[submit] inno setup program script

Tell us something about you. Off-topic Discussion

[submit] inno setup program script

Postby cdumdum » June 16th, 2012, 5:28 am

Hello to all

because i did'nt found a setup with the product, i've done my own with inno setup, here is my script for those who could be interessed :

Code: Select all
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

#define MyAppName "SARDU"
#define MyAppVersion "2.0.4.3"
#define MyAppPublisher "sarducd"
#define MyAppURL "https://www.sarducd.it"
#define MyAppExeName "sardu.exe"

[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{8C1D7FDD-5202-4A0F-A780-05AD1B307D3B}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher=Davide Costa
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
AllowNoIcons=yes
LicenseFile=license.txt
InfoBeforeFile=changelog.txt
; change the path below by your own path where you want to put the install program
OutputDir=C:\Users\azerty\Desktop
OutputBaseFilename=setup_sardu
Compression=lzma
SolidCompression=True
ArchitecturesInstallIn64BitMode=x64 ia64
; change the path below by your own path where the source of the program is located
SourceDir=C:\Users\azerty\Desktop\SARDU
VersionInfoVersion={#MyAppVersion}
VersionInfoCompany={#MyAppPublisher}
VersionInfoProductName={#MyAppName}
VersionInfoProductVersion={#MyAppVersion}

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "french"; MessagesFile: "compiler:Languages\French.isl"
Name: "italian"; MessagesFile: "compiler:Languages\Italian.isl"

[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; Components: sixtyfour thirtytwo
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; Components: sixtyfour thirtytwo

[Files]
Source: "sardu.exe"; DestDir: "{app}"; Flags: ignoreversion 32bit; Components: thirtytwo
Source: "7z.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "7z.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "changelog.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "copyng_SARDU"; DestDir: "{app}"; Flags: ignoreversion
Source: "license.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "License_7zip.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "sardu.chm"; DestDir: "{app}"; Flags: ignoreversion
Source: "SARDU_1"; DestDir: "{app}"
Source: "sardu_x64.exe"; DestDir: "{app}"; Flags: ignoreversion 64bit; Components: sixtyfour; Check: IsWin64
Source: "CFG\*"; DestDir: "{app}\CFG"; Flags: ignoreversion createallsubdirs recursesubdirs
Source: "COPYING\*"; DestDir: "{app}\COPYING"; Flags: ignoreversion createallsubdirs recursesubdirs
Source: "ISO\*"; DestDir: "{app}\ISO"; Flags: ignoreversion createallsubdirs recursesubdirs
Source: "Skin\*"; DestDir: "{app}\Skin"; Flags: ignoreversion createallsubdirs recursesubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{group}\{#MyAppName}"; Filename: "{app}\sardu_x64.exe"; Check: IsWin64
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\sardu_x64.exe"; Tasks: quicklaunchicon; Check: IsWin64
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\sardu_x64.exe"; Tasks: desktopicon; Check: IsWin64

[Run]
Filename: "{app}\{#MyAppExeName}"; Flags: nowait postinstall skipifsilent 32bit; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Components: thirtytwo
Filename: "{app}\sardu_x64.exe"; Flags: nowait postinstall skipifsilent 64bit; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Components: sixtyfour; Check: IsWin64

[InstallDelete]
Type: files; Name: "{app}\sardu.exe"; Check: IsWin64

[Components]
Name: "sixtyfour"; Description: "sixtyfour"; Types: sixtyfour
Name: "thirtytwo"; Description: "thirtytwo"; Types: thirtytwo

[Types]
Name: "sixtyfour"; Description: "{cm:SixtyFourVersion}"; Check: IsWin64
Name: "thirtytwo"; Description: "{cm:ThirtyTwoVersion}"

[CustomMessages]
english.SixtyFourVersion=64 bits system
italian.SixtyFourVersion=Sistema 64 bit
french.SixtyFourVersion=Système 64 bits
english.ThirtyTwoVersion=32 bits System
italian.ThirtyTwoVersion=Sistema 64 bit
french.ThirtyTwoVersion=Système 32 bits

[Code]
// this is a code to check if exist some additionnal component (e.g : iso file)
// were not uninstall
procedure DeinitializeUninstall();
var
  ErrorCode: Integer;
begin

// checking if the program directory exist, if yes, uninstall was not completly done
  if DirExists (ExpandConstant('{app}')) then
    // checking if uninstal program exist
      if not FileExists (ExpandConstant('{uninstallexe}')) then
       // if it does not exist, setup was done and not cancelled by the user
       //so a box with uninstalledmost message id apear,
       //after, by clicking on "ok" button, windows explorer apear
        if MsgBox(FmtMessage(SetupMessage(msgUninstalledMost), ['{#MyAppName}']), mbInformation, MB_OK) = IDOK then
        ShellExec('', ExpandConstant('{win}\explorer.exe'),ExpandConstant('/e, "{app}"'), '', SW_SHOW, ewNoWait, ErrorCode);
end;



Thanks for your comments

Cdumdum
cdumdum
 
Posts: 2
Joined: June 16th, 2012, 5:11 am

Re: [submit] inno setup program script

Postby cdumdum » June 16th, 2012, 5:56 am

erf i've just see an error of traduction, in the CustomMessages section ,
replace the line

Code: Select all
italian.ThirtyTwoVersion=Sistema 64 bit


by

Code: Select all
italian.ThirtyTwoVersion=Sistema 32 bit
cdumdum
 
Posts: 2
Joined: June 16th, 2012, 5:11 am

Re: [submit] inno setup program script

Postby davidecosta » June 17th, 2012, 9:26 am

Thanks :)
I don't use installer, i love portables :cheers:
User avatar
davidecosta
 
Posts: 2543
Joined: January 9th, 2011, 12:44 pm
Location: Sardinia


Return to General

Who is online

Users browsing this forum: No registered users

cron