mirror of
https://github.com/geode-sdk/geode.git
synced 2025-03-31 07:10:28 -04:00
generate uninst when generating windows installer
This commit is contained in:
parent
ac93a6c220
commit
78acebc9c0
2 changed files with 23 additions and 2 deletions
8
.github/workflows/build.yml
vendored
8
.github/workflows/build.yml
vendored
|
@ -128,7 +128,9 @@ jobs:
|
|||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: geode-installer-win
|
||||
path: './installer/windows/geode-installer-win.exe'
|
||||
path: |
|
||||
./installer/windows/geode-installer-win.exe
|
||||
./installer/windows/GeodeUninstaller.exe
|
||||
|
||||
- name: Complete Build Debug Info
|
||||
uses: ./.github/actions/build-debug-info-post
|
||||
|
@ -335,7 +337,9 @@ jobs:
|
|||
- name: Zip Windows Artifacts
|
||||
uses: vimtor/action-zip@v1.2
|
||||
with:
|
||||
files: geode-win/XInput1_4.dll geode-win/Geode.dll geode-win/GeodeUpdater.exe geode-win/Geode.lib geode-win/Geode.pdb
|
||||
files: >-
|
||||
geode-win/XInput1_4.dll geode-win/Geode.dll geode-win/Geode.lib geode-win/Geode.pdb
|
||||
geode-win/GeodeUpdater.exe geode-installer-win/GeodeUninstaller.exe
|
||||
dest: geode-${{ steps.ref.outputs.hash }}-win.zip
|
||||
|
||||
- name: Zip Android32 Artifacts
|
||||
|
|
|
@ -491,6 +491,23 @@ Section "steam_appid.txt"
|
|||
SectionEnd
|
||||
|
||||
Function .onInit
|
||||
# huge thanks to Anders for the reference !!
|
||||
# https://forums.winamp.com/forum/developer-center/nsis-discussion/4633037-creating-an-uninstaller-in-compile-time?p=4633073#post4633073
|
||||
!ifdef GENERATE_UNINSTALLER
|
||||
WriteUninstaller "${__FILEDIR__}\GeodeUninstaller.exe"
|
||||
SetErrorLevel 0
|
||||
Quit
|
||||
!else
|
||||
; get a temporary file path
|
||||
!tempfile TMPINST
|
||||
!delfile "${TMPINST}"
|
||||
|
||||
; create and run the installer that just uses WriteUninstaller
|
||||
!makensis '-DGENERATE_UNINSTALLER "${__FILE__}" "-XOutFile `${TMPINST}.exe`"'
|
||||
!system '"${TMPINST}.exe" /S'
|
||||
!delfile "${TMPINST}.exe"
|
||||
!endif
|
||||
|
||||
!insertmacro MUI_LANGDLL_DISPLAY
|
||||
|
||||
IntOp $0 ${SF_SELECTED} | ${SF_RO}
|
||||
|
|
Loading…
Add table
Reference in a new issue