2016-12-15 06:32:21 +13:00
#define MyAppName "ShareX"
#define MyAppRootDirectory "..\.."
2017-04-23 08:49:45 +12:00
#define MyAppOutputDirectory MyAppRootDirectory + "\Output"
2016-12-15 06:32:21 +13:00
#define MyAppReleaseDirectory MyAppRootDirectory + "\ShareX\bin\Release"
2016-12-16 04:38:33 +13:00
#define MyAppFilename MyAppName + ".exe"
2016-12-15 06:32:21 +13:00
#define MyAppFilepath MyAppReleaseDirectory + "\" + MyAppFilename
2014-05-24 17:40:26 +12:00
#dim Version[4]
2016-12-15 06:32:21 +13:00
#expr ParseVersion(MyAppFilepath, Version[0], Version[1], Version[2], Version[3])
#define MyAppVersion Str(Version[0]) + "." + Str(Version[1]) + "." + Str(Version[2])
#define MyAppPublisher "ShareX Team"
#define MyAppId "82E6AC09-0FEF-4390-AD9F-0DD3F5561EFC"
2013-11-03 23:53:49 +13:00
[Setup]
2018-01-02 03:59:14 +13:00
AppCopyright=Copyright (c) 2007-2018 {#MyAppPublisher}
2016-12-15 06:32:21 +13:00
AppId={#MyAppId}
AppMutex={#MyAppId}
AppName={#MyAppName}
AppPublisher={#MyAppPublisher}
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
2016-12-15 06:32:21 +13:00
AppVerName={#MyAppName} {#MyAppVersion}
AppVersion={#MyAppVersion}
2013-11-03 23:53:49 +13:00
ArchitecturesAllowed=x86 x64 ia64
ArchitecturesInstallIn64BitMode=x64 ia64
2016-12-15 06:32:21 +13:00
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
2013-11-03 23:53:49 +13:00
DirExistsWarning=no
2018-03-13 06:13:10 +13:00
DisableStartupPrompt=yes
DisableWelcomePage=yes
2015-07-06 20:08:42 +12:00
DisableProgramGroupPage=yes
2018-03-13 06:13:10 +13:00
DisableReadyPage=no
DisableReadyMemo=no
DisableFinishedPage=no
2016-12-15 06:32:21 +13:00
LicenseFile={#MyAppRootDirectory}\LICENSE.txt
2018-03-26 09:36:15 +13:00
; .NET 4.6.2 is supported only on Windows 7 SP1 and up
MinVersion=0,6.1.7601
2016-12-15 06:32:21 +13:00
OutputBaseFilename={#MyAppName}-{#MyAppVersion}-setup
2017-04-23 08:49:45 +12:00
OutputDir={#MyAppOutputDirectory}
2013-11-03 23:53:49 +13:00
PrivilegesRequired=none
2015-07-06 20:08:42 +12:00
ShowLanguageDialog=no
2016-12-15 06:32:21 +13:00
UninstallDisplayIcon={app}\{#MyAppFilename}
UninstallDisplayName={#MyAppName}
VersionInfoCompany={#MyAppPublisher}
VersionInfoTextVersion={#MyAppVersion}
VersionInfoVersion={#MyAppVersion}
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
2018-03-01 03:23:01 +13:00
#include "Scripts\lang\english.iss"
2013-11-03 23:53:49 +13:00
[Tasks]
2018-04-24 12:46:45 +12:00
Name: "CreateDesktopIcon"; Description: "Create a desktop shortcut"; GroupDescription: "Additional shortcuts:"; Check: not IsUpdating and not DesktopIconExists
Name: "CreateContextMenuButton"; Description: "Show ""Upload with ShareX"" button in Windows Explorer context menu"; GroupDescription: "Additional shortcuts:"; Check: not IsUpdating
Name: "CreateSendToIcon"; Description: "Create a send to shortcut"; GroupDescription: "Additional shortcuts:"; Check: not IsUpdating
Name: "CreateStartupIcon"; Description: "Run ShareX when Windows starts"; GroupDescription: "Other tasks:"; Check: not IsUpdating
2013-11-03 23:53:49 +13:00
[Files]
2016-12-15 06:32:21 +13:00
Source: "{#MyAppFilepath}"; DestDir: {app}; Flags: ignoreversion
Source: "{#MyAppFilepath}.config"; DestDir: {app}; Flags: ignoreversion
Source: "{#MyAppReleaseDirectory}\*.dll"; DestDir: {app}; Flags: ignoreversion
Source: "{#MyAppRootDirectory}\Licenses\*.txt"; DestDir: {app}\Licenses; Flags: ignoreversion
2017-04-23 08:49:45 +12:00
Source: "{#MyAppOutputDirectory}\Recorder-devices-setup.exe"; DestDir: {app}; Flags: ignoreversion
2017-02-11 03:43:29 +13:00
Source: "{#MyAppRootDirectory}\ShareX.NativeMessagingHost\bin\Release\ShareX_NativeMessagingHost.exe"; DestDir: {app}; Flags: ignoreversion
2016-12-15 06:32:21 +13:00
Source: "{#MyAppReleaseDirectory}\de\*.resources.dll"; DestDir: {app}\Languages\de; Flags: ignoreversion
Source: "{#MyAppReleaseDirectory}\es\*.resources.dll"; DestDir: {app}\Languages\es; Flags: ignoreversion
Source: "{#MyAppReleaseDirectory}\fr\*.resources.dll"; DestDir: {app}\Languages\fr; Flags: ignoreversion
Source: "{#MyAppReleaseDirectory}\hu\*.resources.dll"; DestDir: {app}\Languages\hu; Flags: ignoreversion
2017-08-07 09:09:47 +12:00
Source: "{#MyAppReleaseDirectory}\it-IT\*.resources.dll"; DestDir: {app}\Languages\it-IT; Flags: ignoreversion
2016-12-15 06:32:21 +13:00
Source: "{#MyAppReleaseDirectory}\ko-KR\*.resources.dll"; DestDir: {app}\Languages\ko-KR; Flags: ignoreversion
Source: "{#MyAppReleaseDirectory}\nl-NL\*.resources.dll"; DestDir: {app}\Languages\nl-NL; Flags: ignoreversion
Source: "{#MyAppReleaseDirectory}\pt-BR\*.resources.dll"; DestDir: {app}\Languages\pt-BR; Flags: ignoreversion
Source: "{#MyAppReleaseDirectory}\ru\*.resources.dll"; DestDir: {app}\Languages\ru; Flags: ignoreversion
Source: "{#MyAppReleaseDirectory}\tr\*.resources.dll"; DestDir: {app}\Languages\tr; Flags: ignoreversion
Source: "{#MyAppReleaseDirectory}\vi-VN\*.resources.dll"; DestDir: {app}\Languages\vi-VN; Flags: ignoreversion
Source: "{#MyAppReleaseDirectory}\zh-CN\*.resources.dll"; DestDir: {app}\Languages\zh-CN; Flags: ignoreversion
2017-04-13 08:55:39 +12:00
Source: "{#MyAppReleaseDirectory}\zh-TW\*.resources.dll"; DestDir: {app}\Languages\zh-TW; Flags: ignoreversion
2018-03-17 08:58:25 +13:00
Source: "{#MyAppRootDirectory}\ShareX.ScreenCaptureLib\Stickers\*"; DestDir: {app}\Stickers; Flags: ignoreversion recursesubdirs
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]
2016-12-15 06:32:21 +13:00
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppFilename}"; WorkingDir: "{app}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"; WorkingDir: "{app}"
2018-04-23 09:39:23 +12:00
Name: "{userdesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppFilename}"; WorkingDir: "{app}"; Tasks: CreateDesktopIcon
2016-12-15 06:32:21 +13:00
Name: "{sendto}\{#MyAppName}"; Filename: "{app}\{#MyAppFilename}"; WorkingDir: "{app}"; Tasks: CreateSendToIcon
Name: "{userstartup}\{#MyAppName}"; Filename: "{app}\{#MyAppFilename}"; WorkingDir: "{app}"; Parameters: "-silent"; Tasks: CreateStartupIcon
2013-11-03 23:53:49 +13:00
[Run]
2018-03-12 01:12:37 +13:00
Filename: "{app}\{#MyAppFilename}"; Description: "{cm:LaunchProgram,{#MyAppName}}"; Flags: nowait postinstall; Check: not IsNoRun
2013-11-03 23:53:49 +13:00
[Registry]
2016-12-15 06:32:21 +13:00
Root: "HKCU"; Subkey: "Software\Classes\*\shell\{#MyAppName}"; ValueType: string; ValueData: "Upload with {#MyAppName}"; Tasks: CreateContextMenuButton
Root: "HKCU"; Subkey: "Software\Classes\*\shell\{#MyAppName}"; ValueType: string; ValueName: "Icon"; ValueData: """{app}\{#MyAppFilename}"",0"; Tasks: CreateContextMenuButton
Root: "HKCU"; Subkey: "Software\Classes\*\shell\{#MyAppName}\command"; ValueType: string; ValueData: """{app}\{#MyAppFilename}"" ""%1"""; Tasks: CreateContextMenuButton
Root: "HKCU"; Subkey: "Software\Classes\Directory\shell\{#MyAppName}"; ValueType: string; ValueData: "Upload with {#MyAppName}"; Tasks: CreateContextMenuButton
Root: "HKCU"; Subkey: "Software\Classes\Directory\shell\{#MyAppName}"; ValueType: string; ValueName: "Icon"; ValueData: """{app}\{#MyAppFilename}"",0"; Tasks: CreateContextMenuButton
Root: "HKCU"; Subkey: "Software\Classes\Directory\shell\{#MyAppName}\command"; ValueType: string; ValueData: """{app}\{#MyAppFilename}"" ""%1"""; Tasks: CreateContextMenuButton
Root: "HKCU"; Subkey: "Software\Classes\*\shell\{#MyAppName}"; Flags: dontcreatekey uninsdeletekey
Root: "HKCU"; Subkey: "Software\Classes\Directory\shell\{#MyAppName}"; Flags: dontcreatekey uninsdeletekey
2017-01-14 08:09:38 +13:00
Root: "HKCU"; Subkey: "Software\Classes\.sxcu"; Flags: dontcreatekey uninsdeletekey
Root: "HKCU"; Subkey: "Software\Classes\ShareX.sxcu"; Flags: dontcreatekey uninsdeletekey
2018-04-25 22:47:03 +12:00
Root: "HKCU"; Subkey: "Software\Classes\SystemFileAssociations\image\shell\ShareXImageEditor"; Flags: dontcreatekey uninsdeletekey
2013-11-03 23:53:49 +13:00
2018-03-13 03:55:49 +13:00
[CustomMessages]
DependenciesDir=Dependencies
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"
2018-03-01 03:23:01 +13:00
#include "scripts\products\dotnetfx46.iss"
2014-05-27 19:04:39 +12:00
2018-03-01 04:29:25 +13:00
[Code]
2014-05-27 19:04:39 +12:00
function InitializeSetup(): Boolean;
begin
2014-11-14 11:19:56 +13:00
initwinversion();
2018-03-13 04:45:12 +13:00
dotnetfx46(62);
2014-11-14 11:19:56 +13:00
Result := true;
2014-05-27 19:04:39 +12:00
end;
2016-06-20 19:32:39 +12:00
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;
2018-04-24 12:55:35 +12:00
function IsUpdating(): Boolean;
2018-03-12 01:12:37 +13:00
begin
2018-04-24 12:55:35 +12:00
Result := CmdLineParamExists('/UPDATE');
2018-03-12 01:12:37 +13:00
end;
2018-04-24 12:55:35 +12:00
function IsNoRun(): Boolean;
2018-03-26 09:36:15 +13:00
begin
2018-04-24 12:55:35 +12:00
Result := CmdLineParamExists('/NORUN');
2018-03-26 09:36:15 +13:00
end;
2018-04-24 12:55:35 +12:00
function IsPuushMode(): Boolean;
2018-03-26 09:36:15 +13:00
begin
2018-04-24 12:46:45 +12:00
Result := CmdLineParamExists('-puush');
2018-04-23 09:39:23 +12:00
end;
2018-04-24 12:46:45 +12:00
function DesktopIconExists(): Boolean;
2018-04-23 09:39:23 +12:00
begin
2018-04-24 12:46:45 +12:00
Result := FileExists(ExpandConstant('{userdesktop}\{#MyAppName}.lnk'));
2013-11-03 23:53:49 +13:00
end;