2019-10-07 10:15:45 +00:00
; Script generated by the Inno Script Studio Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "Lokinet"
#define MyAppVersion "0.5.2"
#define MyAppPublisher "Loki Project"
#define MyAppURL "https://lokinet.org"
#define MyAppExeName "lokinetui.exe"
2019-03-12 02:15:50 +00:00
; change this to avoid compiler errors -despair
2019-10-07 10:15:45 +00:00
#ifndef DevPath
2019-03-12 02:15:50 +00:00
#define DevPath "D:\dev\external\llarp\"
2019-10-07 10:15:45 +00:00
#endif
2019-03-20 21:08:15 +00:00
#include "version.txt"
2019-10-07 10:15:45 +00:00
2018-10-30 10:19:34 +00:00
; see ../LICENSE
2019-10-07 10:15:45 +00:00
[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={{11335EAC-0385-4C78-A3AA-67731326B653}}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
2019-03-20 10:48:25 +00:00
#ifndef RELEASE
AppVerName={#MyAppName} {#MyAppVersion}-dev
#else
AppVerName={#MyAppName} {#MyAppVersion}
2019-10-07 10:15:45 +00:00
#endif
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppPublisher}\{#MyAppName}
DefaultGroupName={#MyAppName}
AllowNoIcons=yes
LicenseFile={#DevPath}LICENSE
OutputDir={#DevPath}win32-setup
OutputBaseFilename=lokinet-win32
Compression=lzma2/ultra64
SolidCompression=yes
VersionInfoVersion=0.5.2
VersionInfoCompany=Loki Project
2019-10-12 19:01:24 +00:00
VersionInfoDescription=Lokinet for Microsoft<66> Windows<77> NT<4E>
2019-10-07 10:15:45 +00:00
#ifndef RELEASE
2019-09-20 21:33:30 +00:00
VersionInfoTextVersion=0.5.2-dev-{#VCSRev}
VersionInfoProductTextVersion=0.5.2-dev-{#VCSRev}
2019-03-20 10:12:40 +00:00
#else
2019-09-20 21:33:30 +00:00
VersionInfoTextVersion=0.5.2
VersionInfoProductTextVersion=0.5.2 ({#Codename})
2019-10-07 10:15:45 +00:00
#endif
2019-10-12 19:01:24 +00:00
VersionInfoProductName=Lokinet
2019-10-07 10:15:45 +00:00
VersionInfoProductVersion=0.5.2
2018-11-09 15:46:20 +00:00
InternalCompressLevel=ultra64
2019-10-07 10:15:45 +00:00
MinVersion=0,5.0
ArchitecturesInstallIn64BitMode=x64
2019-10-12 19:01:24 +00:00
VersionInfoCopyright=Copyright <20> 2018-2019 Loki Project
2019-10-07 10:15:45 +00:00
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1
2018-10-30 10:19:34 +00:00
[Files]
2018-11-02 05:32:45 +00:00
; only one of these is installed
2019-03-12 02:15:50 +00:00
#ifdef SINGLE_ARCH
Source: "{#DevPath}build\lokinet.exe"; DestDir: "{app}"; Flags: ignoreversion
2019-03-20 10:02:18 +00:00
Source: "{#DevPath}build\liblokinet-shared.dll"; DestDir: "{app}"; Flags: ignoreversion
2019-10-12 19:01:24 +00:00
Source: "dbghelp64.dll"; DestName: "dbghelp.dll"; DestDir: "{app}"; Flags: ignoreversion
2019-03-12 02:15:50 +00:00
#else
2018-11-02 05:32:45 +00:00
Source: "{#DevPath}build\lokinet.exe"; DestDir: "{app}"; Flags: ignoreversion 32bit; Check: not IsWin64
2019-03-20 10:02:18 +00:00
Source: "{#DevPath}build\liblokinet-shared.dll"; DestDir: "{app}"; Flags: ignoreversion 32bit; Check: not IsWin64
2019-10-12 19:01:24 +00:00
Source: "dbghelp32.dll"; DestName: "dbghelp.dll"; DestDir: "{app}"; Flags: ignoreversion; Check: not IsWin64
2018-11-19 07:55:19 +00:00
Source: "{#DevPath}build64\lokinet.exe"; DestDir: "{app}"; Flags: ignoreversion 64bit; Check: IsWin64
2019-03-20 10:02:18 +00:00
Source: "{#DevPath}build64\liblokinet-shared.dll"; DestDir: "{app}"; Flags: ignoreversion 64bit; Check: IsWin64
2019-10-12 19:01:24 +00:00
Source: "dbghelp64.dll"; DestDir: "{app}"; DestName: "dbghelp.dll"; Flags: ignoreversion; Check: IsWin64
2019-03-20 10:02:18 +00:00
#endif
; UI has landed!
#ifndef RELEASE
Source: "{#DevPath}ui-win32\bin\debug\lokinetui.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#DevPath}ui-win32\bin\debug\lokinetui.exe.config"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#DevPath}ui-win32\bin\debug\lokinetui.pdb"; DestDir: "{app}"; Flags: ignoreversion
#else
Source: "{#DevPath}ui-win32\bin\release\lokinetui.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#DevPath}ui-win32\bin\release\lokinetui.exe.config"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#DevPath}ui-win32\bin\release\lokinetui.pdb"; DestDir: "{app}"; Flags: ignoreversion
2019-03-12 02:15:50 +00:00
#endif
2018-10-30 10:19:34 +00:00
; eh, might as well ship the 32-bit port of everything else
2018-12-24 19:49:59 +00:00
Source: "{#DevPath}build\testAll.exe"; DestDir: "{app}"; Flags: ignoreversion
2019-10-17 02:52:18 +00:00
Source: "{#DevPath}build\lokinetctl.exe"; DestDir: "{app}"; Flags: ignoreversion
2019-09-21 02:00:31 +00:00
Source: "LICENSE"; DestDir: "{app}"; Flags: ignoreversion
2019-09-20 23:23:50 +00:00
Source: "lokinet-bootstrap.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "rootcerts.pem"; DestDir: "{app}"; Flags: ignoreversion
2019-10-12 19:01:24 +00:00
Source: "7z.exe"; DestDir: "{tmp}"; Flags: deleteafterinstall
2018-11-19 10:00:46 +00:00
; if nonexistent, then inet6 was already installed
2019-10-12 19:01:24 +00:00
Source: "inet6.7z"; DestDir: "{app}"; Flags: ignoreversion deleteafterinstall skipifsourcedoesntexist; MinVersion: 0,5.0; OnlyBelowVersion: 0,5.1; Check: not IsTcp6Installed
2018-10-30 10:19:34 +00:00
; Copy the correct tuntap driver for the selected platform
2019-10-12 19:01:24 +00:00
Source: "tuntapv9.7z"; DestDir: "{app}"; Flags: ignoreversion deleteafterinstall; OnlyBelowVersion: 0, 6.0; Check: not IsTapInstalled
Source: "tuntapv9_n6.7z"; DestDir: "{app}"; Flags: ignoreversion deleteafterinstall; MinVersion: 0,6.0; Check: not IsTapInstalled
2018-10-30 10:19:34 +00:00
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
2019-02-26 21:32:43 +00:00
Source: "regdbhelper.dll"; Flags: dontcopy
2019-09-09 21:54:21 +00:00
; build only if we have the 32-bit bins as well
; (i.e. *not* a Travis CI build, travis isn't expected to have these around)
#ifndef SINGLE_ARCH
2019-03-20 21:41:17 +00:00
Source: "C:\Windows\Fonts\iosevka-term-bold.ttf"; DestDir: "{fonts}"; FontInstall: "Iosevka Term Bold"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "C:\Windows\Fonts\iosevka-term-bolditalic.ttf"; DestDir: "{fonts}"; FontInstall: "Iosevka Term Bold Italic"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "C:\Windows\Fonts\iosevka-term-boldoblique.ttf"; DestDir: "{fonts}"; FontInstall: "Iosevka Term Bold Oblique"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "C:\Windows\Fonts\iosevka-term-extralight.ttf"; DestDir: "{fonts}"; FontInstall: "Iosevka Term Extralight"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "C:\Windows\Fonts\iosevka-term-extralightitalic.ttf"; DestDir: "{fonts}"; FontInstall: "Iosevka Term Extralight Italic"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "C:\Windows\Fonts\iosevka-term-extralightoblique.ttf"; DestDir: "{fonts}"; FontInstall: "Iosevka Term Extralight Oblique"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "C:\Windows\Fonts\iosevka-term-heavy.ttf"; DestDir: "{fonts}"; FontInstall: "Iosevka Term Heavy"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "C:\Windows\Fonts\iosevka-term-heavyitalic.ttf"; DestDir: "{fonts}"; FontInstall: "Iosevka Term Heavy Italic"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "C:\Windows\Fonts\iosevka-term-heavyoblique.ttf"; DestDir: "{fonts}"; FontInstall: "Iosevka Term Heavy Oblique"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "C:\Windows\Fonts\iosevka-term-italic.ttf"; DestDir: "{fonts}"; FontInstall: "Iosevka Term Italic"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "C:\Windows\Fonts\iosevka-term-light.ttf"; DestDir: "{fonts}"; FontInstall: "Iosevka Term Light"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "C:\Windows\Fonts\iosevka-term-lightitalic.ttf"; DestDir: "{fonts}"; FontInstall: "Iosevka Term Light Italic"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "C:\Windows\Fonts\iosevka-term-lightoblique.ttf"; DestDir: "{fonts}"; FontInstall: "Iosevka Term Light Oblique"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "C:\Windows\Fonts\iosevka-term-medium.ttf"; DestDir: "{fonts}"; FontInstall: "Iosevka Term Medium"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "C:\Windows\Fonts\iosevka-term-mediumitalic.ttf"; DestDir: "{fonts}"; FontInstall: "Iosevka Term Medium Italic"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "C:\Windows\Fonts\iosevka-term-mediumoblique.ttf"; DestDir: "{fonts}"; FontInstall: "Iosevka Term Medium Oblique"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "C:\Windows\Fonts\iosevka-term-oblique.ttf"; DestDir: "{fonts}"; FontInstall: "Iosevka Term Oblique"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "C:\Windows\Fonts\iosevka-term-regular.ttf"; DestDir: "{fonts}"; FontInstall: "Iosevka Term"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "C:\Windows\Fonts\iosevka-term-thin.ttf"; DestDir: "{fonts}"; FontInstall: "Iosevka Term Thin"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "C:\Windows\Fonts\iosevka-term-thinitalic.ttf"; DestDir: "{fonts}"; FontInstall: "Iosevka Term Thin Italic"; Flags: onlyifdoesntexist uninsneveruninstall
Source: "C:\Windows\Fonts\iosevka-term-thinoblique.ttf"; DestDir: "{fonts}"; FontInstall: "Iosevka Term Thin Oblique"; Flags: onlyifdoesntexist uninsneveruninstall
2019-09-09 21:54:21 +00:00
#endif
2018-10-30 10:19:34 +00:00
2018-11-02 05:32:45 +00:00
[UninstallDelete]
Type: filesandordirs; Name: "{app}\tap-windows*"
2018-11-19 07:55:19 +00:00
Type: filesandordirs; Name: "{app}\inet6_driver"; MinVersion: 0,5.0; OnlyBelowVersion: 0,5.1
2018-11-02 05:32:45 +00:00
Type: filesandordirs; Name: "{userappdata}\.lokinet"
2019-02-26 21:32:43 +00:00
[UninstallRun]
2019-02-27 07:29:40 +00:00
Filename: "{app}\tap-windows-9.21.2\remove.bat"; WorkingDir: "{app}\tap-windows-9.21.2"; Flags: runascurrentuser waituntilterminated skipifdoesntexist; RunOnceId: "RemoveTap"; MinVersion: 0,6.0
Filename: "{app}\tap-windows-9.9.2\remove.bat"; WorkingDir: "{app}\tap-windows-9.9.2"; Flags: runascurrentuser waituntilterminated skipifdoesntexist; RunOnceId: "RemoveTap"; OnlyBelowVersion: 0,6.0
2018-11-19 10:00:46 +00:00
2018-11-19 10:17:50 +00:00
[Dirs]
Name: "{userappdata}\.lokinet"
2018-10-30 10:19:34 +00:00
[Code]
2019-10-07 10:15:45 +00:00
var
2019-02-26 21:32:43 +00:00
TapInstalled: Boolean;
2019-10-12 19:01:24 +00:00
TCP6Installed: Boolean;
Version: TWindowsVersion;
2019-02-26 21:32:43 +00:00
function reg_query_helper(): Integer;
external 'reg_query_helper@files:regdbhelper.dll cdecl setuponly';
2018-11-19 07:55:19 +00:00
procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep = ssPostInstall then
begin
2018-11-19 10:00:46 +00:00
if Version.NTPlatform and (Version.Major = 5) and (Version.Minor = 0) and (FileExists(ExpandConstant('{tmp}\inet6.7z')) = true) then
2018-11-19 07:55:19 +00:00
// I need a better message...
2019-02-26 21:32:43 +00:00
MsgBox('Restart your computer, then set up IPv6 in Network Connections. [Adapter] > Properties > Install... > Protocol > Microsoft IPv6 Driver...', mbInformation, MB_OK);
2018-11-19 07:55:19 +00:00
end;
end;
2019-02-26 21:32:43 +00:00
function IsTapInstalled(): Boolean;
begin
Result := TapInstalled;
end;
2019-10-12 19:01:24 +00:00
function IsTcp6Installed(): Boolean;
2019-02-26 21:32:43 +00:00
begin
2019-10-12 19:01:24 +00:00
if (FileExists(ExpandConstant('{sys}\drivers\tcpip6.sys')) = false) and (Version.Major = 5) and (Version.Minor = 0) then
2018-11-19 07:55:19 +00:00
begin
2019-10-12 19:01:24 +00:00
Result := true;
2018-11-19 07:55:19 +00:00
end
else
begin
2019-10-12 19:01:24 +00:00
Result := false;
2018-12-25 02:38:43 +00:00
end;
2019-10-12 19:01:24 +00:00
end;
procedure InitializeWizard();
begin
GetWindowsVersionEx(Version);
if (reg_query_helper() = 0) then
2018-12-25 02:38:43 +00:00
begin
2019-10-12 19:01:24 +00:00
TapInstalled := false;
end
else
begin
TapInstalled := true;
2018-12-25 02:38:43 +00:00
end;
2018-10-30 10:19:34 +00:00
end;
2019-10-07 10:15:45 +00:00
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
2018-11-02 05:32:45 +00:00
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon; OnlyBelowVersion: 0, 6.1
2019-10-07 10:15:45 +00:00
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon; MinVersion: 0, 6.1
2018-11-02 05:32:45 +00:00
[Run]
Filename: "{app}\{#MyAppExeName}"; Flags: nowait postinstall skipifsilent; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"
; wait until either one or two of these terminates
2018-12-25 02:38:43 +00:00
Filename: "{tmp}\7z.exe"; Parameters: "x tuntapv9.7z"; WorkingDir: "{app}"; Flags: runascurrentuser waituntilterminated skipifdoesntexist; Description: "extract TUN/TAP-v9 driver"; StatusMsg: "Extracting driver..."; OnlyBelowVersion: 0, 6.0
Filename: "{tmp}\7z.exe"; Parameters: "x tuntapv9_n6.7z"; WorkingDir: "{app}"; Flags: runascurrentuser waituntilterminated skipifdoesntexist; Description: "extract TUN/TAP-v9 driver"; StatusMsg: "Extracting driver..."; MinVersion: 0, 6.0
Filename: "{tmp}\7z.exe"; Parameters: "x inet6.7z"; WorkingDir: "{app}"; Flags: skipifdoesntexist runascurrentuser waituntilterminated skipifdoesntexist; Description: "extract inet6 driver"; StatusMsg: "Extracting IPv6 driver..."; MinVersion: 0, 5.0; OnlyBelowVersion: 0, 5.1
2019-09-21 01:42:09 +00:00
Filename: "{app}\lokinet-bootstrap.exe"; Parameters:"-L https://seed.lokinet.org/bootstrap.signed --cacert rootcerts.pem -o ""{userappdata}\.lokinet\bootstrap.signed"""; WorkingDir: "{app}"; Flags: runascurrentuser waituntilterminated; Description: "bootstrap dht"; StatusMsg: "Downloading initial RC..."
2018-11-02 05:32:45 +00:00
; then ask to install drivers
2019-02-26 21:32:43 +00:00
Filename: "{app}\tap-windows-9.9.2\install.bat"; WorkingDir: "{app}\tap-windows-9.9.2\"; Flags: runascurrentuser waituntilterminated skipifdoesntexist; Description: "Install TUN/TAP-v9 driver"; StatusMsg: "Installing driver..."; OnlyBelowVersion: 0, 6.0; Check: not IsTapInstalled
Filename: "{app}\tap-windows-9.21.2\install.bat"; WorkingDir: "{app}\tap-windows-9.21.2\"; Flags: runascurrentuser waituntilterminated skipifdoesntexist; Description: "Install TUN/TAP-v9 driver"; StatusMsg: "Installing driver..."; MinVersion: 0, 6.0; Check: not IsTapInstalled
2018-11-19 07:55:19 +00:00
; install inet6 if not present. (I'd assume netsh displays something helpful if inet6 is already set up and configured.)
2018-11-19 10:00:46 +00:00
; if it doesn't exist, then the inet6 driver appears to be installed
2018-12-25 02:38:43 +00:00
Filename: "{app}\inet6_driver\setup\hotfix.exe"; Parameters: "/m /z"; WorkingDir: "{app}\inet6_driver\setup\"; Flags: runascurrentuser waituntilterminated skipifdoesntexist; Description: "Install IPv6 driver"; StatusMsg: "Installing IPv6..."; OnlyBelowVersion: 0, 5.1; Check: not FileExists(ExpandConstant('{sys}\drivers\tcpip6.sys'))
2019-10-07 10:15:45 +00:00
Filename: "{sys}\netsh.exe"; Parameters: "int ipv6 install"; Flags: runascurrentuser waituntilterminated; Description: "install ipv6 on whistler"; StatusMsg: "Installing IPv6..."; MinVersion: 0,5.1; OnlyBelowVersion: 0,6.0