- NSIS Discussion
- Scripting Question
Archive: Scripting Question
Slyde
21st November 2001 21:27 UTC
Scripting Question
Hi All!
I am a developer currently working on using this most excellent installer for Quake III mods a friend of mine makes. His newest will be using the NSIS for packaging and I can say that i could not be more pleased with it. In the time it took me to find info on .msi creation, I wrote the basic script for the package in NSIS. ROCK! I am having a bit of trouble with one part though.
Being that it is a Quake III mod, all installations on all computers have to be in the Same dir under the Quake III program folder (i.e. <Q3>\BQ3) for network play to work properly. I am thinking there is a way to make sure that the dir is the same by appending it to the dir you install to, like how ICQ does always having ICQ as the dir name...but I am not sure how to do it =( Is there anyone who would be willing to help provide a simple script to do such a thing? I have been playing around with the Strcpy functions...but not coming up with much. would appreciate any help I can get on this! Thank you!
Smile2Me
22nd November 2001 08:09 UTC
If Q3 makes some registry settings, try to find the Q3 root in the
registry (ReadRegStr $0 HKLM "Software\Q3" "Q3Root" might work) and
use StrCpy $0 "$0\BQ3"
and set the $INSTDIR to this value.
Or you could ask the user to find the Q3 dir by DirRequest or the
main program of Q3 by FileRequest using InstallOptions.
I hope this answers your question...
- :D Hendri :D -
Slyde
24th November 2001 23:47 UTC
Thank you!
Smile2Me:
Thank you! I will most certainly try this out. there must be a dir listing for Q3 and I sure hope I find it. I apologize for not responding sooner. Just got back from Thanxgiving family-visit. =) Thanx again mate!
Ackbar
25th November 2001 00:50 UTC
I'd like to know how you are catching the compiler output. Thats pretty cool :)
Slyde
25th November 2001 05:20 UTC
Compiler Output
Ackbar:
In running Win2k, I use the cmd interface lots and I just scroll through everything it prints when it compiles. This is mucho nice for error detection, which thank the head Llamas, is very easy to understand if you've ever programmed. (Thankyouthankyouthankyou). I didn't know if you were asking me or not, if not, then ignore this message =D
Ackbar
25th November 2001 05:40 UTC
How do you capture whats being scrolled by the command interface? thanks :)
Smile2Me
25th November 2001 09:59 UTC
Slyde,
it's ok, have fun, greetz,
- :D Hendri :D -
Slyde
25th November 2001 17:47 UTC
Capture from Commandline
Ackbar:
Basically, just reading it. if you needed to capture, you'd just need to highlight with the mouse and then right click, whenever you are in cmd and do that, what you had highlighted is copied and you can paste in other places. Ctrl+C and Ctrl+V don't work there. it's all done with the right mouse button. like, fi you had to paste something to cmd, just highlight in the otehr window, copy it and go to cmd and right click anywhere on the cmd screen, and it's pasted. that's all there is to it =)
Ackbar
25th November 2001 17:50 UTC
Nice Joke :) Nah I actually figured it out. I was after capturing the return data from a shelled application through a program :)
Slyde
26th November 2001 05:57 UTC
Smile2Me is Great! Give Us Chocolate Cake!
ReadRegStr $0 HKLM "Software\Id\Quake III Arena" "INSTALLPATH"
StrCpy $0 "$0\BQ3"
StrCpy $INSTDIR $0
Not as advanced as i would like, but it works just fine, and since the user can't change it, there is no way the mod would get installed to the wrong dir. Thanx for the help mate! It was a life-saver!
*prances around Smile2Me singing praises*
Smile2Me
26th November 2001 07:21 UTC
Slyde,
You can change your code:
ReadRegStr $0 HKLM "Software\Id\Quake III Arena" "INSTALLPATH"
StrCpy $0 "$0\BQ3"
StrCpy $INSTDIR $0
into:
ReadRegStr $0 HKLM "Software\Id\Quake III Arena" "INSTALLPATH"
StrCpy $INSTDIR "$0\BQ3"
to save some bytes...
And thanx for your kind words :D
It's nice to help out friends...
- :D Hendri :D -
PepCid
28th November 2001 15:01 UTC
Originally posted by Ackbar
Nice Joke :) Nah I actually figured it out. I was after capturing the return data from a shelled application through a program :)
Here is your solution:
http://msdn.microsoft.com/library/de...thred_4uus.aspThe above link links to "Creating a Child Process with Redirected Input and Output" in the MSDN
Grz,
Michel