XTP DLL Deployment |
Post Reply |
Author | |
nickpap
Newbie Joined: 09 May 2008 Status: Offline Points: 4 |
Post Options
Thanks(0)
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 ! |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
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 |
|
aaabc
Newbie Joined: 29 January 2007 Status: Offline Points: 6 |
Post Options
Thanks(0)
|
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 |
|
nickpap
Newbie Joined: 09 May 2008 Status: Offline Points: 4 |
Post Options
Thanks(0)
|
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 |
|
adrien
Senior Member Joined: 30 April 2007 Location: New Zealand Status: Offline Points: 449 |
Post Options
Thanks(0)
|
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 |
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
Perhaps CJ should add a #define for the DLL/LIB name?
|
|
PokerMemento - http://www.pokermemento.com/
|
|
nickpap
Newbie Joined: 09 May 2008 Status: Offline Points: 4 |
Post Options
Thanks(0)
|
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. |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |