Skip to content
⌘ NSIS Forum Archive

Newbee needing help

40 posts

jollyjoice#

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...😁
Thanks
😱
Chris
Joel#
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#
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#
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#
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#
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#
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?😕 🙁
VegetaSan#
It's really easy :

CreateShortCut "$FAVORITES\Anime-Supreme.lnk" "http://www.anime-supreme.com"
SectionEnd
deguix#
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#
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????🤪
Using NSIS v2
Very confused😕
Joost Verburg#
The icon set using MUI_ICON is invalid or you removed files from the Contrib\Graphics folder.
VegetaSan#
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"
jollyjoice#
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#
Did you define MUI_ICON? If yes, that file in invalid. Otherwise the default icon file is missing, in that case reinstall NSIS.
Joost Verburg#
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#
sorry! whilst making them the same size I had chanded one of the names!! Silly me. workes now...
jollyjoice#
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??
jollyjoice#
ok, now how do I add a section to the installer to restore tose saves from the ENDUSER's PC not mine??
Joost Verburg#edited
Section "Restore"
CopyFiles $MYDOCS\save\*.* $INSTDIR
SectionEnd