![]() |
windows vista -> nsis using game explorer
hi, could someone help using the igameexplorer interface from windows vista with nsis' system.dll?
i already have my executable modified with the gdf (game definition file) data as described in the ms directx sdk. now, the next step to take is registering the executable via an api call. here is what the directx sdk readme states Quote:
interface reference: http://windowssdk.msdn.microsoft.com.../ms687221.aspx |
Completely untested.
code: code: |
Great. From what I can tell there, Microsoft is now using something even more cryptic than the Registry. Now there's a "games database"?
<sarcastic>*sighs* don't you just love it when Microsoft's APIs insist on doing everything for you?</sarcastic> -dandaman32 |
thanks for your help kichik!
works quite well, except one thing. in my case the guid is generated before - in the game definition file editor. i tried both, with the sample binary with gdf information and my own binary and both the last parameter of addline could be left empty or even should left empty. i am not much into the gdf thing yet, so i don't know why this last parameter is there anyway as in the vista registry the guid of the is taken anyway. the line code: crashes the installer. as i seem not to require it anyway i left it out, everything else seems to run smooth yet though i didn't try the uninstaller yet but looking at the lines you wrote that could be more a problem than addline cause of the guid thing i do not totally understand ;) DOCa Cola edit: @dandaman32 and yes, quite complicated for a simple link with menu :P |
GenerateGUID might need an allocated buffer like CoCreateGuid. In which case, its usage should be:
or even:code: I'd need the DLL to verify. Could you attach it? Though you're probably correct that it just generates a new GUID. It doesn't take any parameters relating to the game.code: |
1 Attachment(s)
here you go. :)
thanks for your time |
As I thought, it just calls CoCreateGuid. The last usage example I wrote should work. It'd probably have the same effect if you generate the GUID in advance on your computer, but I can't be sure of that. According to MSDN, it's the InstanceID, so it's probably per-computer after all.
MSDN also says: Quote:
|
great, installing works now without any problems. the uninstaller is the next step.
thanks for your help kichik! |
Mind creating a page on the Wiki with examples and functions/macros for adding games to the Game Explorer?
|
yea, as soon as i got this 100% running.
today i played with the uninstaller and couldn't get it working. i forgot to copy the gameuxinstallhelper.dll in the first place but i added it later so the uninstaller part does now look like that code: i tested it and the path to ${GDF} is also correct set to the gdf binary. Another problem i am experiencing are random crashes sometimes the installer calls the dll functions - both with the installer and uninstaller http://img170.imageshack.us/my.php?i...6123647py9.png |
You need to convert `*g .r0` to `g .r0` for the first call and to `g r0` for the others, just like with the installer code.
|
damn, i already tried changing the first call but forgot about the others ;) thx i will try it
|
still no success with
code: the uninstaller seems to run fine but the game doesn't seem to be removed from the game browser... |
You still have an asterisk before `g`. It should be `gr0` for the last two calls.
|
including .dlls in Setup package.
How can I pack the GameuxInstallHelper.dll into the AppNameSetup.exe?
Is is necessary for our users to only download one file and I need to have the .dll accessible so the calls to the Game Explorer work correctly. Any help would be appreciated, Thanks, Keith |
Okay, I know I'm asking dumb questions, but has anyone made a tutorial on this subject? :D
|
does the dll not exist on every vista system?
if it does exist on every vista system, you should not include it in your setup but rather check, whether the user has the dll already and then call the functions or don't, if he has no windows vista (because then they're all useless). if it is not installed on vista by default you should indeed include the dll into your installer. this is quite simple: code: you may need to modify your dll calls to: code: |
I've recently written an installer integrating with Game Explorer, thanks for the help kichik and Doca!
I've put up a wiki page with the code at: http://nsis.sourceforge.net/Game_explorer One thing of interest I discovered is that if you try and create a game explorer link for the current user it fails unless you are an administrator as it tries to write to HKLM - this is in conflict with what the documentation says but there's very little other information about Game Explorer at the moment. -- Marc Sutton www.codev.co.uk |
I've been reading through these forums and I have been able to get my game to install in game explorer. My problem is that I can not uninstall the game from Game Explorer now. This is the GameEx code that I am using:
code: ..Other code omitted Install Code code: Uninstall Code code: I'm not sure where to go from here I've read the NSIS wiki on game explorer and I still can not get my game removed from game explorer. So my first step is to actually get the game removed then figure out how to set up the installer/uninstaller correctly. |
Hi Third,
You need to use code more like that in the wiki. For a start the defines at the top of your code are incorrect. Also you need to RequestUserLevel admin at the top (it seems that applies even if you are trying to install for a current user). Also you need to generate a GUID and store it in the registry when you install, then use that value to uninstall. Copying the code from the wiki entry at: http://nsis.sourceforge.net/Game_explorer should make it work. Hope that helps, -- Marc Sutton http://www.codev.co.uk |
I tried the code from the wiki, but I think my problem is that I can't get the old game to uninstall from gameEx so the code from the wiki doesn't work. Also I have a gid inside my GDF file do I need to generate one the way you said or should I be able to pull it from the GDF?
Thanks |
Okay some how i managed to get the old game removed from GameEx I am now using the code from the wiki, but it is not installing GameEx. I have the GameuxInstallHelper.dll and my gdf.dll in the directory with the installer. My script compiles fine it just doesn't seem to be running the GameEx functions.
code: code: code: Sorry for all of the code just wasn't sure if i was missing something. Like I said, I have the dll's in the same directory as the install script and I also copied them into the directory of the app just to make sure they were found but still no luck. Thanks |
Umm.. Does anyone have any ideas why I might be getting empty GUIDs from the System::Call "GameuxInstallHelper::GenerateGUID(g .r0)" line? I'm not getting "", but "{00000000-0000-0000-000000000000}" as a GUID...?
Owen. |
GenerateGUID does not take a GUID as argument, but the POINTER TO AN GUID.
try GenerateGUID(i .r0) |
GenerateGUID(i .r0) returns simply 0 instead of an empty GUID
Also, this was taken from above and the wiki, so it seems to have worked for others... Owen. |
you may try GenerateGUID(g r0)
|
untested:
PHP Code:
|
Your code with GenerateGUID (i r0) (no period), gives me a blank GUID again... (not "", "{00000000-0000-0000-000000000000}") This was the same as simply doing the GenerateGUID(g .r0) (which gave the same thing, all 0's)
I'm wondering if there's something borked on the vista box I'm using... (or flavour, or... sigh) Owen. |
Well, I found the problem. There are 2 versions of the GameuxInstallHelper. One's a 32 bit dll, one's a 64 bit dll. The 32 bit one works, but if you try to call the 64 bit one, it returns an empty GUID. So. Moral of this story. If you are getting totally weird results, double check you have the right files.
For other people's sanity: 32 bit version of GameuxInstallerHelper is around 77 k 64 bit version of GameuxInstallerHelper is around 100 k Owen. |
If anyone has an install script/s that succesfully add an entry to game explorer I would appreciate it if they would share it with me as I am currently unable to create one of my own.
I've followed the code in the wiki but for some reason my app does not get added to Game Explorer. |
I was able to add an entry to game explorer using the GUID extracted from the GDF resource beforehand, and code like the following:
code: Possibly the GUID passed to the functions needs to be the same as in the GDF resource, but if that's the case, what's the point of having a GenerateGUID function in GameuxInstallHelper instead of an ExtractGUID function? |
Quote:
we use: code: ${GIS_ALL_USERS} = 3, can be 1 for current user instead (HKCU vs LM and for limited user can be 1) Hope that helps anyone else that is trying to get this up and running. Owen. |
There's no need to use GameuxInstallHelper. There are better solutions available.
http://nsis.sourceforge.net/Game_explorer http://nsis.sourceforge.net/Games_plug-in |
I fail to see how either of those is better than GameuxInstallHelper. The "Games" plugin looks like it will only work if the GDF is embedded in the EXE, not if it's in a separate DLL, and requires MSVCR80.dll. The "GameExplorer" header doesn't handle Media Center (and also looks a little buggy - I mean, why swap the GDF path and INSTDIR depending on current or all users?), and neither currently supports rich saved games.
|
GameExplorer header is smaller, simpler, easier to get and just works. Just look at the length of this GameuxInstallHelper related thread to see what I mean. I've created the GameExplorer headers to help users avoid this DLL.
|
I'm doubtful of the "just works" part. I still don't understand the reversal of R0 and R1 depending on ${CONTEXT} in the following snippet:
code: Anyway, I think the clarifications in this thread can be summarized as follows, and maybe added to a wiki page about GameuxInstallHelper: 1. The correct parameter type to use for the GUID (it's "g", not "i" or "*g" - the System plugin takes care of creating a GUID from the string and passing a pointer to it) 2. Use the 32-bit version of GameuxInstallHelper.dll, not the 64-bit version (unless maybe you want to only allow the game to be installed on a 64-bit system) 3. The GUID can be generated during the install, and shouldn't be the same as the gameID in the GDF resource. Once those three things are understood, using GameuxInstallHelper is almost as easy as the GameExplorer header or Games plugin. |
If you're going to create a Wiki page for GameuxInstallHelper, I suggest you put a direct link to the correct version or step by step instructions for its location.
|
Here you go:
http://nsis.sourceforge.net/Game_Explorer_with_Helper (I haven't figured out yet how this forum decides which links to block, so I'm leaving it as text for now) For comparison: Weaknesses of old Game Explorer header: 1. No save game support 2. No media center support 3. Additional tasks have to be created manually (with long paths to remember) 4. No support for pre-Vista systems that might get upgraded Weaknesses of Games plug-in: 1. Requires msvcr80.dll (612 KB) 2. Can't handle GDF in separate dll 3. No save game support 4. All tasks have to be created manually 5. No support for pre-Vista systems that might get upgraded Weaknesses of Game Explorer with Helper header: 1. Requires GameuxInstallHelper.dll (95 KB) 2. Doesn't support more than one game per installer |
Quote:
code: Also, another suggestion, for localization reasons, I'd pull the "Play" task out of the first macro, otherwise the French will see "Play". Or put them in as extra label options. (Same for support), or make them come from language strings $(GameExplorerPlayTask) or something. Owen. |
Supporting more than one game per installer took a little more than just checking for the dll, due to the way it had been using defines for the play task number and support task number, which wouldn't work if the task adding was done in a function declared before the one that added the game, so I switched to variables, and it should be more robust now.
As far as localization, I see your point, but I don't want to force the use of LangStrings, so I pulled the task adding out of the GameExplorer_AddGame, and GameExplorer_AddPlayTask and GameExplorer_AddSupportTask already allow the task names to be specified separately. |
| All times are GMT. The time now is 17:27. |
Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.