Prev Previous Post   Next Post Next
Old 9th March 2003, 12:24   #1
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Check a string for the letters 'quake2'

Is it possible to check whether 'quake2' is in $EXEDIR, or in any variable?

Right now I have this:
code:

ReadINIStr $1 "$TEMP\map-compiler_settings.ini" "Field 7" "State"
StrCmp "$1" "C:\quake2" DirOk
StrCmp "$1" "C:\quake2\" DirOk
StrCmp "$1" "D:\quake2" DirOk
StrCmp "$1" "D:\quake2\" DirOk
StrCmp "$1" "E:\quake2" DirOk
StrCmp "$1" "E:\quake2\" DirOk

StrCmp "$1" "C:\games\quake2" DirOk
StrCmp "$1" "C:\games\quake2\" DirOk
StrCmp "$1" "D:\games\quake2" DirOk
StrCmp "$1" "D:\games\quake2\" DirOk
StrCmp "$1" "E:\games\quake2" DirOk
StrCmp "$1" "E:\games\quake2\" DirOk

StrCmp "$1" "$PROGRAMFILES\quake2" DirOk

MessageBox MB_OK|MB_ICONEXCLAMATION \
"Your current Quake2 directory doesn't contain the letters 'quake2'.$\n \
This will greatly affect Map-Compiling.$\n$\n \
Please change your Quake2 directory structure so that \
it is something like: C:\quake2 or D:\games\quake2.$\n\
If you don't use Quake2, but instead use the Q2Demo or some other \
Quake2 modification, then you will still need to make a new Quake2 \
directory.$\n$\nRead the readme ID: Directory Structures for more \
information."
DirOk:


But it isn't very sufficiant, since the user may have his quake2 directory in e.g. C:\mygames\quake2

Thanks for any help

-Stuart
Afrow UK is offline   Reply With Quote
 
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump