From d9dd2f23570cebc07580c0655ad6f418699e93e7 Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Fri, 17 Jul 2015 19:18:10 +0100 Subject: [PATCH] Rewrite installer using Inno Setup instead of NSIS. For #467. Korean and Simplified Chinese expect the unofficial translation files to be dropped into the folder that holds the rest of the translation files. If the files are missing, their translations will not be included when the installer is built. The translated strings were done in Google Translate and checked in Bing Translate. They should at least be legible, if not great quality. The README now refers to Inno Setup, and the CONTRIBUTING file has been generally updated both for the switch to Inno and the recent code refactoring. --- CONTRIBUTING.md | 22 +- README.md | 4 +- src/installer.iss | 266 +++++++++++++++++++ src/installer.nsi | 637 ---------------------------------------------- 4 files changed, 281 insertions(+), 648 deletions(-) create mode 100644 src/installer.iss delete mode 100644 src/installer.nsi diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f870bbf5..86e03b35 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -8,7 +8,7 @@ A general guide to contributing to LOOT, may be found on [LOOT's wiki](https://g The repository branching structure is pretty simple: * The `master` branch is a ready-to-release branch. It will generally hold code newer than the latest release, but which could be prepared (ie. update version number, changelog) and packaged for release fairly quickly and easily. Code on this branch *should* be reasonably bug free and features will be complete. -* The `dev` branch is a next-release branch. It holds code that's working towards the next big release but which isn't there yet. Code is generally buggy and features incomplete (though this will vary considerably through the development cycle. +* The `dev` branch is a next-release branch. It holds code that's working towards the next big release but which isn't there yet. Code is generally buggy and features incomplete (though this will vary considerably through the development cycle). * Other branches are generally themed on specific features or groups of changes, and come and go as they are merged into one of the two above, or discarded. ## Getting Involved @@ -33,11 +33,13 @@ To translate everything but masterlist messages, first fork this repository. All ### Translating the Installer -1. Open the installer script at `src/installer.nsi` in a text editor of your choice. -2. The English strings are located in the section with the heading `English Strings`. Create a copy of this section below the original. -3. Translate the quoted strings in the copied section, replacing the English text. For the lines beginning `VIAddVersionKey`, only translate the second quoted string. -4. Add an `!insertmacro MUI_LANGUAGE ""` line to the section with the headering `Languages`. `` is the NSIS name for your language: a perhaps incomplete example of accepted values can be found in [this script](http://nsis.sourceforge.net/Examples/Modern%20UI/MultiLanguage.nsi). -3. Save your changes. +First check that an [Inno Setup translation](http://www.jrsoftware.org/files/istrans/) exists for your language. Unofficial translations are acceptable, but require a bit of extra handling. If there isn't an official or unofficial translation for Inno Setup, you're better off making a translation and getting it listed on the linked page before continuing. + +1. Open the installer script at `src/installer.iss` in a text editor of your choice. +2. If your language only has an unofficial translation, add a `#define Exists` block for it near the top of the script, like it has been done for Korean and Simplified Chinese. +3. Add your language to the `[Languages]` section. The `Name` must be the POSIX locale code for your language. The `MessagesFile` filename is the filename of the Inno Setup translation that you checked exists. If your language only has an unofficial translation, wrap its line in `#ifdef` and `#endif` lines, again like it has been done for Korean and Simplified Chinese. +4. Translate the string(s) in the `[CustomMessages]` into your language, following the example of the existing translations. Again, if your language only has an unofficial translation, wrap its line(s) in `#ifdef` and `#endif` lines. +5. Save your changes. ### Translating the LOOT application @@ -45,7 +47,7 @@ To translate everything but masterlist messages, first fork this repository. All 2. If you are starting a new translation, select `File->New catalogue from POT file...` and choose the template file at `resources/l10n/template.pot`. In the `Catalog properties` dialog, just click `OK` without changing anything. 3. If you are updating a previous translation, open in Poedit the `loot.po` translation file in the relevant subdirectory of `resources/l10n`, then select `Catalogue->Update from POT file...` and choose the template file you downloaded. Click `OK` in the `Update summary` dialog. 4. Edit the translation file to add or update translations of the programs' text. Strings that were added since the last translation are displayed in bold and dark blue, and strings you have edited the translations of are marked with a star to the left of their source text in the main list. -5. Save the translation file with the filename `loot.po` in `resources/l10n//LC_MESSAGES/`, where `` is your language's locale code. +5. Save the translation file with the filename `loot.po` in `resources/l10n//LC_MESSAGES/`, where `` is your language's POSIX locale code. Some languages may use different words or phrases for different contexts where only one word or phrase may be used for all contexts in English. While no contextual information is supplied to translators by default, it can be added on request. To request the addition of contextual information to a text string, create an issue for your request in LOOT's [source code issue tracker](https://github.com/loot/loot/issues), quoting the string for which you are requesting contextual information. @@ -58,9 +60,9 @@ Some strings to be translated may contain special characters. Different types of If you're adding a new translation, LOOT's source code must be updated to recognise it. You can do this yourself and include the changes in your translation's pull request if you wish. The files and functions which must be updated are given below. -* In [helpers.h](src/backend/helpers.h), add a constant for the language to the `Language` class, and update `Language::Names()`. -* In [helpers.cpp](src/backend/helpers.cpp), update `Language::Language(const std::string& nameOrCode)` and `Language::Construct(const unsigned int code)`. +* In [language.h](src/backend/helpers/language.h), add a static constant for the language to the `Language` class. +* In [language.cpp](src/backend/helpers/language.cpp), define the value for the constant you added, and update `Language::Language(const std::string& locale)`, `Language::Construct(const unsigned int code)` and `Language::Codes({...})` to include lines for your language. * Add constants for the language in [api.h](src/api/api.h) and [api.cpp](src/api/api.cpp). * In [archive.py](src/archive.py), add the language folder to the inline list on line 68. -* In [installer.nsi](src/installer.nsi), add entries for the language folder to the install and uninstall sections. +* In [installer.iss](src/installer.iss), add an entry for your language's translation file to the `[Files]` section. * In [LOOT Metadata Syntax.html](docs/LOOT%20Metadata%20Syntax.html), add a row for your language to the Language Codes table. diff --git a/README.md b/README.md index 58cc1dcf..6a9faac5 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,9 @@ To install Bower and Vulcanize, first install [Node](http://nodejs.org/), and ru ## Packaging Releases -Installer and zip archive releases for the main LOOT application can be handled by running the scripts `installer.nsi` and `archive.py` in the `src` folder respectively. The installer script requires [NSIS 3](http://nsis.sourceforge.net/), while the archive script requires [Python](http://www.python.org/) (2 or 3). The installer and archive files are created in the `build/` folder, relative to the repository root. +Installer and zip archive releases for the main LOOT application can be handled by running the `src/installer.iss` and `src/archive.py` scripts respectively. The installer script requires [Inno Setup](http://www.jrsoftware.org/isinfo.php), with the unofficial Korean and Simplified C, while the archive script requires [Python](http://www.python.org/) (2 or 3). The installer and archive files are created in the `build/` folder, relative to the repository root. + +If the unofficial Korean and Simplified Chinese Inno Setup translation files are installed alongside the official translation files, then the installer script will also offer those language options. If they are not found, the installer will be built without them. If you have [Git for Windows (msysGit)](https://msysgit.github.io/) or [GitHub for Windows](https://windows.github.com/) installed and you're building from a clone of this repository, the archive script will give archives descriptive names using the output of `git describe --tags --long`. If you have [7-Zip](http://7-zip.org) installed, `.7z` archives will be created. Otherwise, archives will be named `LOOT Archive` and created as deflate-compressed zip files. diff --git a/src/installer.iss b/src/installer.iss new file mode 100644 index 00000000..6d841372 --- /dev/null +++ b/src/installer.iss @@ -0,0 +1,266 @@ +; LOOT installer Inno Setup script. +; This file must be encoded in UTF-8 WITH a BOM for Unicode text to +; be displayed correctly. + +#define MyAppName "LOOT" +#define MyAppVersion "0.8.0" +#define MyAppPublisher "LOOT Team" +#define MyAppURL "http://loot.github.io" +#define MyAppExeName "LOOT.exe" + +#if FileExists(AddBackslash(CompilerPath) + 'Languages\Korean.isl') +#define KoreanExists +#endif + +#if FileExists(AddBackslash(CompilerPath) + 'Languages\ChineseSimplified.isl') +#define SimplifiedChineseExists +#endif + +[Setup] +; NOTE: The value of AppId uniquely identifies this application. +; Do not use the same AppId value in installers for other applications. +; (To generate a new GUID, click Tools | Generate GUID inside the IDE.) +AppId={{BF634210-A0D4-443F-A657-0DCE38040374} +AppName={#MyAppName} +AppVersion={#MyAppVersion} +;AppVerName={#MyAppName} {#MyAppVersion} +AppPublisher={#MyAppPublisher} +AppPublisherURL={#MyAppURL} +AppSupportURL={#MyAppURL} +AppUpdatesURL={#MyAppURL} +AppCopyright=Copyright (C) 2009-2015 {#MyAppPublisher} +DefaultDirName={pf}\{#MyAppName} +DefaultGroupName={#MyAppName} +AllowNoIcons=yes +SourceDir=..\ +OutputBaseFilename=LOOT Installer +OutputDir=build +SetupIconFile=resources\icon.ico +Compression=lzma +SolidCompression=yes +DisableReadyPage=yes + +[Languages] +Name: "en"; MessagesFile: "compiler:Default.isl" +Name: "pt_BR"; MessagesFile: "compiler:Languages\BrazilianPortuguese.isl" +Name: "da"; MessagesFile: "compiler:Languages\Danish.isl" +Name: "fi"; MessagesFile: "compiler:Languages\Finnish.isl" +Name: "fr"; MessagesFile: "compiler:Languages\French.isl" +Name: "de"; MessagesFile: "compiler:Languages\German.isl" +#ifdef KoreanExists +Name: "ko"; MessagesFile: "compiler:Languages\Korean.isl" +#endif +Name: "pl"; MessagesFile: "compiler:Languages\Polish.isl" +Name: "ru"; MessagesFile: "compiler:Languages\Russian.isl" +#ifdef SimplifiedChineseExists +Name: "zh_CN"; MessagesFile: "compiler:Languages\ChineseSimplified.isl" +#endif +Name: "es"; MessagesFile: "compiler:Languages\Spanish.isl" + +[Tasks] +Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked + +[Files] +Source: "build\Release\LOOT.exe"; \ +DestDir: "{app}"; Flags: ignoreversion +Source: "build\Release\cef.pak"; \ +DestDir: "{app}"; Flags: ignoreversion +Source: "build\Release\cef_100_percent.pak"; \ +DestDir: "{app}"; Flags: ignoreversion +Source: "build\Release\cef_200_percent.pak"; \ +DestDir: "{app}"; Flags: ignoreversion +Source: "build\Release\d3dcompiler_47.dll"; \ +DestDir: "{app}"; Flags: ignoreversion +Source: "build\Release\devtools_resources.pak"; \ +DestDir: "{app}"; Flags: ignoreversion +Source: "build\Release\icudtl.dat"; \ +DestDir: "{app}"; Flags: ignoreversion +Source: "build\Release\libcef.dll"; \ +DestDir: "{app}"; Flags: ignoreversion +Source: "build\Release\libEGL.dll"; \ +DestDir: "{app}"; Flags: ignoreversion +Source: "build\Release\libGLESv2.dll"; \ +DestDir: "{app}"; Flags: ignoreversion +Source: "build\Release\wow_helper.exe"; \ +DestDir: "{app}"; Flags: ignoreversion + +Source: "docs\LOOT Metadata Syntax.html"; \ +DestDir: "{app}\docs"; Flags: ignoreversion +Source: "docs\LOOT Readme.html"; \ +DestDir: "{app}\docs"; Flags: ignoreversion isreadme +Source: "docs\licenses\*"; \ +DestDir: "{app}\docs\licenses"; Flags: ignoreversion +Source: "docs\images\main.png"; \ +DestDir: "{app}\docs\images"; Flags: ignoreversion +Source: "docs\images\settings.png"; \ +DestDir: "{app}\docs\images"; Flags: ignoreversion + +Source: "resources\report\index.html"; \ +DestDir: "{app}\resources\report"; Flags: ignoreversion +Source: "resources\report\bower_components\marked\lib\marked.js"; \ +DestDir: "{app}\resources\report\bower_components\marked\lib"; Flags: ignoreversion +Source: "resources\report\bower_components\Jed\jed.js"; \ +DestDir: "{app}\resources\report\bower_components\Jed"; Flags: ignoreversion +Source: "resources\report\bower_components\jed-gettext-parser\jedGettextParser.js"; \ +DestDir: "{app}\resources\report\bower_components\jed-gettext-parser"; Flags: ignoreversion +Source: "resources\report\css\dark-theme.css"; \ +DestDir: "{app}\resources\report\css"; Flags: ignoreversion +Source: "resources\report\js\events.js"; \ +DestDir: "{app}\resources\report\js"; Flags: ignoreversion +Source: "resources\report\js\filters.js"; \ +DestDir: "{app}\resources\report\js"; Flags: ignoreversion +Source: "resources\report\js\helpers.js"; \ +DestDir: "{app}\resources\report\js"; Flags: ignoreversion +Source: "resources\report\js\l10n.js"; \ +DestDir: "{app}\resources\report\js"; Flags: ignoreversion +Source: "resources\report\js\loot.js"; \ +DestDir: "{app}\resources\report\js"; Flags: ignoreversion +Source: "resources\report\js\plugin.js"; \ +DestDir: "{app}\resources\report\js"; Flags: ignoreversion +Source: "resources\report\fonts\*"; \ +DestDir: "{app}\resources\report\fonts"; Flags: ignoreversion + +Source: "resources\l10n\da\LC_MESSAGES\loot.mo"; \ +DestDir: "{app}\resources\l10n\da\LC_MESSAGES"; Flags: ignoreversion +Source: "resources\l10n\de\LC_MESSAGES\loot.mo"; \ +DestDir: "{app}\resources\l10n\de\LC_MESSAGES"; Flags: ignoreversion +Source: "resources\l10n\es\LC_MESSAGES\loot.mo"; \ +DestDir: "{app}\resources\l10n\es\LC_MESSAGES"; Flags: ignoreversion +Source: "resources\l10n\fi\LC_MESSAGES\loot.mo"; \ +DestDir: "{app}\resources\l10n\fi\LC_MESSAGES"; Flags: ignoreversion +Source: "resources\l10n\fr\LC_MESSAGES\loot.mo"; \ +DestDir: "{app}\resources\l10n\fr\LC_MESSAGES"; Flags: ignoreversion +Source: "resources\l10n\ko\LC_MESSAGES\loot.mo"; \ +DestDir: "{app}\resources\l10n\ko\LC_MESSAGES"; Flags: ignoreversion +Source: "resources\l10n\pl\LC_MESSAGES\loot.mo"; \ +DestDir: "{app}\resources\l10n\pl\LC_MESSAGES"; Flags: ignoreversion +Source: "resources\l10n\pt_BR\LC_MESSAGES\loot.mo"; \ +DestDir: "{app}\resources\l10n\pt_BR\LC_MESSAGES"; Flags: ignoreversion +Source: "resources\l10n\ru\LC_MESSAGES\loot.mo"; \ +DestDir: "{app}\resources\l10n\ru\LC_MESSAGES"; Flags: ignoreversion +Source: "resources\l10n\zh_CN\LC_MESSAGES\loot.mo"; \ +DestDir: "{app}\resources\l10n\zh_CN\LC_MESSAGES"; Flags: ignoreversion + +Source: "resources\settings.yaml"; \ +DestDir: "{localappdata}\{#MyAppName}"; Flags: onlyifdoesntexist uninsneveruninstall; AfterInstall: SetLOOTLanguage +; NOTE: Don't use "Flags: ignoreversion" on any shared system files + +[Icons] +Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}" +Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}" +Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon + +[Run] +Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent + +[Registry] +; Store install path for backwards-compatibility with old NSIS install script behaviour. +Root: HKLM; Subkey: "Software\LOOT"; ValueType: string; ValueName: "Installed Path"; ValueData: "{app}"; Flags: deletekey uninsdeletekey + +[UninstallDelete] +Type: files; Name: "{localappdata}\{#MyAppName}\"; +Type: files; Name: "{localappdata}\{#MyAppName}\"; + +Type: files; Name: "{localappdata}\{#MyAppName}\Oblivion\masterlist.yaml"; +Type: files; Name: "{localappdata}\{#MyAppName}\Skyrim\masterlist.yaml"; +Type: files; Name: "{localappdata}\{#MyAppName}\Fallout3\masterlist.yaml"; +Type: files; Name: "{localappdata}\{#MyAppName}\FalloutNV\masterlist.yaml"; + +Type: filesandordirs; Name: "{localappdata}\{#MyAppName}\Oblivion\.git"; +Type: filesandordirs; Name: "{localappdata}\{#MyAppName}\Skyrim\.git"; +Type: filesandordirs; Name: "{localappdata}\{#MyAppName}\Fallout3\.git"; +Type: filesandordirs; Name: "{localappdata}\{#MyAppName}\FalloutNV\.git"; + +Type: dirifempty; Name: "{localappdata}\{#MyAppName}\Oblivion"; +Type: dirifempty; Name: "{localappdata}\{#MyAppName}\Skyrim"; +Type: dirifempty; Name: "{localappdata}\{#MyAppName}\Fallout3"; +Type: dirifempty; Name: "{localappdata}\{#MyAppName}\FalloutNV"; + +Type: dirifempty; Name: "{localappdata}\{#MyAppName}"; + +[CustomMessages] +en.DeleteUserFiles=Do you want to delete your settings and user metadata? +;pt_BR.DeleteUserFiles= +da.DeleteUserFiles=Ønsker du at slette dine indstillinger og bruger metadata? +fi.DeleteUserFiles=Haluatko poistaa asetukset ja käyttäjä metatiedot? +fr.DeleteUserFiles=Voulez-vous supprimer vos paramètres et les métadonnées de l'utilisateur? +de.DeleteUserFiles=Möchten Sie Ihre Einstellungen und Benutzer-Metadaten löschen? +#ifdef KoreanExists +ko.DeleteUserFiles=당신은 당신의 설정과 사용자 메타 데이터를 삭제 하시겠습니까? +#endif +pl.DeleteUserFiles=Czy chcesz usunąć ustawienia i metadane użytkownika? +ru.DeleteUserFiles=Вы хотите, чтобы удалить настройки и метаданные пользователя? +#ifdef SimplifiedChineseExists +zh_CN.DeleteUserFiles=你想删除您的设置和用户的元数据? +#endif +es.DeleteUserFiles=¿Quieres borrar sus ajustes y metadatos de usuario? + +[Code] +// Set LOOT's language in settings.yaml +procedure SetLOOTLanguage(); +var + SearchLineStart: String; + ReplaceLine: String; + Lines: TArrayOfString; + I: Integer; +begin + if ActiveLanguage = 'en' then + exit; + + SearchLineStart := 'language:'; + ReplaceLine := 'language: ' + ActiveLanguage; + + if LoadStringsFromFile(ExpandConstant(CurrentFileName), Lines) = True then begin + for I := 0 to GetArrayLength(Lines) - 1 do begin + if Copy(Lines[I], 0, Length(SearchLineStart)) = SearchLineStart then begin + Lines[I] := ReplaceLine; + SaveStringsToUTF8File(ExpandConstant(CurrentFileName), Lines, False) + Break; + end; + end; + end; +end; +// Query user whether their data files should be deleted on uninstall. +procedure CurUninstallStepChanged (CurUninstallStep: TUninstallStep); +begin + // Don't remove user data if the uninstall is silent. + if UninstallSilent then + exit; + if CurUninstallStep = usUninstall then begin + if MsgBox(CustomMessage('DeleteUserFiles'), mbConfirmation, MB_YESNO or MB_DEFBUTTON2) = IDYES + then begin + DeleteFile(ExpandConstant('{localappdata}\{#MyAppName}\LOOTDebugLog.txt')); + DeleteFile(ExpandConstant('{localappdata}\{#MyAppName}\CEFDebugLog.txt')); + DeleteFile(ExpandConstant('{localappdata}\{#MyAppName}\settings.yaml')); + DeleteFile(ExpandConstant('{localappdata}\{#MyAppName}\Oblivion\userlist.yaml')); + DeleteFile(ExpandConstant('{localappdata}\{#MyAppName}\Skyrim\userlist.yaml')); + DeleteFile(ExpandConstant('{localappdata}\{#MyAppName}\Fallout3\userlist.yaml')); + DeleteFile(ExpandConstant('{localappdata}\{#MyAppName}\FalloutNV\userlist.yaml')); + end; + end; +end; +// Run a previous install's uninstaller before starting this installation. +procedure CurStepChanged(CurStep: TSetupStep); +var + RegKey: String; + RegValue: String; + ResultCode: Integer; +begin + if CurStep = ssInstall then begin + // First try using the Inno Setup installer's uninstall Registry key to get + // the uninstaller's path. This is necessary instead of just using the + // backwards-compatible key because the filename of the uninstaller created + // by Inno Setup can vary. + RegKey := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\{#emit SetupSetting("AppId")}_is1'); + if RegQueryStringValue(HKLM, RegKey, 'UninstallString', RegValue) then begin + Exec(RemoveQuotes(RegValue), '/VERYSILENT', '', SW_HIDE, ewWaitUntilTerminated, ResultCode); + // Now try using the backwards-compatible Registry key, and run the NSIS + // uninstaller, which has a fixed filename. + end + else begin + if RegQueryStringValue(HKLM, 'Software\LOOT', 'Installed Path', RegValue) then begin + Exec(RegValue + '\Uninstall.exe', '/VERYSILENT', '', SW_HIDE, ewWaitUntilTerminated, ResultCode); + end; + end; + end; +end; diff --git a/src/installer.nsi b/src/installer.nsi deleted file mode 100644 index 0b8ecfa6..00000000 --- a/src/installer.nsi +++ /dev/null @@ -1,637 +0,0 @@ -;LOOT NSIS Installer Script - -;-------------------------------- -;Include NSIS files. - - !include "MUI2.nsh" - !include "x64.nsh" - !include "LogicLib.nsh" - !include "nsDialogs.nsh" - -;-------------------------------- -;General - - ; Display Unicode text correctly. - Unicode true - - ;Name, file and version info for installer. - Name "LOOT v0.8.0" - OutFile "..\build\LOOT Installer.exe" - VIProductVersion 0.8.0.0 - - ;Request application privileges for Windows Vista/7 - RequestExecutionLevel admin - - ;Icon for installer\uninstaller - !define MUI_ICON "..\resources\icon.ico" - !define MUI_UNICON "..\resources\icon.ico" - - ; This causes an "are you sure?" message to be displayed if you try to quit the installer or uninstaller. - !define MUI_ABORTWARNING - !define MUI_UNABORTWARNING - - ;Checks that the installer's CRC is correct. - CRCCheck force - - ;The SOLID lzma compressor gives the best compression ratio. - SetCompressor /SOLID lzma - - ;Default install directory. - InstallDir "$PROGRAMFILES\LOOT" - InstallDirRegKey HKLM "Software\LOOT" "Installed Path" - -;-------------------------------- -; Helper Function - -Function ReplaceLineStr - Exch $R0 ; string to replace that whole line with - Exch - Exch $R1 ; string that line should start with - Exch - Exch 2 - Exch $R2 ; file - Push $R3 ; file handle - Push $R4 ; temp file - Push $R5 ; temp file handle - Push $R6 ; global - Push $R7 ; input string length - Push $R8 ; line string length - Push $R9 ; global - - StrLen $R7 $R1 - - GetTempFileName $R4 - - FileOpen $R5 $R4 w - FileOpen $R3 $R2 r - - ReadLoop: - ClearErrors - FileRead $R3 $R6 - IfErrors Done - - StrLen $R8 $R6 - StrCpy $R9 $R6 $R7 -$R8 - StrCmp $R9 $R1 0 +3 - - FileWrite $R5 "$R0$\r$\n" - Goto ReadLoop - - FileWrite $R5 $R6 - Goto ReadLoop - - Done: - - FileClose $R3 - FileClose $R5 - - SetDetailsPrint none - Delete $R2 - Rename $R4 $R2 - SetDetailsPrint both - - Pop $R9 - Pop $R8 - Pop $R7 - Pop $R6 - Pop $R5 - Pop $R4 - Pop $R3 - Pop $R2 - Pop $R1 - Pop $R0 -FunctionEnd - -;-------------------------------- -;Pages - - !define MUI_CUSTOMFUNCTION_GUIINIT onGUIInit - - !insertmacro MUI_PAGE_WELCOME - !insertmacro MUI_PAGE_DIRECTORY - !insertmacro MUI_PAGE_INSTFILES - !define MUI_FINISHPAGE_NOAUTOCLOSE - !define MUI_FINISHPAGE_RUN "$INSTDIR\LOOT.exe" - !define MUI_FINISHPAGE_RUN_TEXT "$(Text_Run)" - !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\Docs\LOOT Readme.html" - !define MUI_FINISHPAGE_SHOWREADME_TEXT "$(Text_ShowReadme)" - !insertmacro MUI_PAGE_FINISH - - !insertmacro MUI_UNPAGE_WELCOME - !insertmacro MUI_UNPAGE_COMPONENTS - !insertmacro MUI_UNPAGE_CONFIRM - !insertmacro MUI_UNPAGE_INSTFILES - -;-------------------------------- -;Languages - - !insertmacro MUI_LANGUAGE "English" - !insertmacro MUI_LANGUAGE "Russian" - !insertmacro MUI_LANGUAGE "German" - !insertmacro MUI_LANGUAGE "Spanish" - !insertmacro MUI_LANGUAGE "SimpChinese" - !insertmacro MUI_LANGUAGE "French" - !insertmacro MUI_LANGUAGE "Polish" - !insertmacro MUI_LANGUAGE "Finnish" - !insertmacro MUI_LANGUAGE "Danish" - !insertmacro MUI_LANGUAGE "Korean" - !insertmacro MUI_RESERVEFILE_LANGDLL - -;-------------------------------- -;English Strings - - VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "LOOT" - VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "LOOT Team" - VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "© 2009-2015 LOOT Team" - VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Installer for LOOT 0.8.0" - VIAddVersionKey /LANG=${LANG_ENGLISH} "FileVersion" "0.8.0" - - LangString TEXT_MESSAGEBOX ${LANG_ENGLISH} "LOOT is already installed, and must be uninstalled before continuing. $\n$\nClick `OK` to remove the previous version or `Cancel` to cancel this upgrade." - LangString TEXT_RUN ${LANG_ENGLISH} "Run LOOT" - LangString TEXT_SHOWREADME ${LANG_ENGLISH} "View Readme" - LangString TEXT_MAIN ${LANG_ENGLISH} "All LOOT's files, minus userlists and settings file." - LangString TEXT_USERFILES ${LANG_ENGLISH} "LOOT's userlist files and settings file." - -;-------------------------------- -;Russian (Русский) Strings - - VIAddVersionKey /LANG=${LANG_RUSSIAN} "ProductName" "LOOT" - VIAddVersionKey /LANG=${LANG_RUSSIAN} "CompanyName" "LOOT Team" - VIAddVersionKey /LANG=${LANG_RUSSIAN} "LegalCopyright" "© 2009-2015 LOOT Team" - VIAddVersionKey /LANG=${LANG_RUSSIAN} "FileDescription" "Установщик для LOOT 0.8.0" - VIAddVersionKey /LANG=${LANG_RUSSIAN} "FileVersion" "0.8.0" - - LangString TEXT_MESSAGEBOX ${LANG_RUSSIAN} "LOOT уже установлен и должен быть удален перед продолжением. $\n$\nНажмите `OK` для удаления предыдущей версии или `Отмена` для отмены обновления." - LangString TEXT_RUN ${LANG_RUSSIAN} "Запустить LOOT" - LangString TEXT_SHOWREADME ${LANG_RUSSIAN} "Просмотр документации" - LangString TEXT_MAIN ${LANG_RUSSIAN} "Все файлы LOOT, кроме пользовательских списков и файла настроек" - LangString TEXT_USERFILES ${LANG_RUSSIAN} "Файлы пользовательских списков LOOT и файл настроек." - -;-------------------------------- -;French (Français) Strings - - VIAddVersionKey /LANG=${LANG_FRENCH} "ProductName" "LOOT" - VIAddVersionKey /LANG=${LANG_FRENCH} "CompanyName" "LOOT Team" - VIAddVersionKey /LANG=${LANG_FRENCH} "LegalCopyright" "© 2009-2015 LOOT Team" - VIAddVersionKey /LANG=${LANG_FRENCH} "FileDescription" "Programme d'installation pour LOOT 0.8.0" - VIAddVersionKey /LANG=${LANG_FRENCH} "FileVersion" "0.8.0" - - LangString TEXT_MESSAGEBOX ${LANG_FRENCH} "LOOT est déjà installé, et doit être désinstallé avant de continuer. $\n$\nCliquer sur `OK` pour désinstaller la version précédente ou 'Annuler' pour annuler la mise à jour." - LangString TEXT_RUN ${LANG_FRENCH} "Lancer LOOT" - LangString TEXT_SHOWREADME ${LANG_FRENCH} "Afficher la documentation" - LangString TEXT_MAIN ${LANG_FRENCH} "Tous les fichiers de LOOT, sauf les userlists et les règlages." - LangString TEXT_USERFILES ${LANG_FRENCH} "L'userlist de LOOT et les règlages." - -;-------------------------------- -;Spanish (castellano) Strings - - VIAddVersionKey /LANG=${LANG_SPANISH} "ProductName" "LOOT" - VIAddVersionKey /LANG=${LANG_SPANISH} "CompanyName" "LOOT Team" - VIAddVersionKey /LANG=${LANG_SPANISH} "LegalCopyright" "© 2009-2015 LOOT Team" - VIAddVersionKey /LANG=${LANG_SPANISH} "FileDescription" "El instalador para LOOT 0.8.0" - VIAddVersionKey /LANG=${LANG_SPANISH} "FileVersion" "0.8.0" - - LangString TEXT_MESSAGEBOX ${LANG_SPANISH} "LOOT está instalado, y debe ser desinstalado antes de continuar. $\n$\nPresione `OK` para eliminar la versión anterior o `Cancel` para cancelar la actualización." - LangString TEXT_RUN ${LANG_SPANISH} "Ejecutar LOOT" - LangString TEXT_SHOWREADME ${LANG_SPANISH} "Ver Léame" - LangString TEXT_MAIN ${LANG_SPANISH} "Todos los archivos de LOOT, menos la lista de usuario y configuraciónes." - LangString TEXT_USERFILES ${LANG_SPANISH} "La lista de usuario y configuraciónes." - -;-------------------------------- -;Simplified Chinese (简体中文) Strings - - VIAddVersionKey /LANG=${LANG_SIMPCHINESE} "ProductName" "LOOT" - VIAddVersionKey /LANG=${LANG_SIMPCHINESE} "CompanyName" "LOOT Team" - VIAddVersionKey /LANG=${LANG_SIMPCHINESE} "LegalCopyright" "© 2009-2015 LOOT Team" - VIAddVersionKey /LANG=${LANG_SIMPCHINESE} "FileDescription" "LOOT 0.8.0安装包" - VIAddVersionKey /LANG=${LANG_SIMPCHINESE} "FileVersion" "0.8.0" - - LangString TEXT_MESSAGEBOX ${LANG_SIMPCHINESE} "检测到旧版LOOT,您需要先卸载旧版才能安装新版。$\n$\n点击“确定”卸载旧版本或者“取消”取消更新。" - LangString TEXT_RUN ${LANG_SIMPCHINESE} "运行LOOT" - LangString TEXT_SHOWREADME ${LANG_SIMPCHINESE} "查看说明" - LangString TEXT_MAIN ${LANG_SIMPCHINESE} "所有LOOT文件(除userlist和配置文件)" - LangString TEXT_USERFILES ${LANG_SIMPCHINESE} "LOOT的userlist和配置文件。" - -;-------------------------------- -;Polish (POLSKI) Strings - - VIAddVersionKey /LANG=${LANG_POLISH} "ProductName" "LOOT" - VIAddVersionKey /LANG=${LANG_POLISH} "CompanyName" "LOOT Team" - VIAddVersionKey /LANG=${LANG_POLISH} "LegalCopyright" "© 2009-2015 LOOT Team" - VIAddVersionKey /LANG=${LANG_POLISH} "FileDescription" "Instalator dla LOOT 0.8.0" - VIAddVersionKey /LANG=${LANG_POLISH} "FileVersion" "0.8.0" - - LangString TEXT_MESSAGEBOX ${LANG_POLISH} "LOOT jest już zainstalowany i musi zostać odinstalowany przed instalowaniem tej wersji. $\n$\nClick `OK` aby odinstalować lub `Cancel` aby anulować aktualizację." - LangString TEXT_RUN ${LANG_POLISH} " Uruchom LOOT" - LangString TEXT_SHOWREADME ${LANG_POLISH} "Czytaj Readme" - LangString TEXT_MAIN ${LANG_POLISH} "Wszystkie pliki LOOT bez ustawień i plików użytkownika." - LangString TEXT_USERFILES ${LANG_POLISH} "Wszystkie pliki LOOT oraz ustawienia użytkownika ." - -;-------------------------------- -;Finnish Strings - - VIAddVersionKey /LANG=${LANG_FINNISH} "ProductName" "LOOT" - VIAddVersionKey /LANG=${LANG_FINNISH} "CompanyName" "LOOT Team" - VIAddVersionKey /LANG=${LANG_FINNISH} "LegalCopyright" "© 2009-2015 LOOT Team" - VIAddVersionKey /LANG=${LANG_FINNISH} "FileDescription" "LOOT 0.8.0 Asennusohjelma" - VIAddVersionKey /LANG=${LANG_FINNISH} "FileVersion" "0.8.0" - - LangString TEXT_MESSAGEBOX ${LANG_FINNISH} "LOOT on jo asennettu ja vanha asennus on poistettava ennen jatkamista. $\n$\nKlikkaa 'OK' poistaaksesi vanhan version tai 'Peruuta' peruuttaaksesi päivityksen." - LangString TEXT_RUN ${LANG_FINNISH} "Käynnistä LOOT" - LangString TEXT_SHOWREADME ${LANG_FINNISH} "Näytä readme" - LangString TEXT_MAIN ${LANG_FINNISH} "Kaikki LOOTin tiedostot paitsi käyttäjälistat ja asetukset." - LangString TEXT_USERFILES ${LANG_FINNISH} "LOOTin käyttäjälistat ja asetukset." - -;-------------------------------- -;German Strings - - VIAddVersionKey /LANG=${LANG_GERMAN} "ProductName" "LOOT" - VIAddVersionKey /LANG=${LANG_GERMAN} "CompanyName" "LOOT Team" - VIAddVersionKey /LANG=${LANG_GERMAN} "LegalCopyright" "© 2009-2015 LOOT Team" - VIAddVersionKey /LANG=${LANG_GERMAN} "FileDescription" "Installationsprogramm LOOT 0.8.0" - VIAddVersionKey /LANG=${LANG_GERMAN} "FileVersion" "0.8.0" - - LangString TEXT_MESSAGEBOX ${LANG_GERMAN} "LOOT ist bereits installiert und muss zunächst deinstalliert werden. $\n$\nKlicken Sie auf 'OK', um die frühere Version zu deinstallieren oder auf 'Abbrechen', um diese Installation abzubrechen." - LangString TEXT_RUN ${LANG_GERMAN} "LOOT starten" - LangString TEXT_SHOWREADME ${LANG_GERMAN} "Readme öffnen" - LangString TEXT_MAIN ${LANG_GERMAN} "Alle LOOT Dateien mit Ausnahme der Benutzerlisten-Dateien und Konfigurationsdateien." - LangString TEXT_USERFILES ${LANG_GERMAN} "LOOT Benutzerlisten-Dateien und Konfigurationsdateien." - -;-------------------------------- -;Danish (dansk) Strings - - VIAddVersionKey /LANG=${LANG_DANISH} "ProductName" "LOOT" - VIAddVersionKey /LANG=${LANG_DANISH} "CompanyName" "LOOT Team" - VIAddVersionKey /LANG=${LANG_DANISH} "LegalCopyright" "© 2009-2015 LOOT Team" - VIAddVersionKey /LANG=${LANG_DANISH} "FileDescription" "Installationsprogram for LOOT 0.8.0" - VIAddVersionKey /LANG=${LANG_DANISH} "FileVersion" "0.8.0" - - LangString TEXT_MESSAGEBOX ${LANG_DANISH} "LOOT er allerede installeret og skal afinstalleres før du fortsætter. $\n$\nTryk på »OK« for at fjerne den forrige version eller »Annuller« for at annullere opdateringen." - LangString TEXT_RUN ${LANG_DANISH} "Kør LOOT" - LangString TEXT_SHOWREADME ${LANG_DANISH} "Vis Readme" - LangString TEXT_MAIN ${LANG_DANISH} "Alle LOOT's filer, undtagen brugerlister og indstillingsfiler." - LangString TEXT_USERFILES ${LANG_DANISH} "LOOT's brugerliste- og indstillingsfile." - -;-------------------------------- -;Korean (한국어) Strings - - VIAddVersionKey /LANG=${LANG_KOREAN} "ProductName" "LOOT" - VIAddVersionKey /LANG=${LANG_KOREAN} "CompanyName" "LOOT Team" - VIAddVersionKey /LANG=${LANG_KOREAN} "LegalCopyright" "© 2009-2015 LOOT Team" - VIAddVersionKey /LANG=${LANG_KOREAN} "FileDescription" "LOOT 0.8.0 인스톨러" - VIAddVersionKey /LANG=${LANG_KOREAN} "FileVersion" "0.8.0" - - LangString TEXT_MESSAGEBOX ${LANG_KOREAN} "Loot가 이미 설치되있으며, 진행하기 전에 제거해야합니다. $\n$\n'확인'을 클릭하면 이전 버전을 제거하며, '취소'를 클릭하면 업그레이드를 취소합니다." - LangString TEXT_RUN ${LANG_KOREAN} "LOOT 실행" - LangString TEXT_SHOWREADME ${LANG_KOREAN} "추가 정보 보기" - LangString TEXT_MAIN ${LANG_KOREAN} "유저리스트와 설정을 제외한 LOOT의 모든 파일." - LangString TEXT_USERFILES ${LANG_KOREAN} "LOOT의 유저리스트와 설정 파일." - -;-------------------------------- -;Initialisations - - Var InstallPath ;Path to existing LOOT install. - - Function .onInit - - !insertmacro MUI_LANGDLL_DISPLAY - - FunctionEnd - - Function onGUIInit - ; First check to see if LOOT is already installed via installer, and launch the existing uninstaller if so. - ReadRegStr $InstallPath HKLM "Software\LOOT" "Installed Path" - ${If} $InstallPath != "" - IfFileExists "$InstallPath\Uninstall.exe" 0 +8 - MessageBox MB_OKCANCEL|MB_ICONQUESTION "$(Text_MessageBox)" IDOK cont IDCANCEL cancel - cancel: - Quit - cont: - ExecWait '$InstallPath\Uninstall.exe _?=$InstallPath' ;Run the uninstaller in its folder and wait until it's done. - Delete "$InstallPath\Uninstall.exe" - RMDir "$InstallPath" - ${EndIf} - FunctionEnd - - Function un.onInit - - !insertmacro MUI_LANGDLL_DISPLAY - - FunctionEnd - -;-------------------------------- -;Installer Sections - - Section "Installer Section" - - ;Install executable. - SetOutPath "$INSTDIR" - File "..\build\Release\LOOT.exe" - File "..\build\Release\d3dcompiler_47.dll" - File "..\build\Release\libEGL.dll" - File "..\build\Release\libGLESv2.dll" - File "..\build\Release\libcef.dll" - File "..\build\Release\wow_helper.exe" - File "..\build\Release\cef.pak" - File "..\build\Release\cef_100_percent.pak" - File "..\build\Release\cef_200_percent.pak" - File "..\build\Release\devtools_resources.pak" - File "..\build\Release\icudtl.dat" - - ;Install UI files. - SetOutPath "$INSTDIR\resources\report" - File "..\resources\report\index.html" - SetOutPath "$INSTDIR\resources\report\bower_components\marked\lib" - File "..\resources\report\bower_components\marked\lib\marked.js" - SetOutPath "$INSTDIR\resources\report\bower_components\Jed" - File "..\resources\report\bower_components\Jed\jed.js" - SetOutPath "$INSTDIR\resources\report\bower_components\jed-gettext-parser" - File "..\resources\report\bower_components\jed-gettext-parser\jedGettextParser.js" - SetOutPath "$INSTDIR\resources\report\css" - File "..\resources\report\css\dark-theme.css" - SetOutPath "$INSTDIR\resources\report\fonts" - File "..\resources\report\fonts\*" - SetOutPath "$INSTDIR\resources\report\js" - File "..\resources\report\js\events.js" - File "..\resources\report\js\filters.js" - File "..\resources\report\js\helpers.js" - File "..\resources\report\js\l10n.js" - File "..\resources\report\js\loot.js" - File "..\resources\report\js\plugin.js" - - ;Install documentation images. - SetOutPath "$INSTDIR\docs\images" - File "..\docs\images\*" - - ;Install licenses. - SetOutPath "$INSTDIR\docs\licenses" - File "..\docs\licenses\*" - - ;Now install readme files. - SetOutPath "$INSTDIR\docs" - File "..\docs\LOOT Metadata Syntax.html" - File "..\docs\LOOT Readme.html" - - ;Now install language files. - SetOutPath "$INSTDIR\resources\l10n\ru\LC_MESSAGES" - File "..\resources\l10n\ru\LC_MESSAGES\loot.mo" - SetOutPath "$INSTDIR\resources\l10n\es\LC_MESSAGES" - File "..\resources\l10n\es\LC_MESSAGES\loot.mo" - SetOutPath "$INSTDIR\resources\l10n\zh_CN\LC_MESSAGES" - File "..\resources\l10n\zh_CN\LC_MESSAGES\loot.mo" - SetOutPath "$INSTDIR\resources\l10n\fr\LC_MESSAGES" - File "..\resources\l10n\fr\LC_MESSAGES\loot.mo" - SetOutPath "$INSTDIR\resources\l10n\pl\LC_MESSAGES" - File "..\resources\l10n\pl\LC_MESSAGES\loot.mo" - SetOutPath "$INSTDIR\resources\l10n\pt_BR\LC_MESSAGES" - File "..\resources\l10n\pt_BR\LC_MESSAGES\loot.mo" - SetOutPath "$INSTDIR\resources\l10n\fi\LC_MESSAGES" - File "..\resources\l10n\fi\LC_MESSAGES\loot.mo" - SetOutPath "$INSTDIR\resources\l10n\de\LC_MESSAGES" - File "..\resources\l10n\de\LC_MESSAGES\loot.mo" - SetOutPath "$INSTDIR\resources\l10n\da\LC_MESSAGES" - File "..\resources\l10n\da\LC_MESSAGES\loot.mo" - SetOutPath "$INSTDIR\resources\l10n\ko\LC_MESSAGES" - File "..\resources\l10n\ko\LC_MESSAGES\loot.mo" - - - ;Install settings file. - SetOutPath "$LOCALAPPDATA\LOOT" - File "..\resources\settings.yaml" - - ;Write language setting to settings.yaml. - StrCmp $LANGUAGE ${LANG_RUSSIAN} 0 +5 - Push "$LOCALAPPDATA\LOOT\settings.yaml" - Push "Language:" - Push "Language: ru" - Call ReplaceLineStr - StrCmp $LANGUAGE ${LANG_SPANISH} 0 +5 - Push "$LOCALAPPDATA\LOOT\settings.yaml" - Push "Language:" - Push "Language: es" - Call ReplaceLineStr - StrCmp $LANGUAGE ${LANG_SIMPCHINESE} 0 +5 - Push "$LOCALAPPDATA\LOOT\settings.yaml" - Push "Language:" - Push "Language: zh_CN" - Call ReplaceLineStr - StrCmp $LANGUAGE ${LANG_FRENCH} 0 +5 - Push "$LOCALAPPDATA\LOOT\settings.yaml" - Push "Language:" - Push "Language: fr" - Call ReplaceLineStr - StrCmp $LANGUAGE ${LANG_POLISH} 0 +5 - Push "$LOCALAPPDATA\LOOT\settings.yaml" - Push "Language:" - Push "Language: pl" - Call ReplaceLineStr - ;StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} 0 +5 - ; Push "$LOCALAPPDATA\LOOT\settings.yaml" - ; Push "Language:" - ; Push "Language: pt_BR" - ; Call ReplaceLineStr - StrCmp $LANGUAGE ${LANG_FINNISH} 0 +5 - Push "$LOCALAPPDATA\LOOT\settings.yaml" - Push "Language:" - Push "Language: fi" - Call ReplaceLineStr - StrCmp $LANGUAGE ${LANG_GERMAN} 0 +5 - Push "$LOCALAPPDATA\LOOT\settings.yaml" - Push "Language:" - Push "Language: de" - Call ReplaceLineStr - StrCmp $LANGUAGE ${LANG_DANISH} 0 +5 - Push "$LOCALAPPDATA\LOOT\settings.yaml" - Push "Language:" - Push "Language: da" - Call ReplaceLineStr - StrCmp $LANGUAGE ${LANG_KOREAN} 0 +5 - Push "$LOCALAPPDATA\LOOT\settings.yaml" - Push "Language:" - Push "Language: ko" - Call ReplaceLineStr - - ;Add Start Menu shortcuts. Set out path back to $INSTDIR otherwise the shortcuts start in the wrong place. - ;Set Shell Var Context to all so that shortcuts are installed for all users, not just admin. - SetOutPath "$INSTDIR" - SetShellVarContext all - CreateDirectory "$SMPROGRAMS\LOOT" - CreateShortCut "$SMPROGRAMS\LOOT\LOOT.lnk" "$INSTDIR\LOOT.exe" - CreateShortCut "$SMPROGRAMS\LOOT\Uninstall.lnk" "$INSTDIR\Uninstall.exe" - CreateShortCut "$SMPROGRAMS\LOOT\Readme.lnk" "$INSTDIR\Docs\LOOT Readme.html" - - - ;Store installation folder in registry key. - WriteRegStr HKLM "Software\LOOT" "Installed Path" "$INSTDIR" - ;Write registry keys for Windows' uninstaller. - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LOOT" "DisplayName" "LOOT" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LOOT" "UninstallString" '"$INSTDIR\Uninstall.exe"' - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LOOT" "URLInfoAbout" 'http://loot.github.io/' - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LOOT" "HelpLink" 'http://loot.github.io/' - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LOOT" "Publisher" 'LOOT Development Team' - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LOOT" "DisplayVersion" '0.8.0' - WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LOOT" "NoModify" 1 - WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LOOT" "NoRepair" 1 - - ;Create uninstaller - WriteUninstaller "$INSTDIR\Uninstall.exe" - - SectionEnd - -;-------------------------------- -;Uninstaller Section - - - Section "un.LOOT" Main - - ;Remove main executables. - Delete "$INSTDIR\LOOT.exe" - Delete "$INSTDIR\d3dcompiler_47.dll" - Delete "$INSTDIR\libEGL.dll" - Delete "$INSTDIR\libGLESv2.dll" - Delete "$INSTDIR\libcef.dll" - Delete "$INSTDIR\wow_helper.exe" - Delete "$INSTDIR\cef.pak" - Delete "$INSTDIR\cef_100_percent.pak" - Delete "$INSTDIR\cef_200_percent.pak" - Delete "$INSTDIR\devtools_resources.pak" - Delete "$INSTDIR\icudtl.dat" - - ;Remove readme images. - RMDir /r "$INSTDIR\docs\images" - - ;Remove licenses. - RMDir /r "$INSTDIR\docs\licenses" - - ;Remove readme files. - Delete "$INSTDIR\docs\LOOT Metadata Syntax.html" - Delete "$INSTDIR\docs\LOOT Readme.html" - RMDir "$INSTDIR\docs" - - ;Remove resource files. - Delete "$INSTDIR\resources\report\index.html" - Delete "$INSTDIR\resources\report\bower_components\marked\lib\marked.js" - Delete "$INSTDIR\resources\report\bower_components\Jed\jed.js" - Delete "$INSTDIR\resources\report\bower_components\jed-gettext-parser\jedGettextParser.js" - Delete "$INSTDIR\resources\report\css\dark-theme.css" - RMDir /r "$INSTDIR\resources\report\fonts" - Delete "$INSTDIR\resources\report\js\events.js" - Delete "$INSTDIR\resources\report\js\filters.js" - Delete "$INSTDIR\resources\report\js\helpers.js" - Delete "$INSTDIR\resources\report\js\l10n.js" - Delete "$INSTDIR\resources\report\js\loot.js" - Delete "$INSTDIR\resources\report\js\plugin.js" - RMDir /r "$INSTDIR\resources\report" - - ;Remove language files. - Delete "$INSTDIR\resources\l10n\ru\LC_MESSAGES\loot.mo" - Delete "$INSTDIR\resources\l10n\es\LC_MESSAGES\loot.mo" - Delete "$INSTDIR\resources\l10n\zh_CN\LC_MESSAGES\loot.mo" - Delete "$INSTDIR\resources\l10n\fr\LC_MESSAGES\loot.mo" - Delete "$INSTDIR\resources\l10n\pl\LC_MESSAGES\loot.mo" - Delete "$INSTDIR\resources\l10n\pt_BR\LC_MESSAGES\loot.mo" - Delete "$INSTDIR\resources\l10n\fi\LC_MESSAGES\loot.mo" - Delete "$INSTDIR\resources\l10n\de\LC_MESSAGES\loot.mo" - Delete "$INSTDIR\resources\l10n\da\LC_MESSAGES\loot.mo" - Delete "$INSTDIR\resources\l10n\ko\LC_MESSAGES\loot.mo" - RMDir "$INSTDIR\resources\l10n\ru\LC_MESSAGES" - RMDir "$INSTDIR\resources\l10n\ru" - RMDir "$INSTDIR\resources\l10n\es\LC_MESSAGES" - RMDir "$INSTDIR\resources\l10n\es" - RMDir "$INSTDIR\resources\l10n\zh_CN\LC_MESSAGES" - RMDir "$INSTDIR\resources\l10n\zh_CN" - RMDir "$INSTDIR\resources\l10n\fr\LC_MESSAGES" - RMDir "$INSTDIR\resources\l10n\fr" - RMDir "$INSTDIR\resources\l10n\pl\LC_MESSAGES" - RMDir "$INSTDIR\resources\l10n\pl" - RMDir "$INSTDIR\resources\l10n\pt_BR\LC_MESSAGES" - RMDir "$INSTDIR\resources\l10n\pt_BR" - RMDir "$INSTDIR\resources\l10n\fi\LC_MESSAGES" - RMDir "$INSTDIR\resources\l10n\fi" - RMDir "$INSTDIR\resources\l10n\de\LC_MESSAGES" - RMDir "$INSTDIR\resources\l10n\de" - RMDir "$INSTDIR\resources\l10n\da\LC_MESSAGES" - RMDir "$INSTDIR\resources\l10n\da" - RMDir "$INSTDIR\resources\l10n\ko\LC_MESSAGES" - RMDir "$INSTDIR\resources\l10n\ko" - RMDir "$INSTDIR\resources\l10n" - RMDir "$INSTDIR\resources" - - ;Now we have to remove the files LOOT generates when it runs. - Delete "$LOCALAPPDATA\LOOT\LOOTDebugLog.txt" - ;Trying to delete a file that doesn't exist doesn't cause an error, so delete all games' files. - ;This doesn't handle user-defined games. - Delete "$LOCALAPPDATA\LOOT\Oblivion\masterlist.yaml" - Delete "$LOCALAPPDATA\LOOT\Skyrim\masterlist.yaml" - Delete "$LOCALAPPDATA\LOOT\Fallout3\masterlist.yaml" - Delete "$LOCALAPPDATA\LOOT\FalloutNV\masterlist.yaml" - ;Delete repositories. - RMDir /r "$LOCALAPPDATA\LOOT\Oblivion\.git" - RMDir /r "$LOCALAPPDATA\LOOT\Skyrim\.git" - RMDir /r "$LOCALAPPDATA\LOOT\Fallout3\.git" - RMDir /r "$LOCALAPPDATA\LOOT\FalloutNV\.git" - ;Try deleting folders. - RMDir "$LOCALAPPDATA\LOOT\Oblivion" - RMDir "$LOCALAPPDATA\LOOT\Skyrim" - RMDir "$LOCALAPPDATA\LOOT\Fallout3" - RMDir "$LOCALAPPDATA\LOOT\FalloutNV" - RMDir "$LOCALAPPDATA\LOOT" - - - ;Remove uninstaller. - Delete "$INSTDIR\Uninstall.exe" - - ;Remove install directory. - RMDir "$INSTDIR" - - ;Delete registry key. - DeleteRegKey HKLM "Software\LOOT" - - ;Delete stupid Windows created registry keys: - DeleteRegKey HKCU "Software\LOOT" - DeleteRegKey HKLM "Software\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\LOOT" - DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\LOOT" - DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\App Management\ARPCache\LOOT" - DeleteRegValue HKCR "Local Settings\Software\Microsoft\Windows\Shell\MuiCache" "$INSTDIR" - DeleteRegValue HKCR "Local Settings\Software\Microsoft\Windows\Shell\MuiCache" "$INSTDIR\LOOT.exe" - DeleteRegValue HKCR "Local Settings\Software\Microsoft\Windows\Shell\MuiCache" "$INSTDIR\Uninstall.exe" - DeleteRegValue HKCU "Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache" "$INSTDIR" - DeleteRegValue HKCU "Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache" "$INSTDIR\LOOT.exe" - DeleteRegValue HKCU "Software\Classes\Local Settings\Software\Microsoft\Windows\Shell\MuiCache" "$INSTDIR\Uninstall.exe" - DeleteRegValue HKCU "Software\Microsoft\Windows\ShellNoRoam\MuiCache" "$INSTDIR" - DeleteRegValue HKCU "Software\Microsoft\Windows\ShellNoRoam\MuiCache" "$INSTDIR\LOOT.exe" - DeleteRegValue HKCU "Software\Microsoft\Windows\ShellNoRoam\MuiCache" "$INSTDIR\Uninstall.exe" - - ;Delete Start Menu folder. - SetShellVarContext all - RMDir /r "$SMPROGRAMS\LOOT" - - SectionEnd - - Section /o "un.User Files" UserFiles - ;The following user files are only removed if set to. - Delete "$LOCALAPPDATA\LOOT\LOOTDebugLog.txt" - Delete "$LOCALAPPDATA\LOOT\CEFDebugLog.txt" - Delete "$LOCALAPPDATA\LOOT\settings.yaml" - Delete "$LOCALAPPDATA\LOOT\Oblivion\userlist.yaml" - Delete "$LOCALAPPDATA\LOOT\Skyrim\userlist.yaml" - Delete "$LOCALAPPDATA\LOOT\Fallout3\userlist.yaml" - Delete "$LOCALAPPDATA\LOOT\FalloutNV\userlist.yaml" - ;Also try removing the folders storing them, in case they are otherwise empty. - RMDir "$LOCALAPPDATA\LOOT\Oblivion" - RMDir "$LOCALAPPDATA\LOOT\Skyrim" - RMDir "$LOCALAPPDATA\LOOT\Fallout3" - RMDir "$LOCALAPPDATA\LOOT\FalloutNV" - ;Try removing install directory. - RMDir "$LOCALAPPDATA\LOOT" - SectionEnd - -;-------------------------------- -;Languages - Description Strings - - !insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN - !insertmacro MUI_DESCRIPTION_TEXT ${Main} "$(Text_Main)" - !insertmacro MUI_DESCRIPTION_TEXT ${UserFiles} "$(Text_UserFiles)" - !insertmacro MUI_UNFUNCTION_DESCRIPTION_END - -;--------------------------------