diff --git a/cmake/bundle/macOS/AppIcon.icns b/cmake/bundle/macOS/AppIcon.icns new file mode 100644 index 000000000..2f742868f Binary files /dev/null and b/cmake/bundle/macOS/AppIcon.icns differ diff --git a/cmake/bundle/macOS/AppIcon.iconset/icon_128x128.png b/cmake/bundle/macOS/AppIcon.iconset/icon_128x128.png new file mode 100644 index 000000000..9e3f1c345 Binary files /dev/null and b/cmake/bundle/macOS/AppIcon.iconset/icon_128x128.png differ diff --git a/cmake/bundle/macOS/AppIcon.iconset/icon_128x128@2x.png b/cmake/bundle/macOS/AppIcon.iconset/icon_128x128@2x.png new file mode 100644 index 000000000..029dff2d6 Binary files /dev/null and b/cmake/bundle/macOS/AppIcon.iconset/icon_128x128@2x.png differ diff --git a/cmake/bundle/macOS/AppIcon.iconset/icon_16x16.png b/cmake/bundle/macOS/AppIcon.iconset/icon_16x16.png new file mode 100644 index 000000000..77be12380 Binary files /dev/null and b/cmake/bundle/macOS/AppIcon.iconset/icon_16x16.png differ diff --git a/cmake/bundle/macOS/AppIcon.iconset/icon_16x16@2x.png b/cmake/bundle/macOS/AppIcon.iconset/icon_16x16@2x.png new file mode 100644 index 000000000..97f34d8a6 Binary files /dev/null and b/cmake/bundle/macOS/AppIcon.iconset/icon_16x16@2x.png differ diff --git a/cmake/bundle/macOS/AppIcon.iconset/icon_256x256.png b/cmake/bundle/macOS/AppIcon.iconset/icon_256x256.png new file mode 100644 index 000000000..2b264dde0 Binary files /dev/null and b/cmake/bundle/macOS/AppIcon.iconset/icon_256x256.png differ diff --git a/cmake/bundle/macOS/AppIcon.iconset/icon_256x256@2x.png b/cmake/bundle/macOS/AppIcon.iconset/icon_256x256@2x.png new file mode 100644 index 000000000..bbe8f7d94 Binary files /dev/null and b/cmake/bundle/macOS/AppIcon.iconset/icon_256x256@2x.png differ diff --git a/cmake/bundle/macOS/AppIcon.iconset/icon_32x32.png b/cmake/bundle/macOS/AppIcon.iconset/icon_32x32.png new file mode 100644 index 000000000..d04efcd37 Binary files /dev/null and b/cmake/bundle/macOS/AppIcon.iconset/icon_32x32.png differ diff --git a/cmake/bundle/macOS/AppIcon.iconset/icon_32x32@2x.png b/cmake/bundle/macOS/AppIcon.iconset/icon_32x32@2x.png new file mode 100644 index 000000000..f542313e0 Binary files /dev/null and b/cmake/bundle/macOS/AppIcon.iconset/icon_32x32@2x.png differ diff --git a/cmake/bundle/macOS/AppIcon.iconset/icon_512x512.png b/cmake/bundle/macOS/AppIcon.iconset/icon_512x512.png new file mode 100644 index 000000000..920f8d8dc Binary files /dev/null and b/cmake/bundle/macOS/AppIcon.iconset/icon_512x512.png differ diff --git a/cmake/bundle/macOS/AppIcon.iconset/icon_512x512@2x.png b/cmake/bundle/macOS/AppIcon.iconset/icon_512x512@2x.png new file mode 100644 index 000000000..8dbac08ae Binary files /dev/null and b/cmake/bundle/macOS/AppIcon.iconset/icon_512x512@2x.png differ diff --git a/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/Contents.json b/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 000000000..64dc11ee7 --- /dev/null +++ b/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,68 @@ +{ + "images" : [ + { + "filename" : "icon_16x16.png", + "idiom" : "mac", + "scale" : "1x", + "size" : "16x16" + }, + { + "filename" : "icon_16x16@2x.png", + "idiom" : "mac", + "scale" : "2x", + "size" : "16x16" + }, + { + "filename" : "icon_32x32.png", + "idiom" : "mac", + "scale" : "1x", + "size" : "32x32" + }, + { + "filename" : "icon_32x32@2x.png", + "idiom" : "mac", + "scale" : "2x", + "size" : "32x32" + }, + { + "filename" : "icon_128x128.png", + "idiom" : "mac", + "scale" : "1x", + "size" : "128x128" + }, + { + "filename" : "icon_128x128@2x.png", + "idiom" : "mac", + "scale" : "2x", + "size" : "128x128" + }, + { + "filename" : "icon_256x256.png", + "idiom" : "mac", + "scale" : "1x", + "size" : "256x256" + }, + { + "filename" : "icon_256x256@2x.png", + "idiom" : "mac", + "scale" : "2x", + "size" : "256x256" + }, + { + "filename" : "icon_512x512.png", + "idiom" : "mac", + "scale" : "1x", + "size" : "512x512" + }, + { + "filename" : "icon_512x512@2x.png", + "idiom" : "mac", + "scale" : "2x", + "size" : "512x512" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/icon_128x128.png b/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/icon_128x128.png new file mode 100644 index 000000000..9e3f1c345 Binary files /dev/null and b/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/icon_128x128.png differ diff --git a/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png b/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png new file mode 100644 index 000000000..029dff2d6 Binary files /dev/null and b/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/icon_128x128@2x.png differ diff --git a/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/icon_16x16.png b/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/icon_16x16.png new file mode 100644 index 000000000..77be12380 Binary files /dev/null and b/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/icon_16x16.png differ diff --git a/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png b/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png new file mode 100644 index 000000000..97f34d8a6 Binary files /dev/null and b/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/icon_16x16@2x.png differ diff --git a/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/icon_256x256.png b/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/icon_256x256.png new file mode 100644 index 000000000..2b264dde0 Binary files /dev/null and b/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/icon_256x256.png differ diff --git a/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png b/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png new file mode 100644 index 000000000..bbe8f7d94 Binary files /dev/null and b/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/icon_256x256@2x.png differ diff --git a/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/icon_32x32.png b/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/icon_32x32.png new file mode 100644 index 000000000..d04efcd37 Binary files /dev/null and b/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/icon_32x32.png differ diff --git a/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/icon_32x32@2x.png b/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/icon_32x32@2x.png new file mode 100644 index 000000000..f542313e0 Binary files /dev/null and b/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/icon_32x32@2x.png differ diff --git a/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/icon_512x512.png b/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/icon_512x512.png new file mode 100644 index 000000000..920f8d8dc Binary files /dev/null and b/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/icon_512x512.png differ diff --git a/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/icon_512x512@2x.png b/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/icon_512x512@2x.png new file mode 100644 index 000000000..8dbac08ae Binary files /dev/null and b/cmake/bundle/macOS/Assets.xcassets/AppIcon.appiconset/icon_512x512@2x.png differ diff --git a/cmake/bundle/macOS/Assets.xcassets/Contents.json b/cmake/bundle/macOS/Assets.xcassets/Contents.json new file mode 100644 index 000000000..73c00596a --- /dev/null +++ b/cmake/bundle/macOS/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/cmake/bundle/macOS/Info.plist.in b/cmake/bundle/macOS/Info.plist.in new file mode 100644 index 000000000..3beeef9c7 --- /dev/null +++ b/cmake/bundle/macOS/Info.plist.in @@ -0,0 +1,34 @@ + + + + + CFBundleExecutable + ${MACOSX_BUNDLE_EXECUTABLE_NAME} + CFBundleIconFile + ${MACOSX_BUNDLE_ICON_FILE} + CFBundleIdentifier + ${MACOSX_BUNDLE_GUI_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${MACOSX_BUNDLE_BUNDLE_NAME} + CFBundlePackageType + APPL + CFBundleShortVersionString + ${MACOSX_BUNDLE_SHORT_VERSION_STRING} + CFBundleVersion + ${MACOSX_BUNDLE_BUNDLE_VERSION} + NSHighResolutionCapable + + LSMinimumSystemVersion + 10.13 + LSAppNapIsDisabled + + NSCameraUsageDescription + OBS needs to access the camera to enable camera sources to work. + NSMicrophoneUsageDescription + OBS needs to access the microphone to enable audio input. + NSHumanReadableCopyright + (c) 2012-${CURRENT_YEAR} Hugh Bailey + + diff --git a/cmake/bundle/macOS/OBSPublicDSAKey.pem b/cmake/bundle/macOS/OBSPublicDSAKey.pem new file mode 100644 index 000000000..91adb402f --- /dev/null +++ b/cmake/bundle/macOS/OBSPublicDSAKey.pem @@ -0,0 +1,36 @@ +-----BEGIN PUBLIC KEY----- +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 +MGjmuSOlPA1umQsToIcO4g== +-----END PUBLIC KEY----- diff --git a/cmake/bundle/macOS/Plugin-Info.plist.in b/cmake/bundle/macOS/Plugin-Info.plist.in new file mode 100644 index 000000000..27c495176 --- /dev/null +++ b/cmake/bundle/macOS/Plugin-Info.plist.in @@ -0,0 +1,28 @@ + + + + + CFBundleName + ${MACOSX_PLUGIN_BUNDLE_NAME} + CFBundleIdentifier + ${MACOSX_PLUGIN_GUI_IDENTIFIER} + CFBundleVersion + ${MACOSX_PLUGIN_BUNDLE_VERSION} + CFBundleShortVersionString + ${MACOSX_PLUGIN_SHORT_VERSION_STRING} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleExecutable + ${MACOSX_PLUGIN_EXECUTABLE_NAME} + CFBundlePackageType + ${MACOSX_PLUGIN_BUNDLE_TYPE} + CFBundleSupportedPlatforms + + MacOSX + + LSMinimumSystemVersion + 10.13 + NSHumanReadableCopyright + (c) 2012-${CURRENT_YEAR} Hugh Bailey + + diff --git a/cmake/bundle/macOS/Virtualcam-Info.plist.in b/cmake/bundle/macOS/Virtualcam-Info.plist.in new file mode 100644 index 000000000..5bfd67033 --- /dev/null +++ b/cmake/bundle/macOS/Virtualcam-Info.plist.in @@ -0,0 +1,42 @@ + + + + + CFBundleName + ${MACOSX_PLUGIN_BUNDLE_NAME} + CFBundleIdentifier + ${MACOSX_PLUGIN_GUI_IDENTIFIER} + CFBundleVersion + ${MACOSX_PLUGIN_BUNDLE_VERSION} + CFBundleShortVersionString + ${MACOSX_PLUGIN_SHORT_VERSION_STRING} + CFBundleExecutable + obs-mac-virtualcam + CFBundleInfoDictionaryVersion + 6.0 + CFBundlePackageType + ${MACOSX_PLUGIN_BUNDLE_TYPE} + CFBundleSupportedPlatforms + + MacOSX + + LSMinimumSystemVersion + 10.13 + CFPlugInFactories + + 7E950B8C-5E49-4B9E-B7D0-B3608A08E8F6 + PlugInMain + + CFPlugInTypes + + 30010C1C-93BF-11D8-8B5B-000A95AF9C6A + + 7E950B8C-5E49-4B9E-B7D0-B3608A08E8F6 + + + CMIOHardwareAssistantServiceNames + + com.obsproject.obs-mac-virtualcam.server + + + diff --git a/cmake/bundle/macOS/background.tiff b/cmake/bundle/macOS/background.tiff new file mode 100644 index 000000000..454874005 Binary files /dev/null and b/cmake/bundle/macOS/background.tiff differ diff --git a/cmake/bundle/macOS/bundleutils.cmake b/cmake/bundle/macOS/bundleutils.cmake new file mode 100644 index 000000000..7e26870e6 --- /dev/null +++ b/cmake/bundle/macOS/bundleutils.cmake @@ -0,0 +1,175 @@ +if(POLICY CMP0007) + cmake_policy(SET CMP0007 NEW) +endif() +if(POLICY CMP0009) + cmake_policy(SET CMP0009 NEW) +endif() +if(POLICY CMP0011) + cmake_policy(SET CMP0011 NEW) +endif() + +# Add additional search paths for dylibbundler +list(APPEND _FIXUP_BUNDLES "-s \"${CMAKE_INSTALL_PREFIX}/lib\"") +list(APPEND _FIXUP_BUNDLES "-s \"${CMAKE_INSTALL_PREFIX}/Frameworks\"") + +# Unlinked modules need to be supplied manually to dylibbundler + +# Find all modules (plugin and standalone) +file(GLOB _OBS_PLUGINS + "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/PlugIns/*.plugin") +file(GLOB _OBS_SCRIPTING_PLUGINS + "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/PlugIns/*.so") + +# Add modules to fixups +foreach(_OBS_PLUGIN IN LISTS _OBS_PLUGINS) + get_filename_component(PLUGIN_NAME "${_OBS_PLUGIN}" NAME_WLE) + list(APPEND _FIXUP_BUNDLES + "-x \"${_OBS_PLUGIN}/Contents/MacOS/${PLUGIN_NAME}\"") +endforeach() + +if(EXISTS + "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/MacOS/obs-ffmpeg-mux") + list( + APPEND + _FIXUP_BUNDLES + "-x \"${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/MacOS/obs-ffmpeg-mux\"" + ) +endif() + +# Add scripting modules to fixups +foreach(_OBS_PLUGIN IN LISTS _OBS_SCRIPTING_PLUGINS) + list(APPEND _FIXUP_BUNDLES "-x \"${_OBS_PLUGIN}\"") +endforeach() + +# Run dylibbbundler +if(DEFINED ENV{VERBOSE}) + set(_VERBOSE_FLAG "--verbose") +endif() + +if(DEFINED ENV{QUIET}) + set(_QUIET_FLAG "OUTPUT_QUIET") +endif() + +list(REMOVE_DUPLICATES _FIXUP_BUNDLES) +string(REPLACE ";" " " _FIXUP_BUNDLES "${_FIXUP_BUNDLES}") +message(STATUS "OBS: Bundle linked libraries and dependencies") +execute_process( + COMMAND + /bin/sh -c + "${_BUNDLER_COMMAND} -a \"${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}\" -cd -of -q -f ${_FIXUP_BUNDLES} ${_VERBOSE_FLAG}" + ${_QUIET_FLAG}) + +# Find all dylibs, frameworks and other code elements inside bundle +file(GLOB _DYLIBS + "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/Frameworks/*.dylib") +file(GLOB _FRAMEWORKS + "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/Frameworks/*.framework") +file(GLOB_RECURSE _QT_PLUGINS + "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/PlugIns/*.dylib") + +if(EXISTS + "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/MacOS/obs-ffmpeg-mux") + list(APPEND _OTHER_BINARIES + "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/MacOS/obs-ffmpeg-mux") +endif() + +if(EXISTS + "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/PlugIns/obspython.py") + list(APPEND _OTHER_BINARIES + "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/PlugIns/obspython.py") +endif() + +if(EXISTS + "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/Resources/obs-mac-virtualcam.plugin" +) + list( + APPEND + _OTHER_BINARIES + "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/Resources/obs-mac-virtualcam.plugin" + ) +endif() + +# Create libobs symlink for legacy plugin support +execute_process( + COMMAND + /bin/sh -c + "cd \"${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/Frameworks\" && ln -fs libobs.framework/Versions/Current/libobs libobs.0.dylib && ln -fsv libobs.framework/Versions/Current/libobs libobs.dylib" + ${_QUIET_FLAG}) + +# Python potentially leaves __pycache__ directories inside the bundle which will +# break codesigning +if(EXISTS "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/PlugIns/__pycache__") + file(REMOVE_RECURSE + "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/PlugIns/__pycache__") +endif() + +# Codesign all binaries inside-out +message(STATUS "OBS: Codesign dependencies") +if(EXISTS + "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/Frameworks/Sparkle.framework" +) + execute_process( + COMMAND + /usr/bin/codesign --remove-signature + "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/Frameworks/Sparkle.framework/Versions/A/Resources/Autoupdate.app" + ${_VERBOSE_FLAG} ${_QUIET_FLAG}) + execute_process( + COMMAND + /usr/bin/codesign --force --sign "${_CODESIGN_IDENTITY}" --deep --options + runtime + "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/Frameworks/Sparkle.framework/Versions/A/Resources/Autoupdate.app" + ${_VERBOSE_FLAG} ${_QUIET_FLAG}) +endif() +if(EXISTS + "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/Frameworks/Chromium Embedded Framework.framework" +) + set(CEF_HELPER_OUTPUT_NAME "OBS Helper") + set(CEF_HELPER_APP_SUFFIXES ":" " (GPU):.gpu" " (Plugin):.plugin" + " (Renderer):.renderer") + + foreach(_SUFFIXES ${CEF_HELPER_APP_SUFFIXES}) + string(REPLACE ":" ";" _SUFFIXES ${_SUFFIXES}) + list(GET _SUFFIXES 0 _NAME_SUFFIX) + list(GET _SUFFIXES 1 _PLIST_SUFFIX) + + set(_HELPER_OUTPUT_NAME "${CEF_HELPER_OUTPUT_NAME}${_NAME_SUFFIX}") + set(_HELPER_ENTITLEMENT_PLIST "entitlements-helper${_PLIST_SUFFIX}.plist") + + execute_process( + COMMAND + /usr/bin/codesign --remove-signature + "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/Frameworks/OBS Helper${_NAME_SUFFIX}.app" + ${_VERBOSE_FLAG} ${_QUIET_FLAG}) + execute_process( + COMMAND + /usr/bin/codesign --force --sign "${_CODESIGN_IDENTITY}" --deep + --options runtime --entitlements + "${_CODESIGN_ENTITLEMENTS}/entitlements-helper${_PLIST_SUFFIX}.plist" + "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}/Contents/Frameworks/OBS Helper${_NAME_SUFFIX}.app" + ${_VERBOSE_FLAG} ${_QUIET_FLAG}) + endforeach() +endif() +foreach(_DEPENDENCY IN LISTS _OTHER_BINARIES _DYLIBS _FRAMEWORKS _OBS_PLUGINS + _OBS_SCRIPTING_PLUGINS _QT_PLUGINS) + if(NOT IS_SYMLINK "${_DEPENDENCY}") + execute_process(COMMAND /usr/bin/codesign --remove-signature + "${_DEPENDENCY}" ${_VERBOSE_FLAG} ${_QUIET_FLAG}) + execute_process( + COMMAND + /usr/bin/codesign --force --sign "${_CODESIGN_IDENTITY}" --options + runtime --entitlements "${_CODESIGN_ENTITLEMENTS}/entitlements.plist" + "${_DEPENDENCY}" ${_VERBOSE_FLAG} ${_QUIET_FLAG}) + endif() +endforeach() + +# Codesign main app +message(STATUS "OBS: Codesign main app") +execute_process( + COMMAND + /usr/bin/codesign --remove-signature + "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}" ${_VERBOSE_FLAG} ${_QUIET_FLAG}) +execute_process( + COMMAND + /usr/bin/codesign --force --sign "${_CODESIGN_IDENTITY}" --options runtime + --entitlements "${_CODESIGN_ENTITLEMENTS}/entitlements.plist" + "${CMAKE_INSTALL_PREFIX}/${_BUNDLENAME}" ${_VERBOSE_FLAG} ${_QUIET_FLAG}) diff --git a/cmake/bundle/macOS/dylibbundler b/cmake/bundle/macOS/dylibbundler new file mode 100755 index 000000000..20f9836ad Binary files /dev/null and b/cmake/bundle/macOS/dylibbundler differ diff --git a/cmake/bundle/macOS/entitlements-helper.gpu.plist b/cmake/bundle/macOS/entitlements-helper.gpu.plist new file mode 100644 index 000000000..a7a497451 --- /dev/null +++ b/cmake/bundle/macOS/entitlements-helper.gpu.plist @@ -0,0 +1,10 @@ + + + + + com.apple.security.cs.disable-library-validation + + com.apple.security.cs.allow-jit + + + diff --git a/cmake/bundle/macOS/entitlements-helper.plist b/cmake/bundle/macOS/entitlements-helper.plist new file mode 100644 index 000000000..4228cf176 --- /dev/null +++ b/cmake/bundle/macOS/entitlements-helper.plist @@ -0,0 +1,12 @@ + + + + + com.apple.security.cs.allow-unsigned-executable-memory + + com.apple.security.cs.disable-library-validation + + com.apple.security.cs.allow-jit + + + diff --git a/cmake/bundle/macOS/entitlements-helper.plugin.plist b/cmake/bundle/macOS/entitlements-helper.plugin.plist new file mode 100644 index 000000000..7cd9df032 --- /dev/null +++ b/cmake/bundle/macOS/entitlements-helper.plugin.plist @@ -0,0 +1,10 @@ + + + + + com.apple.security.cs.allow-unsigned-executable-memory + + com.apple.security.cs.disable-library-validation + + + diff --git a/cmake/bundle/macOS/entitlements-helper.renderer.plist b/cmake/bundle/macOS/entitlements-helper.renderer.plist new file mode 100644 index 000000000..777b3abd9 --- /dev/null +++ b/cmake/bundle/macOS/entitlements-helper.renderer.plist @@ -0,0 +1,10 @@ + + + + + com.apple.security.cs.allow-jit + + com.apple.security.cs.disable-library-validation + + + diff --git a/cmake/bundle/macOS/entitlements.plist b/cmake/bundle/macOS/entitlements.plist new file mode 100644 index 000000000..516d0d521 --- /dev/null +++ b/cmake/bundle/macOS/entitlements.plist @@ -0,0 +1,17 @@ + + + + + com.apple.security.cs.allow-unsigned-executable-memory + + com.apple.security.device.camera + + com.apple.security.device.audio-input + + com.apple.security.cs.disable-library-validation + + + com.apple.security.cs.allow-dyld-environment-variables + + + diff --git a/cmake/bundle/macOS/package.applescript.in b/cmake/bundle/macOS/package.applescript.in new file mode 100644 index 000000000..4f424df78 --- /dev/null +++ b/cmake/bundle/macOS/package.applescript.in @@ -0,0 +1,66 @@ +on run (volumeName) + tell application "Finder" + tell disk (volumeName as string) + open + + set theXOrigin to @_DMG_WINDOW_X@ + set theYOrigin to @_DMG_WINDOW_Y@ + set theWidth to @_DMG_WINDOW_WIDTH@ + set theHeight to @_DMG_WINDOW_HEIGHT@ + + set theBottomRightX to (theXOrigin + theWidth) + set theBottomRightY to (theYOrigin + theHeight) + set dsStore to "\"" & "/Volumes/" & volumeName & "/" & ".DS_STORE\"" + + tell container window + set current view to icon view + set toolbar visible to false + set statusbar visible to false + set the bounds to {theXOrigin, theYOrigin, theBottomRightX, theBottomRightY} + set statusbar visible to false + set position of every item to {theBottomRightX + 100, 100} + end tell + + set opts to the icon view options of container window + tell opts + set icon size to @_DMG_ICON_SIZE@ + set text size to @_DMG_TEXT_SIZE@ + set arrangement to not arranged + end tell + set background picture of opts to file ".background:@CPACK_DMG_BACKGROUND_FILENAME@" + set position of item "@CPACK_PACKAGE_NAME@.app" to {@_DMG_OBS_X@, @_DMG_OBS_Y@} + set position of item "Applications" to {@_DMG_APP_LINK_X@, @_DMG_APP_LINK_Y@} + close + open + -- Force saving of the size + delay 1 + + tell container window + set statusbar visible to false + set the bounds to {theXOrigin, theYOrigin, theBottomRightX - 10, theBottomRightY - 10} + end tell + end tell + + delay 1 + + tell disk (volumeName as string) + tell container window + set statusbar visible to false + set the bounds to {theXOrigin, theYOrigin, theBottomRightX, theBottomRightY} + end tell + end tell + + --give the finder some time to write the .DS_Store file + delay 3 + + set waitTime to 0 + set ejectMe to false + repeat while ejectMe is false + delay 1 + set waitTime to waitTime + 1 + + if (do shell script "[ -f " & dsStore & " ]; echo $?") = "0" then set ejectMe to true + end repeat + log "waited " & waitTime & " seconds for .DS_STORE to be created." + end tell +end run diff --git a/cmake/bundle/windows/ALL_BUILD.vcxproj.user.in b/cmake/bundle/windows/ALL_BUILD.vcxproj.user.in new file mode 100644 index 000000000..bd888ed79 --- /dev/null +++ b/cmake/bundle/windows/ALL_BUILD.vcxproj.user.in @@ -0,0 +1,43 @@ + + + + $(SolutionDir)rundir\$(Configuration)\bin\64bit\obs64.exe + $(SolutionDir)rundir\$(Configuration)\bin\64bit + WindowsLocalDebugger + + + $(SolutionDir)rundir\$(Configuration)\bin\64bit\obs64.exe + $(SolutionDir)rundir\$(Configuration)\bin\64bit + WindowsLocalDebugger + + + $(SolutionDir)rundir\$(Configuration)\bin\64bit\obs64.exe + $(SolutionDir)rundir\$(Configuration)\bin\64bit + WindowsLocalDebugger + + + $(SolutionDir)rundir\$(Configuration)\bin\64bit\obs64.exe + $(SolutionDir)rundir\$(Configuration)\bin\64bit + WindowsLocalDebugger + + + $(SolutionDir)rundir\$(Configuration)\bin\32bit\obs32.exe + $(SolutionDir)rundir\$(Configuration)\bin\32bit + WindowsLocalDebugger + + + $(SolutionDir)rundir\$(Configuration)\bin\32bit\obs32.exe + $(SolutionDir)rundir\$(Configuration)\bin\32bit + WindowsLocalDebugger + + + $(SolutionDir)rundir\$(Configuration)\bin\32bit\obs32.exe + $(SolutionDir)rundir\$(Configuration)\bin\32bit + WindowsLocalDebugger + + + $(SolutionDir)rundir\$(Configuration)\bin\32bit\obs32.exe + $(SolutionDir)rundir\$(Configuration)\bin\32bit + WindowsLocalDebugger + + \ No newline at end of file diff --git a/cmake/bundle/windows/obs-module.rc.in b/cmake/bundle/windows/obs-module.rc.in new file mode 100644 index 000000000..a071576d0 --- /dev/null +++ b/cmake/bundle/windows/obs-module.rc.in @@ -0,0 +1,24 @@ +1 VERSIONINFO +FILEVERSION ${UI_VERSION_MAJOR},${UI_VERSION_MINOR},${UI_VERSION_PATCH},0 +BEGIN + BLOCK "StringFileInfo" + BEGIN + BLOCK "040904B0" + BEGIN + VALUE "CompanyName", "${OBS_COMPANY_NAME}" + VALUE "FileDescription", "${MODULE_DESCRIPTION}" + VALUE "FileVersion", "${UI_VERSION}" + VALUE "ProductName", "${OBS_PRODUCT_NAME}" + VALUE "ProductVersion", "${UI_VERSION}" + VALUE "Comments", "${OBS_COMMENTS}" + VALUE "LegalCopyright", "${OBS_LEGAL_COPYRIGHT}" + VALUE "InternalName", "${PROJECT_NAME}" + VALUE "OriginalFilename", "${PROJECT_NAME}" + END + END + + BLOCK "VarFileInfo" + BEGIN + VALUE "Translation", 0x0409, 0x04B0 + END +END \ No newline at end of file diff --git a/cmake/bundle/windows/obs-studio.ico b/cmake/bundle/windows/obs-studio.ico new file mode 100644 index 000000000..712737291 Binary files /dev/null and b/cmake/bundle/windows/obs-studio.ico differ