diff options
author | Charadon <dev@iotib.net> | 2022-09-26 18:00:17 -0400 |
---|---|---|
committer | Charadon <dev@iotib.net> | 2022-09-26 18:00:17 -0400 |
commit | 3fd16f38f66855f706e75776311dc2529c62e0f2 (patch) | |
tree | 3dedc3cefcf3497f3009ff434635579a2b3734fe | |
parent | 1213f42cc1e0d8ab1db1a33ccaf7c85923e2feb3 (diff) | |
download | Pong-C-3fd16f38f66855f706e75776311dc2529c62e0f2.tar.gz |
distribute.sh: Made Windows part of script try to make self extracting archive, and upped compression level on tarball
-rwxr-xr-x | distribute.sh | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/distribute.sh b/distribute.sh index c67faa9..8e41751 100755 --- a/distribute.sh +++ b/distribute.sh @@ -36,9 +36,16 @@ cd "$CONFIG_INSTALL_PREFIX" # Tarball the finish result! if [ "$WINDOWS" = "true" ]; then - zip -r Pong_"$(uname)-$(uname -r)-$(uname -m)".zip -- * + if [ -f "/c/Program Files/7-Zip/7z.exe" ]; + then # Try to use 7z's self extracting feature if possible. + ARCHIVE_NAME="Pong_$(uname -s)-$(uname -r)" + SEVENZIP="/c/Program Files/7-Zip/7z.exe" + "$SEVENZIP" a -sfx7z.sfx "$ARCHIVE_NAME".exe -- * + else # If not, just create a standard zip file. + zip -9 -r "$ARCHIVE_NAME".zip -- * + fi exit 0 else rm libs/libGL* # Remove OpenGL as it conflicts with graphics drivers. - bsdtar -caf ../Pong_"$(uname -s)-$(uname -r)-$(uname -m)".txz -- * + bsdtar --options xz:compression-force=9 -caf ../Pong_"$(uname -s)-$(uname -r)-$(uname -m)".txz -- * fi |