.:: Bots United ::.

.:: Bots United ::. (http://forums.bots-united.com/index.php)
-   General Bot Coding (http://forums.bots-united.com/forumdisplay.php?f=24)
-   -   Steam directory registry key. (http://forums.bots-united.com/showthread.php?t=1070)

Drek 11-03-2004 20:36

Steam directory registry key.
 
This isn't really a bot coding question, but I didn't know where to ask this question, so I asked it here...

I'm putting together installers for the custom maps that I use on my servers, and I want to have it point by default to the correct directory. I found the registry key for third party mods (Steam\SteamApps\email\half-life) but I can't seem to find any key for the official mods. How do I set up the ClickTeam installer to install into the official mod directories (DOD etc.)?

Thanks in advance...

Cpl. Shrike 11-03-2004 21:06

Re: Steam directory registry key.
 
HKEY_CURRENT_USER\\Software\\Valve\\Counter-Strike\\InstallPath

HKEY_CURRENT_USER\\Software\\Valve\\DOD\\InstallPa th

HKEY_CURRENT_USER\\Software\\Valve\\Half-Life\\InstallPath

HKEY_CURRENT_USER\\Software\\Valve\\Steam\\ModInst allPath


That's all the reg keys i know of for HL =)

Drek 11-03-2004 21:08

Re: Steam directory registry key.
 
hmmm, actually, that is the one key I already knew about. How do I set up the installer to install to the correct directory then? I know you know how because your installer automagically points to the correct directory. :)

Cpl. Shrike 11-03-2004 22:06

Re: Steam directory registry key.
 
Um i install to directories readed from the registery keys mentioned above.


I fact i don't know what's in the following keys
HKEY_CURRENT_USER\\Software\\Valve\\Counter-Strike\\InstallPath
HKEY_CURRENT_USER\\Software\\Valve\\DOD\\InstallPa th

what i do is ::
I let my program look for those keys then read the contents from it and use that content as installation path.

For example:
HKEY_CURRENT_USER\\Software\\Valve\\Counter-Strike\\InstallPath
This key is the official counter strike retail reg key. (won that is)

I don't know what's in it simply because i don't have counter strike retail.
So i let the installer program read your reg key. then i use that reg key content as intall path.

My installer ins't from clickteam or any but i coded it from a zip archive source code.

--------
edit.
or am i not getting your question ??

Drek 11-03-2004 22:20

Re: Steam directory registry key.
 
hmmm, this is what is confusing me. Your installer automatically points to the correct directory on my computer, namely

D:\Games\Steam\SteamApps\myemailaddress\day of defeat\dod

However the registery key

HKEY_CURRENT_USER\\Software\\Valve\\Steam\\ModInst allPath

points to

D:\Games\Steam\SteamApps\myemailaddress\half-life

on my computer.

There are no registry keys that I can find that point to

D:\Games\Steam\SteamApps\myemailaddress\day of defeat\dod

but that is what you are pointing to.

The other keys are WON keys and don't apply to the installers I am making for my clan because we play on Steam now.

How do you get the installer to point to

D:\Games\Steam\SteamApps\myemailaddress\day of defeat\dod

? :)

I know it can be done with the ClickTeam installer because I have seen it done. I even know I saw an explanation somewhere, but I can't remember where... Day of Defeat forums? I'd search there but the search function doesn't work for me right now...

Cpl. Shrike 11-03-2004 22:27

Re: Steam directory registry key.
 
Ahhh yes

The installer grabs your reg key
D:\Games\Steam\SteamApps\myemailaddress\half-life

Since you clicked the dod button.
The installer strips the "half-life" and adds "day of defeat"
But i don't know the full path.

that's the only combination in which i edit the install paths.
All other combo's are just copy pasted from your registery

----------
edit

That's hard to do with clickteam installer.

I coded it in. :)

Cpl. Shrike 11-03-2004 22:31

Re: Steam directory registry key.
 
But then again im not an expert with the cklick team installer
Althoughj i saw they have new version out 8o

Cpl. Shrike 11-03-2004 22:41

Re: Steam directory registry key.
 
Oh btw.

it also points to "dod"
because that's the zip root

\dod\dlls\bla bla
\dod\shrikebot\bla bla
etc etc

so i only needed \email\day of defeat\
:)

--------------------

This is how i got your install path for dod steam (For the coders)
Code:

if (RegOpenKeyEx(HKEY_CURRENT_USER, _T("Software\\Valve\\Steam"), 0, KEY_QUERY_VALUE, &hRegKey) == ERROR_SUCCESS)
 {  // opening your reg key...
    dwLength = 256*sizeof(TCHAR);
    if ((rc=RegQueryValueEx(hRegKey, _T("ModInstallPath"), NULL, NULL, (BYTE*)keyValue, &dwLength))==ERROR_SUCCESS)
    szValue = keyValue;  //this is the install path
 
    ::RegCloseKey(hRegKey);
    if (ModId == MOD_TOD)
    m_strPath = szValue;  // this is used as install path for TOD
 
    else // make DOD path.
    {
          x = strlen(szValue) - 9;  // minus "half-life"
          strncpy(msg2, szValue, x);
          msg2[x]='\0';
          strcat(msg2, "day of defeat"); // add "day of defeat"
          m_strPath = msg2;  // this is used as install path for DOD
    }
 }



All times are GMT +2. The time now is 13:58.

Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.