Skip to content

Commit 409e50b

Browse files
packaging script
1 parent 430e2ca commit 409e50b

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.DS_Store
22
*.dSYM
33
assets
4-
scripts
4+
release
55
AppBundleExe
66
Install_BO3MacFix
77
*.dylib

installer/installer.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ nextaction_t StartInstall() {
149149
memset(sourcePath, 0, PATH_MAX);
150150
strncat(sourcePath, baseDirPath, PATH_MAX);
151151
strncat(sourcePath, "BO3MacFix.dylib", PATH_MAX);
152-
if (chmod(sourcePath, 0755) != 0) { // rwxr-xr-x
152+
if (chmod(sourcePath, 0644) != 0) { // rwxr-xr-x
153153
printf("failed (chmod: %i).\n\n", errno);
154154
printf("Press ENTER to continue.\n");
155155
getchar();

scripts/package.sh

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
3+
# prepare the staging folder
4+
echo Preparing folder...
5+
rm -rf staging
6+
mkdir staging
7+
mkdir staging/BO3MacFix
8+
9+
# copy our compiled binaries
10+
echo Copying binaries...
11+
cp BO3MacFix.dylib staging/BO3MacFix/BO3MacFix.dylib
12+
cp installer/Install_BO3MacFix staging/BO3MacFix/Install_BO3MacFix
13+
cp launcher/AppBundleExe staging/BO3MacFix/AppBundleExe
14+
15+
# copy the binary assets (c2m)
16+
echo Copying assets...
17+
cp -r assets/* staging/BO3MacFix
18+
19+
# set the permissions permissions
20+
echo Setting permissions...
21+
chmod 0644 staging/BO3MacFix/BO3MacFix.dylib
22+
chmod 0755 staging/BO3MacFix/Install_BO3MacFix
23+
chmod 0755 staging/BO3MacFix/AppBundleExe
24+
25+
# make a release tgz file
26+
mkdir release
27+
cd staging
28+
echo Compressing files...
29+
tar -czvf ../release/BO3MacFix.tar.gz BO3MacFix
30+
cd ..

0 commit comments

Comments
 (0)