59 lines
1.3 KiB
Plaintext
59 lines
1.3 KiB
Plaintext
[Setup]
|
|
AppName=superstar
|
|
AppVersion=1.1.0
|
|
DefaultDirName={pf}\superstar_1.1.0
|
|
OutputBaseFilename=superstar_1.1.0
|
|
Compression=lzma
|
|
SolidCompression=yes
|
|
PrivilegesRequired=admin
|
|
|
|
[Code]
|
|
var
|
|
SerialPage: TInputQueryWizardPage;
|
|
|
|
function CheckSerial(Serial: String): Boolean;
|
|
begin
|
|
Result := (Serial = 'ABC123-XYZ789');
|
|
end;
|
|
|
|
procedure InitializeWizard;
|
|
begin
|
|
SerialPage := CreateInputQueryPage(
|
|
wpWelcome,
|
|
'序號驗證',
|
|
'請輸入您的安裝序號',
|
|
'為了完成安裝,請輸入有效的安裝序號。'
|
|
);
|
|
|
|
SerialPage.Add('序號:', False);
|
|
end;
|
|
|
|
function NextButtonClick(CurPageID: Integer): Boolean;
|
|
begin
|
|
Result := True;
|
|
|
|
if CurPageID = SerialPage.ID then
|
|
begin
|
|
if not CheckSerial(SerialPage.Values[0]) then
|
|
begin
|
|
MsgBox('序號錯誤,請再試一次。', mbError, MB_OK);
|
|
Result := False;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
procedure CurStepChanged(CurStep: TSetupStep);
|
|
begin
|
|
if CurStep = ssPostInstall then
|
|
begin
|
|
MsgBox('安裝完成,您可以從桌面或開始選單啟動 superstar_1.1.0。', mbInformation, MB_OK);
|
|
end;
|
|
end;
|
|
|
|
[Files]
|
|
Source: "E:\jasonchen\superstar_1.1.0\publish\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs
|
|
|
|
[Icons]
|
|
Name: "{group}\superstar_1.1.0"; Filename: "{app}\superstar_1.1.0.exe"
|
|
Name: "{commondesktop}\superstar_1.1.0"; Filename: "{app}\superstar_1.1.0.exe"
|