Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 34 additions & 31 deletions .github/workflows/nsis.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,59 +77,46 @@ jobs:
}
working-directory: build

- name: Generate version number (stable)
if: github.event_name == 'push' && github.ref == 'refs/heads/main' && steps.detect.outputs.detectSummary != 'none'
id: version_number_stable
- name: Generate version number
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/pre/')) && steps.detect.outputs.detectSummary != 'none'
id: version_number
shell: pwsh
run: |
$base = Get-Date -Format "yy.MM"
$tags = git tag -l "$base.*"
Write-Host "Stable tags: $($tags -join ', ')"
if ($tags) {
$last = $tags | ForEach-Object {
if ($_ -match '^\d+\.\d+\.(\d+)$') { [int]$Matches[1] } else { 0 }
} | Sort-Object -Descending | Select-Object -First 1
$next = [int]$last + 1
$isPre = "${{ github.ref_name }}" -ne "main"
if ($isPre) {
$base = Get-Date -Format "yy.00"
} else {
$next = 1
$base = Get-Date -Format "yy.MM"
}
$versionNumber = "$base.$next"
Write-Host "Generated version number: $versionNumber"
echo versionNumber=$versionNumber >> $env:GITHUB_OUTPUT

- name: Generate version number (pre)
if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/pre/') && steps.detect.outputs.detectSummary != 'none'
id: version_number_pre
shell: pwsh
run: |
$base = Get-Date -Format "yy.MM"
$tags = git tag -l "$base.pre.*"
Write-Host "Pre tags: $($tags -join ', ')"
$tagPattern = "$base.*"
$tagRegex = '^\d+\.\d+\.(\d+)$'
$tags = git tag -l "$tagPattern"
Write-Host "Matching tags: $($tags -join ', ')"

if ($tags) {
$last = $tags | ForEach-Object {
if ($_ -match '^\d+\.\d+\.pre\.(\d+)$') { [int]$Matches[1] } else { 0 }
if ($_ -match $tagRegex) { [int]$Matches[1] } else { 0 }
} | Sort-Object -Descending | Select-Object -First 1
$next = [int]$last + 1
} else {
$next = 1
}
$versionNumber = "$base.pre.$next"

$versionNumber = "$base.$next"
Write-Host "Generated version number: $versionNumber"
echo versionNumber=$versionNumber >> $env:GITHUB_OUTPUT
echo isPre=$($isPre.ToString().ToLower()) >> $env:GITHUB_OUTPUT

- name: Create GitHub Release
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/pre/')) && steps.detect.outputs.detectSummary != 'none'
shell: pwsh
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
$versionNumber = if ("${{ github.ref_name }}" -eq "main") {
"${{ steps.version_number_stable.outputs.versionNumber }}"
} else {
"${{ steps.version_number_pre.outputs.versionNumber }}"
}
$versionNumber = "${{ steps.version_number.outputs.versionNumber }}"
$detectSummary = "${{ steps.detect.outputs.detectSummary }}"
$isPre = "${{ github.ref_name }}" -ne "main"
$isPre = "${{ steps.version_number.outputs.isPre }}" -eq "true"

if ($isPre) {
gh release create $versionNumber ../dist/*.exe --generate-notes --prerelease
Expand All @@ -139,3 +126,19 @@ jobs:
gh release create $versionNumber ../dist/*.exe --generate-notes --latest=false
}
working-directory: build

- name: Cleanup old pre-releases
if: steps.version_number.outputs.isPre == 'true'
shell: pwsh
run: |
$old = gh release list --limit 100 --json tagName,isPrerelease,createdAt |
ConvertFrom-Json |
Where-Object { $_.isPrerelease } |
Sort-Object createdAt |
Select-Object -SkipLast 10
foreach ($r in $old) {
Write-Host "Deleting old pre-release: $($r.tagName)"
gh release delete $r.tagName --cleanup-tag --yes
}
env:
GH_TOKEN: ${{ github.token }}
1 change: 0 additions & 1 deletion games/colin-mcrae-dirt-2/byof-installer.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ SectionEnd

Function .onInit
StrCpy $9 ${lang_eng} ; Radio Button
!insertmacro MULDERCONFIG_ONINIT
FunctionEnd

Function .onSelChange
Expand Down
7 changes: 4 additions & 3 deletions games/colin-mcrae-dirt-2/enhancement-pack.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,10 @@ Section "GFWL Fix (Xliveless by ThirteenAG)"
!insertmacro NSISUNZ_EXTRACT_ONE "xlive-Win32.zip" ".\" "xlive.dll" "AUTO_DELETE"
SectionEnd

SectionGroup /e "MulderConfig"
!insertmacro MULDERCONFIG_SECTIONS "$INSTDIR" "resources"
SectionGroup /e "MulderConfig (latest)"
Section
!insertmacro INSTALL_MULDERCONFIG "$INSTDIR" "resources"
SectionEnd

Section "Intro Skip (by Garrett)"
AddSize 4
Expand Down Expand Up @@ -121,6 +123,5 @@ SectionEnd
StrCpy $SELECT_FILENAME "dirt2_game.exe"
StrCpy $SELECT_DEFAULT_FOLDER "C:\Program Files (x86)\Steam\steamapps\common\Dirt 2"
StrCpy $SELECT_RELATIVE_INSTDIR ""
!insertmacro MULDERCONFIG_ONINIT
FunctionEnd
!endif
12 changes: 3 additions & 9 deletions games/dino-crisis-2/steam-enhancement-pack.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -135,14 +135,9 @@ Section "High Quality Textures (Rex-HD Project Preview)" rexhd
SectionEnd

!ifndef GOG_ENHANCEMENT_PACK_NSI ; If Steam
SectionGroup "MulderConfig (latest)"
!insertmacro MULDERCONFIG_SECTIONS "$INSTDIR" "resources\steam"
Section
#ExecWait '"$INSTDIR\MulderConfig.exe" -apply' $0
Rename "$INSTDIR\4249140_Launcher.exe" "$INSTDIR\4249140_Launcher_o.exe"
CopyFiles "$INSTDIR\MulderConfig.exe" "$INSTDIR\4249140_Launcher.exe"
SectionEnd
SectionGroupEnd
Section "MulderConfig (latest)"
!insertmacro INSTALL_MULDERCONFIG "$INSTDIR" "resources\steam"
SectionEnd

SectionGroup /e "Remove Non-REbirth files (preserve saves)"
Section /o "Remove english files" remove_original_english
Expand All @@ -166,7 +161,6 @@ SectionEnd
StrCpy $SELECT_FILENAME "4249140_Launcher.exe"
StrCpy $SELECT_DEFAULT_FOLDER "C:\Program Files (x86)\Steam\steamapps\common\4249140_DinoCrisis2"
StrCpy $SELECT_RELATIVE_INSTDIR ""
!insertmacro MULDERCONFIG_ONINIT
FunctionEnd

Function .onSelChange
Expand Down
12 changes: 3 additions & 9 deletions games/dino-crisis/steam-enhancement-pack.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,9 @@ SectionGroup /e "Dino Crisis Classic REbirth"
SectionGroupEnd

!ifndef GOG_ENHANCEMENT_PACK_NSI ; If Steam
SectionGroup "MulderConfig (latest)"
!insertmacro MULDERCONFIG_SECTIONS "$INSTDIR" "resources\steam"
Section
#ExecWait '"$INSTDIR\MulderConfig.exe" -apply' $0
Rename "$INSTDIR\4249130_Launcher.exe" "$INSTDIR\4249130_Launcher_o.exe"
CopyFiles "$INSTDIR\MulderConfig.exe" "$INSTDIR\4249130_Launcher.exe"
SectionEnd
SectionGroupEnd
Section "MulderConfig (latest)"
!insertmacro INSTALL_MULDERCONFIG "$INSTDIR" "resources\steam"
SectionEnd

SectionGroup /e "Remove Non-REbirth files (preserve saves)"
Section /o "Remove english files"
Expand Down Expand Up @@ -160,6 +155,5 @@ SectionGroupEnd
StrCpy $SELECT_FILENAME "4249130_Launcher.exe"
StrCpy $SELECT_DEFAULT_FOLDER "C:\Program Files (x86)\Steam\steamapps\common\4249130_DinoCrisis"
StrCpy $SELECT_RELATIVE_INSTDIR ""
!insertmacro MULDERCONFIG_ONINIT
FunctionEnd
!endif
9 changes: 5 additions & 4 deletions games/dirt-3/enhancement-pack.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,14 @@ Section /o "Upscaled Cars Textures (by Talal26)"
!insertmacro DELETE_RANGE "DiRT 3 Upscaled Liveries Mod 1.0 [Repack-MLD].001" 15
SectionEnd

SectionGroup /e "MulderConfig"
SectionGroup /e "MulderConfig (latest)"
Section
!ifdef BYOF_INSTALLER_NSI
!insertmacro MULDERCONFIG_SECTIONS "$INSTDIR" "resources\byof-installer"
!insertmacro INSTALL_MULDERCONFIG "$INSTDIR" "resources\byof-installer"
!else
!insertmacro MULDERCONFIG_SECTIONS "$INSTDIR" "resources\enhancement-pack"
!insertmacro INSTALL_MULDERCONFIG "$INSTDIR" "resources\enhancement-pack"
!endif
SectionEnd

Section "Super Fast Menus Mod (by Martan)"
AddSize 42
Expand Down Expand Up @@ -136,5 +138,4 @@ Function .onInit
StrCpy $SELECT_DEFAULT_FOLDER "C:\Program Files (x86)\Steam\steamapps\common\DiRT 3 Complete Edition"
StrCpy $SELECT_RELATIVE_INSTDIR ""
!endif
!insertmacro MULDERCONFIG_ONINIT
FunctionEnd
7 changes: 3 additions & 4 deletions games/doom-3/enhancement-pack.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -106,15 +106,14 @@ Section "Textures Pack x4 v1.1 (by GrowlingGuy41)"
File "/oname=$DOCUMENTS\My Games\dhewm3\d3xp\autoexec.cfg" resources\autoexec.cfg
SectionEnd

SectionGroup "MulderConfig (latest)"
!insertmacro MULDERCONFIG_SECTIONS "$INSTDIR" "resources"
SectionGroupEnd
Section "MulderConfig (latest)"
!insertmacro INSTALL_MULDERCONFIG "$INSTDIR" "resources"
SectionEnd

Function .onInit
StrCpy $SELECT_FILENAME "Doom3.exe"
StrCpy $SELECT_DEFAULT_FOLDER "C:\Program Files (x86)\Steam\steamapps\common\Doom 3"
StrCpy $SELECT_RELATIVE_INSTDIR ""
!insertmacro MULDERCONFIG_ONINIT
FunctionEnd

Function OnSelectedFile
Expand Down
10 changes: 3 additions & 7 deletions games/duke-nukem-3d-megaton-edition/enhancement-pack.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -71,16 +71,12 @@ SectionGroup /e "HD Textures" fov
SectionEnd
SectionGroupEnd

SectionGroup /e "MulderConfig (latest)"
!insertmacro MULDERCONFIG_SECTIONS "$INSTDIR""resources"
Section
ExecWait '"$INSTDIR\bin\MulderConfig.exe" -apply' $0
SectionEnd
SectionGroupEnd
Section "MulderConfig (latest)"
!insertmacro INSTALL_MULDERCONFIG "$INSTDIR\bin" "resources"
SectionEnd

Function .onInit
StrCpy $SELECT_FILENAME "duke3d.exe"
StrCpy $SELECT_DEFAULT_FOLDER "C:\Program Files (x86)\Steam\steamapps\common\Duke Nukem 3D\bin"
StrCpy $SELECT_RELATIVE_INSTDIR ".."
!insertmacro MULDERCONFIG_ONINIT
FunctionEnd
10 changes: 3 additions & 7 deletions games/fallout-new-vegas/enhancement-pack.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -200,16 +200,12 @@ Section /o "NVTUP (FNV Texture Upscale Project) v2.0"
!insertmacro DELETE_RANGE "NVTUP.7z.001" 16
SectionEnd

SectionGroup "MulderConfig (latest)"
!insertmacro MULDERCONFIG_SECTIONS "$INSTDIR" "resources"
Section
ExecWait '"$INSTDIR\MulderConfig.exe" -apply' $0
SectionEnd
SectionGroupEnd
Section "MulderConfig (latest)"
!insertmacro INSTALL_MULDERCONFIG "$INSTDIR" "resources"
SectionEnd

Function .onInit
StrCpy $SELECT_FILENAME "FalloutNV.exe"
StrCpy $SELECT_DEFAULT_FOLDER "C:\Program Files (x86)\Steam\steamapps\common\Fallout New Vegas"
StrCpy $SELECT_RELATIVE_INSTDIR ""
!insertmacro MULDERCONFIG_ONINIT
FunctionEnd
7 changes: 3 additions & 4 deletions games/hitman-2-silent-assassin/enhancement-pack.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,9 @@ Section "Add Xinput Controller support (by mutantx20)"
Delete "alec 360.txt"
SectionEnd

SectionGroup "MulderConfig (latest)"
!insertmacro MULDERCONFIG_SECTIONS "$INSTDIR" "resources"
SectionGroupEnd
Section "MulderConfig (latest)"
!insertmacro INSTALL_MULDERCONFIG "$INSTDIR" "resources"
SectionEnd

SectionGroup /e "Language Patch" lang
Section /o "French Patch" lang_fr
Expand Down Expand Up @@ -153,7 +153,6 @@ Function .onInit
StrCpy $SELECT_DEFAULT_FOLDER "C:\Program Files (x86)\Steam\steamapps\common\Hitman 2 Silent Assassin"
StrCpy $SELECT_RELATIVE_INSTDIR ""
StrCpy $1 ${lang_fr} ; Radio Button
!insertmacro MULDERCONFIG_ONINIT
FunctionEnd

Function .onSelChange
Expand Down
7 changes: 3 additions & 4 deletions games/hitman-blood-money/enhancement-pack.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -104,9 +104,9 @@ Section "Add controller support (by JerichoRex)"
Rename "HitmanBloodMoney.exe" "$INSTDIR\_HitmanBloodMoney_gamepad.exe.bak"
SectionEnd

SectionGroup "MulderConfig (latest)"
!insertmacro MULDERCONFIG_SECTIONS "$INSTDIR" "resources"
SectionGroupEnd
Section "MulderConfig (latest)"
!insertmacro INSTALL_MULDERCONFIG "$INSTDIR" "resources"
SectionEnd

Section /o "Upscaled Textures (BM Premastered by V01DXIX)"
AddSize 5274337
Expand Down Expand Up @@ -150,5 +150,4 @@ Function .onInit
StrCpy $SELECT_FILENAME "HitmanBloodMoney.exe"
StrCpy $SELECT_DEFAULT_FOLDER "C:\Program Files (x86)\Steam\steamapps\common\Hitman Blood Money"
StrCpy $SELECT_RELATIVE_INSTDIR ""
!insertmacro MULDERCONFIG_ONINIT
FunctionEnd
20 changes: 9 additions & 11 deletions games/hitman-codename-47/enhancement-pack.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -64,17 +64,16 @@ Section "Widescreen fix (by alphayellow) + dgVoodoo2"
Delete "$INSTDIR\nGlideEULA.txt"
SectionEnd

SectionGroup "MulderConfig (latest)"
Section
AddSize 1945
# Copy Intro.zip to allow toggling the intro video in MulderConfig UI
${IfNot} ${FileExists} "$INSTDIR\@mulderload\backup\Intro.zip"
CopyFiles "$INSTDIR\Cutscenes\Intro\Intro.zip" "$INSTDIR\@mulderload\backup\Intro.zip"
${EndIf}
SectionEnd
Section "MulderConfig (latest)"
# Copy Intro.zip to allow toggling the intro video in MulderConfig UI
AddSize 1945
${IfNot} ${FileExists} "$INSTDIR\@mulderload\backup\Intro.zip"
CopyFiles "$INSTDIR\Cutscenes\Intro\Intro.zip" "$INSTDIR\@mulderload\backup\Intro.zip"
${EndIf}

!insertmacro MULDERCONFIG_SECTIONS "$INSTDIR" "resources"
SectionGroupEnd
# MulderConfig
!insertmacro INSTALL_MULDERCONFIG "$INSTDIR" "resources"
SectionEnd

Section "Modern keyboard mapping"
SetOutPath "$INSTDIR"
Expand All @@ -91,5 +90,4 @@ Function .onInit
StrCpy $SELECT_FILENAME "Hitman.Exe"
StrCpy $SELECT_DEFAULT_FOLDER "C:\Program Files (x86)\Steam\steamapps\common\Hitman Codename 47"
StrCpy $SELECT_RELATIVE_INSTDIR ""
!insertmacro MULDERCONFIG_ONINIT
FunctionEnd
7 changes: 3 additions & 4 deletions games/hitman-contracts/enhancement-pack.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ Section "Add Xinput Controller support (by mutantx20)"
Delete "alec 360.txt"
SectionEnd

SectionGroup "MulderConfig (latest)"
!insertmacro MULDERCONFIG_SECTIONS "$INSTDIR" "resources"
SectionGroupEnd
Section "MulderConfig (latest)"
!insertmacro INSTALL_MULDERCONFIG "$INSTDIR" "resources"
SectionEnd

Section
# Copy readme
Expand All @@ -98,5 +98,4 @@ Function .onInit
StrCpy $SELECT_FILENAME "HitmanContracts.exe"
StrCpy $SELECT_DEFAULT_FOLDER "C:\Program Files (x86)\Steam\steamapps\common\Hitman Contracts"
StrCpy $SELECT_RELATIVE_INSTDIR ""
!insertmacro MULDERCONFIG_ONINIT
FunctionEnd
7 changes: 3 additions & 4 deletions games/resident-evil-0-hd-remaster/enhancement-pack.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -136,13 +136,12 @@ Section
!insertmacro 7Z_REMOVE
SectionEnd

SectionGroup "MulderConfig (latest)"
!insertmacro MULDERCONFIG_SECTIONS "$INSTDIR" "resources"
SectionGroupEnd
Section "MulderConfig (latest)"
!insertmacro INSTALL_MULDERCONFIG "$INSTDIR" "resources"
SectionEnd

Function .onInit
StrCpy $SELECT_FILENAME "re0hd.exe"
StrCpy $SELECT_DEFAULT_FOLDER "C:\Program Files (x86)\Steam\steamapps\common\Resident Evil 0"
StrCpy $SELECT_RELATIVE_INSTDIR ""
!insertmacro MULDERCONFIG_ONINIT
FunctionEnd
12 changes: 3 additions & 9 deletions games/resident-evil-2/steam-enhancement-pack.nsi
Original file line number Diff line number Diff line change
Expand Up @@ -335,14 +335,9 @@ SectionEnd
File "resources\steam\README.txt"
SectionEnd

SectionGroup "MulderConfig (latest)"
!insertmacro MULDERCONFIG_SECTIONS "$INSTDIR" "resources\steam"
Section
#ExecWait '"$INSTDIR\MulderConfig.exe" -apply' $0
Rename "$INSTDIR\4249110_Launcher.exe" "$INSTDIR\4249110_Launcher_o.exe"
CopyFiles "$INSTDIR\MulderConfig.exe" "$INSTDIR\4249110_Launcher.exe"
SectionEnd
SectionGroupEnd
Section "MulderConfig (latest)"
!insertmacro INSTALL_MULDERCONFIG "$INSTDIR" "resources\steam"
SectionEnd

SectionGroup "Free space by removing Non-REbirth files"
Section /o "Remove english files (keep saves)"
Expand Down Expand Up @@ -405,7 +400,6 @@ SectionEnd
StrCpy $SELECT_FILENAME "4249110_Launcher.exe"
StrCpy $SELECT_DEFAULT_FOLDER "C:\Program Files (x86)\Steam\steamapps\common\4249110_Biohazard2"
StrCpy $SELECT_RELATIVE_INSTDIR ""
!insertmacro MULDERCONFIG_ONINIT
FunctionEnd
!endif

Expand Down
Loading
Loading