I'm a bit confused about the comment in [Code] section re: conditio...

Started by spick56, June 02, 2008, 10:01:53 PM

Previous topic - Next topic

spick56

Now I keep getting the right path assigned to the main app/exe file when I create the script, as per my last post, so I guess I must have been doing something wrong earlier on.
 
Anyway, all appears OK now so thanks a lot for all your help and patience.
 
/Michael

Randem

InnoScript takes no information from previous scripts or builds.
 
Why are you using the Add Files tab anyway? You should only use it to add support files such as databases, text, image or any third party file that InnoScript does not report as missing.
 
I have no idea what your script looks like or how it came to be. Post your pjt and iss files. How did this file gemeditor.dll get into the script?
 
You are asking me to be clairvoyant.

spick56

And that's what I thought. When I wrote that post the path assigned to the main application was definately c:program files, which was wrong.
After removing that entry from Add Files tab and creating the script again, I get proper 'source' path and appropriate destination {app}, which was not the case to beging with as that was the rerason for adding the file to Add Files.
 
It's like as if IS reacts slightly differently when creating the script, based on (perhaps) reminance of previous script builds.
 
 
P.S. When I compile the IS script using Inno Setup I get the following message for each file in {sys}:
Warning: Unsafe flag usage on file gemeditor.dll: The ignoreversion flag should not be used on files installed to the Windows System directory ({sys}).
Shoudl I take any notice of it?

Randem

Yes, the main exe goes to the {app} folder. It is the default.
 
Generally the default destination locations should not be changed unless you really know what you doing. In the Beta version this is much clearer.
 
You should not be adding anything in the add files folder other than custom dll/exe that InnoScript does NOT mark as missing.

spick56

Got it and it looks good.
 
I have (hopefully) one last question on this matter. When I add all dll's in the Added Files tab and don't have them checked they go in the right place and that is {sys}.
 
If I don't add my .exe application in the Added Files tab it gets assigned c:program files path. If I add it to the list and have it checked, it goes to localappdata and if not checked it goes to {sys} folder, as expected.
 
I thought the right place for the main executable/application (.exe) would be the {app} folder, is that right?



Randem

Ok, I am uploading the fix for the search tabs (Version 9.0.7). When it is done,  If you have Check For Updates checked it will download and install on your next launch of InnoScript.

spick56

Actually I also found something on that point.
 
I wen't back to my project file and tried entering a folder in the Search Folders, to see if I could reproduce the result that I had with the new project file, and I still wasn't able to enter the folder.
 
On checking other tabs I found that, as part of my experimentation earlier on, I had left c:\Users\michael in the Excluded Folders, which is a parent to the folder that I wanted to include. As soon as I removed that entry I was then able to enter the folder in Search Folders, which makes sense.  
 
In such a case it probably would have been handy to get a message and that would remove any/that confusion, for us and not for you of course.  
 
/Michael

Randem

Ok, I found a solution (I hope) but it will only be available in the 9.1 Build 4 Beta version for now. I may go back to update the 9.0.6 version after verification.
 
You are not crazy... Well not on this issue anyway

spick56

Sorry for the delay, I had to step out for a few minutes.
 
I did what you suggested and I still wasn't able to enter any folders. I then exited IS and ran it again and no folder was in the list.  
I then manually added a few folders to the list (directly in the file using Notepad) and then opened the project using IS and could see the folders, and was also able to add more folders.
 
A couple of hours ago I tried adding folders using Notepad and was also able to then see them in the list (via IS) but wasn't able to add more folders.
 
That's the bit of inconsistency that keeps throwing me off so I get confused.
 
/Michael

Randem

Try this. Open the new project then add a folder to the search path. If nothing appears, exit the program saving the project. Restart InnoScript to see if the search folders appears. I will start up Vista to see what I can see here.
 
Yes, you should enter the search folders to speed up  InnoScript's searches or else it has to search the most of the whole disk.

spick56

You are right, I am getting myself into a knot although I'm not intentionally trying to complicate the process.
I'll start again and describe each step along the way and maybe you can see where I'm taking the wrong turn.
 
1) I create a new project file in IS and select .NET, Safe Mode, Win Version=None, NT Version=Windows XP, Release type=None, VB Version=8, Registry and Miscellaneous flags checked.
2) I enter my project file and .iss file name and run Create Script.
3) The 'search for files' gets bogged down in trying to find my main application/.exe file; it's searching c:program files.
4) I stop IS and go to Search Folders tab, intending to enter the correct path.
5) When I press Add button I get the dialog and I'm able to select the folder but on pressing OK nothing appears in the Search Folders tab.
6) As I experienced that previously I saved IS project file, exited IS and ran it again but it still doesn't let me enter a folder path.
7) I go back to my previous IS project file and I can see folders in the Search Folders tab and I'm able to enter more folders.
 
So I'm basically stuck here even though it doesn't make sense that I can enter folders in my previous IS project file but not this (new) file!!!
had that gone OK I was going to enter a proper search path/folder and leave it at that. I would repeat that step for each file that IS can't find immediately.
 
I suppose the one reason I got into a knot, apart from still being unsure where some files should go and understanding IS properly, is that I would get into a situation similar to point 5) above and I think that I'm going down the wrong path and I try something else which is perhaps the wrong direction.
 
What do you suggest I now do as I can't see why I shouldn't be able to enter some search paths, or should I in fact be adding files?
 
/Michael

Randem

Q1) InnoScript does not work that way. If you comment out lines all you did was comment out lines. The commented out lines will still be added to the script using the template. It would help if you described what your end result would be then I might suggest the correct wat to get there.
 
Q2) dll files should almost NEVER go in the app folder. That process will cause dll hell for the same dll or a different dll version could be anywhere on disk and when a another copy gets installed it will be treated like it is the only copy. You could roll back a system multiple versions doing things in that manner. The system folder is where they belong. You are attempting to make the installation process convoluted and complicated. Stick to the InnoScript defaults in most cases.
 
Q3) You are incorrect. They get checked because InnoScript finds the files. If you have added the files from those search folders you are telling InnoScript to search there, overriding the entry in the search folder that is unchecked.
 
Q4) If the entry in the Add Files tab is checked it will go to the {localappdata} folder, unchecked it will go to the {app} folder. In the beta version you can select which destination folder these files will be installed into.
 
You are vastly over complicating the installation process. Take a moment and view the documentation. The default installation process that InnoScipt delivers should get you well on your way and in most cases is totaly complete.

spick56

As part of trying to use templates to replace/modify lines I've tried commenting out some lines that IS produces (being the first block below) and replace them with my lines (being the second block below).
 
- 1st [Files] block
Source: c:usersmichaeldocumentsvisual studio 2005commonfilesdotnetfx.exe; DestDir: {tmp}; Flags:  deleteafterinstall ignoreversion nocompression; Tasks: DotNetFrameWork
Source: c:usersmichaeldocumentsvisual studio 2005projectsproject palprojectpal swprojectpalbindebugprojectpal.publishcrystalreportscrredist2005_x86.msi; DestDir: {localappdata}\projectpalbindebugprojectpal.publishcrystalreports; Flags:  ignoreversion;  
Source: c:usersmichaeldocumentsvisual studio 2005projectsproject palprojectpal swprojectpalbindebugprojectpal.exe; DestDir: {app}; Flags:  restartreplace ignoreversion;  
Source: c:usersmichaeldocumentsvisual studio 2005projectsproject palprojectpal swprojectpalbindebuggemeditor.dll; DestDir: {sys}; Flags:  ignoreversion;  
Source: c:usersmichaeldocumentsvisual studio 2005projectsproject palprojectpal swprojectpalbindebugspellchecker.dll; DestDir: {sys}; Flags:  ignoreversion;  
 
- 2nd [Files] block
Source: c:usersmichaeldocumentsvisual studio 2005commonfilesdotnetfx.exe; DestDir: {tmp}; Flags:  deleteafterinstall ignoreversion nocompression; Tasks: DotNetFrameWork
Source: c:usersmichaeldocumentsvisual studio 2005projectsproject palprojectpal swprojectpalbinreleaseprojectpal.exe; DestDir: {app}; Flags:  restartreplace ignoreversion;  
Source: c:usersmichaeldocumentsvisual studio 2005projectsproject palprojectpal swprojectpalbinreleasegemeditor.dll; DestDir: {sys}; Flags:  ignoreversion;
Source: c:usersmichaeldocumentsvisual studio 2005projectsproject palprojectpal swprojectpalbinreleaseExtendedRichTextBox.dll; DestDir: {sys}; Flags:  ignoreversion;
Source: c:usersmichaeldocumentsvisual studio 2005projectsproject palprojectpal swprojectpalbinreleasespellchecker.dll; DestDir: {sys}; Flags:  ignoreversion;  
 
 
My problem is that even though I'm able to comment out the initial lines (first block above) and replace them with new lines (2nd block above), as per the following script, IS creates a new bunch of lines that are identical to the original/replaced lines.
 
- CONTENTS OF MY SCRIPT
; Remove the following lines
;Source: c:usersmichaeldocumentsvisual studio 2005projectsproject palprojectpal swprojectpalbindebugprojectpal.publishdotnetfxdotnetfx.exe; DestDir: {tmp}; Flags:  deleteafterinstall ignoreversion nocompression; Tasks: DotNetFrameWork
;Source: c:usersmichaeldocumentsvisual studio 2005projectsproject palprojectpal swprojectpalbindebugprojectpal.publishcrystalreportscrredist2005_x86.msi; DestDir: {localappdata}\projectpalbindebugprojectpal.publishcrystalreports; Flags:  ignoreversion;  
;Source: c:usersmichaeldocumentsvisual studio 2005projectsproject palprojectpal swprojectpalbindebugprojectpal.exe; DestDir: {app}; Flags:  restartreplace ignoreversion;  
;Source: c:usersmichaeldocumentsvisual studio 2005projectsproject palprojectpal swprojectpalbindebuggemeditor.dll; DestDir: {sys}; Flags:  ignoreversion;
;Source: c:usersmichaeldocumentsvisual studio 2005projectsproject palprojectpal swprojectpalbindebugspellchecker.dll; DestDir: {sys}; Flags:  ignoreversion;  
 
; Insert the following lines
Source: c:usersmichaeldocumentsvisual studio 2005projectsproject palprojectpal swprojectpalbindebugprojectpal.publishdotnetfxdotnetfx.exe; DestDir: {tmp}; Flags:  deleteafterinstall ignoreversion nocompression; Tasks: DotNetFrameWork
Source: c:usersmichaeldocumentsvisual studio 2005projectsproject palprojectpal swprojectpalbindebugprojectpal.publishcrystalreportscrredist2005_x86.msi; DestDir: {localappdata}\projectpalbindebugprojectpal.publishcrystalreports; Flags:  ignoreversion;  
Source: c:usersmichaeldocumentsvisual studio 2005projectsproject palprojectpal swprojectpalbinreleaseprojectpal.exe; DestDir: {app}; Flags:  restartreplace ignoreversion;  
Source: c:usersmichaeldocumentsvisual studio 2005projectsproject palprojectpal swprojectpalbinreleasegemeditor.dll; DestDir: {sys}; Flags:  ignoreversion;
Source: c:usersmichaeldocumentsvisual studio 2005projectsproject palprojectpal swprojectpalbinreleaseExtendedRichTextBox.dll; DestDir: {sys}; Flags:  ignoreversion;
Source: c:usersmichaeldocumentsvisual studio 2005projectsproject palprojectpal swprojectpalbinreleasespellchecker.dll; DestDir: {sys}; Flags:  ignoreversion;  
 
Q1) So my question is how can I remove/replace lines without IS recreating the same lines?
 
------------------------------
 
I notice that IS placed my dll files in {sys} folder. I believe those files should go to my {app} folder, although I may be wrong there.  
Q2) Assuming I'm right, is the only (automated) way to do that via templates or is there some other way?
 
Again, sorry for all the questions.
 
------------------------------
 
I also noticed that if I have some entries in 'Search Folders' but uncheck them, when I run Create Script those entries get automatically checked.
Q3) I thought the idea behind checked/unchecked was so that yo ucan control (mainly while experimenting) that rather than IS taking control.
 
------------------------------
Q4) When I use Add Files tab, those files always seem to be added to {localappdata}, which would make sense for normal files but it doesn't seem right if they are dll's or exe's in which case {app} folder seems more appropriate, what do you think?
If I did want those files in {app} folder, is templates the way to do that?
 
/Michael