Skip to content

Commit 640b828

Browse files
committed
Setup file
1 parent 371aa39 commit 640b828

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

build

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ cat > "dist/Contents/Info.plist" <<EOF
4444
EOF
4545

4646
touch dist/Contents/MacOS/launcher.sh
47+
touch dist/Contents/MacOS/setup.sh
4748

48-
chmod 755 dist/Contents/MacOS/launcher.sh
49+
chmod 755 dist/Contents/MacOS/*
4950
chmod 755 dist/Contents/runtime/bin/*
5051

5152
cat > "dist/Contents/MacOS/launcher.sh" <<EOF
@@ -59,6 +60,17 @@ export PYTHONPATH="\$RUNTIME_DIR"
5960
\$RUNTIME_DIR/bin/python3 "\$SOURCE_DIR/main.py" "\$@"
6061
EOF
6162

63+
cat > "dist/Contents/MacOS/setup.sh" <<EOF
64+
#!/bin/bash
65+
66+
DIR="\$(cd "\$(dirname "\$0")" && pwd)"
67+
RUNTIME_DIR="\$DIR/../runtime"
68+
SOURCE_DIR="\$DIR/../src"
69+
70+
export PYTHONPATH="\$RUNTIME_DIR"
71+
\$RUNTIME_DIR/bin/python3 "\$SOURCE_DIR/main.py" --setup
72+
EOF
73+
6274
mv dist GSInstaller.app
6375
codesign --deep --force --sign - "GSInstaller.app"
6476
ditto -c -k --keepParent "GSInstaller.app" GSInstallerMac.zip

src/installer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ def install(installConfigs: dict[str, str]) -> None:
3434
makedirs(f"{datapath}/temp", exist_ok=True)
3535

3636
run([
37-
"/Applications/GraphScript.app/Contents/MacOS/launcher",
37+
"/Applications/GraphScript.app/Contents/MacOS/setup",
3838
"--setup",
3939
])
4040

0 commit comments

Comments
 (0)