diff --git a/.github/workflows/build_release.yaml b/.github/workflows/build_release.yaml index 07a9b47..4ad2820 100644 --- a/.github/workflows/build_release.yaml +++ b/.github/workflows/build_release.yaml @@ -57,10 +57,22 @@ jobs: files: ${{ env.RELEASE_NAME }}-${{ env.RELEASE_VERSION }}-debug dest: ${{ env.RELEASE_NAME }}-${{ env.RELEASE_VERSION }}-debug.zip recursive: true + - name: Install NSIS + run: choco install nsis + - name: Create release installer + uses: joncloud/makensis-action@v3.7 + with: + script-file: scripts/SteamDeckTools_Setup.nsi + arguments: + /V3 + /DUSE_WINGET + /DVERSION=${{ env.RELEASE_VERSION }} + /DBUILD_DIR=../${{ env.RELEASE_NAME }}-${{ env.RELEASE_VERSION }} + /DOUTPUT_FILE=../${{ env.RELEASE_NAME }}-${{ env.RELEASE_VERSION }}-setup.exe - uses: ncipollo/release-action@v1 with: tag: ${{ env.RELEASE_VERSION }} - artifacts: "*.zip" + artifacts: "*.zip,*-setup.exe" prerelease: true generateReleaseNotes: true bodyFile: RELEASE.md diff --git a/.github/workflows/build_test.yaml b/.github/workflows/build_test.yaml index d0da6fe..f889210 100644 --- a/.github/workflows/build_test.yaml +++ b/.github/workflows/build_test.yaml @@ -21,17 +21,30 @@ jobs: - name: Install dependencies run: dotnet restore - name: Build without Version - run: dotnet build --configuration Debug --output ${{ env.SteamDeckTools }}-debug/ + run: dotnet build --configuration Debug --output ${{ env.RELEASE_NAME }}-debug/ - name: Test run: dotnet test --no-restore --verbosity normal - uses: vimtor/action-zip@v1 with: - files: ${{ env.SteamDeckTools }}-debug - dest: ${{ env.SteamDeckTools }}-debug.zip + files: ${{ env.RELEASE_NAME }}-debug + dest: ${{ env.RELEASE_NAME }}-debug.zip recursive: true + - name: Install NSIS + run: choco install nsis + - name: Create debug installer + uses: joncloud/makensis-action@v3.7 + with: + script-file: scripts/SteamDeckTools_Setup.nsi + arguments: + /V3 + /DUSE_WINGET + /DBUILD_DIR=../${{ env.RELEASE_NAME }}-debug + /DOUTPUT_FILE=../${{ env.RELEASE_NAME }}-setup-debug.exe - name: 'Upload Artifact' uses: actions/upload-artifact@v3 with: name: debug-build - path: ${{ env.SteamDeckTools }}-debug + path: + ${{ env.RELEASE_NAME }}-debug.zip + ${{ env.RELEASE_NAME }}-setup-debug.exe retention-days: 14 diff --git a/.gitignore b/.gitignore index 1bc698b..87222a1 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ obj/ build-Release/ build-Debug/ .vscode/ +scripts/Redist/ +SteamDeckTools_Setup*.exe diff --git a/CommonHelpers/Instance.cs b/CommonHelpers/Instance.cs index ccba6d0..5bfd3b7 100644 --- a/CommonHelpers/Instance.cs +++ b/CommonHelpers/Instance.cs @@ -29,6 +29,32 @@ namespace CommonHelpers get { return Environment.GetCommandLineArgs().Contains("-run-on-startup"); } } + public static bool Uninstall + { + get { return Environment.GetCommandLineArgs().Contains("-uninstall"); } + } + + public static bool IsDEBUG + { + get + { +#if DEBUG + return true; +#else + return false; +#endif + } + } + + public static void OnUninstall(Action action) + { + if (Uninstall) + { + action(); + Environment.Exit(0); + } + } + public static bool UseKernelDrivers { get { return useKernelDrivers; } diff --git a/FanControl/FanControlForm.cs b/FanControl/FanControlForm.cs index 2d8465d..58d93bc 100644 --- a/FanControl/FanControlForm.cs +++ b/FanControl/FanControlForm.cs @@ -15,6 +15,11 @@ namespace FanControl public FanControlForm() { + Instance.OnUninstall(() => + { + startupManager.Startup = false; + }); + InitializeComponent(); Text += " v" + Application.ProductVersion.ToString(); diff --git a/LICENSE.md b/LICENSE.md new file mode 100644 index 0000000..1d7b9a7 --- /dev/null +++ b/LICENSE.md @@ -0,0 +1,8 @@ +Creative Commons Attribution-NonCommercial (CC-BY-NC) +https://creativecommons.org/licenses/by-nc/4.0/ + +This project requires the following dependencies: +- Microsoft Visual C++ Redistributable - https://aka.ms/vs/17/release/vc_redist.x64.exe +- .NET Desktop Runtime 6.0 - https://dotnet.microsoft.com/en-us/download/dotnet/thank-you/runtime-desktop-6.0.11-windows-x64-installer +- Rivatuner Statistics Server - https://www.guru3d.com/files-details/rtss-rivatuner-statistics-server-download.html +- ViGEmBus - https://github.com/ViGEm/ViGEmBus/releases diff --git a/PerformanceOverlay/Controller.cs b/PerformanceOverlay/Controller.cs index 852d65c..53cfdc4 100644 --- a/PerformanceOverlay/Controller.cs +++ b/PerformanceOverlay/Controller.cs @@ -26,6 +26,11 @@ namespace PerformanceOverlay public Controller() { + Instance.OnUninstall(() => + { + startupManager.Startup = false; + }); + contextMenu = new System.Windows.Forms.ContextMenuStrip(components); SharedData_Update(); diff --git a/PowerControl/Controller.cs b/PowerControl/Controller.cs index a84cc0d..a4e23b8 100644 --- a/PowerControl/Controller.cs +++ b/PowerControl/Controller.cs @@ -39,6 +39,11 @@ namespace PowerControl public Controller() { + Instance.OnUninstall(() => + { + startupManager.Startup = false; + }); + Instance.RunOnce(TitleWithVersion, "Global\\PowerControl"); Instance.RunUpdater(TitleWithVersion); diff --git a/README.md b/README.md index 962cea8..0a7a395 100644 --- a/README.md +++ b/README.md @@ -68,6 +68,6 @@ Steam Deck Tools is not affiliated with Valve, Steam, or any of their partners. ## License -[Creative Commons Attribution-NonCommercial (CC-BY-NC)](://creativecommons.org/licenses/by-nc/4.0/). +[Creative Commons Attribution-NonCommercial (CC-BY-NC)](https://creativecommons.org/licenses/by-nc/4.0/). Free for personal use. Contact me in other cases (`ayufan@ayufan.eu`). diff --git a/RELEASE.md b/RELEASE.md index befb869..c5e388a 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -25,3 +25,4 @@ - If application is run with `-run-on-startup` it will self-set to run on system start - Depend on `GetCursorPos` to detect `SAS` - Add `Updater.exe` that can update to latest release and debug +- Add `Setup.exe` installer to install all except RTSS diff --git a/SteamController/Controller.cs b/SteamController/Controller.cs index b922371..d9ab8ea 100644 --- a/SteamController/Controller.cs +++ b/SteamController/Controller.cs @@ -35,6 +35,22 @@ namespace SteamController public Controller() { + Instance.OnUninstall(() => + { + Helpers.SteamConfiguration.KillSteam(); + Helpers.SteamConfiguration.WaitForSteamClose(5000); + Helpers.SteamConfiguration.BackupSteamConfig(); + + var steamControllerUpdate = Helpers.SteamConfiguration.UpdateControllerBlacklist( + Devices.SteamController.VendorID, Devices.SteamController.ProductID, false + ); + var x360ControllerUpdate = Helpers.SteamConfiguration.UpdateControllerBlacklist( + Devices.Xbox360Controller.VendorID, Devices.Xbox360Controller.ProductID, false + ); + Settings.Default.EnableSteamDetection = false; + startupManager.Startup = false; + }); + // Set available profiles ProfilesSettings.Helpers.ProfileStringConverter.Profiles = context.Profiles. Where((profile) => profile.Visible). @@ -261,7 +277,7 @@ namespace SteamController var steamControllerUpdate = Helpers.SteamConfiguration.UpdateControllerBlacklist( Devices.SteamController.VendorID, Devices.SteamController.ProductID, - blacklistSteamController + false ); var x360ControllerUpdate = Helpers.SteamConfiguration.UpdateControllerBlacklist( Devices.Xbox360Controller.VendorID, diff --git a/Updater/Program.cs b/Updater/Program.cs index 7582ad7..3fb8f58 100644 --- a/Updater/Program.cs +++ b/Updater/Program.cs @@ -23,6 +23,11 @@ namespace Updater bool updated = Environment.GetCommandLineArgs().Contains(UpdatedArg); bool cmdLine = !firstRun && !userCheck; + Instance.OnUninstall(() => + { + Application_Exit(); + }); + if (updated) { foreach (var arg in Environment.GetCommandLineArgs()) @@ -65,11 +70,14 @@ namespace Updater TrackProcess("PerformanceOverlay"); TrackProcess("SteamController"); -#if DEBUG - AutoUpdater.Start("https://steam-deck-tools.ayufan.dev/docs/updates/debug_zip.xml"); -#else - AutoUpdater.Start("https://steam-deck-tools.ayufan.dev/docs/updates/release_zip.xml"); -#endif + var updateURL = String.Format( + "https://steam-deck-tools.ayufan.dev/docs/updates/{0}_{1}.xml?version={2}", + Instance.IsDEBUG ? "debug" : "release", + IsUsingInstaller ? "setup" : "zip", + Instance.ProductVersion + ); + + AutoUpdater.Start(updateURL); } private static void TrackProcess(String processFilerName) @@ -124,6 +132,20 @@ namespace Updater return found; } + private static bool IsUsingInstaller + { + get + { + var currentProcess = Process.GetCurrentProcess(); + var currentDir = Path.GetDirectoryName(currentProcess.MainModule?.FileName); + if (currentDir is null) + return false; + + var uninstallExe = Path.Combine(currentDir, "Uninstall.exe"); + return File.Exists(uninstallExe); + } + } + private static IEnumerable FindProcesses(String processFilerName) { var currentProcess = Process.GetCurrentProcess(); diff --git a/scripts/SteamDeckTools_Setup.nsi b/scripts/SteamDeckTools_Setup.nsi new file mode 100644 index 0000000..4fa93b8 --- /dev/null +++ b/scripts/SteamDeckTools_Setup.nsi @@ -0,0 +1,316 @@ +!pragma warning error all + +!define /ifndef VERSION "0.0.1" +!define /ifndef BUILD_DIR "../build-Debug" +!define /ifndef OUTPUT_FILE "../SteamDeckTools_Setup_${VERSION}.exe" + +;-------------------------------- +;Include Modern UI + + !include "MUI2.nsh" + +;-------------------------------- +;General + + ;Properly display all languages (Installer will not work on Windows 95, 98 or ME!) + Unicode true + + ;Name and file + Name "Windows Deck Tools for Steam Deck" + OutFile "${OUTPUT_FILE}" + + ;Default installation folder + InstallDir "$PROGRAMFILES64\SteamDeckTools" + + ;Get installation folder from registry if available + InstallDirRegKey HKCU "Software\SteamDeckTools" "" + + ;Request application privileges for Windows Vista + RequestExecutionLevel admin + + ; Version + VIProductVersion "${VERSION}.0" + VIFileVersion "${VERSION}.0" + VIAddVersionKey "FileVersion" "${VERSION}" + VIAddVersionKey "LegalCopyright" "(C) Kamil TrzciƄski 2022." + VIAddVersionKey "FileDescription" "Windows Deck Tools for Steam Deck" + +;-------------------------------- +;Interface Settings + + !define MUI_ABORTWARNING + + ;Show all languages, despite user's codepage + !define MUI_LANGDLL_ALLLANGUAGES + +;-------------------------------- +;Interface Configuration + + !define MUI_HEADERIMAGE + #!define MUI_HEADERIMAGE_BITMAP "logo.bmp" ; optional + + +;-------------------------------- +;Language Selection Dialog Settings + + ;Remember the installer language + !define MUI_LANGDLL_REGISTRY_ROOT "HKCU" + !define MUI_LANGDLL_REGISTRY_KEY "Software\Modern UI Test" + !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language" + +;-------------------------------- +;Pages + + !insertmacro MUI_PAGE_WELCOME + !insertmacro MUI_PAGE_LICENSE "..\License.md" + !insertmacro MUI_PAGE_COMPONENTS + !insertmacro MUI_PAGE_DIRECTORY + !insertmacro MUI_PAGE_INSTFILES + !insertmacro MUI_PAGE_FINISH + + !insertmacro MUI_UNPAGE_WELCOME + !insertmacro MUI_UNPAGE_CONFIRM + !insertmacro MUI_UNPAGE_LICENSE "..\License.md" + !insertmacro MUI_UNPAGE_COMPONENTS + !insertmacro MUI_UNPAGE_DIRECTORY + !insertmacro MUI_UNPAGE_INSTFILES + !insertmacro MUI_UNPAGE_FINISH + +;-------------------------------- +;Languages + + !insertmacro MUI_LANGUAGE "English" ; The first language is the default language + !insertmacro MUI_LANGUAGE "French" + !insertmacro MUI_LANGUAGE "German" + !insertmacro MUI_LANGUAGE "Spanish" + !insertmacro MUI_LANGUAGE "SpanishInternational" + !insertmacro MUI_LANGUAGE "SimpChinese" + !insertmacro MUI_LANGUAGE "TradChinese" + !insertmacro MUI_LANGUAGE "Japanese" + !insertmacro MUI_LANGUAGE "Korean" + !insertmacro MUI_LANGUAGE "Italian" + !insertmacro MUI_LANGUAGE "Dutch" + !insertmacro MUI_LANGUAGE "Danish" + !insertmacro MUI_LANGUAGE "Swedish" + !insertmacro MUI_LANGUAGE "Norwegian" + !insertmacro MUI_LANGUAGE "NorwegianNynorsk" + !insertmacro MUI_LANGUAGE "Finnish" + !insertmacro MUI_LANGUAGE "Greek" + !insertmacro MUI_LANGUAGE "Russian" + !insertmacro MUI_LANGUAGE "Portuguese" + !insertmacro MUI_LANGUAGE "PortugueseBR" + !insertmacro MUI_LANGUAGE "Polish" + !insertmacro MUI_LANGUAGE "Ukrainian" + !insertmacro MUI_LANGUAGE "Czech" + !insertmacro MUI_LANGUAGE "Slovak" + !insertmacro MUI_LANGUAGE "Croatian" + !insertmacro MUI_LANGUAGE "Bulgarian" + !insertmacro MUI_LANGUAGE "Hungarian" + !insertmacro MUI_LANGUAGE "Thai" + !insertmacro MUI_LANGUAGE "Romanian" + !insertmacro MUI_LANGUAGE "Latvian" + !insertmacro MUI_LANGUAGE "Macedonian" + !insertmacro MUI_LANGUAGE "Estonian" + !insertmacro MUI_LANGUAGE "Turkish" + !insertmacro MUI_LANGUAGE "Lithuanian" + !insertmacro MUI_LANGUAGE "Slovenian" + !insertmacro MUI_LANGUAGE "Serbian" + !insertmacro MUI_LANGUAGE "SerbianLatin" + !insertmacro MUI_LANGUAGE "Arabic" + !insertmacro MUI_LANGUAGE "Farsi" + !insertmacro MUI_LANGUAGE "Hebrew" + !insertmacro MUI_LANGUAGE "Indonesian" + !insertmacro MUI_LANGUAGE "Mongolian" + !insertmacro MUI_LANGUAGE "Luxembourgish" + !insertmacro MUI_LANGUAGE "Albanian" + !insertmacro MUI_LANGUAGE "Breton" + !insertmacro MUI_LANGUAGE "Belarusian" + !insertmacro MUI_LANGUAGE "Icelandic" + !insertmacro MUI_LANGUAGE "Malay" + !insertmacro MUI_LANGUAGE "Bosnian" + !insertmacro MUI_LANGUAGE "Kurdish" + !insertmacro MUI_LANGUAGE "Irish" + !insertmacro MUI_LANGUAGE "Uzbek" + !insertmacro MUI_LANGUAGE "Galician" + !insertmacro MUI_LANGUAGE "Afrikaans" + !insertmacro MUI_LANGUAGE "Catalan" + !insertmacro MUI_LANGUAGE "Esperanto" + !insertmacro MUI_LANGUAGE "Asturian" + !insertmacro MUI_LANGUAGE "Basque" + !insertmacro MUI_LANGUAGE "Pashto" + !insertmacro MUI_LANGUAGE "ScotsGaelic" + !insertmacro MUI_LANGUAGE "Georgian" + !insertmacro MUI_LANGUAGE "Vietnamese" + !insertmacro MUI_LANGUAGE "Welsh" + !insertmacro MUI_LANGUAGE "Armenian" + !insertmacro MUI_LANGUAGE "Corsican" + !insertmacro MUI_LANGUAGE "Tatar" + !insertmacro MUI_LANGUAGE "Hindi" + +;-------------------------------- +;Reserve Files + + ;If you are using solid compression, files that are required before + ;the actual installation should be stored first in the data block, + ;because this will make your installer start faster. + + !insertmacro MUI_RESERVEFILE_LANGDLL + +;-------------------------------- +;Installer Sections + +Section "" ShutdownTools + ; Shutdown existing processes + #!if /FileExists "$INSTDIR\Updater.exe" + ExecWait '"$INSTDIR\Updater.exe" -uninstall' + #!endif +SectionEnd + +Section "Windows Deck Tools for Steam Deck" SteamDeckTools + SetShellVarContext All + SectionIn RO + + SetOutPath "$INSTDIR" + SetRegView 64 + + ;ADD YOUR OWN FILES HERE... + File /r "${BUILD_DIR}\*" + + ;Store installation folder + WriteRegStr HKLM "Software\SteamDeckTools" "" $INSTDIR + + ;Create uninstaller + WriteUninstaller "$INSTDIR\Uninstall.exe" + + ; Create entry in Programs + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SteamDeckTools" \ + "DisplayName" "Windows Deck Tools for Steam Deck - ${VERSION}" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SteamDeckTools" \ + "UninstallString" "$\"$INSTDIR\Uninstall.exe$\"" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SteamDeckTools" \ + "QuietUninstallString" "$\"$INSTDIR\Uninstall.exe$\" /S" +SectionEnd + +Section "Desktop Shortcut" DesktopShortcut + SetShellVarContext All + CreateShortcut "$DESKTOP\Fan Control.lnk" "$INSTDIR\FanControl.exe" + CreateShortcut "$DESKTOP\Performance Overlay.lnk" "$INSTDIR\PerformanceOverlay.exe" + CreateShortcut "$DESKTOP\Power Control.lnk" "$INSTDIR\PowerControl.exe" + CreateShortcut "$DESKTOP\Steam Controller.lnk" "$INSTDIR\SteamController.exe" +SectionEnd + +Section "Programs Folder Shortcut" ProgramsShortcut + SetShellVarContext All + CreateShortcut "$SMPROGRAMS\Steam Deck Tools\Fan Control.lnk" "$INSTDIR\FanControl.exe" + CreateShortcut "$SMPROGRAMS\Steam Deck Tools\Performance Overlay.lnk" "$INSTDIR\PerformanceOverlay.exe" + CreateShortcut "$SMPROGRAMS\Steam Deck Tools\Power Control.lnk" "$INSTDIR\PowerControl.exe" + CreateShortcut "$SMPROGRAMS\Steam Deck Tools\Steam Controller.lnk" "$INSTDIR\SteamController.exe" + CreateShortcut "$SMPROGRAMS\Steam Deck Tools\Check for Updates.lnk" "$INSTDIR\Updater.exe" + CreateShortcut "$SMPROGRAMS\Steam Deck Tools\Uninstall.lnk" "$INSTDIR\Uninstall.exe" +SectionEnd + +!ifdef USE_REDIST + Section "Visual Studio Runtime" VisualStudioRuntime + SetOutPath "$INSTDIR\Redist" + File "Redist\vc_redist.x64.exe" + ExecWait '"$INSTDIR\Redist\vc_redist.x64.exe" /passive /norestart' + SectionEnd + + Section "ViGEmBus Setup 1.21.442" ViGEmBus + SetOutPath "$INSTDIR\Redist" + File "Redist\ViGEmBus_1.21.442_x64_x86_arm64.exe" + ExecWait '"$INSTDIR\Redist\ViGEmBus_1.21.442_x64_x86_arm64.exe" /quiet /norestart' + SectionEnd + + Section ".NET Desktop Runtime 6.0.11" DotNetRuntime + SetOutPath "$INSTDIR\Redist" + File "Redist\windowsdesktop-runtime-6.0.11-win-x64.exe" + ExecWait '"$INSTDIR\Redist\windowsdesktop-runtime-6.0.11-win-x64.exe" /passive /norestart' + SectionEnd +!endif + +!ifdef USE_WINGET + Section "Visual Studio Runtime" VisualStudioRuntime + ExecWait 'winget install -e --id Microsoft.VC++2015-2022Redist-x64 --override "/passive /norestart"' + SectionEnd + + Section "ViGEmBus Setup" ViGEmBus + ExecWait 'winget install -e --id ViGEm.ViGEmBus' + SectionEnd + + Section ".NET Desktop Runtime 6.0" DotNetRuntime + ExecWait 'winget install -e --id Microsoft.DotNet.DesktopRuntime.6 --override "/passive /norestart"' + SectionEnd +!endif + +Section "Run on Startup" StartAllComponents + Exec '"$INSTDIR\FanControl.exe" -run-on-startup' + Exec '"$INSTDIR\PerformanceOverlay.exe" -run-on-startup' + Exec '"$INSTDIR\PowerControl.exe" -run-on-startup' + Exec '"$INSTDIR\SteamController.exe" -run-on-startup' +SectionEnd + +;-------------------------------- +;Installer Functions + +Function .onInit + + !insertmacro MUI_LANGDLL_DISPLAY + +FunctionEnd + +;-------------------------------- +;Descriptions + + ;USE A LANGUAGE STRING IF YOU WANT YOUR DESCRIPTIONS TO BE LANGAUGE SPECIFIC + + ;Assign descriptions to sections + !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN + !insertmacro MUI_DESCRIPTION_TEXT ${SteamDeckTools} "The Steam Deck Tools components." + !ifdef USE_REDIST | USE_WINGET + !insertmacro MUI_DESCRIPTION_TEXT ${VisualStudioRuntime} "Install Visual Studio C++ Runtime 2015-2022." + !insertmacro MUI_DESCRIPTION_TEXT ${DotNetRuntime} "Install .NET Desktop Runtime 6.0." + !insertmacro MUI_DESCRIPTION_TEXT ${ViGEmBus} "Install ViGEmBus Driver." + !endif + !insertmacro MUI_DESCRIPTION_TEXT ${DesktopShortcut} "Create a shortcut on your desktop." + !insertmacro MUI_DESCRIPTION_TEXT ${ProgramsShortcut} "Create a shortcut in your start menu folder." + !insertmacro MUI_DESCRIPTION_TEXT ${StartAllComponents} "Start all components on system boot." + !insertmacro MUI_FUNCTION_DESCRIPTION_END + +;-------------------------------- +;Uninstaller Section + +Section "Uninstall" + SetShellVarContext all + + ExecWait '"$INSTDIR\FanControl.exe" -uninstall' + ExecWait '"$INSTDIR\PerformanceOverlay.exe" -uninstall' + ExecWait '"$INSTDIR\PowerControl.exe" -uninstall' + ExecWait '"$INSTDIR\SteamController.exe" -uninstall' + ExecWait '"$INSTDIR\Updater.exe" -uninstall' + + Delete "$INSTDIR\*" + Delete "$DESKTOP\Fan Control.lnk" + Delete "$DESKTOP\Performance Overlay.lnk" + Delete "$DESKTOP\Power Control.lnk" + Delete "$DESKTOP\Steam Controller.lnk" + Delete "$SMPROGRAMS\Steam Deck Tools\Fan Control.lnk" + Delete "$SMPROGRAMS\Steam Deck Tools\Performance Overlay.lnk" + Delete "$SMPROGRAMS\Steam Deck Tools\Power Control.lnk" + Delete "$SMPROGRAMS\Steam Deck Tools\Steam Controller.lnk" + Delete "$SMPROGRAMS\Steam Deck Tools\Check for Updates.lnk" + Delete "$SMPROGRAMS\Steam Deck Tools\Uninstall.lnk" + RMDir "$SMPROGRAMS\Steam Deck Tools" + + DeleteRegKey /ifempty HKLM "Software\SteamDeckTools" + DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SteamDeckTools" +SectionEnd + +;-------------------------------- +;Uninstaller Functions + +Function un.onInit + + !insertmacro MUI_UNGETLANGUAGE + +FunctionEnd diff --git a/scripts/build_installer.bat b/scripts/build_installer.bat new file mode 100644 index 0000000..b20ce64 --- /dev/null +++ b/scripts/build_installer.bat @@ -0,0 +1,3 @@ +cd "%~dp0" +powershell -File "build.ps1" Debug +"C:\Program Files (x86)\nsis\Bin\makensis.exe" /V3 /DUSE_WINGET /DBUILD_DIR=../build-Debug SteamDeckTools_Setup.nsi