-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding the education installer profile
- Loading branch information
1 parent
63063c1
commit 8ac8b29
Showing
2 changed files
with
100 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
|
||
[Setup] | ||
AppId={{org.luwrain.education}} | ||
AppName=LUWRAIN для образования | ||
AppVersion=0.1.0 | ||
AppVerName=LUWRAIN для образования 0.1.0 | ||
AppPublisher=LUWRAIN | ||
AppComments=Комплект невизуальных образовательных приложений | ||
AppCopyright=Copyright (C) 2021 LUWRAIN | ||
AppPublisherURL=http:https://luwrain.org | ||
;AppSupportURL=http:https://java.com/ | ||
;AppUpdatesURL=http:https://java.com/ | ||
;{localappdata}\Luwrain | ||
DefaultDirName={code:GetDefaultDir} | ||
DisableStartupPrompt=Yes | ||
DisableDirPage=Yes | ||
DisableProgramGroupPage=Yes | ||
DisableReadyPage=Yes | ||
DisableFinishedPage=Yes | ||
DisableWelcomePage=Yes | ||
DefaultGroupName=LUWRAIN для образования | ||
;Optional License | ||
LicenseFile= | ||
;WinXP or above | ||
MinVersion=0,5.1 | ||
OutputBaseFilename=lwreducation-0.1.0 | ||
Compression=lzma2/normal | ||
SolidCompression=yes | ||
PrivilegesRequired=lowest | ||
SetupIconFile=Luwrain\education.ico | ||
UninstallDisplayIcon={app}\education.ico | ||
UninstallDisplayName=LUWRAIN для образования | ||
WizardImageStretch=No | ||
WizardSmallImageFile=setup-icon.bmp | ||
ArchitecturesInstallIn64BitMode=x64 | ||
|
||
[Languages] | ||
Name: "russian"; MessagesFile: "compiler:Languages\Russian.isl" | ||
|
||
[Files] | ||
Source: "Luwrain\education.exe"; DestDir: "{app}"; Flags: ignoreversion | ||
Source: "Luwrain\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs | ||
|
||
[Icons] | ||
Name: "{group}\LUWRAIN для образования"; Filename: "%ComSpec%"; Parameters: "/c start {code:GetDefaultDir}\education.exe"; IconFilename: "{app}\education.ico"; Check: returnTrue() | ||
Name: "{commondesktop}\LUWRAIN для образования"; Filename: "%ComSpec%"; Parameters: "/c start {code:GetDefaultDir}\education.exe"; IconFilename: "{app}\education.ico"; Check: returnTrue() | ||
|
||
[Run] | ||
Filename: "{code:GetDefaultDir}\education.exe"; Parameters: "-Xappcds:generatecache"; Check: returnFalse() | ||
Filename: "{code:GetDefaultDir}\education.exe"; Description: "{cm:LaunchProgram,Luwrain}"; Flags: nowait postinstall skipifsilent; Check: returnTrue() | ||
Filename: "{code:GetDefaultDir}\education.exe"; Parameters: "-install -svcName ""LUWRAIN"" -svcDesc ""education"" -mainExe ""education.exe"" "; Check: returnFalse() | ||
|
||
[UninstallRun] | ||
;Filename: "{code:GetDefaultDir}\education.exe "; Parameters: "-uninstall -svcName Luwrain -stopOnUninstall"; Check: returnFalse() | ||
|
||
[Code] | ||
const | ||
BN_CLICKED = 0; | ||
WM_COMMAND = $0111; | ||
CN_BASE = $BC00; | ||
CN_COMMAND = CN_BASE + WM_COMMAND; | ||
procedure CurPageChanged(CurPageID: Integer); | ||
var | ||
Param: Longint; | ||
begin | ||
// if we are on the ready page, then... | ||
if CurPageID = wpReady then | ||
begin | ||
// the result of this is 0, just to be precise... | ||
Param := 0 or BN_CLICKED shl 16; | ||
// post the click notification message to the next button | ||
PostMessage(WizardForm.NextButton.Handle, CN_COMMAND, Param, 0); | ||
end; | ||
end; | ||
function returnTrue(): Boolean; | ||
begin | ||
Result := True; | ||
end; | ||
function returnFalse(): Boolean; | ||
begin | ||
Result := False; | ||
end; | ||
function GetDefaultDir(def: string): string; | ||
begin | ||
// {localappdata}\LwrEducation | ||
Result := GetShortName(GetEnv('localappdata')+'\LwrEducation'); | ||
end; | ||
function InitializeSetup(): Boolean; | ||
begin | ||
// Possible future improvements: | ||
// if version less or same => just launch app | ||
// if upgrade => check if same app is running and wait for it to exit | ||
// Add pack200/unpack200 support? | ||
Result := True; | ||
end; |
Binary file not shown.