mirror of
https://gitlab.com/kelteseth/ScreenPlay.git
synced 2024-11-21 18:22:29 +01:00
Add basic macos dmg installer
Fix inverted fat bin check
This commit is contained in:
parent
c5d2871440
commit
c8e8a92897
@ -1,22 +1,41 @@
|
||||
message(STATUS "[DMG INSTALLER ENABLED]: Configuring. This can take some time...")
|
||||
|
||||
|
||||
set(CPACK_PACKAGE_VENDOR "Elias Steurer Tachiom")
|
||||
set(CPACK_PACKAGE_NAME "ScreenPlay")
|
||||
set(CPACK_PACKAGE_CONTACT "Elias Steurer <eli@kelteseth.com>")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "ScreenPlay is an Open Source Live-Wallpaper app for Windows and OSX. ")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/README.md")
|
||||
set(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
|
||||
set(CPACK_PACKAGE_VERSION_MAJOR ${PROJECT_VERSION_MAJOR})
|
||||
set(CPACK_PACKAGE_VERSION_MINOR ${PROJECT_VERSION_MINOR})
|
||||
set(CPACK_PACKAGE_VERSION_PATCH ${PROJECT_VERSION_PATCH})
|
||||
|
||||
set(CPACK_GENERATOR "DragNDrop")
|
||||
set(CPACK_DMG_FORMAT "UDBZ")
|
||||
set(CPACK_DMG_VOLUME_NAME "ScreenPlay")
|
||||
set(MACOSX_BUNDLE_BUNDLE_NAME ${CPACK_PACKAGE_NAME})
|
||||
set(MACOSX_BUNDLE_BUNDLE_GUI_IDENTIFIER "app.screenplay.screenplay")
|
||||
set(CPACK_DMG_VOLUME_NAME ${CPACK_PACKAGE_NAME})
|
||||
set(CPACK_SYSTEM_NAME "OSX")
|
||||
set(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/ScreenPlay/assets/icons/app.ico")
|
||||
|
||||
set(CPACK_COMPONENTS_GROUPING IGNORE)
|
||||
set(CPACK_PACKAGE_NAME "ScreenPlay")
|
||||
set(CPACK_PACKAGING_INSTALL_PREFIX "/")
|
||||
set(CPACK_PACKAGE_FILE_NAME "ScreenPlay-Installer")
|
||||
set(CPACK_PACKAGE_VENDOR "Elias Steurer")
|
||||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "${PROJECT_DESCRIPTION}")
|
||||
set(CPACK_PACKAGE_DIRECTORY "${CMAKE_BINARY_DIR}")
|
||||
set(CPACK_COMPONENTS_ALL "ScreenPlayComponent")
|
||||
set(CPACK_ARCHIVE_COMPONENT_INSTALL ON)
|
||||
set(CPACK_COMPONENTS_ALL_IN_ONE_PACKAGE ON)
|
||||
|
||||
include(CPack)
|
||||
set(MACOSX_BUNDLE_BUNDLE_VERSION "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
|
||||
set(MACOSX_BUNDLE_ICON_FILE "${CMAKE_SOURCE_DIR}/CMake/exampleApp.icns")
|
||||
set(CPACK_DMG_DS_STORE_SETUP_SCRIPT "${CMAKE_SOURCE_DIR}/CMake/DS_Store.scpt")
|
||||
set(CPACK_DMG_BACKGROUND_IMAGE "${CMAKE_SOURCE_DIR}/CMake/dmg_background.png")
|
||||
set(MACOSX_BUNDLE_INFO_PLIST "${CMAKE_SOURCE_DIR}/CMake/MacOSXBundleInfo.plist.in")
|
||||
|
||||
set_source_files_properties(${CMAKE_SOURCE_DIR}/CMake/exampleApp.icns PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
|
||||
|
||||
# Install all files from /bin
|
||||
install(
|
||||
DIRECTORY "${CMAKE_BINARY_DIR}/bin/"
|
||||
COMPONENT ScreenPlay
|
||||
DESTINATION "./")
|
||||
COMPONENT ScreenPlayComponent
|
||||
DESTINATION "./")
|
||||
|
||||
include(CPack)
|
||||
|
41
CMake/DS_Store.scpt
Normal file
41
CMake/DS_Store.scpt
Normal file
@ -0,0 +1,41 @@
|
||||
on run argv
|
||||
-- Constants for window dimensions
|
||||
|
||||
set BG_W to 780
|
||||
set BG_H to 390
|
||||
set TITLE_BAR_H to 22
|
||||
|
||||
set diskImage to item 1 of argv
|
||||
|
||||
tell application "Finder"
|
||||
tell disk diskImage
|
||||
-- Must call open and close to set window options later
|
||||
open
|
||||
-- Setup background and icon arrangement
|
||||
set current view of container window to icon view
|
||||
set theViewOptions to the icon view options of container window
|
||||
-- Note: CMake automatically renames the file to background.<ext>
|
||||
set background picture of theViewOptions to file ".background:background.png"
|
||||
set arrangement of theViewOptions to not arranged
|
||||
set icon size of theViewOptions to 72
|
||||
|
||||
-- Attempt to hide sidebar and toolbar
|
||||
set toolbar visible of container window to false
|
||||
set statusbar visible of container window to false
|
||||
set sidebar width of container window to 0
|
||||
|
||||
-- Get current position of the window
|
||||
set {currentX, currentY} to position of container window
|
||||
-- Set the new bounds of the window
|
||||
set bounds of container window to {currentX, currentY, currentX + BG_W, currentY + BG_H + TITLE_BAR_H}
|
||||
-- Set icon positions
|
||||
set position of item "ScreenPlay.app" to {137, 99}
|
||||
set position of item "Applications" to {287, 99}
|
||||
|
||||
-- Update and apply changes
|
||||
update without registering applications
|
||||
delay 5
|
||||
close
|
||||
end tell
|
||||
end tell
|
||||
end run
|
36
CMake/MacOSXBundleInfo.plist.in
Normal file
36
CMake/MacOSXBundleInfo.plist.in
Normal file
@ -0,0 +1,36 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>English</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>${MACOSX_BUNDLE_EXECUTABLE_NAME}</string>
|
||||
<key>CFBundleGetInfoString</key>
|
||||
<string>${MACOSX_BUNDLE_INFO_STRING}</string>
|
||||
<key>CFBundleIconFile</key>
|
||||
<string>${MACOSX_BUNDLE_ICON_FILE}</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleLongVersionString</key>
|
||||
<string>${MACOSX_BUNDLE_LONG_VERSION_STRING}</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>${MACOSX_BUNDLE_BUNDLE_VERSION}</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>${MACOSX_BUNDLE_COPYRIGHT}</string>
|
||||
<key>NSHighResolutionCapable</key>
|
||||
<string>True</string>
|
||||
<key>NSSupportsAutomaticGraphicsSwitching</key>
|
||||
<true/>
|
||||
</dict>
|
||||
</plist>
|
BIN
CMake/dmg_background.png
Executable file
BIN
CMake/dmg_background.png
Executable file
Binary file not shown.
After Width: | Height: | Size: 339 KiB |
@ -200,16 +200,19 @@ def listfiles(path):
|
||||
|
||||
def check_universal_binary():
|
||||
dir = 'build-64-osx-universal-release/bin/ScreenPlay.app/Contents'
|
||||
path = Path.joinpath(repo_root_path(), dir).absolute()
|
||||
path = Path(repo_root_path()).joinpath(dir).absolute()
|
||||
print(f"Checking files at: {path}")
|
||||
files = listfiles(str(path))
|
||||
none_fat_found = False
|
||||
none_fat_files = []
|
||||
for file in files:
|
||||
out = run_and_capture_output(f"lipo -info {file}")
|
||||
if out.startswith('Non-fat'):
|
||||
print(out)
|
||||
none_fat_found = True
|
||||
none_fat_files.append(file)
|
||||
if none_fat_found:
|
||||
print("✅ All files are a universal binaries")
|
||||
print("❌ None universal binaries found")
|
||||
for file in none_fat_files:
|
||||
print(f"❌ {file}")
|
||||
else:
|
||||
print("❌ None universal binaries found")
|
||||
print("✅ All files are a universal binaries")
|
Loading…
Reference in New Issue
Block a user