2020-03-27 13:37:27 +00:00
|
|
|
#!/bin/sh -ex
|
|
|
|
|
|
|
|
# BUILD_blablabla is Azure specific, so we wrap it for portability
|
|
|
|
ARTIFACT_DIR="$BUILD_ARTIFACTSTAGINGDIRECTORY"
|
|
|
|
|
|
|
|
# Remove unecessary files
|
2021-04-04 08:34:12 +00:00
|
|
|
rm -f ./bin/rpcs3.exp ./bin/rpcs3.lib ./bin/rpcs3.pdb ./bin/vc_redist.x64.exe
|
2023-04-30 10:37:03 +00:00
|
|
|
rm -rf ./bin/git
|
2020-03-27 13:37:27 +00:00
|
|
|
|
2023-12-06 17:52:27 +00:00
|
|
|
# Prepare compatibility and SDL database for packaging
|
2023-08-26 10:24:47 +00:00
|
|
|
mkdir ./bin/config
|
|
|
|
mkdir ./bin/config/input_configs
|
|
|
|
curl -fsSL 'https://raw.githubusercontent.com/gabomdq/SDL_GameControllerDB/master/gamecontrollerdb.txt' 1> ./bin/config/input_configs/gamecontrollerdb.txt
|
2023-08-02 09:30:00 +00:00
|
|
|
curl -fsSL 'https://rpcs3.net/compatibility?api=v1&export' | iconv -t UTF-8 1> ./bin/GuiConfigs/compat_database.dat
|
2023-12-06 17:52:27 +00:00
|
|
|
|
|
|
|
# Download SSL certificate (not needed with CURLSSLOPT_NATIVE_CA)
|
|
|
|
#curl -fsSL 'https://curl.haxx.se/ca/cacert.pem' 1> ./bin/cacert.pem
|
2020-03-27 13:37:27 +00:00
|
|
|
|
|
|
|
# Package artifacts
|
|
|
|
7z a -m0=LZMA2 -mx9 "$BUILD" ./bin/*
|
|
|
|
|
|
|
|
# Generate sha256 hashes
|
|
|
|
# Write to file for GitHub releases
|
|
|
|
sha256sum "$BUILD" | awk '{ print $1 }' | tee "$BUILD.sha256"
|
|
|
|
echo "$(cat "$BUILD.sha256");$(stat -c %s "$BUILD")B" > GitHubReleaseMessage.txt
|
|
|
|
|
|
|
|
# Move files to publishing directory
|
2021-04-04 08:34:12 +00:00
|
|
|
cp -- "$BUILD" "$ARTIFACT_DIR"
|
|
|
|
cp -- "$BUILD.sha256" "$ARTIFACT_DIR"
|