PDA

View Full Version : Problems with keyfiles in subfolders


mutex
11-27-2006, 08:46 AM
Hello all,

I encountered some problems with keyfiles which are not in the root folder of my application path. I'd like to use my .exe for keyfile as recommended, but it is located in %AppFolder%\bin\release.

When I tag it as keyfile, the patch won't find the installed application. When I use a file in the root path (e.g. uninstall.exe), it works...
Any ideas?

Best regards,
Philip Hammer, Deck13 Interactive

Lorne
11-27-2006, 10:02 AM
I encountered some problems with keyfiles which are not in the root folder of my application path. I'd like to use my .exe for keyfile as recommended, but it is located in %AppFolder%\bin\release.

When I tag it as keyfile, the patch won't find the installed application. When I use a file in the root path (e.g. uninstall.exe), it works...
Any ideas?It's a bug. :) Logged: #14231.

If you need a solution right away (before the next update), here are two workarounds:

Implement the key file check yourself (in Lua). Basically just override the g_cbFcnFindApplicationCallback function to look for the keyfile in the appropriate subfolder and compare the MD5, etc.
Use a key file in the root path, e.g. a version.txt file with the version number in it works really well for this.

mutex
11-27-2006, 10:23 AM
Thank you for the fast answer. Providing an additional version.txt works well for me.

jlsf2
06-21-2007, 09:37 AM
Was this ever fixed? I appear to be having the same problem.

Thanks.

Lorne
06-21-2007, 09:47 AM
Yes, this bug was fixed and will be available in the next version (2.0.5.0).

jlsf2
06-21-2007, 09:51 AM
Is there a timeframe for that? Is there anyway that I could get a pre-release version? Or, is there anyway I could get an early release of just this fix?

Thanks.

Lorne
06-21-2007, 10:19 AM
Is there a timeframe for that?
Right now it looks like about a week, maybe two weeks depending on how the rest of the fixes go.

Is there anyway that I could get a pre-release version? Or, is there anyway I could get an early release of just this fix?If a week will be too late, yes it's possible. We could give you a current build, although it would fall outside the scope of our regular updates so you'd have to revert back to the original file before applying the 2.0.5.0 update.

If you really need something right now, contact our support department and ask nicely. :)

jlsf2
06-21-2007, 10:24 AM
Well, desperate times bring... you know....

I might have a workaround for now. Can you look at this and tell me if there is anything else to be worried about? This fixes finding the Key files; just wondering if the actually patching will also have problems.

Thanks.

** I pulled this from the Actions and just hard-code in the subdirectory **

-- Location method: Registry key
-- Read a folder path from the Registry.
if not g_InstalledVersion then
local MainKey = HKEY_LOCAL_MACHINE;
local SubKey = SessionVar.Expand("Software\\XXX\\YYY\\ZZZ\\MiniGames\\#GAME_NAME#");
local ValueName = "InstallFolder";
local FolderPath = Registry.GetValue(MainKey, SubKey, ValueName);
tempFolderPath = FolderPath .. "\\pak\\tb1_game1";
Debug.Print( "FolderPath: " .. FolderPath .. "\n" );
Debug.Print( "tempFolderPath: " .. tempFolderPath .. "\n" );
--Debug.Print( SessionVar.Expand( "AppFolder: %AppFolder%\n" ) );
g_InstalledVersion = VisualPatch.CheckFolderVersion("%AppFolder%", tempFolderPath);
if g_InstalledVersion then
SessionVar.Set("%AppFolder%", FolderPath);
end
end

Lorne
06-21-2007, 10:32 AM
That looks like it should work. As always, "test fully, test first." :)

jlsf2
06-21-2007, 10:37 AM
Ok, thanks.

I think I'd rather do this versus getting an early build.

I'll just modify my future patch releases to do it the correct way once the next version comes out.

jlsf2
07-11-2007, 07:01 PM
Lorne, any update on the next version?

Turns out my fix worked for most cases, but I've found a patch that it doesn't work for (no idea why not).

Thanks.

Lorne
07-12-2007, 10:11 AM
Lorne, any update on the next version?I am told that the next release is nearing completion but we don't have a precise date yet.
Turns out my fix worked for most cases, but I've found a patch that it doesn't work for (no idea why not).Maybe check the MD5 hash of the key file in that installation against the original...it could be a corrupted/modified file.

Enabling a verbose patching log might reveal some clues as well.

jlsf2
07-15-2007, 08:35 PM
I'll just wait for the official patch.

My hack is still working... I just had the wrong file in my release directory... stupid of me.