Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - XTP DLL Deployment
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

XTP DLL Deployment

 Post Reply Post Reply
Author
Message
nickpap View Drop Down
Newbie
Newbie
Avatar

Joined: 09 May 2008
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote nickpap Quote  Post ReplyReply Direct Link To This Post Topic: XTP DLL Deployment
    Posted: 22 November 2008 at 2:37pm
Hello,

I have an application and several DLLs being built, each linking with the ToolkitPro DLL.

Now I am preparing to deploy the application and I do not like the idea of shipping the ToolkitPro1200vc80.dll by that name. I would like it to be something like Toolkit.dll, or XTP.dll. This would really come in handy when I'll prepare a patch for the app and I could include the latest Toolkit under the same name, with the patch app packing the differences only, instead of a whole new ToolkitProxxxxvc80.dll file.

I tried linking all my own DLLs statically with the Toolkit, but that created other issues I don't have time to deal with right now, plus it blowed up the DLL size significantly.

Another option I thought of would be to edit the XTToolkitPro.h file so that it does not create the library filename on its own but lets the project use one I select, actually a renamed copy of the original lib. This is just an idea, haven't tried it yet.

I'd like to know if anybody else has had this sort of problem and how they coped with it.

Thanks !
Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 24 November 2008 at 5:10am

Hi,

Yes, you can change name. Open toolkit project in IDE and change dll/lib names. Now patch XTToolkitPro.h to use this name.

Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
aaabc View Drop Down
Newbie
Newbie


Joined: 29 January 2007
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote aaabc Quote  Post ReplyReply Direct Link To This Post Posted: 25 November 2008 at 6:31pm

Hi Oleg,

Can you please go a bit detail on how to 'patch' XTToolkitPro.h to use a new name?  I did change the dll/lib name and it now compiles to produce dll with the new name, but what to patch and how/where?
Product: Xtreme ToolkitPro version 12.0.2
Platform: Windows XP (32bit) - SP2
Language: Visual C++ 6.0 SP6
Back to Top
nickpap View Drop Down
Newbie
Newbie
Avatar

Joined: 09 May 2008
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote nickpap Quote  Post ReplyReply Direct Link To This Post Posted: 27 November 2008 at 5:04am
Hello there,

First of all, I'd like to thank Oleg for a prompt and clear response ! Here is what I did based on his suggestions and it worked just file:

Open the XTToolkitPro.h file and go near the end of it. You should see there some directives that create the library name from various definitions that have been set in the code above.

As you can see below, I commented out the original #pragma lines and edited them to generate the XTP name and only use the _XTPLIB_PROJECT_CONFIGURATION define, so I can have both XTP.dll, lib, for Release and XTPD.dll, lib for Debug builds.

After this, just save the edited file "closer" to your application sources, that is, in a path that comes before the one used by VS to locate the Toolkit stuff. This could be your application sources path, some common Includes path you may have, anything that will be read before the original Toolkit header.

Then copy the libs you built in the proper build folders, XTP.lib into Release and XTPD.lib into Debug and perform a Clean Rebuild. This is very important, since all your previous builds may contain links to the original Toolkit DLLs.

Then, after a successful build, you have to copy the DLLs near the binaries and hey presto, they work !

#ifndef _XTPLIB_NOAUTOLINK
    //#pragma comment(lib, "ToolkitPro" _XTPLIB_PROJECT_EVAL _XTPLIB_FILE_VERSION _XTPLIB_VISUALSTUDIO_VERSION _XTPLIB_PLATFORM _XTPLIB_PROJECT_CONFIGURATION ".lib")
    //#pragma message("Automatically linking with ToolkitPro" _XTPLIB_PROJECT_EVAL _XTPLIB_FILE_VERSION _XTPLIB_VISUALSTUDIO_VERSION _XTPLIB_PLATFORM _XTPLIB_PROJECT_CONFIGURATION "." _XTPLIB_LINK_TYPE)
    #pragma comment(lib, "XTP" _XTPLIB_PROJECT_CONFIGURATION ".lib")
    #pragma message("Automatically linking with ToolkitPro XTP" _XTPLIB_PROJECT_CONFIGURATION "." _XTPLIB_LINK_TYPE)
#endif //_XTPLIB_NOAUTOLINK


Back to Top
adrien View Drop Down
Senior Member
Senior Member


Joined: 30 April 2007
Location: New Zealand
Status: Offline
Points: 449
Post Options Post Options   Thanks (0) Thanks(0)   Quote adrien Quote  Post ReplyReply Direct Link To This Post Posted: 30 November 2008 at 6:16am
Hi Nick

We looked into this issue as well, but if you look into the reasons why the name, you may still need to keep some aspects in there - e.g. version number, since the DLL isn't necessarily binary compatible with earlier versions.

to chang ethe lib file that is included in the header, look for a #pragma comment(lib, ...) entry
Back to Top
znakeeye View Drop Down
Senior Member
Senior Member
Avatar

Joined: 26 July 2006
Status: Offline
Points: 1672
Post Options Post Options   Thanks (0) Thanks(0)   Quote znakeeye Quote  Post ReplyReply Direct Link To This Post Posted: 01 December 2008 at 2:30am
Perhaps CJ should add a #define for the DLL/LIB name?
PokerMemento - http://www.pokermemento.com/
Back to Top
nickpap View Drop Down
Newbie
Newbie
Avatar

Joined: 09 May 2008
Status: Offline
Points: 4
Post Options Post Options   Thanks (0) Thanks(0)   Quote nickpap Quote  Post ReplyReply Direct Link To This Post Posted: 01 December 2008 at 7:43am
Hello,

@adrien : Binary compatibility is not an issue for me, since I always rebuild the whole application suite for a patch, so everything is relinked with the latest headers, libs, etc. Also, I always distribute a diff patcher application, never a single dll.

@znakeeye: If you edit the header file, you can add such a define yourself. What you probably mean, is perhaps an option during setup, where you can enter a preferred name to be used during the library build.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.156 seconds.