-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
84 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
#define OutputName "proxychain" | ||
#define MyAppName "Proxychain" | ||
#define MyAppVersion "1.3" | ||
#define MyAppPublisher "Karasiq, Inc." | ||
#define MyAppURL "http://www.github.com/Karasiq" | ||
#define MyAppExeName "bin\proxychain.bat" | ||
#define ProjectFolder "..\" | ||
|
||
[Setup] | ||
AppId={{21ce352a-e9cc-11e4-b02c-1681e6b88ec1}} | ||
AppName={#MyAppName} | ||
AppVersion={#MyAppVersion} | ||
;AppVerName={#MyAppName} {#MyAppVersion} | ||
AppPublisher={#MyAppPublisher} | ||
AppPublisherURL={#MyAppURL} | ||
AppSupportURL={#MyAppURL} | ||
AppUpdatesURL={#MyAppURL} | ||
DefaultDirName={pf}\{#MyAppName} | ||
DefaultGroupName={#MyAppName} | ||
OutputDir={#ProjectFolder}\target\iss | ||
OutputBaseFilename={#OutputName}-{#MyAppVersion} | ||
SetupIconFile={#ProjectFolder}\setup\icon.ico | ||
Compression=lzma | ||
SolidCompression=true | ||
PrivilegesRequired=admin | ||
|
||
[Languages] | ||
Name: english; MessagesFile: compiler:Default.isl | ||
Name: russian; MessagesFile: compiler:Languages\Russian.isl | ||
|
||
[Tasks] | ||
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Languages: | ||
|
||
[Files] | ||
Source: {#ProjectFolder}\target\universal\stage\*; DestDir: {app}; Flags: ignoreversion recursesubdirs | ||
Source: {#ProjectFolder}\setup\icon.ico; DestDir: {app} | ||
|
||
[Icons] | ||
Name: {group}\{#MyAppName}; Filename: {app}\{#MyAppExeName}; IconFilename: {app}\icon.ico; WorkingDir: {app} | ||
Name: {commondesktop}\{#MyAppName}; Filename: {app}\{#MyAppExeName}; Tasks: desktopicon; IconFilename: {app}\icon.ico; WorkingDir: {app} | ||
|
||
[Run] | ||
Filename: {app}\{#MyAppExeName}; Description: {cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}; Flags: shellexec postinstall skipifsilent; WorkingDir: {app}; Check: IsJREInstalled | ||
|
||
[Code] | ||
#define MinJRE "1.8" | ||
#define WebJRE "https://www.java.com/ru/download/manual.jsp" | ||
function IsJREInstalled: Boolean; | ||
var | ||
JREVersion: string; | ||
begin | ||
// read JRE version | ||
Result := RegQueryStringValue(HKLM32, 'Software\JavaSoft\Java Runtime Environment', | ||
'CurrentVersion', JREVersion); | ||
// if the previous reading failed and we're on 64-bit Windows, try to read | ||
// the JRE version from WOW node | ||
if not Result and IsWin64 then | ||
Result := RegQueryStringValue(HKLM64, 'Software\JavaSoft\Java Runtime Environment', | ||
'CurrentVersion', JREVersion); | ||
// if the JRE version was read, check if it's at least the minimum one | ||
if Result then | ||
Result := CompareStr(JREVersion, '{#MinJRE}') >= 0; | ||
end; | ||
function InitializeSetup: Boolean; | ||
var | ||
ErrorCode: Integer; | ||
begin | ||
Result := True; | ||
// check if JRE is installed; if not, then... | ||
if not IsJREInstalled then | ||
begin | ||
// show a message box and let user to choose if they want to download JRE; | ||
// if so, go to its download site and exit setup; continue otherwise | ||
if MsgBox('Java is required. Do you want to download it now ?', | ||
mbConfirmation, MB_YESNO) = IDYES then | ||
begin | ||
Result := False; | ||
ShellExec('', '{#WebJRE}', '', '', SW_SHOWNORMAL, ewNoWait, ErrorCode); | ||
end; | ||
end; | ||
end; |