2015-08-08 05:31:40 +12:00
#define AppName "ShareX"
#define AppFilename "ShareX.exe"
2016-02-29 22:50:51 +13:00
#define RootDirectory "..\.."
#define AppParentDirectory RootDirectory + "\ShareX\bin\Release"
#define AppFilepath AppParentDirectory + "\" + AppFilename
2014-05-24 17:40:26 +12:00
#dim Version[4]
2016-02-29 22:50:51 +13:00
#expr ParseVersion(AppFilepath, Version[0], Version[1], Version[2], Version[3])
2015-08-08 05:31:40 +12:00
#define AppVersion Str(Version[0]) + "." + Str(Version[1]) + "." + Str(Version[2])
2015-08-13 13:07:38 +12:00
#define AppPublisher "ShareX Team"
2015-08-08 05:31:40 +12:00
#define AppId "82E6AC09-0FEF-4390-AD9F-0DD3F5561EFC"
2013-11-03 23:53:49 +13:00
[Setup]
2016-02-29 22:50:51 +13:00
AppCopyright=Copyright (c) 2007-2016 {#AppPublisher}
2015-08-08 05:31:40 +12:00
AppId={#AppId}
AppMutex={#AppId}
AppName={#AppName}
AppPublisher={#AppPublisher}
2015-07-06 20:08:42 +12:00
AppPublisherURL=https://getsharex.com
2014-05-24 17:40:26 +12:00
AppSupportURL=https://github.com/ShareX/ShareX/issues
AppUpdatesURL=https://github.com/ShareX/ShareX/releases
2015-08-08 05:31:40 +12:00
AppVerName={#AppName} {#AppVersion}
AppVersion={#AppVersion}
2013-11-03 23:53:49 +13:00
ArchitecturesAllowed=x86 x64 ia64
ArchitecturesInstallIn64BitMode=x64 ia64
2015-08-08 05:31:40 +12:00
DefaultDirName={pf}\{#AppName}
DefaultGroupName={#AppName}
2013-11-03 23:53:49 +13:00
DirExistsWarning=no
2016-06-20 20:33:11 +12:00
DisableReadyPage=yes
2015-07-06 20:08:42 +12:00
DisableProgramGroupPage=yes
2016-02-29 22:50:51 +13:00
LicenseFile={#RootDirectory}\LICENSE.txt
2013-11-03 23:53:49 +13:00
MinVersion=0,5.01.2600
2015-08-08 05:31:40 +12:00
OutputBaseFilename={#AppName}-{#AppVersion}-setup
2013-11-03 23:53:49 +13:00
OutputDir=Output\
PrivilegesRequired=none
2015-07-06 20:08:42 +12:00
ShowLanguageDialog=no
2015-08-08 05:31:40 +12:00
UninstallDisplayIcon={app}\{#AppFilename}
UninstallDisplayName={#AppName}
VersionInfoCompany={#AppPublisher}
VersionInfoTextVersion={#AppVersion}
VersionInfoVersion={#AppVersion}
2014-10-13 11:53:44 +13:00
WizardImageBackColor=clWhite
2015-07-07 17:30:50 +12:00
WizardImageFile=WizardImageFile.bmp
2015-06-21 21:17:02 +12:00
WizardImageStretch=no
2015-07-07 17:30:50 +12:00
WizardSmallImageFile=WizardSmallImageFile.bmp
2013-11-03 23:53:49 +13:00
[Languages]
2014-05-27 19:04:39 +12:00
Name: "en"; MessagesFile: "compiler:Default.isl"
Name: "de"; MessagesFile: "compiler:Languages\German.isl"
2013-11-03 23:53:49 +13:00
[Tasks]
Name: "CreateDesktopIcon"; Description: "Create a desktop shortcut"; GroupDescription: "Additional shortcuts:"
2015-10-12 23:13:46 +13:00
Name: "CreateContextMenuButton"; Description: "Show ""Upload with ShareX"" button in Windows Explorer context menu"; GroupDescription: "Additional shortcuts:"
2014-07-07 12:50:05 +12:00
Name: "CreateSendToIcon"; Description: "Create a send to shortcut"; GroupDescription: "Additional shortcuts:"
2015-02-22 05:59:27 +13:00
Name: "CreateQuickLaunchIcon"; Description: "Create a quick launch shortcut"; GroupDescription: "Additional shortcuts:"; OnlyBelowVersion: 0,6.1
2015-10-12 23:13:46 +13:00
Name: "CreateStartupIcon"; Description: "Run ShareX when Windows starts"; GroupDescription: "Other tasks:"
2013-11-03 23:53:49 +13:00
[Files]
2015-08-08 05:31:40 +12:00
Source: "{#AppParentDirectory}\ShareX.exe"; DestDir: {app}; Flags: ignoreversion
Source: "{#AppParentDirectory}\ShareX.exe.config"; DestDir: {app}; Flags: ignoreversion
Source: "{#AppParentDirectory}\*.dll"; DestDir: {app}; Flags: ignoreversion
2016-02-29 22:50:51 +13:00
Source: "{#RootDirectory}\Licenses\*.txt"; DestDir: {app}\Licenses; Flags: ignoreversion
2016-08-26 12:54:17 +12:00
Source: "Output\Recorder-devices-setup.exe"; DestDir: {app}; Flags: ignoreversion
Source: "{#RootDirectory}\..\ShareX_Chrome\ShareX_Chrome\bin\Release\ShareX_Chrome.exe"; DestDir: {app}; Flags: ignoreversion
2015-08-08 05:31:40 +12:00
Source: "{#AppParentDirectory}\de\*.resources.dll"; DestDir: {app}\Languages\de; Flags: ignoreversion
2015-08-25 06:32:24 +12:00
Source: "{#AppParentDirectory}\es\*.resources.dll"; DestDir: {app}\Languages\es; Flags: ignoreversion
2015-08-08 05:31:40 +12:00
Source: "{#AppParentDirectory}\fr\*.resources.dll"; DestDir: {app}\Languages\fr; Flags: ignoreversion
Source: "{#AppParentDirectory}\hu\*.resources.dll"; DestDir: {app}\Languages\hu; Flags: ignoreversion
Source: "{#AppParentDirectory}\ko-KR\*.resources.dll"; DestDir: {app}\Languages\ko-KR; Flags: ignoreversion
Source: "{#AppParentDirectory}\nl-NL\*.resources.dll"; DestDir: {app}\Languages\nl-NL; Flags: ignoreversion
2015-08-25 06:32:24 +12:00
Source: "{#AppParentDirectory}\pt-BR\*.resources.dll"; DestDir: {app}\Languages\pt-BR; Flags: ignoreversion
2015-10-27 15:03:24 +13:00
Source: "{#AppParentDirectory}\ru\*.resources.dll"; DestDir: {app}\Languages\ru; Flags: ignoreversion
2015-08-25 06:32:24 +12:00
Source: "{#AppParentDirectory}\tr\*.resources.dll"; DestDir: {app}\Languages\tr; Flags: ignoreversion
2015-10-27 15:03:24 +13:00
Source: "{#AppParentDirectory}\vi-VN\*.resources.dll"; DestDir: {app}\Languages\vi-VN; Flags: ignoreversion
2015-08-25 06:32:24 +12:00
Source: "{#AppParentDirectory}\zh-CN\*.resources.dll"; DestDir: {app}\Languages\zh-CN; Flags: ignoreversion
2016-06-20 19:32:39 +12:00
Source: "puush"; DestDir: {app}; Check: IsPuushMode
2014-10-05 01:55:18 +13:00
2013-11-03 23:53:49 +13:00
[Icons]
2015-08-08 21:49:33 +12:00
Name: "{group}\{#AppName}"; Filename: "{app}\{#AppFilename}"; WorkingDir: "{app}"
Name: "{group}\{cm:UninstallProgram,{#AppName}}"; Filename: "{uninstallexe}"; WorkingDir: "{app}"
Name: "{userdesktop}\{#AppName}"; Filename: "{app}\{#AppFilename}"; WorkingDir: "{app}"; Tasks: CreateDesktopIcon; Check: not DesktopIconExists
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#AppName}"; Filename: "{app}\{#AppFilename}"; WorkingDir: "{app}"; Tasks: CreateQuickLaunchIcon
Name: "{sendto}\{#AppName}"; Filename: "{app}\{#AppFilename}"; WorkingDir: "{app}"; Tasks: CreateSendToIcon
Name: "{userstartup}\{#AppName}"; Filename: "{app}\{#AppFilename}"; WorkingDir: "{app}"; Parameters: "-silent"; Tasks: CreateStartupIcon
2013-11-03 23:53:49 +13:00
[Run]
2015-08-08 05:31:40 +12:00
Filename: "{app}\{#AppFilename}"; Description: "{cm:LaunchProgram,{#AppName}}"; Flags: nowait postinstall
2013-11-03 23:53:49 +13:00
2015-06-22 20:28:44 +12:00
[UninstallRun]
Filename: regsvr32; WorkingDir: {app}; Parameters: "/s /u screen-capture-recorder.dll"; Check: not IsWin64
Filename: regsvr32; WorkingDir: {app}; Parameters: "/s /u screen-capture-recorder-x64.dll"; Check: IsWin64
Filename: regsvr32; WorkingDir: {app}; Parameters: "/s /u audio_sniffer.dll"; Check: not IsWin64
Filename: regsvr32; WorkingDir: {app}; Parameters: "/s /u audio_sniffer-x64.dll"; Check: IsWin64
2013-11-03 23:53:49 +13:00
[Registry]
2015-10-12 23:13:46 +13:00
Root: "HKCU"; Subkey: "Software\Classes\*\shell\{#AppName}"; ValueType: string; ValueData: "Upload with {#AppName}"; Tasks: CreateContextMenuButton
Root: "HKCU"; Subkey: "Software\Classes\*\shell\{#AppName}"; ValueType: string; ValueName: "Icon"; ValueData: """{app}\{#AppFilename}"",0"; Tasks: CreateContextMenuButton
Root: "HKCU"; Subkey: "Software\Classes\*\shell\{#AppName}\command"; ValueType: string; ValueData: """{app}\{#AppFilename}"" ""%1"""; Tasks: CreateContextMenuButton
Root: "HKCU"; Subkey: "Software\Classes\Directory\shell\{#AppName}"; ValueType: string; ValueData: "Upload with {#AppName}"; Tasks: CreateContextMenuButton
Root: "HKCU"; Subkey: "Software\Classes\Directory\shell\{#AppName}"; ValueType: string; ValueName: "Icon"; ValueData: """{app}\{#AppFilename}"",0"; Tasks: CreateContextMenuButton
Root: "HKCU"; Subkey: "Software\Classes\Directory\shell\{#AppName}\command"; ValueType: string; ValueData: """{app}\{#AppFilename}"" ""%1"""; Tasks: CreateContextMenuButton
2015-08-08 21:49:33 +12:00
Root: "HKCU"; Subkey: "Software\Classes\*\shell\{#AppName}"; Flags: dontcreatekey uninsdeletekey
Root: "HKCU"; Subkey: "Software\Classes\Directory\shell\{#AppName}"; Flags: dontcreatekey uninsdeletekey
Root: "HKCU"; Subkey: "Software\Classes\Folder\shell\{#AppName}"; Flags: dontcreatekey uninsdeletekey
2013-11-03 23:53:49 +13:00
2015-06-22 18:56:18 +12:00
[Code]
2014-05-27 19:04:39 +12:00
#include "Scripts\products.iss"
#include "Scripts\products\stringversion.iss"
#include "Scripts\products\winversion.iss"
#include "Scripts\products\fileversion.iss"
#include "Scripts\products\dotnetfxversion.iss"
#include "Scripts\products\msi31.iss"
#include "Scripts\products\dotnetfx40full.iss"
2014-06-24 13:05:23 +12:00
procedure InitializeWizard;
begin
WizardForm.LicenseAcceptedRadio.Checked := true;
end;
2014-05-27 19:04:39 +12:00
function InitializeSetup(): Boolean;
begin
2014-11-14 11:19:56 +13:00
initwinversion();
2014-05-27 19:04:39 +12:00
msi31('3.1');
dotnetfx40full();
2014-11-14 11:19:56 +13:00
Result := true;
2014-05-27 19:04:39 +12:00
end;
2013-11-03 23:53:49 +13:00
function DesktopIconExists(): Boolean;
begin
2015-08-08 05:31:40 +12:00
Result := FileExists(ExpandConstant('{userdesktop}\{#AppName}.lnk'));
2016-06-20 19:32:39 +12:00
end;
function CmdLineParamExists(const value: string): Boolean;
var
i: Integer;
begin
Result := False;
for i := 1 to ParamCount do
if CompareText(ParamStr(i), value) = 0 then
begin
Result := True;
Exit;
end;
end;
function IsPuushMode: Boolean;
begin
Result := CmdLineParamExists('-puush');
2013-11-03 23:53:49 +13:00
end;