summaryrefslogtreecommitdiff
path: root/build.sh
diff options
context:
space:
mode:
authorRaindropsSys <contact@minteck.org>2023-09-03 14:39:50 +0200
committerRaindropsSys <contact@minteck.org>2023-09-03 14:39:50 +0200
commit153d21ace9801ac665e2d7f99c967147d1214f29 (patch)
treef363dccf520fbc2c1670d2308b73294fa9ab5676 /build.sh
parent6a20ab31ef4d9f6bb0e008b9f1b8d3fbeb6bd956 (diff)
downloadblocks-153d21ace9801ac665e2d7f99c967147d1214f29.tar.gz
blocks-153d21ace9801ac665e2d7f99c967147d1214f29.tar.bz2
blocks-153d21ace9801ac665e2d7f99c967147d1214f29.zip
Updated 16 files and added 5 files (automated)
Diffstat (limited to 'build.sh')
-rwxr-xr-xbuild.sh24
1 files changed, 15 insertions, 9 deletions
diff --git a/build.sh b/build.sh
index ad10b5a..0ef2218 100755
--- a/build.sh
+++ b/build.sh
@@ -3,34 +3,40 @@ source ./venv/bin/activate
rm -rf ./dist ./_temp
mkdir -p ./dist/darwin-arm64 ./dist/darwin-x64 ./dist/win32 ./dist/linux-arm64 ./dist/linux-x64 ./_temp
-podman machine start
-ssh -i ~/.ssh/podman-machine-default -R 10000:$(hostname):22 -p $(podman machine --log-level=debug ssh -- exit 2>&1 | grep Executing | awk {'print $8'}) core@localhost sshfs -p 10000 $USER@127.0.0.1:/Volumes/Projects /mnt/Projects&
+#podman machine start
+#ssh -i ~/.ssh/podman-machine-default -R 10000:$(hostname):22 -p $(podman machine --log-level=debug ssh -- exit 2>&1 | grep Executing | awk {'print $8'}) core@localhost sshfs -p 10000 $USER@127.0.0.1:/Volumes/Projects /mnt/Projects&
# macOS
cp -rv ./assets ./_temp/assets
-pyinstaller --distpath ./dist/darwin-arm64 --workpath ./_temp --noconfirm --specpath ./_temp -n Blocks --add-data assets:assets -p src -s --noconsole --osx-bundle-identifier dev.equestria.blocks --target-architecture arm64 main.py
+pyinstaller --distpath ./dist/darwin-arm64 --workpath ./_temp --noconfirm --specpath ./_temp -n Blocks --add-data assets:assets -p src -s --noconsole --osx-bundle-identifier dev.equestria.blocks -i ./assets/textures/icon-mac.icns --target-architecture arm64 main.py
rm -rf ./_temp
+
+source ./venv_x86/bin/activate
mkdir -p ./_temp
cp -rv ./assets ./_temp/assets
-pyinstaller --distpath ./dist/darwin-x64 --workpath ./_temp --noconfirm --specpath ./_temp -n Blocks --add-data assets:assets -p src -s --noconsole --osx-bundle-identifier dev.equestria.blocks --target-architecture x86_64 main.py
+arch -x86_64 pyinstaller --distpath ./dist/darwin-x64 --workpath ./_temp --noconfirm --specpath ./_temp -n Blocks --add-data assets:assets -p src -s --noconsole --osx-bundle-identifier dev.equestria.blocks -i ./assets/textures/icon-mac.icns --target-architecture x86_64 main.py
rm -rf ./_temp
+source ./venv_x86/bin/activate
+exit
+
# Linux
mkdir -p ./_temp
cp -rv ./assets ./_temp/assets
podman start blocks-build
-podman exec blocks-build bash -c "cd /blocks && pyinstaller --distpath ./dist/linux-arm64 --workpath ./_temp --noconfirm --specpath ./_temp -n Blocks --add-data assets:assets -p src -s --noconsole --onefile main.py"
+podman exec blocks-build bash -c "cd /blocks && pyinstaller --distpath ./dist/linux-arm64 --workpath ./_temp --noconfirm --specpath ./_temp -n Blocks --add-data assets:assets -p src -s --noconsole --hidden-import=pygame -i ./assets/textures/icon.png --onefile main.py"
rm -rf ./_temp
podman stop blocks-build
podman machine stop
mkdir -p ./_temp
cp -rv ./assets ./_temp/assets
-ssh zephyrheights sshfs $USER@192.168.1.23:/Volumes/Projects/blocks /blocks && ssh zephyrheights sshfs $USER@192.168.1.23:/Volumes/Projects/blocks /blocks
-ssh zephyrheights 'bash -c "cd /blocks && pyinstaller --distpath ./dist/linux-x64 --workpath ./_temp --noconfirm --specpath ./_temp -n Blocks --add-data assets:assets -p src -s --noconsole --onefile main.py && cd / && umount /blocks"'
+ssh zephyrheights umount -lf /blocks
+ssh zephyrheights sshfs $USER@192.168.1.23:/Volumes/Projects/blocks /blocks
+ssh zephyrheights 'bash -c "cd /blocks && pyinstaller --distpath ./dist/linux-x64 --workpath ./_temp --noconfirm --specpath ./_temp -n Blocks --add-data assets:assets -p src -s --noconsole --hidden-import=pygame -i ./assets/textures/icon.png --onefile main.py && cd / && umount /blocks"'
rm -rf ./_temp
# Windows
mkdir -p ./_temp
cp -rv ./assets ./_temp/assets
-wine64 $PWD/win32/Scripts/pyinstaller.exe --distpath ./dist/win32 --workpath ./_temp --noconfirm --specpath ./_temp -n Blocks --add-data "assets;assets" -p src --noconsole --onefile main.py
-rm -rf ./_temp \ No newline at end of file
+wine64 $PWD/win32/Scripts/pyinstaller.exe --distpath ./dist/win32 --workpath ./_temp --noconfirm --specpath ./_temp -n Blocks --add-data "assets;assets" -p src --noconsole -i ./assets/textures/icon.ico --onefile main.py
+rm -rf ./_temp