Files
dvc/scripts/innosetup/setup.iss
T
Ruslan Kuprieiev e1f736eaad daemon: fix daemon when running in binary mode
When running from binary, we need to fixup environment variables
before launching new processes. We also need to detach from the parent
tty, because otherwise it causes problems for PyInstaller.

Plus, when binary is built as --onefile it still creates pop-up terminal
on windows, so we need to switch to --onedir.

Fixes #1446
Fixes #1444

Signed-off-by: Ruslan Kuprieiev <[email protected]>
2018-12-18 18:13:55 +02:00

84 lines
2.3 KiB
Plaintext

#define MyAppName "Data Version Control"
#define MyAppVersion ReadIni(".\scripts\innosetup\config.ini", "Version", "version", "unknown")
#define MyAppPublisher "Dmitry Petrov"
#define MyAppURL "https://dataversioncontrol.com/"
#define MyAppDir "..\..\dist\dvc"
[Setup]
AppId={{8258CE8A-110E-4E0D-AE60-FEE00B15F041}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={code:GetDefaultDirName}
DefaultGroupName={#MyAppName}
AllowNoIcons=yes
LicenseFile=..\..\LICENSE
OutputBaseFilename=dvc-{#MyAppVersion}
Compression=lzma2/max
SolidCompression=yes
OutputDir=..\..\
ChangesEnvironment=yes
SetupIconFile=dvc.ico
WizardSmallImageFile=dvc_up.bmp
WizardImageFile=dvc_left.bmp
DisableWelcomePage=no
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Files]
Source: "{#MyAppDir}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
[Tasks]
Name: modifypath; Description: Adds dvc's application directory to environmental path; Flags: checkablealone;
Name: modifypath\system; Description: Adds dvc's application directory to enviromental path for all users;
Name: addsymlinkpermissions; Description: Add permission for creating symbolic links; Flags: checkablealone;
Name: addsymlinkpermissions\system; Description: Add permissions for creating symbolic links for all users;
[Code]
const
ModPathName = 'modifypath';
ModPathPath = '{app}';
SymLinkName = 'addsymlinkpermissions';
var
ModPathType: String;
SymLinkType: String;
function GetDefaultDirName(Dummy: string): string;
begin
if IsAdminLoggedOn then begin
Result := ExpandConstant('{pf}\{#MyAppName}');
end else begin
Result := ExpandConstant('{userpf}\{#MyAppName}');
end;
end;
#include "modpath.iss"
#include "addsymlink.iss"
procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep = ssPostInstall then begin
if IsTaskSelected(ModPathName + '\system') then begin
ModPathType := 'system';
end else begin
ModPathType := 'user';
end;
if IsTaskSelected(SymLinkName + '\system') then begin
SymLinkType := 'system';
end else begin
SymLinkType := 'user';
end;
if IsTaskSelected(ModPathName) then
ModPath();
if IsTaskSelected(SymLinkName) then
AddSymLink();
end;
end;