New topic: 

Inno Setup Sample Script

<http://forums.realsoftware.com/viewtopic.php?t=33864>

         Page 1 of 1
   [ 1 post ]                 Previous topic | Next topic          Author  
Message        wbgookin          Post subject: Inno Setup Sample ScriptPosted: 
Wed May 19, 2010 1:09 pm                         
Joined: Sat Aug 22, 2009 9:44 am
Posts: 87                Hey all,

There was a question on the mailing list about Windows setup scripts, so I 
figured I'd post this as a starter script.  It displays a license file, copies 
your program and libs file to the program files directory, adds shortcuts on 
the desktop and start menu, and all the basic stuff (including an uninstaller).

I've tried to use a lot of variables up at the top of it so you don't have to 
go through and adjust all of the values later (all the #define lines are what 
you change).  Let me know if you have any questions...this is a pretty basic 
installer.  It will build your "rbapp" installer and give it a name of 
rbappSetup_400.exe (because the version is 4.0.0, if your revision is 1 the 
file would be rbappSetup_401.exe).  The setup file gets put in an "Output" 
directory below the .iss file.

Note that if you don't want a license file or icon on the installer, you can 
remove those #define lines but then you'll have to remove the lines below that 
reference them.  I'm sure I forgot to explain something, so let me know if you 
have any questions.

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

#define MyAppBuildPath "t:\work\realbasic\rbapp\Builds - 
rbapp.rbvcp\Windows\rbapp"
#define MyAppName "rbapp"
#define MyAppVerName "rbapp"
#define MyAppExeName "rbapp.exe"
#define MyAppUrlName "rbapp.url"
#define MyAppRevision "0"
#define MyAppMinor "0"
#define MyAppMajor "4"
#define MyAppPublisher "Your Company, LLC"
#define MyAppURL "http://www.yoursitehere.com";
#define MyAppCopyright "2010"
#define MyAppAgreement "t:\work\documents\legal\agreement_va.rtf"
#define MyAppSetupIconFile "t:\work\graphics\psp8\icons\logo2.ico"
#define BaseFilenamePrefix "rbappSetup"

[Setup]
OutputBaseFilename={#BaseFilenamePrefix}_{#MyAppMajor}{#MyAppMinor}{#MyAppRevision}
AppName={#MyAppName}{#MyAppMajor}
AppVerName={#MyAppVerName} {#MyAppMajor}.{#MyAppMinor}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}{#MyAppMajor}
DefaultGroupName={#MyAppName}{#MyAppMajor}
AppCopyright={#MyAppCopyright}
LicenseFile={#MyAppAgreement}
ChangesAssociations=true
Compression=lzma
SolidCompression=true
ShowLanguageDialog=no
SetupIconFile={#MyAppSetupIconFile}
Uninstallable=true
DisableStartupPrompt=false
VersionInfoVersion={#MyAppMajor}.{#MyAppMinor}.{#MyAppRevision}
VersionInfoCompany={#MyAppPublisher}
VersionInfoDescription={#MyAppVerName}
VersionInfoTextVersion={#MyAppVerName}
VersionInfoCopyright=(#MyAppCopyright}
VersionInfoProductName={#MyAppVerName}
VersionInfoProductVersion={#MyAppMajor}.{#MyAppMinor}.{#MyAppRevision}
AllowUNCPath=false
UsePreviousGroup=false
UsePreviousAppDir=false

[Tasks]
; NOTE: The following entry contains English phrases ("Create a desktop icon" 
and "Additional icons"). You are free to translate them into another language 
if required.
Name: desktopicon; Description: Create a &desktop icon; GroupDescription: 
Additional icons:
; NOTE: The following entry contains English phrases ("Create a Quick Launch 
icon" and "Additional icons"). You are free to translate them into another 
language if required.
Name: quicklaunchicon; Description: Create a &Quick Launch icon; 
GroupDescription: Additional icons:; Flags: unchecked

[Files]
Source: {#MyAppBuildPath}\{#MyAppExeName}; DestDir: {app}
Source: {#MyAppBuildPath}\{#MyAppName} Libs\*.*; DestDir: {app}\{#MyAppName} 
Libs

[INI]
Filename: {app}\{#MyAppURLName}; Section: InternetShortcut; Key: URL; String: 
{#MyAppURL}

[Icons]
Name: {group}\{#MyAppName}; Filename: {app}\{#MyAppExeName}
; NOTE: The following entry contains an English phrase ("on the Web"). You are 
free to translate it into another language if required.
Name: {group}\{#MyAppName} on the Web; Filename: {app}\{#MyAppURLName}
Name: {userdesktop}\{#MyAppName}{#MyAppMajor}; Filename: {app}\{#MyAppExeName}; 
Tasks: desktopicon
Name: {userappdata}\Microsoft\Internet Explorer\Quick 
Launch\{#MyAppName}{#MyAppMajor}; Filename: {app}\{#MyAppExeName}; Tasks: 
quicklaunchicon

[Run]
; NOTE: The following entry contains an English phrase ("Launch"). You are free 
to translate it into another language if required.
Filename: {app}\{#MyAppExeName}; Description: Launch {#MyAppName}; Flags: 
nowait postinstall skipifsilent unchecked

[UninstallDelete]
Type: files; Name: {app}\{#MyAppUrlName}

[Dirs]
Name: {app}\{#MyAppName} Libs; Flags: uninsneveruninstall

[_ISTool]
UseAbsolutePaths=false
OutputExeFilename=Output\setup.exe
   
                             Top            Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 1 post ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to