How\where to use SaveStringToFile() in my inno setup file - inno-setup

I'm not that familiar with inno (or pascal scripting), but I am assuming what I want to do is pretty simple.
I want to edit a particular text file at the very beginning of the install. Is there a place in the [Code] section were I could just plug this in so that it does this first and then just continues as usual? I'm not really asking for a code example because I think I could figure that out, but I just wanted to know where to put the code.

The install is done between the CurStepChanged(ssInstall) and CurStepChanged(ssPostInstall) event function calls. ssInstall is the correct point to run code for the beginning of the install.

Related

Inno setup to sequentially execute other uninstallers (3rd party apps)

I have search for almost 2 days including going through regular documentation for inno setup. But I have not found a way for Inno setup to sequentially execute other uninstallers (3rd party apps), as items in the [UninstallRun] section. Since the other uninstallers are "cloned" the "waituntilterminated" flag doesn't work on those uninstallers. Has anyone come up with a way to accomplish this?
Thanks,
David
If the other uninstallers are Inno Setup-made, then I do not think you need to do anything special.
Inno Setup-made uninstaller really clones itself and run its clone internally. But it waits for the clone to actually complete the uninstallation before it closes itself. The only thing, that the clone does after the main uninstaller processes closes, is that it deletes the uninstaller executable (and its data files). I do not think you really need to wait for this to done. But if you do, just wait for the uninstaller files to be gone, before you proceed with the other uninstaller.

How to display release notes before installation in Inno Setup?

I want to be able to display the release notes to the end user before the installation has started (e.g. if there are any code changes they should be aware of before upgrading to a newer version).
I've read the documentation regarding the Pascal code BeforeInstall and AfterInstall Parameters, but my problem is how can I make a reference to my release notes file as it is packed inside the setup executable? I realise the simplest answer would be to simply package the installer with a copy of the text file sitting alongside it so it could reference it in this way, but then if the user only copies the executable for example, this would presumably cause a reference error.
What is the best way to go about implementing this?
You are looking for the InfoBeforeFile directive:
[Setup]
InfoBeforeFile=infobefore.txt

Inno Setup set Setup.exe create date and modified date the same

By default, when compiling the Setup.exe Inno Setup does not delete the existing file before compiling, meaning that the modified date is likely to be different from the create date unless remembering to manually delete the Setup.exe before compile. What would be the best way to set the date and time the same? I can think of two possible approaches to do this. One would be to use the TouchDate and TouchTime functions in the Code section at the end of the compile, the other would involve using the ISSP section to automatically delete the Setup.exe prior to compile. I'm not entirely sure if the ISSP option is possible, but which way would be simplest and preferable? Does anyone have any advice on which approach I should take, or is there another option I am overlooking?
It's most probably a consequence of so called file tunelling which has nothing to do with Inno Setup. One way out of this is making a batch script that will run compiler and touch the timestamp after compilation (preprocessor cannot do that because it runs before compilation).

Inno Setup Shortcut Issue

I have one small, but frustrating issue.
I create installer with possibility for shortcut for the executable, but if the executable is not in the main folder in lets say MyProgram\bin\myprogram.exe the installer makes copy of the .exe in the main program folder and shortcut path is not MyProgram\bin\myprogram.exe like it supposed to be, but its MyProgram\myprogram.exe and of course it won't run until i make manual shortcut from bin folder.
Hope you guys understand my problem and tell me where i can fix this in the script.
You may have an error with your [Icon] entry, try something like:
Name:"{group}\MyProgram";Filename:"{app}\bin\myprogram.exe

Tutorial/Guide to create a classic, small Linux application in a package (Debian)

I've made a small script in my machine, and an alias in .bashrc that calls it. It's a bash script with 3 lines, but it can grow.
Now, some people in my team found it useful, and want to use it.
Instead of saying "copy this alias, do this, do that, install that lib" I was thinking about creating a simple package to be a little more professional. Fact is, I've never done something like this before. And the problem to me is not creating a package, is trying to decide what usually do you put in a package.
Suppose I want to take my script, and create myapplication. I want to create a .deb file that my team would install and:
Have a /usr/bin/myapplication or /usr/sbin/myapplication (what's the difference between them?), so they would just call myapplication at their terminal and it would work;
Have a man page; (Where are usually located man pages in a debian system?);
Have a possibility to read a .myapplicationrc in home folder with some configurations;
Have an entry for shortcuts in a gnome installation (is it possible to have an universal shortcut "format" that's is available to KDE and Gnome as well?);
Install dependencies.
I'm new to all that stuff. I usually code simple scripts and create an alias in my bashrc. I've never done a package before. Which guides do you know of that can help me accomplish what I thinking of above?
Here is a place to start, though I welcome a more succinct answer.
I couldn't find a complete guide. I think the best thing to do is download a package that does exactly what I'm thinking of and do some reading, like taskwarrior.

Resources