diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-04-19 21:47:57 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-19 21:47:57 +0200 |
commit | c7563a5f7c00e389b2e2af699ea07d109bfb5ef3 (patch) | |
tree | b090ba08082b4f92f0bd477c63608aba1262b73e | |
parent | 3ff3c335bcdc7a6037881a7b74f596d8de4b21ba (diff) | |
parent | 9462dd3ddc55e3e48e47ca794c05e11cabb6226e (diff) | |
download | PrismLauncher-c7563a5f7c00e389b2e2af699ea07d109bfb5ef3.tar.gz PrismLauncher-c7563a5f7c00e389b2e2af699ea07d109bfb5ef3.tar.bz2 PrismLauncher-c7563a5f7c00e389b2e2af699ea07d109bfb5ef3.zip |
Merge pull request #454 from kthchew/feature/hardened-runtime
-rw-r--r-- | .github/workflows/build.yml | 3 | ||||
-rw-r--r-- | cmake/MacOSXBundleInfo.plist.in | 4 | ||||
-rw-r--r-- | program_info/App.entitlements | 12 |
3 files changed, 18 insertions, 1 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3f2c07a5..e6d1189b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -115,7 +115,7 @@ jobs: - name: Configure CMake (Linux) if: runner.os == 'Linux' run: | - cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DLauncher_BUILD_PLATFORM=Linux -G Ninja + cmake -S . -B ${{ env.BUILD_DIR }} -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=${{ inputs.build_type }} -DENABLE_LTO=ON -DLauncher_BUILD_PLATFORM=Linux -G Ninja ## # BUILD @@ -143,6 +143,7 @@ jobs: cd ${{ env.INSTALL_DIR }} chmod +x "PolyMC.app/Contents/MacOS/polymc" + sudo codesign --sign - --deep --force --entitlements "../program_info/App.entitlements" --options runtime "PolyMC.app/Contents/MacOS/polymc" tar -czf ../PolyMC.tar.gz * - name: Package (Windows) diff --git a/cmake/MacOSXBundleInfo.plist.in b/cmake/MacOSXBundleInfo.plist.in index 050123ee..0e3a43c6 100644 --- a/cmake/MacOSXBundleInfo.plist.in +++ b/cmake/MacOSXBundleInfo.plist.in @@ -2,6 +2,10 @@ <!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>NSCameraUsageDescription</key> + <string>A Minecraft mod wants to access your camera.</string> + <key>NSMicrophoneUsageDescription</key> + <string>A Minecraft mod wants to access your microphone.</string> <key>NSPrincipalClass</key> <string>NSApplication</string> <key>NSHighResolutionCapable</key> diff --git a/program_info/App.entitlements b/program_info/App.entitlements new file mode 100644 index 00000000..1850b990 --- /dev/null +++ b/program_info/App.entitlements @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> +<plist version="1.0"> +<dict> + <key>com.apple.security.cs.disable-library-validation</key> + <true/> + <key>com.apple.security.device.audio-input</key> + <true/> + <key>com.apple.security.device.camera</key> + <true/> +</dict> +</plist> |