Skip to content

Commit

Permalink
Concat binary files in a way that works on all powershell versions.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lymia committed Dec 18, 2023
1 parent 9d08137 commit d5d120f
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions scripts/ci/build-installer_win32.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ $VERSION = "$( sbt "print version" --error )".Trim()
$FILE_VERSION = "$VERSION".Split("-")[0]
$FILE_VERSION = "$FILE_VERSION.$( git rev-list HEAD --count )"
$INSTALLER_NAME = "MPPatch-Installer_win32_$VERSION.exe"
echo "VERSION=$VERSION"
echo "FILE_VERSION=$FILE_VERSION"
echo "INSTALLER_NAME=$INSTALLER_NAME"

# Build the native-image
echo "Building native-image installer"
Expand Down Expand Up @@ -83,11 +86,10 @@ target/rcedit.exe "target/mppatch-installer-stub.exe" `
--set-version-string "OriginalFilename" "$INSTALLER_NAME" `
--set-icon "scripts/res/mppatch-installer.ico" `
--application-manifest "scripts/res/win32-manifest.xml"
Get-Content "target/mppatch-installer-stub.exe", "target/mppatch-installer-data.dat" -Encoding Byte -Read 1024 `
| Set-Content "target/$INSTALLER_NAME" -Encoding Byte
cmd /c copy /b "target/mppatch-installer-stub.exe"+"target/mppatch-installer-data.dat" "target/$INSTALLER_NAME"

# Create tarball
echo "Creating Windows installer tarball..."
cd target
tar --gzip -cv -f "mppatch_ci_installer-win32.tar.gz" "target/$INSTALLER_NAME"
tar --gzip -cv -f "mppatch_ci_installer-win32.tar.gz" "$INSTALLER_NAME"
cd ..

0 comments on commit d5d120f

Please sign in to comment.