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
2 changes: 1 addition & 1 deletion docs/design.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Each component has exactly these parts. A part that doesn't apply is explicitly
- Owner-only conveniences that a public build must not have (today: fetching Lecram's paid builds from his channel)
sit behind a compile-time switch (`-p:<Name>=true`, default off, `BuildFlags.<Name>`), are compiled in both variants
and tested in both. Public releases build with the switch off; `tools/build-private.ps1` builds the private
variant; the release bot drops it on copyparty after each release.
variant (portable exe and installer); the release bot drops both on copyparty after each release.
- `nvngx_dlssnr.dll` is never committed to this repo or bundled in the exe/installer; the app downloads it from the catalog mirror.

## 4. Choosing builds
Expand Down
17 changes: 13 additions & 4 deletions installer/DLSSUpdater.iss
Original file line number Diff line number Diff line change
@@ -1,18 +1,27 @@
; Inno Setup script for the installable DLSS5 Updater. Build after `dotnet publish`:
; iscc /DAppVersion=3.0.0 installer\DLSSUpdater.iss
; The portable build is the same single-file publish\DLSS5Updater.exe, released as is.
; The owner's private build (tools\build-private.ps1) adds /DPrivate: it packages publish-private\DLSS5Updater.exe into
; publish-private\DLSS5Updater-Setup-<version>-private.exe. Same AppId, so it installs over the public app and back.

#ifndef AppVersion
#define AppVersion "0.0.0"
#endif
#define AppName "DLSS5 Updater"
#define AppExe "DLSS5Updater.exe"
#ifdef Private
#define SourceDir "..\publish-private"
#define Suffix "-private"
#else
#define SourceDir "..\publish"
#define Suffix ""
#endif

[Setup]
AppId={{6F0B8E53-1C2D-4B7A-9E4F-3A5D2C8B1E07}
AppName={#AppName}
AppVersion={#AppVersion}
AppVerName={#AppName} {#AppVersion}
AppVerName={#AppName} {#AppVersion}{#Suffix}
AppPublisher=ApolloF
AppPublisherURL=https://github.com/ApolloF/DLSS5-Updater
AppSupportURL=https://github.com/ApolloF/DLSS5-Updater/issues
Expand All @@ -31,8 +40,8 @@ MinVersion=10.0
SetupIconFile=..\src\DLSSUpdater\Assets\icon.ico
UninstallDisplayIcon={app}\{#AppExe}
UninstallDisplayName={#AppName}
OutputDir=..\publish
OutputBaseFilename=DLSS5Updater-Setup-{#AppVersion}
OutputDir={#SourceDir}
OutputBaseFilename=DLSS5Updater-Setup-{#AppVersion}{#Suffix}
Compression=lzma2/max
SolidCompression=yes
WizardStyle=modern
Expand All @@ -53,7 +62,7 @@ Type: files; Name: "{autoprograms}\DLSS Updater\DLSS Updater.lnk"
Type: dirifempty; Name: "{autoprograms}\DLSS Updater"

[Files]
Source: "..\publish\{#AppExe}"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#SourceDir}\{#AppExe}"; DestDir: "{app}"; Flags: ignoreversion

[Icons]
Name: "{group}\{#AppName}"; Filename: "{app}\{#AppExe}"
Expand Down
19 changes: 16 additions & 3 deletions tools/build-private.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Builds the owner's private portable exe: the public app plus Lecram's MediaFire channel (-p:LecramChannel=true).
# Output: publish-private\DLSS5Updater.exe. Run from anywhere.
# Builds the owner's private app: the public app plus Lecram's MediaFire channel (-p:LecramChannel=true).
# Output: publish-private\DLSS5Updater.exe (portable) and DLSS5Updater-Setup-<version>-private.exe (installer, needs
# Inno Setup 6; -NoInstaller skips it). Run from anywhere.
param([switch]$NoInstaller)
$ErrorActionPreference = 'Stop'
$root = Split-Path -Parent $PSScriptRoot
$out = Join-Path $root 'publish-private'
Expand All @@ -9,5 +11,16 @@ if ($LASTEXITCODE -ne 0) { throw "dotnet publish failed (exit $LASTEXITCODE)" }

$exe = Join-Path $out 'DLSS5Updater.exe'
if (-not (Test-Path $exe)) { throw "Missing $exe after publish" }
$vi = (Get-Item $exe).VersionInfo
Write-Host "Private build: $exe"
Write-Host "Version: $((Get-Item $exe).VersionInfo.ProductVersion)"
Write-Host "Version: $($vi.ProductVersion)"
if ($NoInstaller) { return }

$iscc = @((Get-Command iscc -CommandType Application -ErrorAction SilentlyContinue).Source,
"${env:ProgramFiles(x86)}\Inno Setup 6\ISCC.exe", "$env:LOCALAPPDATA\Programs\Inno Setup 6\ISCC.exe") |
Where-Object { $_ -and (Test-Path $_) } | Select-Object -First 1
if (-not $iscc) { throw 'Inno Setup 6 (ISCC.exe) not found; install it or pass -NoInstaller' }
$version = "$($vi.FileMajorPart).$($vi.FileMinorPart).$($vi.FileBuildPart)"
& $iscc /Q /DPrivate "/DAppVersion=$version" (Join-Path $root 'installer\DLSSUpdater.iss')
if ($LASTEXITCODE -ne 0) { throw "ISCC failed (exit $LASTEXITCODE)" }
Write-Host "Installer: $(Join-Path $out "DLSS5Updater-Setup-$version-private.exe")"