mirror of
https://github.com/loot/libloot.git
synced 2026-07-27 14:16:01 -07:00
Update the readme and installer for the MSVC runtime requirement
The readme now informs users that the MSVC 2015 x86 redistributable is required, and the installer will download and install it if it is not detected as being already installed.
This commit is contained in:
@@ -50,6 +50,6 @@ You may also need to set `BOOST_ROOT` if CMake cannot find Boost.
|
||||
|
||||
Packaging scripts are provided for creating an installer on Windows and compressed archives on Windows and Linux.
|
||||
|
||||
Run the `scripts/installer.iss` [Inno Setup](http://www.jrsoftware.org/isinfo.php) script to build an installer executable in the `build` folder. 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.
|
||||
Run the `scripts/installer.iss` [Inno Setup](http://www.jrsoftware.org/isinfo.php) script to build an installer executable in the `build` folder. The script requires the [Inno Download Plugin](https://bitbucket.org/mitrich_k/inno-download-plugin) to be installed. 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.
|
||||
|
||||
The archive packaging script requires [Git](https://git-scm.com/), and on Windows it also requires [7-Zip](http://7-zip.org), while on Linux it requires `tar` and `xz`. It can be run using `node scripts/archive.js`, and creates archives for LOOT, its API and the metadata validator in the `build` folder. The archives are named as described in the Downloads section above.
|
||||
|
||||
@@ -229,7 +229,7 @@ figure > div {
|
||||
|
||||
<p><strong>LOOT requires Windows 7 or later.</strong></p>
|
||||
|
||||
<p>LOOT can be installed either using its automated installer or manually. To install LOOT manually, extract the downloaded archive to a location of your choice.
|
||||
<p>LOOT can be installed either using its automated installer or manually. If you are using the installer, just run it and follow the wizard steps. If installing manually, extract the downloaded archive to a location of your choice, then download and install the <a href="http://download.microsoft.com/download/9/a/2/9a2a7e36-a8af-46c0-8a78-a5eb111eefe2/vc_redist.x86.exe">MSVC 2015 x86 redistributable</a> if you don't already have it installed.</p>
|
||||
|
||||
<p>If LOOT was installed using the installer, then use the uninstaller linked to in the Start Menu to uninstall LOOT. If LOOT was installed manually:
|
||||
<ol>
|
||||
|
||||
+75
-21
@@ -2,6 +2,14 @@
|
||||
; This file must be encoded in UTF-8 WITH a BOM for Unicode text to
|
||||
; be displayed correctly.
|
||||
|
||||
#include <idp.iss>
|
||||
#include <idplang\finnish.iss>
|
||||
#include <idplang\french.iss>
|
||||
#include <idplang\german.iss>
|
||||
#include <idplang\polish.iss>
|
||||
#include <idplang\russian.iss>
|
||||
#include <idplang\spanish.iss>
|
||||
|
||||
#define MyAppName "LOOT"
|
||||
#define MyAppVersion "0.9.2"
|
||||
#define MyAppPublisher "LOOT Team"
|
||||
@@ -139,6 +147,7 @@ Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks:
|
||||
|
||||
[Run]
|
||||
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
|
||||
Filename: "{tmp}\vc_redist.x86.exe"; Parameters: "/quiet"; Flags: skipifdoesntexist
|
||||
|
||||
[Registry]
|
||||
; Store install path for backwards-compatibility with old NSIS install script behaviour.
|
||||
@@ -186,26 +195,6 @@ zh_CN.DeleteUserFiles=你想要删除你的设置和用户数据吗?
|
||||
es.DeleteUserFiles=¿Quieres borrar sus ajustes y metadatos de usuario?
|
||||
|
||||
[Code]
|
||||
// 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'));
|
||||
DeleteFile(ExpandConstant('{localappdata}\{#MyAppName}\Fallout4\userlist.yaml'));
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
// Set LOOT's language in settings.yaml
|
||||
procedure SetLootLanguage();
|
||||
var
|
||||
@@ -236,6 +225,7 @@ begin
|
||||
SaveStringToFile(File, LanguageLine, False);
|
||||
end;
|
||||
end;
|
||||
|
||||
// Run a previous install's uninstaller before starting this installation.
|
||||
procedure RunPreviousVersionUninstaller();
|
||||
var
|
||||
@@ -259,11 +249,75 @@ begin
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function VCRedistNeedsInstall: Boolean;
|
||||
var
|
||||
VersionMajor : Integer;
|
||||
VersionMinor: Integer;
|
||||
VersionBld: Integer;
|
||||
RegKey: String;
|
||||
IsRuntimeInstalled: Cardinal;
|
||||
InstalledVersionMajor: Cardinal;
|
||||
InstalledVersionMinor: Cardinal;
|
||||
InstalledVersionBld: Cardinal;
|
||||
begin
|
||||
VersionMajor := 14;
|
||||
VersionMinor := 0;
|
||||
VersionBld := 24212;
|
||||
RegKey := 'SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x86';
|
||||
IsRuntimeInstalled := 0;
|
||||
InstalledVersionMajor := 0;
|
||||
InstalledVersionMinor := 0;
|
||||
InstalledVersionBld := 0;
|
||||
|
||||
RegQueryDWordValue(HKLM, RegKey, 'Installed', IsRuntimeInstalled);
|
||||
RegQueryDWordValue(HKLM, RegKey, 'Major', InstalledVersionMajor);
|
||||
RegQueryDWordValue(HKLM, RegKey, 'Minor', InstalledVersionMinor);
|
||||
RegQueryDWordValue(HKLM, RegKey, 'Bld', InstalledVersionBld);
|
||||
|
||||
Result := (IsRuntimeInstalled = 0)
|
||||
or (InstalledVersionMajor < VersionMajor)
|
||||
or (InstalledVersionMinor < VersionMinor)
|
||||
or (InstalledVersionBld < VersionBld);
|
||||
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'));
|
||||
DeleteFile(ExpandConstant('{localappdata}\{#MyAppName}\Fallout4\userlist.yaml'));
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure InitializeWizard();
|
||||
begin
|
||||
if VCRedistNeedsInstall then begin
|
||||
idpAddFile('http://download.microsoft.com/download/9/a/2/9a2a7e36-a8af-46c0-8a78-a5eb111eefe2/vc_redist.x86.exe', ExpandConstant('{tmp}\vc_redist.x86.exe'));
|
||||
|
||||
idpDownloadAfter(wpReady);
|
||||
end
|
||||
end;
|
||||
|
||||
procedure CurStepChanged(CurStep: TSetupStep);
|
||||
begin
|
||||
if CurStep = ssInstall then
|
||||
RunPreviousVersionUninstaller();
|
||||
|
||||
if CurStep = ssPostInstall then
|
||||
if CurStep = ssPostInstall then begin
|
||||
SetLootLanguage();
|
||||
DeleteFile(ExpandConstant('{tmp}\vc_redist.x86.exe'));
|
||||
end
|
||||
end;
|
||||
|
||||
Reference in New Issue
Block a user