diff --git a/scripts/build-windows.ps1 b/scripts/build-windows.ps1 new file mode 100644 index 0000000..6146210 --- /dev/null +++ b/scripts/build-windows.ps1 @@ -0,0 +1 @@ +cargo build --release --target x86_64-pc-windows-msvc diff --git a/scripts/package-linux.sh b/scripts/package-linux.sh index b8e1e5e..41d9d61 100755 --- a/scripts/package-linux.sh +++ b/scripts/package-linux.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash +ARCH=x86_64 + APP_DIR=platforms/linux/MartianChess.AppDir/ # Copy binary to build dir @@ -18,6 +20,6 @@ cp -f $LIB_DIR/* $PACKAGE_LIB_DIR/ cp -rf assets $APP_DIR/ # Build AppImage file -DEST_DIR=packages/MartianChess.AppImage -ARCH=x86_64 -appimagetool $APP_DIR $DEST_DIR +PACKAGE_FILE=MartianChess-v1.0-linux.AppImage +DEST_FILE=packages/$PACKAGE_FILE +appimagetool $APP_DIR $DEST_FILE \ No newline at end of file diff --git a/scripts/package-macos.sh b/scripts/package-macos.sh index e8f81c3..8696eec 100755 --- a/scripts/package-macos.sh +++ b/scripts/package-macos.sh @@ -35,7 +35,8 @@ install_name_tool -change @rpath/libfmod.dylib "@loader_path/../Frameworks/libfm install_name_tool -change @rpath/libfmodstudio.dylib "@loader_path/../Frameworks/libfmodstudio.dylib" "$GAME/MartianChess" # Build dmg file -rm -f packages/martian_chess.dmg +PACKAGE_FILE="packages/MartianChess-v1.0-macos.dmg" +rm -f $PACKAGE_FILE create-dmg \ --volname "Martian Chess" \ --volicon "media/MartianChess.icns" \ @@ -46,6 +47,6 @@ create-dmg \ --icon "$NAME" 200 190 \ --hide-extension "$NAME" \ --app-drop-link 600 185 \ - "packages/Martian Chess.dmg" \ + $PACKAGE_FILE \ ./platforms/macos/ diff --git a/scripts/package-windows.ps1 b/scripts/package-windows.ps1 index cdc7f41..44e1fd4 100644 --- a/scripts/package-windows.ps1 +++ b/scripts/package-windows.ps1 @@ -1,11 +1,11 @@ -cargo build --release - -Copy-Item -Force "./target/release/martian-chess.exe" "./target/release/MartianChess.exe" +Copy-Item -Force "./target/x86_64-pc-windows-msvc/release/martian-chess.exe" "./platforms/windows/MartianChess.exe" +Copy-Item -Force "./lib/windows/*" "./platforms/windows/" +Copy-Item -Force -Recursive "./assets" "./platforms/windows" $compress = @{ - Path = "./target/release/MartianChess.exe", "./fmod_vc.lib", "./fmodstudio_vc.lib", "fmodstudio.dll", "fmod.dll", "./assets" + Path = "./platforms/windows/*" CompressionLevel = "Optimal" - DestinationPath = "./packages/MartianChess-windows.zip" + DestinationPath = "./packages/MartianChess-v1.0-windows.zip" } Compress-Archive @compress \ No newline at end of file