Upload 3 files
Browse files- build_installer.bat +59 -0
- setup.iss.txt +103 -0
- setup_advanced.iss.txt +172 -0
build_installer.bat
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
@echo off
|
| 2 |
+
echo ========================================
|
| 3 |
+
echo AI File Converter Pro - Build Script
|
| 4 |
+
echo ========================================
|
| 5 |
+
echo.
|
| 6 |
+
|
| 7 |
+
REM Clean previous builds
|
| 8 |
+
echo [1/4] Cleaning previous builds...
|
| 9 |
+
if exist build rmdir /s /q build
|
| 10 |
+
if exist dist rmdir /s /q dist
|
| 11 |
+
if exist *.spec del /q *.spec
|
| 12 |
+
|
| 13 |
+
REM Run PyInstaller
|
| 14 |
+
echo [2/4] Creating executable with PyInstaller...
|
| 15 |
+
pyinstaller --noconsole --onefile --icon=logo.ico --name="AIFileConverter" main.py
|
| 16 |
+
|
| 17 |
+
if %errorlevel% neq 0 (
|
| 18 |
+
echo ERROR: PyInstaller failed!
|
| 19 |
+
pause
|
| 20 |
+
exit /b %errorlevel%
|
| 21 |
+
)
|
| 22 |
+
|
| 23 |
+
REM Check if executable was created
|
| 24 |
+
if not exist "dist\AIFileConverter.exe" (
|
| 25 |
+
echo ERROR: Executable not found!
|
| 26 |
+
pause
|
| 27 |
+
exit /b 1
|
| 28 |
+
)
|
| 29 |
+
|
| 30 |
+
REM Create installer with Inno Setup
|
| 31 |
+
echo [3/4] Creating installer with Inno Setup...
|
| 32 |
+
|
| 33 |
+
REM Try to find Inno Setup compiler
|
| 34 |
+
set ISCC_PATH=""
|
| 35 |
+
if exist "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" set ISCC_PATH="C:\Program Files (x86)\Inno Setup 6\ISCC.exe"
|
| 36 |
+
if exist "C:\Program Files\Inno Setup 6\ISCC.exe" set ISCC_PATH="C:\Program Files\Inno Setup 6\ISCC.exe"
|
| 37 |
+
|
| 38 |
+
if %ISCC_PATH% == "" (
|
| 39 |
+
echo ERROR: Inno Setup not found!
|
| 40 |
+
echo Please install Inno Setup from: https://jrsoftware.org/isdl.php
|
| 41 |
+
pause
|
| 42 |
+
exit /b 1
|
| 43 |
+
)
|
| 44 |
+
|
| 45 |
+
%ISCC_PATH% setup_advanced.iss
|
| 46 |
+
|
| 47 |
+
if %errorlevel% neq 0 (
|
| 48 |
+
echo ERROR: Inno Setup compilation failed!
|
| 49 |
+
pause
|
| 50 |
+
exit /b %errorlevel%
|
| 51 |
+
)
|
| 52 |
+
|
| 53 |
+
REM Done
|
| 54 |
+
echo.
|
| 55 |
+
echo [4/4] Build completed successfully!
|
| 56 |
+
echo.
|
| 57 |
+
echo Installer created: InstallerOutput\AI_File_Converter_Pro_v2.0_Setup.exe
|
| 58 |
+
echo.
|
| 59 |
+
pause
|
setup.iss.txt
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
; Inno Setup Script for AI File Converter Pro
|
| 2 |
+
; Put this file in your project directory
|
| 3 |
+
|
| 4 |
+
[Setup]
|
| 5 |
+
; Basic information
|
| 6 |
+
AppId={{8A5C3D2E-1F4B-4A9E-8D7C-6B5A4E3D2C1B}}
|
| 7 |
+
AppName=AI File Converter Pro
|
| 8 |
+
AppVersion=2.0
|
| 9 |
+
AppPublisher=AI File Converter Team
|
| 10 |
+
AppPublisherURL=https://your-website.com
|
| 11 |
+
AppSupportURL=https://your-website.com/support
|
| 12 |
+
AppUpdatesURL=https://your-website.com/updates
|
| 13 |
+
DefaultDirName={autopf}\AI File Converter Pro
|
| 14 |
+
DefaultGroupName=AI File Converter Pro
|
| 15 |
+
AllowNoIcons=yes
|
| 16 |
+
LicenseFile=LICENSE.txt
|
| 17 |
+
OutputDir=installer
|
| 18 |
+
OutputBaseFilename=AI_File_Converter_Pro_Setup
|
| 19 |
+
SetupIconFile=logo.ico
|
| 20 |
+
Compression=lzma2/ultra64
|
| 21 |
+
SolidCompression=yes
|
| 22 |
+
WizardStyle=modern
|
| 23 |
+
PrivilegesRequired=lowest
|
| 24 |
+
ArchitecturesInstallIn64BitMode=x64compatible
|
| 25 |
+
|
| 26 |
+
; Disk space requirements
|
| 27 |
+
ExtraDiskSpaceRequired=200000000
|
| 28 |
+
|
| 29 |
+
; Uninstaller
|
| 30 |
+
UninstallDisplayIcon={app}\AIFileConverter.exe
|
| 31 |
+
UninstallDisplayName=AI File Converter Pro
|
| 32 |
+
|
| 33 |
+
[Languages]
|
| 34 |
+
Name: "english"; MessagesFile: "compiler:Default.isl"
|
| 35 |
+
|
| 36 |
+
[Tasks]
|
| 37 |
+
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
| 38 |
+
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 6.1; Check: not IsAdminInstallMode
|
| 39 |
+
|
| 40 |
+
[Files]
|
| 41 |
+
; Main application
|
| 42 |
+
Source: "dist\AIFileConverter.exe"; DestDir: "{app}"; Flags: ignoreversion
|
| 43 |
+
|
| 44 |
+
; Logo files (if you want to include them for reference)
|
| 45 |
+
Source: "logo.ico"; DestDir: "{app}"; Flags: ignoreversion
|
| 46 |
+
Source: "logo.png"; DestDir: "{app}"; Flags: ignoreversion
|
| 47 |
+
|
| 48 |
+
; Optional: Include any additional resources
|
| 49 |
+
; Source: "assets\*"; DestDir: "{app}\assets"; Flags: recursesubdirs createallsubdirs
|
| 50 |
+
|
| 51 |
+
; Optional: Include ffmpeg if needed (uncomment if you want to bundle ffmpeg)
|
| 52 |
+
; Source: "ffmpeg\bin\*"; DestDir: "{app}\ffmpeg\bin"; Flags: recursesubdirs createallsubdirs
|
| 53 |
+
|
| 54 |
+
[Icons]
|
| 55 |
+
Name: "{group}\AI File Converter Pro"; Filename: "{app}\AIFileConverter.exe"; IconFilename: "{app}\logo.ico"
|
| 56 |
+
Name: "{group}\{cm:UninstallProgram,AI File Converter Pro}"; Filename: "{uninstallexe}"
|
| 57 |
+
Name: "{autodesktop}\AI File Converter Pro"; Filename: "{app}\AIFileConverter.exe"; IconFilename: "{app}\logo.ico"; Tasks: desktopicon
|
| 58 |
+
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\AI File Converter Pro"; Filename: "{app}\AIFileConverter.exe"; IconFilename: "{app}\logo.ico"; Tasks: quicklaunchicon
|
| 59 |
+
|
| 60 |
+
[Run]
|
| 61 |
+
; Run the application after installation (optional)
|
| 62 |
+
Filename: "{app}\AIFileConverter.exe"; Description: "{cm:LaunchProgram,AI File Converter Pro}"; Flags: nowait postinstall skipifsilent
|
| 63 |
+
|
| 64 |
+
[Registry]
|
| 65 |
+
; Optional: Add registry entries for file associations
|
| 66 |
+
; Root: "HKCR"; Subkey: ".aifc"; ValueType: "string"; ValueData: "AIFF File"; Flags: uninsdeletekey
|
| 67 |
+
; Root: "HKCR"; Subkey: "AIFileConverter\shell\open\command"; ValueType: "string"; ValueData: """{app}\AIFileConverter.exe"" ""%1"""; Flags: uninsdeletekey
|
| 68 |
+
|
| 69 |
+
[Code]
|
| 70 |
+
// Custom code to check if files are in use
|
| 71 |
+
function InitializeSetup(): Boolean;
|
| 72 |
+
begin
|
| 73 |
+
Result := True;
|
| 74 |
+
// You can add custom initialization code here
|
| 75 |
+
end;
|
| 76 |
+
|
| 77 |
+
procedure CurStepChanged(CurStep: TSetupStep);
|
| 78 |
+
begin
|
| 79 |
+
if CurStep = ssPostInstall then
|
| 80 |
+
begin
|
| 81 |
+
// Post-installation actions
|
| 82 |
+
// For example: create desktop shortcut if not created
|
| 83 |
+
end;
|
| 84 |
+
end;
|
| 85 |
+
|
| 86 |
+
// Function to create a custom welcome message
|
| 87 |
+
procedure InitializeWizard;
|
| 88 |
+
var
|
| 89 |
+
WelcomeLabel: TNewStaticText;
|
| 90 |
+
begin
|
| 91 |
+
// Custom welcome text can be added here
|
| 92 |
+
WizardForm.WelcomeLabel2.Caption := 'Welcome to AI File Converter Pro!' + #13#10 +
|
| 93 |
+
#13#10 +
|
| 94 |
+
'This wizard will guide you through the installation of ' +
|
| 95 |
+
'AI File Converter Pro, the ultimate file conversion tool ' +
|
| 96 |
+
'with AI assistance.' + #13#10 +
|
| 97 |
+
#13#10 +
|
| 98 |
+
'Features:' + #13#10 +
|
| 99 |
+
'• Convert documents, images, videos, and audio' + #13#10 +
|
| 100 |
+
'• AI-powered format recommendations' + #13#10 +
|
| 101 |
+
'• Natural language commands' + #13#10 +
|
| 102 |
+
'• Batch processing support';
|
| 103 |
+
end;
|
setup_advanced.iss.txt
ADDED
|
@@ -0,0 +1,172 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
; Advanced Inno Setup Script for AI File Converter Pro
|
| 2 |
+
|
| 3 |
+
[Setup]
|
| 4 |
+
AppId={{AIFILE-CONVERTER-PRO-2024}}
|
| 5 |
+
AppName=AI File Converter Pro
|
| 6 |
+
AppVersion=2.0.0
|
| 7 |
+
AppVerName=AI File Converter Pro 2.0
|
| 8 |
+
AppPublisher=AI File Converter Team
|
| 9 |
+
AppPublisherURL=https://your-website.com
|
| 10 |
+
AppSupportURL=https://your-website.com/support
|
| 11 |
+
AppUpdatesURL=https://your-website.com/updates
|
| 12 |
+
DefaultDirName={autopf}\AI File Converter Pro
|
| 13 |
+
DefaultGroupName=AI File Converter Pro
|
| 14 |
+
AllowNoIcons=yes
|
| 15 |
+
LicenseFile=LICENSE.txt
|
| 16 |
+
OutputDir=InstallerOutput
|
| 17 |
+
OutputBaseFilename=AI_File_Converter_Pro_v2.0_Setup
|
| 18 |
+
SetupIconFile=logo.ico
|
| 19 |
+
Compression=lzma2
|
| 20 |
+
SolidCompression=yes
|
| 21 |
+
WizardStyle=modern
|
| 22 |
+
PrivilegesRequired=lowest
|
| 23 |
+
ArchitecturesInstallIn64BitMode=x64compatible
|
| 24 |
+
UninstallDisplayIcon={app}\AIFileConverter.exe
|
| 25 |
+
UninstallDisplayName=AI File Converter Pro
|
| 26 |
+
|
| 27 |
+
; Version info
|
| 28 |
+
VersionInfoVersion=2.0.0.0
|
| 29 |
+
VersionInfoCompany=AI File Converter Team
|
| 30 |
+
VersionInfoDescription=AI File Converter Pro Installer
|
| 31 |
+
VersionInfoProductName=AI File Converter Pro
|
| 32 |
+
VersionInfoProductVersion=2.0.0.0
|
| 33 |
+
VersionInfoCopyright=Copyright © 2024
|
| 34 |
+
|
| 35 |
+
; Sign tool (if you have a certificate)
|
| 36 |
+
; SignTool=mysign
|
| 37 |
+
; SignedUninstaller=yes
|
| 38 |
+
|
| 39 |
+
[Languages]
|
| 40 |
+
Name: "english"; MessagesFile: "compiler:Default.isl"
|
| 41 |
+
Name: "german"; MessagesFile: "compiler:Languages\German.isl"
|
| 42 |
+
Name: "french"; MessagesFile: "compiler:Languages\French.isl"
|
| 43 |
+
Name: "spanish"; MessagesFile: "compiler:Languages\Spanish.isl"
|
| 44 |
+
|
| 45 |
+
[Tasks]
|
| 46 |
+
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
|
| 47 |
+
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 6.1
|
| 48 |
+
Name: "associatefiles"; Description: "Associate supported file types with AI File Converter Pro"; GroupDescription: "File associations:"
|
| 49 |
+
|
| 50 |
+
[Files]
|
| 51 |
+
Source: "dist\AIFileConverter.exe"; DestDir: "{app}"; Flags: ignoreversion signonce
|
| 52 |
+
Source: "logo.ico"; DestDir: "{app}"; Flags: ignoreversion
|
| 53 |
+
Source: "logo.png"; DestDir: "{app}"; Flags: ignoreversion
|
| 54 |
+
Source: "README.txt"; DestDir: "{app}"; Flags: ignoreversion; AfterInstall: CreateReadmeShortcut
|
| 55 |
+
|
| 56 |
+
; Include ffmpeg if bundled
|
| 57 |
+
; Source: "ffmpeg\*"; DestDir: "{app}\ffmpeg"; Flags: recursesubdirs createallsubdirs
|
| 58 |
+
|
| 59 |
+
; Include documentation
|
| 60 |
+
; Source: "docs\*"; DestDir: "{app}\docs"; Flags: recursesubdirs createallsubdirs
|
| 61 |
+
|
| 62 |
+
[Icons]
|
| 63 |
+
Name: "{group}\AI File Converter Pro"; Filename: "{app}\AIFileConverter.exe"; IconFilename: "{app}\logo.ico"; WorkingDir: "{app}"
|
| 64 |
+
Name: "{group}\{cm:UninstallProgram,AI File Converter Pro}"; Filename: "{uninstallexe}"; IconFilename: "{app}\logo.ico"
|
| 65 |
+
Name: "{autodesktop}\AI File Converter Pro"; Filename: "{app}\AIFileConverter.exe"; IconFilename: "{app}\logo.ico"; WorkingDir: "{app}"; Tasks: desktopicon
|
| 66 |
+
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\AI File Converter Pro"; Filename: "{app}\AIFileConverter.exe"; IconFilename: "{app}\logo.ico"; Tasks: quicklaunchicon
|
| 67 |
+
Name: "{group}\Readme"; Filename: "{app}\README.txt"
|
| 68 |
+
|
| 69 |
+
[Run]
|
| 70 |
+
Filename: "{app}\AIFileConverter.exe"; Description: "{cm:LaunchProgram,AI File Converter Pro}"; Flags: nowait postinstall skipifsilent
|
| 71 |
+
|
| 72 |
+
[UninstallDelete]
|
| 73 |
+
Type: filesandordirs; Name: "{app}\*.log"
|
| 74 |
+
Type: dirifempty; Name: "{app}"
|
| 75 |
+
|
| 76 |
+
[Registry]
|
| 77 |
+
; Add to PATH (optional)
|
| 78 |
+
; Root: HKLM; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: expandsz; ValueName: "Path"; ValueData: "{olddata};{app}"; Check: IsAdminInstallMode
|
| 79 |
+
|
| 80 |
+
; File associations
|
| 81 |
+
Root: HKCR; Subkey: ".mp3"; ValueType: string; ValueData: "AI_File_Converter_Pro.audio"; Flags: uninsdeletekey; Tasks: associatefiles
|
| 82 |
+
Root: HKCR; Subkey: ".mp4"; ValueType: string; ValueData: "AI_File_Converter_Pro.video"; Flags: uninsdeletekey; Tasks: associatefiles
|
| 83 |
+
Root: HKCR; Subkey: ".pdf"; ValueType: string; ValueData: "AI_File_Converter_Pro.document"; Flags: uninsdeletekey; Tasks: associatefiles
|
| 84 |
+
Root: HKCR; Subkey: ".jpg"; ValueType: string; ValueData: "AI_File_Converter_Pro.image"; Flags: uninsdeletekey; Tasks: associatefiles
|
| 85 |
+
Root: HKCR; Subkey: ".png"; ValueType: string; ValueData: "AI_File_Converter_Pro.image"; Flags: uninsdeletekey; Tasks: associatefiles
|
| 86 |
+
|
| 87 |
+
[Code]
|
| 88 |
+
var
|
| 89 |
+
CustomPage: TWizardPage;
|
| 90 |
+
ChkBoxCreateBackup: TNewCheckBox;
|
| 91 |
+
|
| 92 |
+
procedure InitializeWizard;
|
| 93 |
+
var
|
| 94 |
+
WelcomeLabel: TNewStaticText;
|
| 95 |
+
Page: TWizardPage;
|
| 96 |
+
CustomLabel: TNewStaticText;
|
| 97 |
+
begin
|
| 98 |
+
// Custom Welcome Message
|
| 99 |
+
WizardForm.WelcomeLabel2.Caption := 'Welcome to AI File Converter Pro 2.0!' + #13#10 +
|
| 100 |
+
#13#10 +
|
| 101 |
+
'AI File Converter Pro is a powerful file conversion tool ' +
|
| 102 |
+
'that uses artificial intelligence to help you convert files ' +
|
| 103 |
+
'with natural language commands.' + #13#10 +
|
| 104 |
+
#13#10 +
|
| 105 |
+
'Key Features:' + #13#10 +
|
| 106 |
+
'• Support for documents, images, videos, and audio' + #13#10 +
|
| 107 |
+
'• AI-powered format recommendations' + #13#10 +
|
| 108 |
+
'• Natural language commands' + #13#10 +
|
| 109 |
+
'• Batch processing with queue management' + #13#10 +
|
| 110 |
+
'• High-quality conversion with optimization' + #13#10 +
|
| 111 |
+
#13#10 +
|
| 112 |
+
'Click Next to continue or Cancel to exit setup.';
|
| 113 |
+
|
| 114 |
+
// Custom page for additional options
|
| 115 |
+
CustomPage := CreateCustomPage(wpSelectTasks, 'Additional Options', 'Select additional setup options');
|
| 116 |
+
CustomLabel := TNewStaticText.Create(CustomPage);
|
| 117 |
+
CustomLabel.Parent := CustomPage.Surface;
|
| 118 |
+
CustomLabel.Caption := 'Choose additional options for the installation:';
|
| 119 |
+
CustomLabel.Top := 0;
|
| 120 |
+
CustomLabel.Width := CustomPage.SurfaceWidth;
|
| 121 |
+
|
| 122 |
+
ChkBoxCreateBackup := TNewCheckBox.Create(CustomPage);
|
| 123 |
+
ChkBoxCreateBackup.Parent := CustomPage.Surface;
|
| 124 |
+
ChkBoxCreateBackup.Caption := 'Create a backup of previous installation';
|
| 125 |
+
ChkBoxCreateBackup.Top := 30;
|
| 126 |
+
ChkBoxCreateBackup.Width := CustomPage.SurfaceWidth;
|
| 127 |
+
ChkBoxCreateBackup.Checked := False;
|
| 128 |
+
end;
|
| 129 |
+
|
| 130 |
+
procedure CurStepChanged(CurStep: TSetupStep);
|
| 131 |
+
begin
|
| 132 |
+
if CurStep = ssPostInstall then
|
| 133 |
+
begin
|
| 134 |
+
// Create a log file of installation
|
| 135 |
+
SaveStringToFile(ExpandConstant('{app}\install_log.txt'),
|
| 136 |
+
'Installation completed at ' + GetDateTimeString('yyyy-mm-dd hh:nn:ss', #0, #0) + #13#10,
|
| 137 |
+
False);
|
| 138 |
+
|
| 139 |
+
// Add custom post-installation steps here
|
| 140 |
+
if ChkBoxCreateBackup.Checked then
|
| 141 |
+
begin
|
| 142 |
+
// Backup logic here
|
| 143 |
+
Log('Creating backup...');
|
| 144 |
+
end;
|
| 145 |
+
end;
|
| 146 |
+
end;
|
| 147 |
+
|
| 148 |
+
function NeedRestart(): Boolean;
|
| 149 |
+
begin
|
| 150 |
+
Result := False;
|
| 151 |
+
end;
|
| 152 |
+
|
| 153 |
+
procedure CreateReadmeShortcut();
|
| 154 |
+
begin
|
| 155 |
+
// Custom post-install action for README
|
| 156 |
+
SaveStringToFile(ExpandConstant('{app}\README.txt'),
|
| 157 |
+
'AI File Converter Pro' + #13#10 +
|
| 158 |
+
'=====================' + #13#10 + #13#10 +
|
| 159 |
+
'Thank you for installing AI File Converter Pro!' + #13#10 + #13#10 +
|
| 160 |
+
'Quick Start:' + #13#10 +
|
| 161 |
+
'1. Launch the application' + #13#10 +
|
| 162 |
+
'2. Select file type (Document/Image/Video/Audio)' + #13#10 +
|
| 163 |
+
'3. Add files to convert' + #13#10 +
|
| 164 |
+
'4. Choose output format' + #13#10 +
|
| 165 |
+
'5. Click Start Conversion' + #13#10 + #13#10 +
|
| 166 |
+
'Using AI Assistant:' + #13#10 +
|
| 167 |
+
'- Type "convert this to pdf" to change format' + #13#10 +
|
| 168 |
+
'- Ask "best format for web" for recommendations' + #13#10 +
|
| 169 |
+
'- Say "analyze this file" for file insights' + #13#10 + #13#10 +
|
| 170 |
+
'For support, visit: https://your-website.com/support',
|
| 171 |
+
False);
|
| 172 |
+
end;
|