XTP DLL Deployment
Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Toolkit Pro
Forum Description: Topics Related to Codejock Toolkit Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=12769
Printed Date: 01 February 2025 at 8:53am Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com
Topic: XTP DLL Deployment
Posted By: nickpap
Subject: XTP DLL Deployment
Date 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 !
|
Replies:
Posted By: Oleg
Date 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
|
Posted By: aaabc
Date 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
|
Posted By: nickpap
Date 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
|
Posted By: adrien
Date 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
------------- http://www.wingate.com - http://www.wingate.com
|
Posted By: znakeeye
Date Posted: 01 December 2008 at 2:30am
Perhaps CJ should add a #define for the DLL/LIB name?
------------- PokerMemento - http://www.pokermemento.com/
|
Posted By: nickpap
Date Posted: 01 December 2008 at 7:43am
Hello,
@ member_profile.asp?PF=2967&FID=112 - 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.
@ member_profile.asp?PF=2198&FID=112 - 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.
|
|