mirror of
https://github.com/LegacyUpdate/LegacyUpdate.git
synced 2025-01-22 06:01:50 -05:00
Add script to patch Debian's NSIS with i486-capable binaries
This commit is contained in:
parent
12648d0fbd
commit
cff8713162
2 changed files with 36 additions and 0 deletions
1
.github/workflows/build.yml
vendored
1
.github/workflows/build.yml
vendored
|
@ -38,6 +38,7 @@ jobs:
|
|||
run: |
|
||||
sudo apt-get update -q
|
||||
sudo apt-get install -qy make nsis nsis-pluginapi mingw-w64-i686-dev cabextract
|
||||
./build/fix-nsis.sh
|
||||
|
||||
- name: Install MinGW toolchain
|
||||
run: |
|
||||
|
|
35
build/fix-nsis.sh
Normal file
35
build/fix-nsis.sh
Normal file
|
@ -0,0 +1,35 @@
|
|||
#!/bin/bash
|
||||
# Fixes NSIS binaries so they run on Pentium/486. Debian's build of NSIS is compiled with MinGW,
|
||||
# but they lack any -mcpu flag, so the binaries receive a default of i686. To fix this, we'll
|
||||
# download the official Windows build of NSIS and extract its binaries. We only handle stubs though,
|
||||
# because we provide our own plugin builds in this repo.
|
||||
|
||||
set -e
|
||||
|
||||
if [[ $UID != 0 ]]; then
|
||||
echo "This script needs to be run as root (sorry)" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ ! -d /usr/share/nsis/Stubs ]]; then
|
||||
echo "NSIS not installed, or Stubs directory is broken" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [[ -d /usr/share/nsis/Stubs_old ]]; then
|
||||
echo "NSIS stubs are already fixed" >&2
|
||||
exit 0
|
||||
fi
|
||||
|
||||
apt-get install -qy curl p7zip-full
|
||||
|
||||
mkdir /tmp/nsis
|
||||
cd /tmp/nsis
|
||||
|
||||
curl -fSL https://prdownloads.sourceforge.net/nsis/NSIS%203/3.10/nsis-3.10-setup.exe -o nsis.exe
|
||||
7z x nsis.exe
|
||||
|
||||
mv /usr/share/nsis/Stubs{,_old}
|
||||
cp -ra Stubs /usr/share/nsis/Stubs
|
||||
|
||||
rm -rf /tmp/nsis
|
Loading…
Reference in a new issue