Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   Future Improvements (https://forums.graalonline.com/forums/forumdisplay.php?f=10)
-   -   External PM Windows and the Microsoft C Runtime (https://forums.graalonline.com/forums/showthread.php?t=84939)

Inverness 03-31-2009 10:54 PM

External PM Windows and the Microsoft C Runtime
 
I'd like those external PM windows back. Now the following is a long explanation just for Stefan's benefit.

And Stefan, I don't know if the situation has changed since then, but back when you decided to remove the external PM windows and use the scripted GUI stuff, you were not properly distributing the C Runtime along with Graal, which led to DLL loading problems.

All modern Windows applications should come with a manifest (external or preferably embedded) that tells Windows which DLL files need to be loaded for the application. Not all DLL files use the manifest functionality clearly, but the C Runtime does. The manifest is designed so multiple variations of the same DLL files can exist side by side.

Now then here is an example of a manifest that should be embedded in or included with the Graal and RC exe files:
PHP Code:

<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
<dependency>
    <dependentAssembly>
        <assemblyIdentity
            type='win32' 
            name='Microsoft.VC80.CRT'
            version='8.0.50727.3053'
            processorArchitecture='x86'
            publicKeyToken='1fc8b3b9a1e18e3b'
            language='*'
        />
    </dependentAssembly>
</dependency>
</assembly>

Now when windows loads your EXE file and finds this embedded or named exefilename.manifest in the folder, it will attempt to load Microsoft.VC80.CRT version 8.0.50727.3053.

If you have the CRT installed properly (and that specific version), Windows will load this from C:\Windows\WinSxS, if not the program will not run. However, if you don't want to require the user to install the runtime, you have the option of distributing a private assembly along with the Graal executable. A private assembly is a more sophisticated version of simply putting the dll file in the folder with the executable.

Distributing a private assembly would involve placing these four files in the folder with the executable:
PHP Code:

Microsoft.VC80.CRT.manifest
msvcm80
.dll
msvcp80
.dll
msvcr80
.dll 

When Windows attempts to load the Microsoft.VC80.CRT assembly, if it finds a manifest for that assembly in the same folder as the executable, then that manifest will be loaded which in turn loads the 3 DLL files that make up the C Runtime. Loading an individual DLL file of the CRT is improper which is why you can simply dump one of them in with the executable and expect it to work.

Admins 04-01-2009 11:01 AM

It was not mainly a problem with manifests, but with some dynamically linked library which the application doesn't have any control over. Statically linking the libraries solved it, and the exe was only a few kb bigger.
External PM windows will come back in the next version with the new scripted playerlist.

Crono 04-01-2009 06:11 PM

Please tell me the external pm's are not using themes, and that we still have an option not to use scripted playerlists. :(

Deas_Voice 04-01-2009 06:52 PM

Quote:

Originally Posted by Crono (Post 1480162)
Please tell me the external pm's are not using themes, and that we still have an option not to use scripted playerlists. :(

2nd! :(

DarkReaper0 04-01-2009 11:09 PM

Quote:

Originally Posted by Stefan (Post 1480061)
It was not mainly a problem with manifests, but with some dynamically linked library which the application doesn't have any control over. Statically linking the libraries solved it, and the exe was only a few kb bigger.
External PM windows will come back in the next version with the new scripted playerlist.


Wait....so you're saying we're trading a scripted pm window for a scripted playerlist?

RPG options:
1) Optional scripted playerlist
2) Mandatory scripted playerlist

Highlight for your personalized response!
1) Oh thank god, I finally appreciate you for caring for the players =)
2) WHAT THE ****? SCRIPTED FAILS SO HARD I'M SORRY BUT WHY DO WE USE THIS?

LoneAngelIbesu 04-01-2009 11:56 PM

Quote:

Originally Posted by DarkReaper0 (Post 1480263)
WHAT THE ****? SCRIPTED FAILS SO HARD I'M SORRY BUT WHY DO WE USE THIS?

I find the scripted playerlist to be a lot better than the external one. Not only does it match the game defaults, but it's also customizable by each server (e.g. adding custom options to the right-click menu).

cyan3 04-02-2009 12:28 AM

Quote:

Originally Posted by LoneAngelIbesu (Post 1480271)
I find the scripted playerlist to be a lot better than the external one. Not only does it match the game defaults, but it's also customizable by each server (e.g. adding custom options to the right-click menu).

I love the scripted playerlist but probably because I have to use it.


All times are GMT +2. The time now is 05:21 AM.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.