So I'm using Innosetup with javafxpackager, I specify a desktop icon (.ico) in the iss file with 'SetupIconFile'.
After installing the application (Win7) the icon on the desktop has jagged edges. At first I thought something was wrong with my icon, but if I right-click the icon and change the icon to the file I specified in the iss file, it has crispy clean edges.
So I'm guessing either Inno-Setup, or javafxpackager does something to my icon (tried with all manner of sizes and multi-layered ico files btw). And I'm guessing the chances are higher it has something to do with Inno-Setup, since I specify the icon in the iss.
Any ideas what could be wrong?
Edit: I said I specify the icon with 'SetupIconFile' but I didn't look correctly in my iss file, I actually do:
[Files]
Source: "MyApp\MyApp.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "MyApp\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
[Icons]
Name: "{group}\MyApp"; Filename: "{app}\MyApp.exe"; IconFilename: "{app}\MyApp.ico"; Check: returnTrue()
Name: "{userdesktop}\MyApp"; Filename: "{app}\MyApp.exe"; IconFilename: "{app}\MyApp.ico"; Check: returnTrue()
Related
I'm using Innosetup for a very simple Windows C++ app. It just has an icon for the main EXE in the start menu group, plus another icon for the uninstaller (unins000.exe, created by Innosetup).
In the [Files] section of the script is:
Source: "C:\...\telecine.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\...\Telecine.ico"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\...\uninstall.ico"; DestDir: "{app}"; Flags: ignoreversion
and in the [Icons] section:
Name: "{autoprograms}\Nightshade Arts\Telecine\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; IconFilename: "{app}\Telecine.ico"
Name: "{autoprograms}\Nightshade Arts\Telecine\Uninstall"; Filename: "{app}\unins000.exe"; IconFilename: "{app}\uninstall.ico"
What works: the two entries are in the program group, the shortcut to Telecine.exe has the Telecine.ico icon next to it, the shortcut to the uninstaller works.
Problem: the uninstaller icon is not the one in uninstall.ico, it is something else, probably contained in unins000.exe itself.
Not sure what has gone wrong. uninstall.ico is there is the app directory, and it contains the right icon. Just doesn't show up.
Not sure where I've gone wrong?
I'm new user in Inno Setup. My problem is that I have some folders and one file. I want to make a setup package to install all of them. Here is my code
[Files]
Source: "D:\POS CAD Standard\CAD\*"; DestDir: "C:\POS CAD Standard"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "D:\POS CAD Standard\acad.lsp"; DestDir: "{userappdata}\Autodesk\AutoCAD 2014\R19.1\enu\support"; Flags: ignoreversion
[Dirs]
Name: "C:\POS CAD Standard"; Attribs:readonly hidden system; Permissions: users-readexec;Flags:
[Icons]
Name: "{group}\{cm:UninstallProgram,POS CAD Standard}"; Filename: "{uninstallexe}"
It works fine, but when I'm trying to setup to another PC my source file is not found, and I want to make some files (not folder) to be read only.
Use Attribs: readonly parameter.
It is supported both in the [Files] and [Dirs] sections.
Source: "D:\POS CAD Standard\CAD\*"; DestDir: "{sd}\POS CAD Standard"; \
Flags: ignoreversion recursesubdirs createallsubdirs; Attribs: readonly
Note that I've used the {sd} constant instead of hardcoding the C: drive (what is a bad practice).
I am using Inno-Setup version 5.5.3(a).
[Files]
Source: "C:\GPT\GPT.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\GPT\GPT.dat"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
I would like to install the "GPT.dat" file into the users AppData folder in a custom folder called "GPT"
e.g. AppData\GPT\
for example, in my delphi code, I create a folder called "GPT" in the users AppData path. These is where I would like to place the file
var
path: array[0..MAX_PATH] of char;
SHGetFolderPath(0, CSIDL_APPDATA, 0, SHGFP_TYPE_CURRENT, #path);
userPath:= Path;
UserPath:= UserPath + '\GPT\';
if not DirectoryExists(UserPath) then
CreateDir(UserPath);
Can anyone tell me how to edit my [Files] section of my Inno script to make this happen?
Thanks
You need to use the {userappdata} constant, which is mapped just to the CSIDL_APPDATA item ID, as a destination directory for your files:
[Files]
Source: "C:\GPT\GPT.dat"; DestDir: "{userappdata}\GPT\"; Flags: ignoreversion createallsubdirs recursesubdirs comparetimestamp
{userappdata} & {commonappdata}
The path to the Application Data folder.
CSIDL_APPDATA = {userappdata} = C:\Documents and Settings\username\Application Data
CSIDL_COMMON_APPDATA = {commonappdata} = C:\Documents and Settings\All Users\Application Data
You need to use : {userappdata}
If you check the Inno Setup documentation :
{userappdata} = C:\Documents and Settings\username\AppData\Roaming\
{commonappdata} = C:\Documents and Settings\All Users\AppData\Roaming\
{localappdata} : The path to the local (nonroaming) Application Data folder.
{userappdata} & {commonappdata} : The path to the Application Data folder.
I use :
[Files]
Source: MyPath\* ; Flags: recursesubdirs createallsubdirs; DestDir: {userappdata}\MySoftware\ ; Components: ConfigFiles
And my config files are in :
C:\Users*\AppData\Roaming\MySoftware**
It seems more appropriate to use {programdata}, if I interpret Mirals comment correctly.
However, on XP there is no {programdata}, only {commonappdata} or {userappdata}, so I have to diversify my install. {programdata} is a later invention.
A disturbing trap is when the desktop and userappdata are mirrored to the server ("roaming profile"), that slows programs down greatly if they use userappdata for ini file storage, at least that's my experience.
My application has a folder of files that are all marked as "hidden" (including the folder itself). However, Inno Setup won't copy them for installation unless I remove the "hidden" attribute first.
Fair enough, but is there a way to make Inno Setup mark the installed folder as "hidden" after it finishes setup on my end-user's machine?
Thanks.
See the Attribs parameter for entries in the [Dirs] section.
[Dirs]
Name: "{app}\blah"; Attribs: hidden;
Note that this won't really stop people from seeing it, just make it look like you have something to hide.
First of all, ensure that ONLY the directory is hidden, and not the subdirectory. Say its name is srcHiddenDir.
Now, create another directory dstHiddenDir, but dont make it hidden now. But it should be empty.
Then, open the settings.json, and replace all the occurrences of srcHiddenDir with dstHiddenDir.
Now, Make it ready to copy files as usual. In one part of the code, you will get:
[Files]
Source: "wherethewholecodeis\phpdesktop\phpdesktop-chrome.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "wherethewholecodeis\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "wherethewholecodeis\*srcHiddenDir*\*"; DestDir: "{app}\*dstHiddenDir*"; Attribs:hidden; Flags: ignoreversion recursesubdirs createallsubdirs
Then, you need to write:
[Dirs]
Name: {app}\dstHiddenDir; Attribs:hidden;
Name: {app}\dstHiddenDir\application; Attribs:hidden;
Name: {app}\dstHiddenDir\database; Attribs:hidden;
Name: {app}\dstHiddenDir\css; Attribs:hidden;
....
...and all the subdirectories you want to hide, just for more safety. But Note those subdirectories should be genuine, and there in the source/destination. Else, when you run the setup, error will show that these directories dont exist.
Now, compile the program.
Hope this helps.
I want to exclude 2 folders by default, unless a component is checked. I don't have all the files individually listed in the [Files] section, as some of them might be added/removed in the future, but there are 2 folders that I need to control.
Here's the code I have:
Source: "source\*"; DestDir: {app}; Excludes: "\plugins\api,\plugins\shared memory"; Flags: ignoreversion recursesubdirs createallsubdirs;
Source: "source\plugins\api\*"; DestDir: {app}; Flags: recursesubdirs createallsubdirs;
Source: "source\plugins\shared memory\*"; DestDir: {app}; Components: plugins_api; Flags: recursesubdirs createallsubdirs;
What I want:
Those subfolders (api and shared memory) should only be copied if
plugins_api is selected.
If the component plugins_api is not
checked, they should not be copied.
I'd rather avoid including
every file in the .iss file. It is not an option.
What I get with this code:
If the component is not checked, the folders are not copied. Ok.
If the component was checked, the folders are not copied. Not ok.
So it seems the exclude in the first line affects the other 2 lines. How can I avoid this?
2 points:
1) You only have the Components entry on one of the special folders.
2) The special folders, as you have them will be installing their contents direct into the {app} folder.
If you follow the folders in use:
Source: "source\plugins\api\*"; DestDir: {app};
Put contents of source\plugins\api\ in {app}
I expect you want something like:
Source: "source\plugins\api\*"; DestDir: {app}\plugins\api\; Components: plugins_api; Flags: recursesubdirs createallsubdirs;
Source: "source\plugins\shared memory\*"; DestDir: {app}\plugins\shared memory\; Components: plugins_api; Flags: recursesubdirs createallsubdirs;