diff --git a/Output/superstar_1.0.0.exe b/Output/superstar_1.0.0.exe new file mode 100644 index 0000000..beeaa1d Binary files /dev/null and b/Output/superstar_1.0.0.exe differ diff --git a/package.iss b/package.iss new file mode 100644 index 0000000..4e70bb6 --- /dev/null +++ b/package.iss @@ -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" diff --git a/說明.txt b/說明.txt new file mode 100644 index 0000000..a1641eb --- /dev/null +++ b/說明.txt @@ -0,0 +1,10 @@ +1. F9 編譯,會出現在Output +2. 修改 +3. 序號暫定 ABC123-XYZ789 + +[Files] +Source: "C:\jasonchen\superstar_1.0.0\publish\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs + +路徑改成別的,就可以包了 + +dotnet publish -c Release -r win-x64 --self-contained true -o publish