Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

Reply
 
Thread Tools Display Modes
  #1  
Old 07-20-2010, 07:30 AM
Harakiri23
Fire Beetle
 
Join Date: Jun 2009
Location: b
Posts: 11
Default

^ this is actually the wrong way and very error prone - it took me a while to figure out how this should work, since nobody documented it =)

see the folder

http://code.google.com/p/projecteqem...r/utils/perlxs

see the dummy header for client.h for example - put all method signatures in there you want to export

after that run

./convert client.h Client

it will create perl_client.cpp

directly modyfing perl_client.cpp is a bad idea, because everything somebody manually put in there will be overwritten - hence the big fat warning in this file

" This file was generated automatically by xsubpp version 1.9508 from the 2 * This file was generated automatically by xsubpp version 1.9508 from the
3 * contents of tmp. Do not edit this file, edit tmp instead."

Do not edit....

The plus site of this is, that you can easily remove/add functions you want to export to the dummy header file - you dont need to export every function.

setting up the environment for perl is another thing, you need xsubpp, its easier on unix than on cygwin/windows
Reply With Quote
  #2  
Old 07-20-2010, 08:37 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

LOL, wow, I always wondered what that folder of files were for...

At this point, it would be a bit of a pain to start using that way to generate the perl export files again. Doing them manually is really quick and easy though. Sounds like if someone wanted a particular function to be exported and didn't know how to write it themselves, they could just use that script and then pull out just the 1 function they are wanting and add that to the normal perl_client.cpp manually.

By making them manually, you get more flexibility and can set defaults if the function doesn't already have them and make optional fields in the commands. Another nice thing about doing them manually is that the function itself can be changed in the source without having to change the order of the arguments in the perl function, so you don't mess up existing quest scripts.

Maybe I should run that script and see how well it works. Might make it easy to add a bunch of the lesser needed functions from mob/client/npc. Then just merge in the stuff that doesn't exist already.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 07-20-2010, 05:13 PM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

Using xsubpp will generate incorrect results at this point. It was something that was lost in the conversion to SVN. I had trouble keeping people to keep up the header files so I just gave up.

All for the better really because it allows far more flexibility this way and it really speaks to the utter piece of shit perl's C/C++ interface is that doing it this way is "wrong".
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 06:19 PM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3