AFC / setup_advanced.iss
embedingHF's picture
Upload 2 files
a400527 verified
; Advanced Inno Setup Script for AI File Converter Pro
[Setup]
AppId={{AIFILE-CONVERTER-PRO-2024}}
AppName=AI File Converter Pro
AppVersion=2.0.0
AppVerName=AI File Converter Pro 2.0
AppPublisher=AI File Converter Team
AppPublisherURL=https://your-website.com
AppSupportURL=https://your-website.com/support
AppUpdatesURL=https://your-website.com/updates
DefaultDirName={autopf}\AI File Converter Pro
DefaultGroupName=AI File Converter Pro
AllowNoIcons=yes
LicenseFile=LICENSE.txt
OutputDir=InstallerOutput
OutputBaseFilename=AI_File_Converter_Pro_v2.0_Setup
SetupIconFile=logo.ico
Compression=lzma2
SolidCompression=yes
WizardStyle=modern
PrivilegesRequired=lowest
ArchitecturesInstallIn64BitMode=x64compatible
UninstallDisplayIcon={app}\AIFileConverter.exe
UninstallDisplayName=AI File Converter Pro
; Version info
VersionInfoVersion=2.0.0.0
VersionInfoCompany=AI File Converter Team
VersionInfoDescription=AI File Converter Pro Installer
VersionInfoProductName=AI File Converter Pro
VersionInfoProductVersion=2.0.0.0
VersionInfoCopyright=Copyright © 2024
; Sign tool (if you have a certificate)
; SignTool=mysign
; SignedUninstaller=yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "german"; MessagesFile: "compiler:Languages\German.isl"
Name: "french"; MessagesFile: "compiler:Languages\French.isl"
Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 6.1
Name: "associatefiles"; Description: "Associate supported file types with AI File Converter Pro"; GroupDescription: "File associations:"
[Files]
Source: "dist\AIFileConverter.exe"; DestDir: "{app}"; Flags: ignoreversion signonce
Source: "logo.ico"; DestDir: "{app}"; Flags: ignoreversion
Source: "logo.png"; DestDir: "{app}"; Flags: ignoreversion
Source: "README.txt"; DestDir: "{app}"; Flags: ignoreversion; AfterInstall: CreateReadmeShortcut
; Include ffmpeg if bundled
; Source: "ffmpeg\*"; DestDir: "{app}\ffmpeg"; Flags: recursesubdirs createallsubdirs
; Include documentation
; Source: "docs\*"; DestDir: "{app}\docs"; Flags: recursesubdirs createallsubdirs
[Icons]
Name: "{group}\AI File Converter Pro"; Filename: "{app}\AIFileConverter.exe"; IconFilename: "{app}\logo.ico"; WorkingDir: "{app}"
Name: "{group}\{cm:UninstallProgram,AI File Converter Pro}"; Filename: "{uninstallexe}"; IconFilename: "{app}\logo.ico"
Name: "{autodesktop}\AI File Converter Pro"; Filename: "{app}\AIFileConverter.exe"; IconFilename: "{app}\logo.ico"; WorkingDir: "{app}"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\AI File Converter Pro"; Filename: "{app}\AIFileConverter.exe"; IconFilename: "{app}\logo.ico"; Tasks: quicklaunchicon
Name: "{group}\Readme"; Filename: "{app}\README.txt"
[Run]
Filename: "{app}\AIFileConverter.exe"; Description: "{cm:LaunchProgram,AI File Converter Pro}"; Flags: nowait postinstall skipifsilent
[UninstallDelete]
Type: filesandordirs; Name: "{app}\*.log"
Type: dirifempty; Name: "{app}"
[Registry]
; Add to PATH (optional)
; Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}"; Check: IsAdminInstallMode
; File associations
Root: HKCR; Subkey: ".mp3"; ValueType: string; ValueData: "AI_File_Converter_Pro.audio"; Flags: uninsdeletekey; Tasks: associatefiles
Root: HKCR; Subkey: ".mp4"; ValueType: string; ValueData: "AI_File_Converter_Pro.video"; Flags: uninsdeletekey; Tasks: associatefiles
Root: HKCR; Subkey: ".pdf"; ValueType: string; ValueData: "AI_File_Converter_Pro.document"; Flags: uninsdeletekey; Tasks: associatefiles
Root: HKCR; Subkey: ".jpg"; ValueType: string; ValueData: "AI_File_Converter_Pro.image"; Flags: uninsdeletekey; Tasks: associatefiles
Root: HKCR; Subkey: ".png"; ValueType: string; ValueData: "AI_File_Converter_Pro.image"; Flags: uninsdeletekey; Tasks: associatefiles
[Code]
var
CustomPage: TWizardPage;
ChkBoxCreateBackup: TNewCheckBox;
procedure InitializeWizard;
var
WelcomeLabel: TNewStaticText;
Page: TWizardPage;
CustomLabel: TNewStaticText;
begin
// Custom Welcome Message
WizardForm.WelcomeLabel2.Caption := 'Welcome to AI File Converter Pro 2.0!' + #13#10 +
#13#10 +
'AI File Converter Pro is a powerful file conversion tool ' +
'that uses artificial intelligence to help you convert files ' +
'with natural language commands.' + #13#10 +
#13#10 +
'Key Features:' + #13#10 +
'• Support for documents, images, videos, and audio' + #13#10 +
'• AI-powered format recommendations' + #13#10 +
'• Natural language commands' + #13#10 +
'• Batch processing with queue management' + #13#10 +
'• High-quality conversion with optimization' + #13#10 +
#13#10 +
'Click Next to continue or Cancel to exit setup.';
// Custom page for additional options
CustomPage := CreateCustomPage(wpSelectTasks, 'Additional Options', 'Select additional setup options');
CustomLabel := TNewStaticText.Create(CustomPage);
CustomLabel.Parent := CustomPage.Surface;
CustomLabel.Caption := 'Choose additional options for the installation:';
CustomLabel.Top := 0;
CustomLabel.Width := CustomPage.SurfaceWidth;
ChkBoxCreateBackup := TNewCheckBox.Create(CustomPage);
ChkBoxCreateBackup.Parent := CustomPage.Surface;
ChkBoxCreateBackup.Caption := 'Create a backup of previous installation';
ChkBoxCreateBackup.Top := 30;
ChkBoxCreateBackup.Width := CustomPage.SurfaceWidth;
ChkBoxCreateBackup.Checked := False;
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep = ssPostInstall then
begin
// Create a log file of installation
SaveStringToFile(ExpandConstant('{app}\install_log.txt'),
'Installation completed at ' + GetDateTimeString('yyyy-mm-dd hh:nn:ss', #0, #0) + #13#10,
False);
// Add custom post-installation steps here
if ChkBoxCreateBackup.Checked then
begin
// Backup logic here
Log('Creating backup...');
end;
end;
end;
function NeedRestart(): Boolean;
begin
Result := False;
end;
procedure CreateReadmeShortcut();
begin
// Custom post-install action for README
SaveStringToFile(ExpandConstant('{app}\README.txt'),
'AI File Converter Pro' + #13#10 +
'=====================' + #13#10 + #13#10 +
'Thank you for installing AI File Converter Pro!' + #13#10 + #13#10 +
'Quick Start:' + #13#10 +
'1. Launch the application' + #13#10 +
'2. Select file type (Document/Image/Video/Audio)' + #13#10 +
'3. Add files to convert' + #13#10 +
'4. Choose output format' + #13#10 +
'5. Click Start Conversion' + #13#10 + #13#10 +
'Using AI Assistant:' + #13#10 +
'- Type "convert this to pdf" to change format' + #13#10 +
'- Ask "best format for web" for recommendations' + #13#10 +
'- Say "analyze this file" for file insights' + #13#10 + #13#10 +
'For support, visit: https://your-website.com/support',
False);
end;