- NSIS Discussion
- Newbee needing help
Archive: Newbee needing help
jollyjoice
28th March 2004 19:14 UTC
Newbee needing help
Hi all,
These things will probobly be easy for an expert but I can't find a way to do them! Any help would be apreciated.
I have a nice installer going (http://chris.simutrans.com) but need some help on advancing it.
1) Can you add a texture to the modernUI, insead of the default windows coluorings?
2) How do you make an item to install ALWAYS cheacked, IE must be installed?
3) How do I do the background image thing? I have tryed ecery variation yet it still does not work!
Any ideas?
I will probobly think of some other things later...:D
Thanks
:eek:
Chris
Joel
28th March 2004 19:22 UTC
1) Nope. That will be subclassing, meaning change the source code of NSIS.
2) Read about IfFileExists
3) What background image? The installer top corner?
deguix
28th March 2004 19:47 UTC
1) If you mean a "theme", you have to change a lot the NSIS source code...
2) Use SectionSetFlags command inside .onSelChange function (if you mean "checked on components page").
3) See the example "${NSISDIR}\Contrib\BgImage.nsi" (if you really mean "background image").
jollyjoice
29th March 2004 18:26 UTC
1)I mean, instead of windows giving you a boring gray like all the other windows to use a bitmap or other image as a "texture"
2)I want the file to be un-unchekable if you get me. It cannot be uncheaked. They are the core files for the program.
3)I mean the full screen thingy, i have read that but it eather says there is an error in the script or makes it, but it doesnt actualy show up!
pengyou
29th March 2004 19:07 UTC
For (2) on your list, I think SectionIn and the RO parameter are what you are looking for. (See 4.6.1.4 in the NSIS manual)
Joel
30th March 2004 02:01 UTC
1) As I told you, no. You'll have to change the source code.
2) Like pengyou saud.
3) There's a plugin, right?
jollyjoice
30th March 2004 18:01 UTC
3) Er, yes
jollyjoice
1st April 2004 19:00 UTC
any ideas
trying to add shortcuts to websites in users favorites? I have 3 set up, only 1 installs and it shows up as a shortcut not a link. any ideas?:confused: :(
Joost Verburg
1st April 2004 19:21 UTC
Search the forum for info about URL files.
VegetaSan
2nd April 2004 13:57 UTC
It's really easy :
CreateShortCut "$FAVORITES\Anime-Supreme.lnk" "http://www.anime-supreme.com"
SectionEnd
VegetaSan
2nd April 2004 14:00 UTC
without the "SectionEnd"
deguix
3rd April 2004 00:08 UTC
VegetaSan, (TIP) don't forget, has an "Edit" button on the right corner part of each post, so you can edit the post if it has something wrong. The time limit for the edition is 3 hours after the posting.
jollyjoice
26th April 2004 19:14 UTC
Any ideas? This comes up when compiling:
Error: File doesn't exist or is an invalid icon file
Error in macro MUI_INTERFACE on macroline 61
Error in macro MUI_PAGE_INIT on macroline 3
Error in macro MUI_PAGE_WELCOME on macroline 5
Error in script "C:\Documents and Settings\Administrator\Desktop\Simutrans.nsi" on line 49 -- aborting creation process
The line in question is:
!insertmacro MUI_PAGE_WELCOME
What is going on????:weird:
Using NSIS v2
Very confused:confused:
Joost Verburg
26th April 2004 20:16 UTC
The icon set using MUI_ICON is invalid or you removed files from the Contrib\Graphics folder.
VegetaSan
27th April 2004 09:42 UTC
I had the same problem once ... but when I copied the icon to my C: then It suddenly worked
!define MUI_ICON "C:\icon.ico"
!define MUI_UNICON "C:\icon.ico"
Joost Verburg
27th April 2004 09:45 UTC
The location of the icon makes no difference.
VegetaSan
27th April 2004 10:04 UTC
I know that .. but that really was the problem at my place
Joost Verburg
27th April 2004 10:12 UTC
I think it must have been a typo :)
jollyjoice
27th April 2004 19:21 UTC
ok, still no good. this is the full thing I think:
!insertmacro: MUI_PAGE_WELCOME
Error: File doesn't exist or is an invalid icon file
Error in macro MUI_INTERFACE on macroline 61
Error in macro MUI_PAGE_INIT on macroline 3
Error in macro MUI_PAGE_WELCOME on macroline 5
Error in script "C:\Documents and Settings\Administrator\Desktop\Simutrans.nsi" on line 49 -- aborting creation process
Joost Verburg
27th April 2004 19:31 UTC
Did you define MUI_ICON? If yes, that file in invalid. Otherwise the default icon file is missing, in that case reinstall NSIS.
jollyjoice
27th April 2004 19:34 UTC
!define MUI_ICON "C:\csimu.ico"
!define MUI_UNICON "C:\simuun.ico"
Joost Verburg
27th April 2004 19:36 UTC
That means that these files are invalid icon files. Note that bitmaps are not identical to icons, you'll have to use an icon editor.
jollyjoice
27th April 2004 19:46 UTC
they are icons. I made them and they have worked before
jollyjoice
27th April 2004 20:05 UTC
sorry! whilst making them the same size I had chanded one of the names!! Silly me. workes now...
jollyjoice
8th May 2004 12:19 UTC
copy files in uninstaller??
OK, I want to get the unistaller to copy the savefiles from folder "save" to a new folder "Save bakup" in mydocuments. I have tryed doing this as you would when programming the installer bit, the file compiles fine just it dosent actualy do it! Any ideas??
Joost Verburg
8th May 2004 13:12 UTC
Use CopyFiles with full path names.
jollyjoice
8th May 2004 15:06 UTC
how exactly? copyfiles "$INSTDIR\save\*.*" "C:\save backup" ??
Joost Verburg
9th May 2004 10:58 UTC
Yes
jollyjoice
9th May 2004 14:35 UTC
ok, now how do I add a section to the installer to restore tose saves from the ENDUSER's PC not mine??
Joost Verburg
9th May 2004 16:43 UTC
Section "Restore"
CopyFiles $MYDOCS\save\*.* $INSTDIR
SectionEnd
jollyjoice
9th May 2004 19:44 UTC
thanks, will give it a go!!
jollyjoice
26th May 2004 19:00 UTC
ok, next. tryed the BG plugin again, it works fine but I get
!insertmacro: MUI_LANGUAGE
Error: Function named ".onGUIInit" already exists.
Error in macro MUI_FUNCTION_GUIINIT on macroline 2
Error in macro MUI_INSERT on macroline 11
Error in macro MUI_LANGUAGEFILE_BEGIN on macroline 4
!include: error in script: "C:\Program Files\NSIS\Contrib\Modern UI\Language files\English.nsh" on line 9
Error in macro MUI_LANGUAGE on macroline 5
Error in script "C:\Documents and Settings\admin2\Desktop\Simutrans.nsi" on line 61 -- aborting creation process
or a list of text thingys which havent worked and the installer is screwed. any ideas?
jollyjoice
27th May 2004 20:21 UTC
same thing, it is not a problem with the rest of the script. HELP anybody???
kichik
28th May 2004 09:42 UTC
See the MUI readme about custom functions (or something similar). The MUI uses .onGUIInit.
jollyjoice
28th May 2004 19:06 UTC
setting the language is a custom function?
kichik
29th May 2004 09:34 UTC
No, "Customize Modern UI Functions".
jollyjoice
29th May 2004 15:04 UTC
ok, so how do i make the b/g image function to be called notusing .onguinit??
pengyou
29th May 2004 18:38 UTC
From the MUI ReadMe:
If you want add your own code to functions inserted by the Modern UI, such as the .onGUIInit function and the Page functions, create your own function and let the Modern UI functions call them. Use the defines to define the name of your functions.
Example:
!define MUI_CUSTOMFUNCTION_GUIINIT myGuiInit
Function myGUIInit
...your own code...
FunctionEnd
jollyjoice
29th May 2004 19:16 UTC
YEs! Thanks, it works!! codn't find that in my readme, sorry.
jollyjoice
30th May 2004 17:19 UTC
how do you work the Compare functions? I wnat to get it to compare the current installer with the one on my website and download it if necessary, all i can get it to do is say "you are uptodate" or download it regardless