打包工具
This commit is contained in:
parent
840076be50
commit
b40e11331f
BIN
Output/superstar_1.0.0.exe
Normal file
BIN
Output/superstar_1.0.0.exe
Normal file
Binary file not shown.
58
package.iss
Normal file
58
package.iss
Normal file
@ -0,0 +1,58 @@
|
|||||||
|
[Setup]
|
||||||
|
AppName=superstar
|
||||||
|
AppVersion=1.0.0
|
||||||
|
DefaultDirName={pf}\superstar_1.0.0
|
||||||
|
OutputBaseFilename=superstar_1.0.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.0.0。', mbInformation, MB_OK);
|
||||||
|
end;
|
||||||
|
end;
|
||||||
|
|
||||||
|
[Files]
|
||||||
|
Source: "E:\jasonchen\superstar_1.0.0\publish\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs
|
||||||
|
|
||||||
|
[Icons]
|
||||||
|
Name: "{group}\superstar_1.0.0"; Filename: "{app}\superstar_1.0.0.exe"
|
||||||
|
Name: "{commondesktop}\superstar_1.0.0"; Filename: "{app}\superstar_1.0.0.exe"
|
Loading…
x
Reference in New Issue
Block a user