-
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
eb90826
commit 2543977
Showing
5 changed files
with
82 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
#!/usr/bin/perl | ||
|
||
|
||
#BEGIN APPLY ENTITLEMENTS | ||
UNITYENTITLEMENTSTOOL: | ||
my $EntitlementsPublishFile = $ARGV[0]; | ||
my $EntitlementsPublishTarget = $ARGV[1]; | ||
my $EntitlementsPublishFileName = $ARGV[0]; chop($EntitlementsPublishFileName); chop($EntitlementsPublishFileName); chop($EntitlementsPublishFileName); | ||
my $EntitlementsPackageFile = $EntitlementsPublishFileName . 'pkg'; | ||
if ((($EntitlementsPublishTarget eq "standaloneOSXIntel") || ($EntitlementsPublishTarget eq "standaloneOSXUniversal") || ($EntitlementsPublishTarget eq "Unsupported build target!")) && ($EntitlementsPublishFile =~ /.app$/) && (-d $EntitlementsPublishFile) && ($^O == "darwin")) { | ||
system("/bin/chmod -R a+rwx \"$EntitlementsPublishFile\""); | ||
system("defaults write \"$EntitlementsPublishFile/Contents/Info.plist\" \"CFBundleIdentifier\" -string \"com.finoldigital.CardGameSimulator\""); | ||
system("defaults write \"$EntitlementsPublishFile/Contents/Info.plist\" \"LSApplicationCategoryType\" -string \"public.app-category.card-games\""); | ||
system("defaults write \"$EntitlementsPublishFile/Contents/Info.plist\" \"CFBundleVersion\" -string \"1.3.0\""); | ||
system("defaults write \"$EntitlementsPublishFile/Contents/Info.plist\" \"CFBundleShortVersionString\" -string \"1.3.0\""); | ||
system("find \"$jEntitlementsPublishFile\" -name \*.meta -exec rm -r \"{{}}\" \\;"); | ||
system("/usr/sbin/chown -RH \"finoldigital:staff\" \"$EntitlementsPublishFile\""); | ||
system("/bin/chmod -RH u+w,go-w,a+rX \"$EntitlementsPublishFile\""); | ||
my $CodesignEnvironment = $ENV{'CODESIGN_ALLOCATE'}; | ||
$ENV{'CODESIGN_ALLOCATE'}="/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate"; | ||
recursiveCodesign("$EntitlementsPublishFile/Contents/Frameworks"); | ||
recursiveCodesign("$EntitlementsPublishFile/Contents/Plugins"); | ||
system("/usr/bin/codesign --force --timestamp=none --sign \"Developer ID Application: Finol Digital LLC (49G524X5NY)\" --entitlements \"/Users/finoldigital/Documents/GitHub/Card-Game-Simulator/Assets/Editor/entitlements.entitlements\" \"$EntitlementsPublishFile\""); | ||
system("rm -R \"$EntitlementsPublishFileName (Untouched).app\""); | ||
system("cp -R \"$EntitlementsPublishFile\" \"$EntitlementsPublishFileName (Untouched).app\""); | ||
system("/usr/bin/productbuild --component \"$EntitlementsPublishFile\" /Applications --sign \"3rd Party Mac Developer Application: Finol Digital LLC (49G524X5NY)\" --product \"$EntitlementsPublishFile/Contents/Info.plist\" \"$EntitlementsPackageFile\""); | ||
$ENV{'CODESIGN_ALLOCATE'}=$CodesignEnvironment; | ||
} | ||
|
||
sub recursiveCodesign { | ||
my $dirName = shift; | ||
opendir my($dh), $dirName or return; | ||
my @files = readdir($dh); | ||
closedir $dh; | ||
foreach my $currentFile (@files) { | ||
next if $currentFile =~ /^\.{1,2}$/; | ||
if ( lc($currentFile) =~ /.bundle$/ or lc($currentFile) =~ /.dylib$/ or lc($currentFile) =~ /.a$/ or lc($currentFile) =~ /.so$/ or lc($currentFile) =~ /.lib$/ or (-f "$dirName/$currentFile" && $currentFile =~ /^[^.]*$/ && `file "$dirName/$currentFile"` =~ /Mach-O/) ) { | ||
system("/usr/bin/codesign --force --timestamp=none --sign \"Developer ID Application: Finol Digital LLC (49G524X5NY)\" --entitlements \"/Users/finoldigital/Documents/GitHub/Card-Game-Simulator/Assets/Editor/entitlements.entitlements\" \"$dirName/$currentFile\""); | ||
} | ||
if (-d "$dirName/$currentFile") { | ||
recursiveCodesign("$dirName/$currentFile"); | ||
} | ||
} | ||
} | ||
#END APPLY ENTITLEMENTS | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
<?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.application-identifier</key> | ||
<string>com.finoldigital.CardGameSimulator</string> | ||
<key>com.apple.security.app-sandbox</key> | ||
<true/> | ||
<key>com.apple.security.network.client</key> | ||
<true/> | ||
<key>com.apple.security.network.server</key> | ||
<true/> | ||
</dict> | ||
</plist> |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.