Jump to content

Rebuilding Inno Setups


Recommended Posts

in that case

Filename: {app}\AveDesk.exe; Parameters: /RegServer; WorkingDir: {app}\; StatusMsg: Registering AveDesk.exe
Filename: {app}\AveDesk.exe; Parameters: /AssocFiles; WorkingDir: {app}\; StatusMsg: Registering AveDesk.exe
Filename: {app}\AveDesk.exe; Parameters: /UnRegServer; WorkingDir: {app}\; StatusMsg: Registering AveDesk.exe
Filename: {app}\AveDesk.exe; Parameters: /UnAssocFiles; WorkingDir: {app}\; StatusMsg: Registering AveDesk.exe

The StatusMsg only shows if it isn't silent, not important just to let the user know what is going on.

Link to comment
Share on other sites

The code that you posted looks ok. It is not the full iss file, the lines I posted were just examples of how to do the tasks you wanted.

To create the iss file from scratch, firstly I create a new folder named with the name of the app, open the folder and right click, select New - Inno Setup Script, this opens a default iss template with settings I have in all my scripts and name it with the app name.

As I know where the files are going, and through experience with other files I have created I set up folders as if I had extracted the inno package, so I would create a folder called {app}, this is where the main bulk of the files will go to, and a folder called {userappdata}, this contains files I will copy to the current users app data folder, these folders relate to Inno variables in the script.

Opening the script I goto Setup Options - App Directory and set the default location for the {app} variable, this is normally Program Files, which is already assumed with the {pf} variable there, and the name of the folder I want to create there, in this case AveDesk, so it will say {pf}\avedesk.

Next I will set the Default program group name, select the Program Group tab next to the App Directory, and enter the name of the folder that I want to install icons to. in this case AveDesk.Once this is done the iss file will contain these lines

AppVerName=avedesk v1.3

I then copy all the files I want to be installed to C:\Program Files\AveDesk into the {app} folder and all the files that I want to goto my app data folder into {userappdata} this would include folder structure as normally I would have installed the app first and setup as I liked, so any folders\files and settings would have been created, as I dont know exactly where your bin and ah weather are going I can't describe the addition of those files so I'll pretend I'm installing the bats and settings_overrides.ini to seperate folders. I would add these folder to the {userappdata}, note this will now differ from my original example.

Next I will create the icons, including an uninstall one, import any reg files I have exported that contain registration info or settings\preferences, occasionally info under the Regsitry section requires altering.

If I need to register dlls but have used the wildcard I will add these to the Install Run section and the unregistering to the Uninstall Run section, this time were are using the info from the register and unregister.bat.

If everything has gone ok and I haven't made any mistakes or typos it should compile ok, below is a file that did providing the correct structure is in place.


Link to comment
Share on other sites

so judging from this scection here in your iss file

[Files]Source: {app}\*.*; DestDir: {app}; Flags: recursesubdirs ignoreversion createallsubdirs

Source: {userappdata}\register.bat\register.bat; DestDir: {userappdata}\register.bat

Source: {userappdata}\settings_overrides.ini\settings_overrides.ini; DestDir: {userappdata}\settings_overrides.ini

Source: {userappdata}\unregister.bat\unregister.bat; DestDir: {userappdata}\unregister.bat

does that mean its not really important to name off or list every single little file thats going to be carried over ?

sorry if im being a pain on this benners im just trying to get my head around it all, its complex but yet simple in a way ,, but its almost looking to simple to be true,,

Link to comment
Share on other sites

Nope adding files is that simple, using wlidcards, the recursesubdirs and createallsubdirs you don't need to list all the file or folders, which in the case of AveDesk is a boon, if you add more files to the same directories you don't have to add those either.

The only problem (sometimes) is as I have said before, you cannot use different flags on wildcards as the flags apply to all the files. The more iss files you create the better they will be, it was a while before I realised the recuressubdirs flag, I manually added the files, thats my rookie mistake :blushing:

Don't worry about being a pain, help is what these forums are about. :thumbup

Link to comment
Share on other sites

i think i found a small problem in your iss you have these particular lines

Source: {userappdata}\register.bat\register.bat; DestDir: {userappdata}\register.bat

Source: {userappdata}\settings_overrides.ini\settings_overrides.ini; DestDir: {userappdata}\settings_overrides.ini

should the register.bat & unregister.bat files be in the {app} folder instead of {userappdata}

im saying this because mine are in my program files directory

and also my settings_overrides.ini is in program files also,, why are yours in application data ?

Edited by Lost Soul
Link to comment
Share on other sites

it is not the full iss file, the lines I posted were just examples of how to do the tasks you wanted.

The examples I posted were just that examples, I don't use the program and as such didn't have any settings to copy over. I picked the register, unregister and settings_overrides files at random, as you did not describe the file names that you wished to copy over, I thought I would give you an example of files that you recognized rather than extractions from my own iss files.

You are correct in your conclusion that the files belong in the {app} folder and all the files that are currently residing in your appdata folder go into the {userappdata} folder.

If you can describe in more detail or send the files to me I will make one that works correctly, when I mean correctly I mean one that works as well not just copies the files correctly. :D. Do you use Messenger?

Link to comment
Share on other sites

  • 7 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...