inno Setup Packaging Tool SummaryCategory: Install Setup 2013-02-02 15:44 2386 People read comments (0) favorite reports
Recently packaged with Inno Setup, it is easy to make some low-level mistakes in this process, specifically written to remind yourself
1. Packaging folders
" d:myproject/xx/* " " {app} "; Flags:ignoreversion Recursesubdirs Createallsubdirs
It extracts the XX directory directly under the file copy to the installation directory, and did not generate XX directory, the program if you want to refer to the XX directory files will appear error.
I'll be fine if I change it. (Maybe the wizard can generate, I don't know yet)
" d:myproject/xx/* " " {app}/xx "; Flags:ignoreversion Recursesubdirs Createallsubdirs
2. Desktop icons
The code generated by the wizard will not tag your application and will not add a shortcut to the uninstall program in the Start menu.
1Name:"{group}/xx"; Filename:"{App}/xx.exe" 2Name:"{group}/{cm:uninstallprogram,xx}"; Filename:"{Uninstallexe}" 3Name:"{commondesktop}/xx"; Filename:"{App}/xx.exe"; IconFileName:"{App}/res/xx.ico"; Tasks:desktopicon
You can do this by adding the code under icons.
3. To register some OCX controls or DLLs when installing the program
My own practice is a bat script to register the OCX or DLL, put in the automatic run, run it before the program runs. Of course, there's this script code in Inno Setup.
4. If the program is running, some component support is required, such as. NETFramework, it is necessary to detect whether the system is installed when extracting. NETFramework
1 [Code]2 function Checkdotnet4_0 (): boolean;3 begin4Result:=not regkeyexists (HKLM,'software/microsoft/.netframework/policy/v4.0'); 5 end;6 7 function Initializesetup (): Boolean;8 varPath:string; 9 Resultcode:integer;Ten begin One ifcheckdotnet4_0 () Then A begin -Extracttemporaryfile ('Dotnetfx40_full_x86_x64.exe'); -Exec (Expandconstant ('{Tmp}/dotnetfx40_full_x86_x64.exe'),"',"', SW_SHOWNORMAL, ewwaituntilterminated, ResultCode); the End -End
Inno Setup Packaging Tool Summary