makepanda.py 262 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730
  1. #!/usr/bin/python
  2. ########################################################################
  3. #
  4. # Caution: there are two separate, independent build systems:
  5. # 'makepanda', and 'ppremake'. Use one or the other, do not attempt
  6. # to use both. This file is part of the 'makepanda' system.
  7. #
  8. # To build panda using this script, type 'makepanda.py' on unix
  9. # or 'makepanda.bat' on windows, and examine the help-text.
  10. # Then run the script again with the appropriate options to compile
  11. # panda3d.
  12. #
  13. ########################################################################
  14. try:
  15. import sys,os,platform,time,stat,string,re,getopt,fnmatch,threading,Queue,signal,shutil
  16. if (sys.platform == "darwin"): import plistlib
  17. except:
  18. print "You are either using an incomplete or an old version of Python!"
  19. print "Please install the development package of Python 2.x and try again."
  20. exit(1)
  21. from makepandacore import *
  22. from installpanda import *
  23. ########################################################################
  24. ##
  25. ## PARSING THE COMMAND LINE OPTIONS
  26. ##
  27. ## You might be tempted to change the defaults by editing them
  28. ## here. Don't do it. Instead, create a script that compiles
  29. ## panda with your preferred options. Or, create
  30. ## a 'makepandaPreferences' file and put it into your python path.
  31. ##
  32. ########################################################################
  33. COMPILER=0
  34. INSTALLER=0
  35. GENMAN=0
  36. COMPRESSOR="zlib"
  37. THREADCOUNT=0
  38. CFLAGS=""
  39. LDFLAGS=""
  40. RTDIST=0
  41. RTDIST_VERSION="dev"
  42. RUNTIME=0
  43. DISTRIBUTOR=""
  44. VERSION=None
  45. DEBVERSION=None
  46. RPMRELEASE="1"
  47. P3DSUFFIX=None
  48. MAJOR_VERSION=None
  49. COREAPI_VERSION=None
  50. PLUGIN_VERSION=None
  51. OSXTARGET=None
  52. HOST_URL="https://runtime.panda3d.org/"
  53. if "MACOSX_DEPLOYMENT_TARGET" in os.environ:
  54. OSXTARGET=os.environ["MACOSX_DEPLOYMENT_TARGET"]
  55. PkgListSet(["PYTHON", "DIRECT", # Python support
  56. "GL", "GLES", "GLES2"] + DXVERSIONS + ["TINYDISPLAY", "NVIDIACG", # 3D graphics
  57. "EGL", # OpenGL (ES) integration
  58. "OPENAL", "FMODEX", "FFMPEG", # Multimedia
  59. "ODE", "PHYSX", "BULLET", # Physics
  60. "SPEEDTREE", # SpeedTree
  61. "ZLIB", "PNG", "JPEG", "TIFF", "SQUISH", "FREETYPE", # 2D Formats support
  62. ] + MAYAVERSIONS + MAXVERSIONS + [ "FCOLLADA", # 3D Formats support
  63. "VRPN", "OPENSSL", # Transport
  64. "FFTW", "SWSCALE", # Algorithm helpers
  65. "ARTOOLKIT", "OPENCV", "DIRECTCAM", # Augmented Reality
  66. "NPAPI", "AWESOMIUM", # Browser embedding
  67. "GTK2", "WX", "FLTK", # Toolkit support
  68. "OSMESA", "X11", "XF86DGA", "XRANDR", "XCURSOR", # Unix platform support
  69. "PANDATOOL", "PVIEW", "DEPLOYTOOLS", # Toolchain
  70. "CONTRIB" # Experimental
  71. ])
  72. CheckPandaSourceTree()
  73. def keyboardInterruptHandler(x,y):
  74. exit("keyboard interrupt")
  75. signal.signal(signal.SIGINT, keyboardInterruptHandler)
  76. ########################################################################
  77. ##
  78. ## Command-line parser.
  79. ##
  80. ## You can type "makepanda --help" to see all the options.
  81. ##
  82. ########################################################################
  83. def usage(problem):
  84. if (problem):
  85. print ""
  86. print problem
  87. print ""
  88. print "Makepanda generates a 'built' subdirectory containing a"
  89. print "compiled copy of Panda3D. Command-line arguments are:"
  90. print ""
  91. print " --help (print the help message you're reading now)"
  92. print " --verbose (print out more information)"
  93. print " --runtime (build a runtime build instead of an SDK build)"
  94. print " --installer (build an installer)"
  95. print " --optimize X (optimization level can be 1,2,3,4)"
  96. print " --version X (set the panda version number)"
  97. print " --lzma (use lzma compression when building Windows installer)"
  98. print " --distributor X (short string identifying the distributor of the build)"
  99. print " --outputdir X (use the specified directory instead of 'built')"
  100. print " --host URL (set the host url (runtime build only))"
  101. print " --threads N (use the multithreaded build system. see manual)"
  102. print " --osxtarget N (the OSX version number to build for (OSX only))"
  103. print " --override \"O=V\" (override dtool_config/prc option value)"
  104. print " --static (builds libraries for static linking)"
  105. print ""
  106. for pkg in PkgListGet():
  107. p = pkg.lower()
  108. print " --use-%-9s --no-%-9s (enable/disable use of %s)"%(p, p, pkg)
  109. print ""
  110. print " --nothing (disable every third-party lib)"
  111. print " --everything (enable every third-party lib)"
  112. print ""
  113. print "The simplest way to compile panda is to just type:"
  114. print ""
  115. print " makepanda --everything"
  116. print ""
  117. os._exit(1)
  118. def parseopts(args):
  119. global INSTALLER,RTDIST,RUNTIME,GENMAN,DISTRIBUTOR,VERSION
  120. global COMPRESSOR,THREADCOUNT,OSXTARGET,HOST_URL
  121. global DEBVERSION,RPMRELEASE,P3DSUFFIX
  122. longopts = [
  123. "help","distributor=","verbose","runtime","osxtarget=",
  124. "optimize=","everything","nothing","installer","rtdist","nocolor",
  125. "version=","lzma","no-python","threads=","outputdir=","override=",
  126. "static","host=","debversion=","rpmrelease=","p3dsuffix="]
  127. anything = 0
  128. optimize = ""
  129. for pkg in PkgListGet(): longopts.append("no-"+pkg.lower())
  130. for pkg in PkgListGet(): longopts.append("use-"+pkg.lower())
  131. try:
  132. opts, extras = getopt.getopt(args, "", longopts)
  133. for option,value in opts:
  134. if (option=="--help"): raise "usage"
  135. elif (option=="--optimize"): optimize=value
  136. elif (option=="--installer"): INSTALLER=1
  137. elif (option=="--verbose"): SetVerbose(True)
  138. elif (option=="--distributor"): DISTRIBUTOR=value
  139. elif (option=="--rtdist"): RTDIST=1
  140. elif (option=="--runtime"): RUNTIME=1
  141. elif (option=="--genman"): GENMAN=1
  142. elif (option=="--everything"): PkgEnableAll()
  143. elif (option=="--nothing"): PkgDisableAll()
  144. elif (option=="--threads"): THREADCOUNT=int(value)
  145. elif (option=="--outputdir"): SetOutputDir(value.strip())
  146. elif (option=="--osxtarget"): OSXTARGET=value.strip()
  147. elif (option=="--nocolor"): DisableColors()
  148. elif (option=="--version"):
  149. VERSION=value
  150. if (len(VERSION.split(".")) != 3): raise "usage"
  151. elif (option=="--lzma"): COMPRESSOR="lzma"
  152. elif (option=="--override"): AddOverride(value.strip())
  153. elif (option=="--static"): SetLinkAllStatic(True)
  154. elif (option=="--host"): HOST_URL=value
  155. elif (option=="--debversion"): DEBVERSION=value
  156. elif (option=="--rpmrelease"): RPMRELEASE=value
  157. elif (option=="--p3dsuffix"): P3DSUFFIX=value
  158. # Backward compatibility, OPENGL was renamed to GL
  159. elif (option=="--use-opengl"): PkgEnable("GL")
  160. elif (option=="--no-opengl"): PkgDisable("GL")
  161. else:
  162. for pkg in PkgListGet():
  163. if (option=="--use-"+pkg.lower()):
  164. PkgEnable(pkg)
  165. break
  166. for pkg in PkgListGet():
  167. if (option=="--no-"+pkg.lower()):
  168. PkgDisable(pkg)
  169. break
  170. if (option=="--everything" or option.startswith("--use-")
  171. or option=="--nothing" or option.startswith("--no-")):
  172. anything = 1
  173. except: usage(0)
  174. if (anything==0): usage(0)
  175. if (RTDIST and RUNTIME):
  176. usage("Options --runtime and --rtdist cannot be specified at the same time!")
  177. if (optimize=="" and (RTDIST or RUNTIME)): optimize = "4"
  178. elif (optimize==""): optimize = "3"
  179. if (OSXTARGET != None and OSXTARGET.strip() == ""):
  180. OSXTARGET = None
  181. elif (OSXTARGET != None):
  182. OSXTARGET = OSXTARGET.strip()
  183. if (len(OSXTARGET) != 4 or not OSXTARGET.startswith("10.")):
  184. usage("Invalid setting for OSXTARGET")
  185. try:
  186. OSXTARGET = "10.%d" % int(OSXTARGET[-1])
  187. except:
  188. usage("Invalid setting for OSXTARGET")
  189. try:
  190. SetOptimize(int(optimize))
  191. assert GetOptimize() in [1, 2, 3, 4]
  192. except:
  193. usage("Invalid setting for OPTIMIZE")
  194. parseopts(sys.argv[1:])
  195. ########################################################################
  196. ##
  197. ## Handle environment variables.
  198. ##
  199. ########################################################################
  200. if ("CFLAGS" in os.environ):
  201. CFLAGS = os.environ["CFLAGS"]
  202. if ("RPM_OPT_FLAGS" in os.environ):
  203. CFLAGS += " " + os.environ["RPM_OPT_FLAGS"]
  204. CFLAGS = CFLAGS.strip()
  205. if ("LDFLAGS" in os.environ):
  206. LDFLAGS = os.environ["LDFLAGS"]
  207. LDFLAGS = LDFLAGS.strip()
  208. os.environ["MAKEPANDA"] = os.path.abspath(sys.argv[0])
  209. if (sys.platform == "darwin" and OSXTARGET != None):
  210. os.environ["MACOSX_DEPLOYMENT_TARGET"] = OSXTARGET
  211. ########################################################################
  212. ##
  213. ## Configure things based on the command-line parameters.
  214. ##
  215. ########################################################################
  216. if (VERSION is None):
  217. if (RUNTIME):
  218. VERSION = ParsePluginVersion("dtool/PandaVersion.pp")
  219. COREAPI_VERSION = VERSION + "." + ParseCoreapiVersion("dtool/PandaVersion.pp")
  220. PLUGIN_VERSION = VERSION
  221. else:
  222. VERSION = ParsePandaVersion("dtool/PandaVersion.pp")
  223. PLUGIN_VERSION = ParsePluginVersion("dtool/PandaVersion.pp")
  224. if (COREAPI_VERSION is None):
  225. COREAPI_VERSION = VERSION
  226. if (DEBVERSION is None):
  227. DEBVERSION = VERSION
  228. MAJOR_VERSION = VERSION[:3]
  229. if (P3DSUFFIX is None):
  230. P3DSUFFIX = MAJOR_VERSION
  231. if (RUNTIME or RTDIST):
  232. # Compiling Maya/Max is pointless in rtdist build
  233. for ver in MAYAVERSIONS + MAXVERSIONS:
  234. PkgDisable(ver)
  235. if (DISTRIBUTOR.strip() == ""):
  236. exit("You must provide a valid distributor name when making a runtime or rtdist build!")
  237. if (not IsCustomOutputDir()):
  238. if (RTDIST):
  239. SetOutputDir("built_" + DISTRIBUTOR.strip())
  240. elif (RUNTIME):
  241. SetOutputDir("built_" + DISTRIBUTOR.strip() + "_rt")
  242. RTDIST_VERSION = DISTRIBUTOR.strip() + "_" + MAJOR_VERSION
  243. elif (DISTRIBUTOR == ""):
  244. DISTRIBUTOR = "makepanda"
  245. if (RUNTIME):
  246. for pkg in PkgListGet():
  247. if pkg in ["GTK2"]:
  248. # Optional package(s) for runtime.
  249. pass
  250. elif pkg in ["OPENSSL", "ZLIB", "NPAPI", "JPEG", "PNG"]:
  251. # Required packages for runtime.
  252. if (PkgSkip(pkg)==1):
  253. exit("Runtime must be compiled with OpenSSL, ZLib, NPAPI, JPEG and PNG support!")
  254. else:
  255. # Unused packages for runtime.
  256. PkgDisable(pkg)
  257. if (sys.platform.startswith("win")):
  258. os.environ["BISON_SIMPLE"] = GetThirdpartyBase()+"/win-util/bison.simple"
  259. if (INSTALLER and RTDIST):
  260. exit("Cannot build an installer for the rtdist build!")
  261. if (INSTALLER) and (PkgSkip("PYTHON")) and (not RUNTIME):
  262. exit("Cannot build installer without python")
  263. if (RTDIST) and (PkgSkip("JPEG")):
  264. exit("Cannot build rtdist without jpeg")
  265. if (RTDIST) and (PkgSkip("WX") and PkgSkip("FLTK")):
  266. exit("Cannot build rtdist without wx or fltk")
  267. if (RUNTIME):
  268. SetLinkAllStatic(True)
  269. if not os.path.isdir("contrib"):
  270. PkgDisable("CONTRIB")
  271. ########################################################################
  272. ##
  273. ## Load the dependency cache.
  274. ##
  275. ########################################################################
  276. LoadDependencyCache()
  277. ########################################################################
  278. ##
  279. ## Locate various SDKs.
  280. ##
  281. ########################################################################
  282. MakeBuildTree()
  283. SdkLocateDirectX()
  284. SdkLocateMaya()
  285. SdkLocateMax()
  286. SdkLocateMacOSX(OSXTARGET)
  287. SdkLocatePython(RTDIST)
  288. SdkLocateVisualStudio()
  289. SdkLocateMSPlatform()
  290. SdkLocatePhysX()
  291. SdkLocateSpeedTree()
  292. SdkAutoDisableDirectX()
  293. SdkAutoDisableMaya()
  294. SdkAutoDisableMax()
  295. SdkAutoDisablePhysX()
  296. SdkAutoDisableSpeedTree()
  297. if (RTDIST and DISTRIBUTOR == "cmu"):
  298. if (RTDIST_VERSION == "cmu_1.7" and SDK["PYTHONVERSION"] != "python2.6"):
  299. exit("The CMU 1.7 runtime distribution must be built against Python 2.6!")
  300. elif (RTDIST_VERSION == "cmu_1.8" and SDK["PYTHONVERSION"] != "python2.7"):
  301. exit("The CMU 1.8 runtime distribution must be built against Python 2.7!")
  302. ########################################################################
  303. ##
  304. ## Choose a Compiler.
  305. ##
  306. ## This should also set up any environment variables needed to make
  307. ## the compiler work.
  308. ##
  309. ########################################################################
  310. if (sys.platform == "win32"):
  311. SetupVisualStudioEnviron()
  312. COMPILER="MSVC"
  313. else:
  314. CheckLinkerLibraryPath()
  315. COMPILER="LINUX"
  316. builtdir = os.path.join(os.path.abspath(GetOutputDir()))
  317. AddToPathEnv("PYTHONPATH", builtdir)
  318. AddToPathEnv("PANDA_PRC_DIR", os.path.join(builtdir, "etc"))
  319. if (sys.platform.startswith("win")):
  320. AddToPathEnv("PATH", os.path.join(builtdir, "plugins"))
  321. AddToPathEnv("PYTHONPATH", os.path.join(builtdir, "bin"))
  322. else:
  323. AddToPathEnv("PATH", os.path.join(builtdir, "bin"))
  324. AddToPathEnv("PYTHONPATH", os.path.join(builtdir, "lib"))
  325. ########################################################################
  326. ##
  327. ## External includes, external libraries, and external defsyms.
  328. ##
  329. ########################################################################
  330. if (COMPILER=="MSVC"):
  331. PkgDisable("X11")
  332. PkgDisable("XRANDR")
  333. PkgDisable("XF86DGA")
  334. PkgDisable("XCURSOR")
  335. PkgDisable("GLES")
  336. PkgDisable("GLES2")
  337. PkgDisable("EGL")
  338. if (PkgSkip("PYTHON")==0):
  339. IncDirectory("ALWAYS", SDK["PYTHON"] + "/include")
  340. LibDirectory("ALWAYS", SDK["PYTHON"] + "/libs")
  341. for pkg in PkgListGet():
  342. if (PkgSkip(pkg)==0):
  343. if (pkg[:4]=="MAYA"):
  344. IncDirectory(pkg, SDK[pkg] + "/include")
  345. DefSymbol(pkg, "MAYAVERSION", pkg)
  346. elif (pkg[:3]=="MAX"):
  347. IncDirectory(pkg, SDK[pkg] + "/include")
  348. IncDirectory(pkg, SDK[pkg] + "/include/CS")
  349. IncDirectory(pkg, SDK[pkg+"CS"] + "/include")
  350. IncDirectory(pkg, SDK[pkg+"CS"] + "/include/CS")
  351. DefSymbol(pkg, "MAX", pkg)
  352. elif (pkg[:2]=="DX"):
  353. IncDirectory(pkg, SDK[pkg] + "/include")
  354. else:
  355. IncDirectory(pkg, GetThirdpartyDir() + pkg.lower() + "/include")
  356. for pkg in DXVERSIONS:
  357. if (PkgSkip(pkg)==0):
  358. vnum=pkg[2:]
  359. LibDirectory(pkg, SDK[pkg] + '/lib/x86')
  360. LibDirectory(pkg, SDK[pkg] + '/lib')
  361. LibName(pkg, 'd3dVNUM.lib'.replace("VNUM", vnum))
  362. LibName(pkg, 'd3dxVNUM.lib'.replace("VNUM", vnum))
  363. if (vnum=="9" and "GENERIC_DXERR_LIBRARY" in SDK):
  364. LibName(pkg, 'dxerr.lib')
  365. else:
  366. LibName(pkg, 'dxerrVNUM.lib'.replace("VNUM", vnum))
  367. LibName(pkg, 'ddraw.lib')
  368. LibName(pkg, 'dxguid.lib')
  369. LibName("WINSOCK", "wsock32.lib")
  370. LibName("WINSOCK2", "wsock32.lib")
  371. LibName("WINSOCK2", "ws2_32.lib")
  372. LibName("WINCOMCTL", "comctl32.lib")
  373. LibName("WINCOMDLG", "comdlg32.lib")
  374. LibName("WINUSER", "user32.lib")
  375. LibName("WINMM", "winmm.lib")
  376. LibName("WINIMM", "imm32.lib")
  377. LibName("WINKERNEL", "kernel32.lib")
  378. LibName("WINOLE", "ole32.lib")
  379. LibName("WINOLEAUT", "oleaut32.lib")
  380. LibName("WINOLDNAMES", "oldnames.lib")
  381. LibName("WINSHELL", "shell32.lib")
  382. LibName("WINGDI", "gdi32.lib")
  383. LibName("ADVAPI", "advapi32.lib")
  384. LibName("GL", "opengl32.lib")
  385. LibName("GLES", "libgles_cm.lib")
  386. LibName("GLES2", "libGLESv2.lib")
  387. LibName("EGL", "libEGL.lib")
  388. LibName("MSIMG", "msimg32.lib")
  389. if (PkgSkip("DIRECTCAM")==0): LibName("DIRECTCAM", "strmiids.lib")
  390. if (PkgSkip("DIRECTCAM")==0): LibName("DIRECTCAM", "quartz.lib")
  391. if (PkgSkip("DIRECTCAM")==0): LibName("DIRECTCAM", "odbc32.lib")
  392. if (PkgSkip("DIRECTCAM")==0): LibName("DIRECTCAM", "odbccp32.lib")
  393. if (PkgSkip("PNG")==0): LibName("PNG", GetThirdpartyDir() + "png/lib/libpandapng.lib")
  394. if (PkgSkip("JPEG")==0): LibName("JPEG", GetThirdpartyDir() + "jpeg/lib/libpandajpeg.lib")
  395. if (PkgSkip("TIFF")==0): LibName("TIFF", GetThirdpartyDir() + "tiff/lib/libpandatiff.lib")
  396. if (PkgSkip("ZLIB")==0): LibName("ZLIB", GetThirdpartyDir() + "zlib/lib/libpandazlib1.lib")
  397. if (PkgSkip("VRPN")==0): LibName("VRPN", GetThirdpartyDir() + "vrpn/lib/vrpn.lib")
  398. if (PkgSkip("VRPN")==0): LibName("VRPN", GetThirdpartyDir() + "vrpn/lib/quat.lib")
  399. if (PkgSkip("FMODEX")==0): LibName("FMODEX", GetThirdpartyDir() + "fmodex/lib/fmodex_vc.lib")
  400. if (PkgSkip("NVIDIACG")==0): LibName("CGGL", GetThirdpartyDir() + "nvidiacg/lib/cgGL.lib")
  401. if (PkgSkip("NVIDIACG")==0): LibName("CGDX9", GetThirdpartyDir() + "nvidiacg/lib/cgD3D9.lib")
  402. if (PkgSkip("NVIDIACG")==0): LibName("NVIDIACG", GetThirdpartyDir() + "nvidiacg/lib/cg.lib")
  403. if (PkgSkip("OPENSSL")==0): LibName("OPENSSL", GetThirdpartyDir() + "openssl/lib/libpandassl.lib")
  404. if (PkgSkip("OPENSSL")==0): LibName("OPENSSL", GetThirdpartyDir() + "openssl/lib/libpandaeay.lib")
  405. if (PkgSkip("FREETYPE")==0): LibName("FREETYPE", GetThirdpartyDir() + "freetype/lib/freetype.lib")
  406. if (PkgSkip("FFTW")==0): LibName("FFTW", GetThirdpartyDir() + "fftw/lib/rfftw.lib")
  407. if (PkgSkip("FFTW")==0): LibName("FFTW", GetThirdpartyDir() + "fftw/lib/fftw.lib")
  408. if (PkgSkip("ARTOOLKIT")==0):LibName("ARTOOLKIT",GetThirdpartyDir() + "artoolkit/lib/libAR.lib")
  409. if (PkgSkip("ODE")==0): LibName("ODE", GetThirdpartyDir() + "ode/lib/ode.lib")
  410. if (PkgSkip("FCOLLADA")==0): LibName("FCOLLADA", GetThirdpartyDir() + "fcollada/lib/FCollada.lib")
  411. if (PkgSkip("SQUISH")==0): LibName("SQUISH", GetThirdpartyDir() + "squish/lib/squish.lib")
  412. if (PkgSkip("OPENCV")==0): LibName("OPENCV", GetThirdpartyDir() + "opencv/lib/cv.lib")
  413. if (PkgSkip("OPENCV")==0): LibName("OPENCV", GetThirdpartyDir() + "opencv/lib/highgui.lib")
  414. if (PkgSkip("OPENCV")==0): LibName("OPENCV", GetThirdpartyDir() + "opencv/lib/cvaux.lib")
  415. if (PkgSkip("OPENCV")==0): LibName("OPENCV", GetThirdpartyDir() + "opencv/lib/ml.lib")
  416. if (PkgSkip("OPENCV")==0): LibName("OPENCV", GetThirdpartyDir() + "opencv/lib/cxcore.lib")
  417. if (PkgSkip("AWESOMIUM")==0):LibName("AWESOMIUM", GetThirdpartyDir() + "awesomium/lib/Awesomium.lib")
  418. if (PkgSkip("FFMPEG")==0): LibName("FFMPEG", GetThirdpartyDir() + "ffmpeg/lib/avcodec.lib")
  419. if (PkgSkip("FFMPEG")==0): LibName("FFMPEG", GetThirdpartyDir() + "ffmpeg/lib/avformat.lib")
  420. if (PkgSkip("FFMPEG")==0): LibName("FFMPEG", GetThirdpartyDir() + "ffmpeg/lib/avutil.lib")
  421. if (PkgSkip("SWSCALE")==0): LibName("SWSCALE", GetThirdpartyDir() + "ffmpeg/lib/swscale.lib")
  422. if (PkgSkip("OPENAL")==0):
  423. if (os.path.exists(GetThirdpartyDir() + "openal/lib/pandaopenal32.lib")):
  424. LibName("OPENAL", GetThirdpartyDir() + "openal/lib/pandaopenal32.lib")
  425. else:
  426. LibName("OPENAL", GetThirdpartyDir() + "openal/lib/OpenAL32.lib")
  427. if (PkgSkip("WX")==0):
  428. LibName("WX", GetThirdpartyDir() + "wx/lib/wxbase28u.lib")
  429. LibName("WX", GetThirdpartyDir() + "wx/lib/wxmsw28u_core.lib")
  430. DefSymbol("WX", "__WXMSW__", "")
  431. DefSymbol("WX", "_UNICODE", "")
  432. DefSymbol("WX", "UNICODE", "")
  433. if (PkgSkip("FLTK")==0):
  434. LibName("FLTK", GetThirdpartyDir() + "fltk/lib/fltk.lib")
  435. for pkg in MAYAVERSIONS:
  436. if (PkgSkip(pkg)==0):
  437. LibName(pkg, '"' + SDK[pkg] + '/lib/Foundation.lib"')
  438. LibName(pkg, '"' + SDK[pkg] + '/lib/OpenMaya.lib"')
  439. LibName(pkg, '"' + SDK[pkg] + '/lib/OpenMayaAnim.lib"')
  440. LibName(pkg, '"' + SDK[pkg] + '/lib/OpenMayaUI.lib"')
  441. for pkg in MAXVERSIONS:
  442. if (PkgSkip(pkg)==0):
  443. LibName(pkg, SDK[pkg] + '/lib/core.lib')
  444. LibName(pkg, SDK[pkg] + '/lib/edmodel.lib')
  445. LibName(pkg, SDK[pkg] + '/lib/gfx.lib')
  446. LibName(pkg, SDK[pkg] + '/lib/geom.lib')
  447. LibName(pkg, SDK[pkg] + '/lib/mesh.lib')
  448. LibName(pkg, SDK[pkg] + '/lib/maxutil.lib')
  449. LibName(pkg, SDK[pkg] + '/lib/paramblk2.lib')
  450. if (PkgSkip("PHYSX")==0):
  451. LibName("PHYSX", SDK["PHYSX"] + "/lib/Win32/PhysXLoader.lib")
  452. LibName("PHYSX", SDK["PHYSX"] + "/lib/Win32/NxCharacter.lib")
  453. IncDirectory("PHYSX", SDK["PHYSX"] + "/Physics/include")
  454. IncDirectory("PHYSX", SDK["PHYSX"] + "/PhysXLoader/include")
  455. IncDirectory("PHYSX", SDK["PHYSX"] + "/NxCharacter/include")
  456. IncDirectory("PHYSX", SDK["PHYSX"] + "/NxExtensions/include")
  457. IncDirectory("PHYSX", SDK["PHYSX"] + "/Foundation/include")
  458. IncDirectory("PHYSX", SDK["PHYSX"] + "/Cooking/include")
  459. # We need to be able to find NxCharacter.dll when importing code library libpandaphysx
  460. AddToPathEnv("PATH", SDK["PHYSX"]+"/../Bin/win32/")
  461. if (PkgSkip("SPEEDTREE")==0):
  462. win64 = (sys.platform.startswith("win") and is_64)
  463. if win64:
  464. libdir = SDK["SPEEDTREE"] + "/Lib/Windows/VC9.x64/"
  465. p64ext = '64'
  466. else:
  467. libdir = SDK["SPEEDTREE"] + "/Lib/Windows/VC9/"
  468. p64ext = ''
  469. debugext = ''
  470. if (GetOptimize() <= 2 and sys.platform.startswith("win")): debugext = "_d"
  471. libsuffix = "_v%s_VC90MT%s_Static%s.lib" % (
  472. SDK["SPEEDTREEVERSION"], p64ext, debugext)
  473. LibName("SPEEDTREE", "%sSpeedTreeCore%s" % (libdir, libsuffix))
  474. LibName("SPEEDTREE", "%sSpeedTreeForest%s" % (libdir, libsuffix))
  475. LibName("SPEEDTREE", "%sSpeedTree%sRenderer%s" % (libdir, SDK["SPEEDTREEAPI"], libsuffix))
  476. LibName("SPEEDTREE", "%sSpeedTreeRenderInterface%s" % (libdir, libsuffix))
  477. if (SDK["SPEEDTREEAPI"] == "OpenGL"):
  478. LibName("SPEEDTREE", "%sglew32.lib" % (libdir))
  479. LibName("SPEEDTREE", "glu32.lib")
  480. IncDirectory("SPEEDTREE", SDK["SPEEDTREE"] + "/Include")
  481. if (PkgSkip("BULLET")==0):
  482. LibName("BULLET", GetThirdpartyDir() + "bullet/lib/LinearMath.lib")
  483. LibName("BULLET", GetThirdpartyDir() + "bullet/lib/BulletCollision.lib")
  484. LibName("BULLET", GetThirdpartyDir() + "bullet/lib/BulletDynamics.lib")
  485. LibName("BULLET", GetThirdpartyDir() + "bullet/lib/BulletSoftBody.lib")
  486. if (COMPILER=="LINUX"):
  487. PkgDisable("AWESOMIUM")
  488. if (PkgSkip("PYTHON")==0):
  489. IncDirectory("ALWAYS", SDK["PYTHON"])
  490. if (sys.platform == "darwin"):
  491. if (PkgSkip("FREETYPE")==0):
  492. IncDirectory("FREETYPE", "/usr/X11R6/include")
  493. IncDirectory("FREETYPE", "/usr/X11/include")
  494. IncDirectory("FREETYPE", "/usr/X11/include/freetype2")
  495. IncDirectory("GL", "/usr/X11R6/include")
  496. if (os.path.isdir("/usr/PCBSD")):
  497. IncDirectory("ALWAYS", "/usr/PCBSD/local/include")
  498. LibDirectory("ALWAYS", "/usr/PCBSD/local/lib")
  499. if (sys.platform.startswith("freebsd")):
  500. IncDirectory("ALWAYS", "/usr/local/include")
  501. LibDirectory("ALWAYS", "/usr/local/lib")
  502. # Workaround for an issue where pkg-config does not include this path
  503. if (os.path.isdir("/usr/lib64/glib-2.0/include")):
  504. IncDirectory("GTK2", "/usr/lib64/glib-2.0/include")
  505. if (os.path.isdir("/usr/lib64/gtk-2.0/include")):
  506. IncDirectory("GTK2", "/usr/lib64/gtk-2.0/include")
  507. fcollada_libs = ("FColladaD", "FColladaSD")
  508. # WARNING! The order of the ffmpeg libraries matters!
  509. ffmpeg_libs = ("libavformat", "libavcodec", "libavutil")
  510. # Name pkg-config libs, include(dir)s
  511. if (not RUNTIME):
  512. SmartPkgEnable("ARTOOLKIT", "", ("AR"), "AR/ar.h")
  513. SmartPkgEnable("FCOLLADA", "", ChooseLib(*fcollada_libs), ("FCollada", "FCollada.h"))
  514. SmartPkgEnable("FFMPEG", ffmpeg_libs, ffmpeg_libs, ffmpeg_libs)
  515. SmartPkgEnable("SWSCALE", "libswscale", "libswscale", ("libswscale", "libswscale/swscale.h"), target_pkg = "FFMPEG")
  516. SmartPkgEnable("FFTW", "", ("fftw", "rfftw"), ("fftw.h", "rfftw.h"))
  517. SmartPkgEnable("FMODEX", "", ("fmodex"), ("fmodex", "fmodex/fmod.h"))
  518. SmartPkgEnable("FREETYPE", "freetype2", ("freetype"), ("freetype2", "freetype2/freetype/freetype.h"))
  519. SmartPkgEnable("GL", "gl", ("GL"), ("GL/gl.h"), framework = "OpenGL")
  520. SmartPkgEnable("GLES", "glesv1_cm", ("GLESv1_CM"), ("GLES/gl.h"), framework = "OpenGLES")
  521. SmartPkgEnable("GLES2", "glesv2", ("GLESv2"), ("GLES2/gl2.h")) #framework = "OpenGLES"?
  522. SmartPkgEnable("EGL", "egl", ("EGL"), ("EGL/egl.h"))
  523. SmartPkgEnable("OSMESA", "osmesa", ("OSMesa"), ("GL/osmesa.h"))
  524. SmartPkgEnable("NVIDIACG", "", ("Cg"), "Cg/cg.h", framework = "Cg")
  525. SmartPkgEnable("ODE", "", ("ode"), "ode/ode.h")
  526. SmartPkgEnable("OPENAL", "openal", ("openal"), "AL/al.h", framework = "OpenAL")
  527. SmartPkgEnable("OPENCV", "opencv", ("cv", "highgui", "cvaux", "ml", "cxcore"), ("opencv", "opencv/cv.h"))
  528. SmartPkgEnable("SQUISH", "", ("squish"), "squish.h")
  529. SmartPkgEnable("TIFF", "", ("tiff"), "tiff.h")
  530. SmartPkgEnable("VRPN", "", ("vrpn", "quat"), ("vrpn", "quat.h", "vrpn/vrpn_Types.h"))
  531. SmartPkgEnable("BULLET", "bullet", ("BulletSoftBody", "BulletDynamics", "BulletCollision", "LinearMath"), ("bullet", "bullet/btBulletDynamicsCommon.h"))
  532. SmartPkgEnable("GTK2", "gtk+-2.0")
  533. SmartPkgEnable("JPEG", "", ("jpeg"), "jpeglib.h")
  534. SmartPkgEnable("OPENSSL", "openssl", ("ssl", "crypto"), ("openssl/ssl.h", "openssl/crypto.h"))
  535. SmartPkgEnable("PNG", "libpng", ("png"), "png.h")
  536. SmartPkgEnable("ZLIB", "", ("z"), "zlib.h")
  537. if (RTDIST and sys.platform == "darwin" and "PYTHONVERSION" in SDK):
  538. # Don't use the framework for the OSX rtdist build. I'm afraid it gives problems somewhere.
  539. SmartPkgEnable("PYTHON", "", SDK["PYTHONVERSION"], (SDK["PYTHONVERSION"], SDK["PYTHONVERSION"] + "/Python.h"), tool = SDK["PYTHONVERSION"] + "-config")
  540. elif("PYTHONVERSION" in SDK and not RUNTIME):
  541. SmartPkgEnable("PYTHON", "", SDK["PYTHONVERSION"], (SDK["PYTHONVERSION"], SDK["PYTHONVERSION"] + "/Python.h"), tool = SDK["PYTHONVERSION"] + "-config", framework = "Python")
  542. if (RTDIST):
  543. SmartPkgEnable("WX", tool = "wx-config")
  544. SmartPkgEnable("FLTK", "", ("fltk"), ("Fl/Fl.H"), tool = "fltk-config")
  545. if (RUNTIME):
  546. if (sys.platform.startswith("freebsd")):
  547. SmartPkgEnable("NPAPI", "mozilla-plugin", (), ("libxul/stable", "libxul/stable/npapi.h", "nspr/prtypes.h", "nspr"))
  548. else:
  549. SmartPkgEnable("NPAPI", "mozilla-plugin", (), ("xulrunner-*/stable", "xulrunner-*/stable/npapi.h", "nspr*/prtypes.h", "nspr*"))
  550. if (sys.platform != "darwin"):
  551. # CgGL is covered by the Cg framework, and we don't need X11 components on OSX
  552. if (PkgSkip("NVIDIACG")==0 and not RUNTIME):
  553. SmartPkgEnable("CGGL", "", ("CgGL"), "Cg/cgGL.h")
  554. if (not RUNTIME):
  555. SmartPkgEnable("X11", "x11", "X11", ("X11", "X11/Xlib.h"))
  556. SmartPkgEnable("XRANDR", "xrandr", "Xrandr", "X11/extensions/Xrandr.h")
  557. SmartPkgEnable("XF86DGA", "xxf86dga", "Xxf86dga", "X11/extensions/xf86dga.h")
  558. SmartPkgEnable("XCURSOR", "xcursor", "Xcursor", "X11/Xcursor/Xcursor.h")
  559. if (RUNTIME):
  560. # For the runtime, all packages are required
  561. for pkg in ["OPENSSL", "ZLIB", "NPAPI", "JPEG", "PNG"]:
  562. if (pkg in PkgListGet() and PkgSkip(pkg)==1):
  563. exit("Runtime must be compiled with OpenSSL, ZLib, NPAPI, JPEG and PNG support!")
  564. if (not RUNTIME and not LocateBinary("bison")):
  565. exit("Could not locate bison!")
  566. if (not RUNTIME and not LocateBinary("flex")):
  567. exit("Could not locate flex!")
  568. for pkg in MAYAVERSIONS:
  569. if (PkgSkip(pkg)==0 and (pkg in SDK)):
  570. if (sys.platform == "darwin"):
  571. # Sheesh, Autodesk really can't make up their mind
  572. # regarding the location of the Maya devkit on OS X.
  573. if (os.path.isdir(SDK[pkg] + "/Maya.app/Contents/lib")):
  574. LibDirectory(pkg, SDK[pkg] + "/Maya.app/Contents/lib")
  575. if (os.path.isdir(SDK[pkg] + "/Maya.app/Contents/MacOS")):
  576. LibDirectory(pkg, SDK[pkg] + "/Maya.app/Contents/MacOS")
  577. if (os.path.isdir(SDK[pkg] + "/lib")):
  578. LibDirectory(pkg, SDK[pkg] + "/lib")
  579. if (os.path.isdir(SDK[pkg] + "/Maya.app/Contents/include/maya")):
  580. IncDirectory(pkg, SDK[pkg] + "/Maya.app/Contents/include")
  581. if (os.path.isdir(SDK[pkg] + "/devkit/include/maya")):
  582. IncDirectory(pkg, SDK[pkg] + "/devkit/include")
  583. if (os.path.isdir(SDK[pkg] + "/include/maya")):
  584. IncDirectory(pkg, SDK[pkg] + "/include")
  585. else:
  586. LibDirectory(pkg, SDK[pkg] + "/lib")
  587. IncDirectory(pkg, SDK[pkg] + "/include")
  588. DefSymbol(pkg, "MAYAVERSION", pkg)
  589. if (sys.platform == "darwin"):
  590. LibName("ALWAYS", "-framework AppKit")
  591. if (PkgSkip("OPENCV")==0): LibName("OPENCV", "-framework QuickTime")
  592. LibName("AGL", "-framework AGL")
  593. LibName("CARBON", "-framework Carbon")
  594. LibName("COCOA", "-framework Cocoa")
  595. # Fix for a bug in OSX Leopard:
  596. LibName("GL", "-dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib")
  597. for pkg in MAYAVERSIONS:
  598. if (PkgSkip(pkg)==0 and (pkg in SDK)):
  599. LibName(pkg, "-Wl,-rpath," + SDK[pkg] + "/lib")
  600. if (sys.platform != "darwin"):
  601. LibName(pkg, "-lOpenMayalib")
  602. LibName(pkg, "-lOpenMaya")
  603. LibName(pkg, "-lOpenMayaAnim")
  604. LibName(pkg, "-lAnimSlice")
  605. LibName(pkg, "-lDeformSlice")
  606. LibName(pkg, "-lModifiers")
  607. LibName(pkg, "-lDynSlice")
  608. LibName(pkg, "-lKinSlice")
  609. LibName(pkg, "-lModelSlice")
  610. LibName(pkg, "-lNurbsSlice")
  611. LibName(pkg, "-lPolySlice")
  612. LibName(pkg, "-lProjectSlice")
  613. LibName(pkg, "-lImage")
  614. LibName(pkg, "-lShared")
  615. LibName(pkg, "-lTranslators")
  616. LibName(pkg, "-lDataModel")
  617. LibName(pkg, "-lRenderModel")
  618. LibName(pkg, "-lNurbsEngine")
  619. LibName(pkg, "-lDependEngine")
  620. LibName(pkg, "-lCommandEngine")
  621. LibName(pkg, "-lFoundation")
  622. LibName(pkg, "-lIMFbase")
  623. if (sys.platform == "darwin"):
  624. LibName(pkg, "-dylib_file /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib")
  625. if (PkgSkip("PHYSX")==0):
  626. IncDirectory("PHYSX", SDK["PHYSX"] + "/Physics/include")
  627. IncDirectory("PHYSX", SDK["PHYSX"] + "/PhysXLoader/include")
  628. IncDirectory("PHYSX", SDK["PHYSX"] + "/NxCharacter/include")
  629. IncDirectory("PHYSX", SDK["PHYSX"] + "/NxExtensions/include")
  630. IncDirectory("PHYSX", SDK["PHYSX"] + "/Foundation/include")
  631. IncDirectory("PHYSX", SDK["PHYSX"] + "/Cooking/include")
  632. LibDirectory("PHYSX", SDK["PHYSXLIBS"])
  633. if (sys.platform == "darwin"):
  634. LibName("PHYSX", SDK["PHYSXLIBS"] + "/osxstatic/PhysXCooking.a")
  635. LibName("PHYSX", SDK["PHYSXLIBS"] + "/osxstatic/PhysXCore.a")
  636. else:
  637. LibName("PHYSX", "-lPhysXLoader")
  638. LibName("PHYSX", "-lNxCharacter")
  639. DefSymbol("ALWAYS", "MAKEPANDA", "")
  640. DefSymbol("WITHINPANDA", "WITHIN_PANDA", "1")
  641. IncDirectory("ALWAYS", GetOutputDir()+"/tmp")
  642. IncDirectory("ALWAYS", GetOutputDir()+"/include")
  643. if GetLinkAllStatic():
  644. DefSymbol("ALWAYS", "LINK_ALL_STATIC", "")
  645. ########################################################################
  646. ##
  647. ## Give a Status Report on Command-Line Options
  648. ##
  649. ########################################################################
  650. def printStatus(header,warnings):
  651. if GetVerbose():
  652. print ""
  653. print "-------------------------------------------------------------------"
  654. print header
  655. tkeep = ""
  656. tomit = ""
  657. for x in PkgListGet():
  658. if (PkgSkip(x)==0): tkeep = tkeep + x + " "
  659. else: tomit = tomit + x + " "
  660. if RTDIST: print "Makepanda: Runtime distribution build"
  661. elif RUNTIME: print "Makepanda: Runtime build"
  662. else: print "Makepanda: Regular build"
  663. print "Makepanda: Compiler:",COMPILER
  664. print "Makepanda: Optimize:",GetOptimize()
  665. print "Makepanda: Keep Pkg:",tkeep
  666. print "Makepanda: Omit Pkg:",tomit
  667. if (GENMAN): print "Makepanda: Generate API reference manual"
  668. else : print "Makepanda: Don't generate API reference manual"
  669. if (sys.platform == "win32" and not RTDIST):
  670. if INSTALLER: print "Makepanda: Build installer, using",COMPRESSOR
  671. else : print "Makepanda: Don't build installer"
  672. print "Makepanda: Version ID: "+VERSION
  673. for x in warnings: print "Makepanda: "+x
  674. print "-------------------------------------------------------------------"
  675. print ""
  676. sys.stdout.flush()
  677. ########################################################################
  678. ##
  679. ## BracketNameWithQuotes
  680. ##
  681. ########################################################################
  682. def BracketNameWithQuotes(name):
  683. # Workaround for OSX bug - compiler doesn't like those flags quoted.
  684. if (name.startswith("-framework")): return name
  685. if (name.startswith("-dylib_file")): return name
  686. # Don't add quotes when it's not necessary.
  687. if " " not in name: return name
  688. # Account for quoted name (leave as is) but quote everything else (e.g., to protect spaces within paths from improper parsing)
  689. if (name.startswith('"') and name.endswith('"')): return name
  690. else: return '"' + name + '"'
  691. ########################################################################
  692. ##
  693. ## CompileCxx
  694. ##
  695. ########################################################################
  696. def CompileCxx(obj,src,opts):
  697. ipath = GetListOption(opts, "DIR:")
  698. if (COMPILER=="MSVC"):
  699. cmd = "cl "
  700. if (is_64):
  701. cmd += "/favor:blend "
  702. cmd += "/wd4996 /wd4275 /wd4267 /wd4101 /wd4273 "
  703. # Enables Windows 7 mode if SDK is detected.
  704. # But only if it is Windows 7 (0x601) and not e. g. Vista (0x600)
  705. platsdk = GetRegistryKey("SOFTWARE\\Microsoft\\Microsoft SDKs\\Windows\\v7.0", "InstallationFolder")
  706. winver = sys.getwindowsversion()
  707. if platsdk and os.path.isdir(platsdk) and winver[0] >= 6 and winver[1] >= 1:
  708. cmd += "/DPANDA_WIN7 /DWINVER=0x601 "
  709. cmd += "/Fo" + obj + " /nologo /c"
  710. for x in ipath: cmd += " /I" + x
  711. for (opt,dir) in INCDIRECTORIES:
  712. if (opt=="ALWAYS") or (opt in opts): cmd += " /I" + BracketNameWithQuotes(dir)
  713. for (opt,var,val) in DEFSYMBOLS:
  714. if (opt=="ALWAYS") or (opt in opts): cmd += " /D" + var + "=" + val
  715. if (opts.count('NOFLOATWARN')): cmd += ' /wd4244 /wd4305'
  716. if (opts.count('MSFORSCOPE')): cmd += ' /Zc:forScope-'
  717. optlevel = GetOptimizeOption(opts)
  718. if (optlevel==1): cmd += " /MDd /Zi /RTCs /GS"
  719. if (optlevel==2): cmd += " /MDd /Zi"
  720. if (optlevel==3): cmd += " /MD /Zi /O2 /Ob2 /DFORCE_INLINING"
  721. if (optlevel==4): cmd += " /MD /Zi /Ox /Ob2 /DFORCE_INLINING /DNDEBUG /GL"
  722. cmd += " /Fd" + os.path.splitext(obj)[0] + ".pdb"
  723. building = GetValueOption(opts, "BUILDING:")
  724. if (building): cmd += " /DBUILDING_" + building
  725. if ("BIGOBJ" in opts) or (is_64):
  726. cmd += " /bigobj"
  727. cmd += " /EHa /Zm300 /DWIN32_VC /DWIN32 /W3 " + BracketNameWithQuotes(src)
  728. oscmd(cmd)
  729. if (COMPILER=="LINUX"):
  730. cc = os.environ.get('CC', 'gcc')
  731. cxx = os.environ.get('CXX', 'g++')
  732. if (src.endswith(".c")): cmd = cc +' -fPIC -c -o ' + obj
  733. else: cmd = cxx+' -ftemplate-depth-30 -fPIC -c -o ' + obj
  734. for (opt, dir) in INCDIRECTORIES:
  735. if (opt=="ALWAYS") or (opt in opts): cmd += ' -I' + BracketNameWithQuotes(dir)
  736. for (opt,var,val) in DEFSYMBOLS:
  737. if (opt=="ALWAYS") or (opt in opts): cmd += ' -D' + var + '=' + val
  738. for x in ipath: cmd += ' -I' + x
  739. if (sys.platform == "darwin"):
  740. cmd += " -Wno-deprecated-declarations"
  741. if (OSXTARGET != None):
  742. cmd += " -isysroot " + SDK["MACOSX"]
  743. cmd += " -mmacosx-version-min=" + OSXTARGET
  744. if is_64:
  745. cmd += " -arch x86_64"
  746. else:
  747. cmd += " -arch i386"
  748. if ("NOPPC" not in opts): cmd += " -arch ppc"
  749. cmd += " -pthread"
  750. optlevel = GetOptimizeOption(opts)
  751. if (optlevel==1): cmd += " -ggdb -D_DEBUG"
  752. if (optlevel==2): cmd += " -O1 -D_DEBUG"
  753. if (optlevel==3): cmd += " -O2"
  754. if (optlevel==4): cmd += " -O3 -DNDEBUG"
  755. if (CFLAGS !=""): cmd += " " + CFLAGS
  756. building = GetValueOption(opts, "BUILDING:")
  757. if (building): cmd += " -DBUILDING_" + building
  758. cmd += ' ' + BracketNameWithQuotes(src)
  759. oscmd(cmd)
  760. ########################################################################
  761. ##
  762. ## CompileBison
  763. ##
  764. ########################################################################
  765. def CompileBison(wobj, wsrc, opts):
  766. ifile = os.path.basename(wsrc)
  767. wdsth = GetOutputDir()+"/include/" + ifile[:-4] + ".h"
  768. wdstc = GetOutputDir()+"/tmp/" + ifile + ".cxx"
  769. pre = GetValueOption(opts, "BISONPREFIX_")
  770. if (COMPILER == "MSVC"):
  771. oscmd(GetThirdpartyBase()+'/win-util/bison -y -d -o'+GetOutputDir()+'/tmp/'+ifile+'.c -p '+pre+' '+wsrc)
  772. CopyFile(wdstc, GetOutputDir()+"/tmp/"+ifile+".c")
  773. CopyFile(wdsth, GetOutputDir()+"/tmp/"+ifile+".h")
  774. if (COMPILER == "LINUX"):
  775. oscmd("bison -y -d -o"+GetOutputDir()+"/tmp/"+ifile+".c -p "+pre+" "+wsrc)
  776. CopyFile(wdstc, GetOutputDir()+"/tmp/"+ifile+".c")
  777. CopyFile(wdsth, GetOutputDir()+"/tmp/"+ifile+".h")
  778. CompileCxx(wobj,wdstc,opts)
  779. ########################################################################
  780. ##
  781. ## CompileFlex
  782. ##
  783. ########################################################################
  784. def CompileFlex(wobj,wsrc,opts):
  785. ifile = os.path.basename(wsrc)
  786. wdst = GetOutputDir()+"/tmp/"+ifile+".cxx"
  787. pre = GetValueOption(opts, "BISONPREFIX_")
  788. dashi = opts.count("FLEXDASHI")
  789. if (COMPILER == "MSVC"):
  790. if (dashi): oscmd(GetThirdpartyBase()+"/win-util/flex -i -P" + pre + " -o"+wdst+" "+wsrc)
  791. else: oscmd(GetThirdpartyBase()+"/win-util/flex -P" + pre + " -o"+wdst+" "+wsrc)
  792. if (COMPILER == "LINUX"):
  793. if (dashi): oscmd("flex -i -P" + pre + " -o"+wdst+" "+wsrc)
  794. else: oscmd("flex -P" + pre + " -o"+wdst+" "+wsrc)
  795. CompileCxx(wobj,wdst,opts)
  796. ########################################################################
  797. ##
  798. ## CompileIgate
  799. ##
  800. ########################################################################
  801. def CompileIgate(woutd,wsrc,opts):
  802. outbase = os.path.basename(woutd)[:-3]
  803. woutc = GetOutputDir()+"/tmp/"+outbase+"_igate.cxx"
  804. wobj = FindLocation(outbase + "_igate.obj", [])
  805. srcdir = GetValueOption(opts, "SRCDIR:")
  806. module = GetValueOption(opts, "IMOD:")
  807. library = GetValueOption(opts, "ILIB:")
  808. ipath = GetListOption(opts, "DIR:")
  809. if (PkgSkip("PYTHON")):
  810. WriteFile(woutc,"")
  811. WriteFile(woutd,"")
  812. CompileCxx(wobj,woutc,opts)
  813. ConditionalWriteFile(woutd,"")
  814. return
  815. cmd = GetOutputDir()+"/bin/interrogate -srcdir "+srcdir+" -I"+srcdir
  816. cmd += ' -Dvolatile -Dmutable'
  817. if (COMPILER=="MSVC"):
  818. cmd += ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__inline -longlong __int64 -D_X86_ -DWIN32_VC -D_WIN32'
  819. #NOTE: this 1500 value is the version number for VC2008.
  820. cmd += ' -D_MSC_VER=1500 -D"_declspec(param)=" -D_near -D_far -D__near -D__far -D__stdcall'
  821. if (COMPILER=="LINUX") and (is_64):
  822. cmd += ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__inline -D__const=const -D_LP64'
  823. if (COMPILER=="LINUX") and (not is_64):
  824. cmd += ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__inline -D__const=const -D__i386__'
  825. optlevel=GetOptimizeOption(opts)
  826. if (optlevel==1): cmd += ' -D_DEBUG'
  827. if (optlevel==2): cmd += ' -D_DEBUG'
  828. if (optlevel==3): pass
  829. if (optlevel==4): cmd += ' -DNDEBUG'
  830. cmd += ' -oc ' + woutc + ' -od ' + woutd
  831. cmd += ' -fnames -string -refcount -assert -python-native'
  832. cmd += ' -S' + GetOutputDir() + '/include/parser-inc'
  833. for x in ipath: cmd += ' -I' + BracketNameWithQuotes(x)
  834. for (opt,dir) in INCDIRECTORIES:
  835. if (opt=="ALWAYS") or (opt in opts): cmd += ' -S' + BracketNameWithQuotes(dir)
  836. for (opt,var,val) in DEFSYMBOLS:
  837. if (opt=="ALWAYS") or (opt in opts): cmd += ' -D' + var + '=' + val
  838. building = GetValueOption(opts, "BUILDING:")
  839. if (building): cmd += " -DBUILDING_"+building
  840. cmd += ' -module ' + module + ' -library ' + library
  841. for x in wsrc:
  842. if (x.startswith("/")):
  843. cmd += ' ' + BracketNameWithQuotes(x)
  844. else:
  845. cmd += ' ' + BracketNameWithQuotes(os.path.basename(x))
  846. oscmd(cmd)
  847. CompileCxx(wobj,woutc,opts)
  848. return
  849. ########################################################################
  850. ##
  851. ## CompileImod
  852. ##
  853. ########################################################################
  854. def CompileImod(wobj, wsrc, opts):
  855. module = GetValueOption(opts, "IMOD:")
  856. library = GetValueOption(opts, "ILIB:")
  857. if (COMPILER=="MSVC"):
  858. woutc = wobj[:-4]+".cxx"
  859. if (COMPILER=="LINUX"):
  860. woutc = wobj[:-2]+".cxx"
  861. if (PkgSkip("PYTHON")):
  862. WriteFile(woutc,"")
  863. CompileCxx(wobj,woutc,opts)
  864. return
  865. cmd = GetOutputDir() + '/bin/interrogate_module '
  866. cmd += ' -oc ' + woutc + ' -module ' + module + ' -library ' + library + ' -python-native '
  867. for x in wsrc: cmd += ' ' + BracketNameWithQuotes(x)
  868. oscmd(cmd)
  869. CompileCxx(wobj,woutc,opts)
  870. return
  871. ########################################################################
  872. ##
  873. ## CompileLib
  874. ##
  875. ########################################################################
  876. def CompileLib(lib, obj, opts):
  877. if (COMPILER=="MSVC"):
  878. cmd = 'link /lib /nologo '
  879. if (is_64):
  880. cmd += "/MACHINE:X64 "
  881. cmd += '/OUT:' + BracketNameWithQuotes(lib)
  882. for x in obj: cmd += ' ' + BracketNameWithQuotes(x)
  883. oscmd(cmd)
  884. if (COMPILER=="LINUX"):
  885. if sys.platform == 'darwin':
  886. cmd = 'libtool -static -o ' + BracketNameWithQuotes(lib)
  887. else:
  888. cmd = 'ar cru ' + BracketNameWithQuotes(lib)
  889. for x in obj: cmd=cmd + ' ' + BracketNameWithQuotes(x)
  890. oscmd(cmd)
  891. oscmd("ranlib " + BracketNameWithQuotes(lib))
  892. ########################################################################
  893. ##
  894. ## CompileLink
  895. ##
  896. ########################################################################
  897. def CompileLink(dll, obj, opts):
  898. if (COMPILER=="MSVC"):
  899. cmd = "link /nologo"
  900. if (is_64):
  901. cmd += " /MACHINE:X64"
  902. if ("MFC" not in opts):
  903. cmd += " /NOD:MFC90.LIB /NOD:MFC80.LIB /NOD:LIBCMT"
  904. cmd += " /NOD:LIBCI.LIB /DEBUG"
  905. cmd += " /nod:libc /nod:libcmtd /nod:atlthunk /nod:atls"
  906. if (GetOrigExt(dll) != ".exe"): cmd += " /DLL"
  907. optlevel = GetOptimizeOption(opts)
  908. if (optlevel==1): cmd += " /MAP /MAPINFO:EXPORTS /NOD:MSVCRT.LIB /NOD:MSVCPRT.LIB /NOD:MSVCIRT.LIB"
  909. if (optlevel==2): cmd += " /MAP:NUL /NOD:MSVCRT.LIB /NOD:MSVCPRT.LIB /NOD:MSVCIRT.LIB"
  910. if (optlevel==3): cmd += " /MAP:NUL /NOD:MSVCRTD.LIB /NOD:MSVCPRTD.LIB /NOD:MSVCIRTD.LIB"
  911. if (optlevel==4): cmd += " /MAP:NUL /LTCG /NOD:MSVCRTD.LIB /NOD:MSVCPRTD.LIB /NOD:MSVCIRTD.LIB"
  912. if ("MFC" in opts):
  913. if (optlevel<=2): cmd += " /NOD:MSVCRTD.LIB mfcs90d.lib MSVCRTD.lib"
  914. else: cmd += " /NOD:MSVCRT.LIB mfcs90.lib MSVCRT.lib"
  915. cmd += " /FIXED:NO /OPT:REF /STACK:4194304 /INCREMENTAL:NO "
  916. cmd += ' /OUT:' + BracketNameWithQuotes(dll)
  917. subsystem = GetValueOption(opts, "SUBSYSTEM:")
  918. if (subsystem): cmd += " /SUBSYSTEM:" + subsystem
  919. if (dll.endswith(".dll")):
  920. cmd += ' /IMPLIB:' + GetOutputDir() + '/lib/'+os.path.splitext(os.path.basename(dll))[0]+".lib"
  921. for (opt, dir) in LIBDIRECTORIES:
  922. if (opt=="ALWAYS") or (opt in opts): cmd += ' /LIBPATH:' + BracketNameWithQuotes(dir)
  923. for x in obj:
  924. if (x.endswith(".dll")):
  925. cmd += ' ' + GetOutputDir() + '/lib/' + os.path.splitext(os.path.basename(x))[0] + ".lib"
  926. elif (x.endswith(".lib")):
  927. dname = os.path.splitext(dll)[0]+".dll"
  928. if (GetOrigExt(x) != ".ilb" and os.path.exists(GetOutputDir()+"/bin/" + os.path.splitext(os.path.basename(x))[0] + ".dll")):
  929. exit("Error: in makepanda, specify "+dname+", not "+x)
  930. cmd += ' ' + BracketNameWithQuotes(x)
  931. elif (x.endswith(".def")):
  932. cmd += ' /DEF:' + BracketNameWithQuotes(x)
  933. elif (x.endswith(".dat")):
  934. pass
  935. else: cmd += ' ' + BracketNameWithQuotes(x)
  936. if (GetOrigExt(dll)==".exe" and "NOICON" not in opts):
  937. cmd += " " + GetOutputDir() + "/tmp/pandaIcon.res"
  938. for (opt, name) in LIBNAMES:
  939. if (opt=="ALWAYS") or (opt in opts): cmd += " " + BracketNameWithQuotes(name)
  940. oscmd(cmd)
  941. SetVC90CRTVersion(dll+".manifest")
  942. mtcmd = "mt -manifest " + dll + ".manifest -outputresource:" + dll
  943. if (dll.endswith(".exe")==0): mtcmd = mtcmd + ";2"
  944. else: mtcmd = mtcmd + ";1"
  945. oscmd(mtcmd)
  946. if (COMPILER=="LINUX"):
  947. cxx = os.environ.get('CXX', 'g++')
  948. if (GetOrigExt(dll)==".exe"): cmd = cxx + ' -o ' + dll + ' -L' + GetOutputDir() + '/lib -L' + GetOutputDir() + '/tmp -L/usr/X11R6/lib'
  949. else:
  950. if (sys.platform == "darwin"):
  951. cmd = cxx + ' -undefined dynamic_lookup'
  952. if ("BUNDLE" in opts): cmd += ' -bundle '
  953. else:
  954. cmd += ' -dynamiclib -install_name ' + os.path.basename(dll)
  955. cmd += ' -compatibility_version ' + MAJOR_VERSION + ' -current_version ' + VERSION
  956. cmd += ' -o ' + dll + ' -L' + GetOutputDir() + '/lib -L' + GetOutputDir() + '/tmp -L/usr/X11R6/lib'
  957. else:
  958. cmd = cxx + ' -shared'
  959. if ("MODULE" not in opts): cmd += " -Wl,-soname=" + os.path.basename(dll)
  960. cmd += ' -o ' + dll + ' -L' + GetOutputDir() + '/lib -L' + GetOutputDir() + '/tmp -L/usr/X11R6/lib'
  961. for x in obj:
  962. if (GetOrigExt(x) != ".dat"):
  963. base = os.path.basename(x)
  964. if (base[-3:]==".so") and (base[:3]=="lib"):
  965. cmd += ' -l' + base[3:-3]
  966. elif (base[-2:]==".a") and (base[:3]=="lib"):
  967. cmd += ' -l' + base[3:-2]
  968. else:
  969. cmd += ' ' + x
  970. if (sys.platform == "darwin"):
  971. cmd += " -headerpad_max_install_names"
  972. if (OSXTARGET != None):
  973. cmd += " -isysroot " + SDK["MACOSX"] + " -Wl,-syslibroot," + SDK["MACOSX"]
  974. cmd += " -mmacosx-version-min=" + OSXTARGET
  975. if is_64:
  976. cmd += " -arch x86_64"
  977. else:
  978. cmd += " -arch i386"
  979. if ("NOPPC" not in opts): cmd += " -arch ppc"
  980. if (LDFLAGS !=""): cmd += " " + LDFLAGS
  981. for (opt, dir) in LIBDIRECTORIES:
  982. if (opt=="ALWAYS") or (opt in opts): cmd += ' -L' + BracketNameWithQuotes(dir)
  983. for (opt, name) in LIBNAMES:
  984. if (opt=="ALWAYS") or (opt in opts): cmd += ' ' + BracketNameWithQuotes(name)
  985. cmd += " -pthread"
  986. if (not sys.platform.startswith("freebsd")):
  987. cmd += " -ldl"
  988. oscmd(cmd)
  989. if (GetOrigExt(dll)==".exe" and GetOptimizeOption(opts)==4 and "NOSTRIP" not in opts):
  990. oscmd("strip " + BracketNameWithQuotes(dll))
  991. os.system("chmod +x " + BracketNameWithQuotes(dll))
  992. if dll.endswith("." + MAJOR_VERSION + ".dylib"):
  993. newdll = dll[:-6-len(MAJOR_VERSION)] + "dylib"
  994. if (os.path.isfile(newdll)):
  995. os.remove(newdll)
  996. oscmd("ln -s " + BracketNameWithQuotes(os.path.basename(dll)) + " " + BracketNameWithQuotes(newdll))
  997. elif dll.endswith("." + MAJOR_VERSION):
  998. newdll = dll[:-len(MAJOR_VERSION)-1]
  999. if (os.path.isfile(newdll)):
  1000. os.remove(newdll)
  1001. oscmd("ln -s " + BracketNameWithQuotes(os.path.basename(dll)) + " " + BracketNameWithQuotes(newdll))
  1002. ##########################################################################################
  1003. #
  1004. # CompileEgg
  1005. #
  1006. ##########################################################################################
  1007. def CompileEgg(eggfile, src, opts):
  1008. pz = False
  1009. if (eggfile.endswith(".pz")):
  1010. pz = True
  1011. eggfile = eggfile[:-3]
  1012. if (src.endswith(".egg")):
  1013. CopyFile(eggfile, src)
  1014. elif (src.endswith(".flt")):
  1015. oscmd(GetOutputDir()+"/bin/flt2egg -ps keep -o " + BracketNameWithQuotes(eggfile) + " " + BracketNameWithQuotes(src))
  1016. if pz:
  1017. oscmd(GetOutputDir()+"/bin/pzip " + BracketNameWithQuotes(eggfile))
  1018. ##########################################################################################
  1019. #
  1020. # CompileResource
  1021. #
  1022. ##########################################################################################
  1023. def CompileResource(target, src, opts):
  1024. ipath = GetListOption(opts, "DIR:")
  1025. if (COMPILER=="MSVC"):
  1026. cmd = "rc"
  1027. cmd += " /Fo" + BracketNameWithQuotes(target)
  1028. for x in ipath: cmd += " /I" + x
  1029. for (opt,dir) in INCDIRECTORIES:
  1030. if (opt=="ALWAYS") or (opt in opts): cmd += " /I" + BracketNameWithQuotes(dir)
  1031. for (opt,var,val) in DEFSYMBOLS:
  1032. if (opt=="ALWAYS") or (opt in opts): cmd += " /D" + var + "=" + val
  1033. cmd += " " + BracketNameWithQuotes(src)
  1034. oscmd(cmd)
  1035. elif (sys.platform == "darwin"):
  1036. cmd = "/Developer/Tools/Rez -useDF"
  1037. cmd += " -o " + BracketNameWithQuotes(target)
  1038. for x in ipath: cmd += " -i " + x
  1039. for (opt,dir) in INCDIRECTORIES:
  1040. if (opt=="ALWAYS") or (opt in opts): cmd += " -i " + BracketNameWithQuotes(dir)
  1041. for (opt,var,val) in DEFSYMBOLS:
  1042. if (opt=="ALWAYS") or (opt in opts):
  1043. if (val == ""):
  1044. cmd += " -d " + var
  1045. else:
  1046. cmd += " -d " + var + " = " + val
  1047. cmd += " " + BracketNameWithQuotes(src)
  1048. oscmd(cmd)
  1049. ##########################################################################################
  1050. #
  1051. # RunGenPyCode
  1052. #
  1053. ##########################################################################################
  1054. def RunGenPyCode(target, inputs, opts):
  1055. if (PkgSkip("PYTHON") != 0): return
  1056. cmdstr = SDK["PYTHONEXEC"] + " " + os.path.join("direct", "src", "ffi", "jGenPyCode.py")
  1057. if (GENMAN): cmdstr += " -d"
  1058. cmdstr += " -r"
  1059. for i in inputs:
  1060. if (GetOrigExt(i)==".dll"):
  1061. cmdstr += " " + os.path.basename(os.path.splitext(i)[0].replace("_d","").replace(GetOutputDir()+"/lib/",""))
  1062. oscmd(cmdstr)
  1063. ##########################################################################################
  1064. #
  1065. # FreezePy
  1066. #
  1067. ##########################################################################################
  1068. def FreezePy(target, inputs, opts):
  1069. assert len(inputs) > 0
  1070. # Make sure this function isn't called before genpycode is run.
  1071. cmdstr = SDK["PYTHONEXEC"] + " " + os.path.join("direct", "src", "showutil", "pfreeze.py")
  1072. src = inputs.pop(0)
  1073. for i in inputs:
  1074. cmdstr += " -i " + os.path.splitext(i)[0]
  1075. cmdstr += " -o " + target + " " + src
  1076. if ("LINK_PYTHON_STATIC" in opts):
  1077. os.environ["LINK_PYTHON_STATIC"] = "1"
  1078. oscmd(cmdstr)
  1079. if ("LINK_PYTHON_STATIC" in os.environ):
  1080. del os.environ["LINK_PYTHON_STATIC"]
  1081. if (not os.path.exists(target)):
  1082. exit("")
  1083. ##########################################################################################
  1084. #
  1085. # Package
  1086. #
  1087. ##########################################################################################
  1088. def Package(target, inputs, opts):
  1089. assert len(inputs) == 1
  1090. # Invoke the ppackage script.
  1091. command = SDK["PYTHONEXEC"]
  1092. if (GetOptimizeOption(opts) >= 4):
  1093. command += " -OO"
  1094. command += " direct/src/p3d/ppackage.py -u"
  1095. if (sys.platform == "darwin" and "MACOSX" in SDK and SDK["MACOSX"] != None and len(SDK["MACOSX"]) > 1):
  1096. command += " -R \"%s\"" % SDK["MACOSX"]
  1097. command += " -i \"" + GetOutputDir() + "/stage\""
  1098. if (P3DSUFFIX):
  1099. command += ' -a "' + P3DSUFFIX + '"'
  1100. command += " " + inputs[0]
  1101. oscmd(command)
  1102. ##########################################################################################
  1103. #
  1104. # CompileBundle
  1105. #
  1106. ##########################################################################################
  1107. def CompileBundle(target, inputs, opts):
  1108. if (sys.platform != "darwin"): return
  1109. plist = None
  1110. resources = []
  1111. objects = []
  1112. for i in inputs:
  1113. if (i.endswith(".plist")):
  1114. if (plist != None): exit("Only one plist file can be used when creating a bundle!")
  1115. plist = i
  1116. elif (i.endswith(".rsrc") or i.endswith(".icns")):
  1117. resources.append(i)
  1118. elif (GetOrigExt(i) == ".obj" or GetOrigExt(i) in SUFFIX_LIB or GetOrigExt(i) in SUFFIX_DLL):
  1119. objects.append(i)
  1120. else:
  1121. exit("Don't know how to bundle file %s" % i)
  1122. # Now link the object files to form the bundle.
  1123. if (plist == None): exit("One plist file must be used when creating a bundle!")
  1124. bundleName = plistlib.readPlist(plist)["CFBundleExecutable"]
  1125. oscmd("rm -rf %s" % target)
  1126. oscmd("mkdir -p %s/Contents/MacOS/" % target)
  1127. oscmd("mkdir -p %s/Contents/Resources/" % target)
  1128. if target.endswith(".app"):
  1129. SetOrigExt("%s/Contents/MacOS/%s" % (target, bundleName), ".exe")
  1130. else:
  1131. SetOrigExt("%s/Contents/MacOS/%s" % (target, bundleName), ".dll")
  1132. CompileLink("%s/Contents/MacOS/%s" % (target, bundleName), objects, opts + ["BUNDLE"])
  1133. oscmd("cp %s %s/Contents/Info.plist" % (plist, target))
  1134. for r in resources:
  1135. oscmd("cp %s %s/Contents/Resources/" % (r, target))
  1136. ##########################################################################################
  1137. #
  1138. # CompileMIDL
  1139. #
  1140. ##########################################################################################
  1141. def CompileMIDL(target, src, opts):
  1142. ipath = GetListOption(opts, "DIR:")
  1143. if (COMPILER=="MSVC"):
  1144. cmd = "midl"
  1145. cmd += " /out" + BracketNameWithQuotes(os.path.dirname(target))
  1146. for x in ipath: cmd += " /I" + x
  1147. for (opt,dir) in INCDIRECTORIES:
  1148. if (opt=="ALWAYS") or (opt in opts): cmd += " /I" + BracketNameWithQuotes(dir)
  1149. for (opt,var,val) in DEFSYMBOLS:
  1150. if (opt=="ALWAYS") or (opt in opts): cmd += " /D" + var + "=" + val
  1151. cmd += " " + BracketNameWithQuotes(src)
  1152. oscmd(cmd)
  1153. ##########################################################################################
  1154. #
  1155. # CompileAnything
  1156. #
  1157. ##########################################################################################
  1158. def CompileAnything(target, inputs, opts, progress = None):
  1159. if (opts.count("DEPENDENCYONLY")):
  1160. return
  1161. if (len(inputs)==0):
  1162. exit("No input files for target "+target)
  1163. infile = inputs[0]
  1164. origsuffix = GetOrigExt(target)
  1165. if (len(inputs) == 1 and origsuffix == GetOrigExt(infile)):
  1166. # It must be a simple copy operation.
  1167. ProgressOutput(progress, "Copying file", target)
  1168. CopyFile(target, infile)
  1169. if (origsuffix==".exe" and not sys.platform.startswith("win")):
  1170. os.system("chmod +x \"%s\"" % target)
  1171. return
  1172. elif (target == "pandac/PandaModules.py"):
  1173. ProgressOutput(progress, "Generating 'pandac' tree")
  1174. return RunGenPyCode(target, inputs, opts)
  1175. elif (infile.endswith(".py")):
  1176. if (origsuffix==".exe"):
  1177. ProgressOutput(progress, "Building frozen executable", target)
  1178. else:
  1179. ProgressOutput(progress, "Building frozen library", target)
  1180. return FreezePy(target, inputs, opts)
  1181. elif (infile.endswith(".idl")):
  1182. ProgressOutput(progress, "Compiling MIDL file", infile)
  1183. return CompileMIDL(target, infile, opts)
  1184. elif (infile.endswith(".pdef")):
  1185. ProgressOutput(progress, "Building package from pdef file", infile)
  1186. return Package(target, inputs, opts)
  1187. elif origsuffix in SUFFIX_LIB:
  1188. ProgressOutput(progress, "Linking static library", target)
  1189. return CompileLib(target, inputs, opts)
  1190. elif origsuffix in SUFFIX_DLL or (origsuffix==".plugin" and sys.platform != "darwin"):
  1191. if (origsuffix==".exe"):
  1192. ProgressOutput(progress, "Linking executable", target)
  1193. else:
  1194. ProgressOutput(progress, "Linking dynamic library", target)
  1195. # Add version number to the dynamic library, on unix
  1196. if (origsuffix==".dll" and "MODULE" not in opts and not sys.platform.startswith("win") and not RTDIST):
  1197. if (sys.platform == "darwin"):
  1198. if (target.lower().endswith(".dylib")):
  1199. target = target[:-5] + MAJOR_VERSION + ".dylib"
  1200. SetOrigExt(target, origsuffix)
  1201. else:
  1202. target = target + "." + MAJOR_VERSION
  1203. SetOrigExt(target, origsuffix)
  1204. return CompileLink(target, inputs, opts)
  1205. elif (origsuffix==".in"):
  1206. ProgressOutput(progress, "Building Interrogate database", target)
  1207. return CompileIgate(target, inputs, opts)
  1208. elif (origsuffix==".plugin" and sys.platform == "darwin"):
  1209. ProgressOutput(progress, "Building plugin bundle", target)
  1210. return CompileBundle(target, inputs, opts)
  1211. elif (origsuffix==".app"):
  1212. ProgressOutput(progress, "Building application bundle", target)
  1213. return CompileBundle(target, inputs, opts)
  1214. elif (origsuffix==".pz"):
  1215. ProgressOutput(progress, "Compressing", target)
  1216. return CompileEgg(target, infile, opts)
  1217. elif (origsuffix==".egg"):
  1218. ProgressOutput(progress, "Converting", target)
  1219. return CompileEgg(target, infile, opts)
  1220. elif (origsuffix in [".res", ".rsrc"]):
  1221. ProgressOutput(progress, "Building resource object", target)
  1222. return CompileResource(target, infile, opts)
  1223. elif (origsuffix==".obj"):
  1224. if (infile.endswith(".cxx")):
  1225. ProgressOutput(progress, "Building C++ object", target)
  1226. return CompileCxx(target, infile, opts)
  1227. elif (infile.endswith(".c")):
  1228. ProgressOutput(progress, "Building C object", target)
  1229. return CompileCxx(target, infile, opts)
  1230. elif (infile.endswith(".mm")):
  1231. ProgressOutput(progress, "Building Objective-C++ object", target)
  1232. return CompileCxx(target, infile, opts)
  1233. elif (infile.endswith(".yxx")):
  1234. ProgressOutput(progress, "Building Bison object", target)
  1235. return CompileBison(target, infile, opts)
  1236. elif (infile.endswith(".lxx")):
  1237. ProgressOutput(progress, "Building Flex object", target)
  1238. return CompileFlex(target, infile, opts)
  1239. elif (infile.endswith(".in")):
  1240. ProgressOutput(progress, "Building Interrogate object", target)
  1241. return CompileImod(target, inputs, opts)
  1242. elif (infile.endswith(".rc") or infile.endswith(".r")):
  1243. ProgressOutput(progress, "Building resource object", target)
  1244. return CompileResource(target, infile, opts)
  1245. exit("Don't know how to compile: %s from %s" % (target, inputs))
  1246. ##########################################################################################
  1247. #
  1248. # Generate dtool_config.h, prc_parameters.h, and dtool_have_xxx.dat
  1249. #
  1250. ##########################################################################################
  1251. DTOOL_CONFIG=[
  1252. #_Variable_________________________Windows___________________Unix__________
  1253. ("HAVE_PYTHON", '1', '1'),
  1254. ("USE_DEBUG_PYTHON", 'UNDEF', 'UNDEF'),
  1255. ("PYTHON_FRAMEWORK", 'UNDEF', 'UNDEF'),
  1256. ("COMPILE_IN_DEFAULT_FONT", '1', '1'),
  1257. ("STDFLOAT_DOUBLE", 'UNDEF', 'UNDEF'),
  1258. ("HAVE_MAYA", '1', '1'),
  1259. ("MAYA_PRE_5_0", 'UNDEF', 'UNDEF'),
  1260. ("HAVE_SOFTIMAGE", 'UNDEF', 'UNDEF'),
  1261. ("SSL_097", 'UNDEF', 'UNDEF'),
  1262. ("REPORT_OPENSSL_ERRORS", '1', '1'),
  1263. ("USE_PANDAFILESTREAM", '1', '1'),
  1264. ("USE_DELETED_CHAIN", '1', '1'),
  1265. ("HAVE_GL", '1', 'UNDEF'),
  1266. ("HAVE_GLES", 'UNDEF', 'UNDEF'),
  1267. ("HAVE_GLES2", 'UNDEF', 'UNDEF'),
  1268. ("HAVE_MESA", 'UNDEF', 'UNDEF'),
  1269. ("MESA_MGL", 'UNDEF', 'UNDEF'),
  1270. ("HAVE_SGIGL", 'UNDEF', 'UNDEF'),
  1271. ("HAVE_GLX", 'UNDEF', '1'),
  1272. ("HAVE_EGL", 'UNDEF', 'UNDEF'),
  1273. ("HAVE_WGL", '1', 'UNDEF'),
  1274. ("HAVE_DX8", 'UNDEF', 'UNDEF'),
  1275. ("HAVE_DX9", 'UNDEF', 'UNDEF'),
  1276. ("HAVE_CHROMIUM", 'UNDEF', 'UNDEF'),
  1277. ("HAVE_THREADS", '1', '1'),
  1278. ("SIMPLE_THREADS", 'UNDEF', 'UNDEF'),
  1279. ("OS_SIMPLE_THREADS", '1', '1'),
  1280. ("DEBUG_THREADS", 'UNDEF', 'UNDEF'),
  1281. ("HAVE_POSIX_THREADS", 'UNDEF', '1'),
  1282. ("HAVE_AUDIO", '1', '1'),
  1283. ("NOTIFY_DEBUG", 'UNDEF', 'UNDEF'),
  1284. ("DO_PSTATS", 'UNDEF', 'UNDEF'),
  1285. ("DO_COLLISION_RECORDING", 'UNDEF', 'UNDEF'),
  1286. ("SUPPORT_IMMEDIATE_MODE", '1', '1'),
  1287. ("TRACK_IN_INTERPRETER", 'UNDEF', 'UNDEF'),
  1288. ("DO_MEMORY_USAGE", 'UNDEF', 'UNDEF'),
  1289. ("DO_PIPELINING", '1', '1'),
  1290. ("EXPORT_TEMPLATES", 'yes', 'yes'),
  1291. ("LINK_IN_GL", 'UNDEF', 'UNDEF'),
  1292. ("LINK_IN_PHYSICS", 'UNDEF', 'UNDEF'),
  1293. ("DEFAULT_PATHSEP", '";"', '":"'),
  1294. ("WORDS_BIGENDIAN", 'UNDEF', 'UNDEF'),
  1295. ("HAVE_NAMESPACE", '1', '1'),
  1296. ("HAVE_OPEN_MASK", 'UNDEF', 'UNDEF'),
  1297. ("HAVE_WCHAR_T", '1', '1'),
  1298. ("HAVE_WSTRING", '1', '1'),
  1299. ("HAVE_TYPENAME", '1', '1'),
  1300. ("SIMPLE_STRUCT_POINTERS", '1', 'UNDEF'),
  1301. ("HAVE_DINKUM", 'UNDEF', 'UNDEF'),
  1302. ("HAVE_STL_HASH", 'UNDEF', 'UNDEF'),
  1303. ("HAVE_GETTIMEOFDAY", 'UNDEF', '1'),
  1304. ("GETTIMEOFDAY_ONE_PARAM", 'UNDEF', 'UNDEF'),
  1305. ("HAVE_GETOPT", 'UNDEF', '1'),
  1306. ("HAVE_GETOPT_LONG_ONLY", 'UNDEF', '1'),
  1307. ("PHAVE_GETOPT_H", 'UNDEF', '1'),
  1308. ("PHAVE_LINUX_INPUT_H", 'UNDEF', '1'),
  1309. ("IOCTL_TERMINAL_WIDTH", 'UNDEF', '1'),
  1310. ("HAVE_STREAMSIZE", '1', '1'),
  1311. ("HAVE_IOS_TYPEDEFS", '1', '1'),
  1312. ("HAVE_IOS_BINARY", '1', '1'),
  1313. ("STATIC_INIT_GETENV", '1', 'UNDEF'),
  1314. ("HAVE_PROC_SELF_EXE", 'UNDEF', '1'),
  1315. ("HAVE_PROC_SELF_MAPS", 'UNDEF', '1'),
  1316. ("HAVE_PROC_SELF_ENVIRON", 'UNDEF', '1'),
  1317. ("HAVE_PROC_SELF_CMDLINE", 'UNDEF', '1'),
  1318. ("HAVE_PROC_CURPROC_FILE", 'UNDEF', 'UNDEF'),
  1319. ("HAVE_PROC_CURPROC_MAP", 'UNDEF', 'UNDEF'),
  1320. ("HAVE_PROC_SELF_CMDLINE", 'UNDEF', 'UNDEF'),
  1321. ("HAVE_GLOBAL_ARGV", '1', 'UNDEF'),
  1322. ("PROTOTYPE_GLOBAL_ARGV", 'UNDEF', 'UNDEF'),
  1323. ("GLOBAL_ARGV", '__argv', 'UNDEF'),
  1324. ("GLOBAL_ARGC", '__argc', 'UNDEF'),
  1325. ("PHAVE_IO_H", '1', 'UNDEF'),
  1326. ("PHAVE_IOSTREAM", '1', '1'),
  1327. ("PHAVE_STRING_H", 'UNDEF', '1'),
  1328. ("PHAVE_LIMITS_H", 'UNDEF', '1'),
  1329. ("PHAVE_STDLIB_H", 'UNDEF', '1'),
  1330. ("PHAVE_MALLOC_H", '1', '1'),
  1331. ("PHAVE_SYS_MALLOC_H", 'UNDEF', 'UNDEF'),
  1332. ("PHAVE_ALLOCA_H", 'UNDEF', '1'),
  1333. ("PHAVE_LOCALE_H", 'UNDEF', '1'),
  1334. ("PHAVE_MINMAX_H", '1', 'UNDEF'),
  1335. ("PHAVE_SSTREAM", '1', '1'),
  1336. ("PHAVE_NEW", '1', '1'),
  1337. ("PHAVE_SYS_TYPES_H", '1', '1'),
  1338. ("PHAVE_SYS_TIME_H", 'UNDEF', '1'),
  1339. ("PHAVE_UNISTD_H", 'UNDEF', '1'),
  1340. ("PHAVE_UTIME_H", 'UNDEF', '1'),
  1341. ("PHAVE_GLOB_H", 'UNDEF', '1'),
  1342. ("PHAVE_DIRENT_H", 'UNDEF', '1'),
  1343. ("PHAVE_SYS_SOUNDCARD_H", 'UNDEF', '1'),
  1344. ("PHAVE_UCONTEXT_H", 'UNDEF', '1'),
  1345. ("PHAVE_STDINT_H", 'UNDEF', '1'),
  1346. ("HAVE_RTTI", '1', '1'),
  1347. ("HAVE_X11", 'UNDEF', '1'),
  1348. ("HAVE_XRANDR", 'UNDEF', '1'),
  1349. ("HAVE_XF86DGA", 'UNDEF', '1'),
  1350. ("HAVE_XCURSOR", 'UNDEF', '1'),
  1351. ("IS_LINUX", 'UNDEF', '1'),
  1352. ("IS_OSX", 'UNDEF', 'UNDEF'),
  1353. ("IS_FREEBSD", 'UNDEF', 'UNDEF'),
  1354. ("GLOBAL_OPERATOR_NEW_EXCEPTIONS", 'UNDEF', '1'),
  1355. ("USE_STL_ALLOCATOR", '1', '1'),
  1356. ("USE_MEMORY_DLMALLOC", '1', 'UNDEF'),
  1357. ("USE_MEMORY_PTMALLOC", 'UNDEF', 'UNDEF'),
  1358. ("USE_MEMORY_MALLOC", 'UNDEF', '1'),
  1359. ("HAVE_ZLIB", 'UNDEF', 'UNDEF'),
  1360. ("HAVE_PNG", 'UNDEF', 'UNDEF'),
  1361. ("HAVE_JPEG", 'UNDEF', 'UNDEF'),
  1362. ("PHAVE_JPEGINT_H", '1', '1'),
  1363. ("HAVE_VIDEO4LINUX", 'UNDEF', '1'),
  1364. ("HAVE_TIFF", 'UNDEF', 'UNDEF'),
  1365. ("HAVE_SGI_RGB", '1', '1'),
  1366. ("HAVE_TGA", '1', '1'),
  1367. ("HAVE_IMG", '1', '1'),
  1368. ("HAVE_SOFTIMAGE_PIC", '1', '1'),
  1369. ("HAVE_BMP", '1', '1'),
  1370. ("HAVE_PNM", '1', '1'),
  1371. ("HAVE_VRPN", 'UNDEF', 'UNDEF'),
  1372. ("HAVE_FMODEX", 'UNDEF', 'UNDEF'),
  1373. ("HAVE_OPENAL", 'UNDEF', 'UNDEF'),
  1374. ("HAVE_NVIDIACG", 'UNDEF', 'UNDEF'),
  1375. ("HAVE_FREETYPE", 'UNDEF', 'UNDEF'),
  1376. ("HAVE_SPEEDTREE", 'UNDEF', 'UNDEF'),
  1377. ("HAVE_FFTW", 'UNDEF', 'UNDEF'),
  1378. ("HAVE_OPENSSL", 'UNDEF', 'UNDEF'),
  1379. ("HAVE_NET", 'UNDEF', 'UNDEF'),
  1380. ("HAVE_EGG", '1', '1'),
  1381. ("HAVE_CG", 'UNDEF', 'UNDEF'),
  1382. ("HAVE_CGGL", 'UNDEF', 'UNDEF'),
  1383. ("HAVE_CGDX9", 'UNDEF', 'UNDEF'),
  1384. ("HAVE_FFMPEG", 'UNDEF', 'UNDEF'),
  1385. ("HAVE_SWSCALE", 'UNDEF', 'UNDEF'),
  1386. ("HAVE_ARTOOLKIT", 'UNDEF', 'UNDEF'),
  1387. ("HAVE_ODE", 'UNDEF', 'UNDEF'),
  1388. ("HAVE_OPENCV", 'UNDEF', 'UNDEF'),
  1389. ("HAVE_DIRECTCAM", 'UNDEF', 'UNDEF'),
  1390. ("HAVE_SQUISH", 'UNDEF', 'UNDEF'),
  1391. ("HAVE_FCOLLADA", 'UNDEF', 'UNDEF'),
  1392. ("HAVE_OPENAL_FRAMEWORK", 'UNDEF', 'UNDEF'),
  1393. ("PRC_SAVE_DESCRIPTIONS", '1', '1'),
  1394. ("_SECURE_SCL", '1', 'UNDEF'),
  1395. ("_SECURE_SCL_THROWS", '0', 'UNDEF'),
  1396. ("HAVE_P3D_PLUGIN", 'UNDEF', 'UNDEF'),
  1397. ]
  1398. PRC_PARAMETERS=[
  1399. ("DEFAULT_PRC_DIR", '"<auto>etc"', '"<auto>etc"'),
  1400. ("PRC_DIR_ENVVARS", '"PANDA_PRC_DIR"', '"PANDA_PRC_DIR"'),
  1401. ("PRC_PATH_ENVVARS", '"PANDA_PRC_PATH"', '"PANDA_PRC_PATH"'),
  1402. ("PRC_PATH2_ENVVARS", '""', '""'),
  1403. ("PRC_PATTERNS", '"*.prc"', '"*.prc"'),
  1404. ("PRC_ENCRYPTED_PATTERNS", '"*.prc.pe"', '"*.prc.pe"'),
  1405. ("PRC_ENCRYPTION_KEY", '""', '""'),
  1406. ("PRC_EXECUTABLE_PATTERNS", '""', '""'),
  1407. ("PRC_EXECUTABLE_ARGS_ENVVAR", '"PANDA_PRC_XARGS"', '"PANDA_PRC_XARGS"'),
  1408. ("PRC_PUBLIC_KEYS_FILENAME", '""', '""'),
  1409. ("PRC_RESPECT_TRUST_LEVEL", 'UNDEF', 'UNDEF'),
  1410. ("PRC_DCONFIG_TRUST_LEVEL", '0', '0'),
  1411. ("PRC_INC_TRUST_LEVEL", '0', '0'),
  1412. ]
  1413. def WriteConfigSettings():
  1414. dtool_config={}
  1415. prc_parameters={}
  1416. speedtree_parameters={}
  1417. plugin_config={}
  1418. if (sys.platform.startswith("win")):
  1419. for key,win,unix in DTOOL_CONFIG:
  1420. dtool_config[key] = win
  1421. for key,win,unix in PRC_PARAMETERS:
  1422. prc_parameters[key] = win
  1423. else:
  1424. for key,win,unix in DTOOL_CONFIG:
  1425. dtool_config[key] = unix
  1426. for key,win,unix in PRC_PARAMETERS:
  1427. prc_parameters[key] = unix
  1428. for x in PkgListGet():
  1429. if ("HAVE_"+x in dtool_config):
  1430. if (PkgSkip(x)==0):
  1431. dtool_config["HAVE_"+x] = '1'
  1432. else:
  1433. dtool_config["HAVE_"+x] = 'UNDEF'
  1434. dtool_config["HAVE_NET"] = '1'
  1435. if (PkgSkip("NVIDIACG")==0):
  1436. dtool_config["HAVE_CG"] = '1'
  1437. dtool_config["HAVE_CGGL"] = '1'
  1438. dtool_config["HAVE_CGDX9"] = '1'
  1439. if (not sys.platform.startswith("linux")):
  1440. dtool_config["HAVE_PROC_SELF_EXE"] = 'UNDEF'
  1441. dtool_config["HAVE_PROC_SELF_MAPS"] = 'UNDEF'
  1442. dtool_config["HAVE_PROC_SELF_CMDLINE"] = 'UNDEF'
  1443. dtool_config["HAVE_PROC_SELF_ENVIRON"] = 'UNDEF'
  1444. if (sys.platform == "darwin"):
  1445. dtool_config["PYTHON_FRAMEWORK"] = 'Python'
  1446. dtool_config["PHAVE_MALLOC_H"] = 'UNDEF'
  1447. dtool_config["PHAVE_SYS_MALLOC_H"] = '1'
  1448. dtool_config["HAVE_OPENAL_FRAMEWORK"] = '1'
  1449. dtool_config["HAVE_X11"] = 'UNDEF' # We might have X11, but we don't need it.
  1450. dtool_config["HAVE_XRANDR"] = 'UNDEF'
  1451. dtool_config["HAVE_XF86DGA"] = 'UNDEF'
  1452. dtool_config["HAVE_XCURSOR"] = 'UNDEF'
  1453. dtool_config["HAVE_GLX"] = 'UNDEF'
  1454. dtool_config["IS_LINUX"] = 'UNDEF'
  1455. dtool_config["HAVE_VIDEO4LINUX"] = 'UNDEF'
  1456. dtool_config["IS_OSX"] = '1'
  1457. # 10.4 had a broken ucontext implementation
  1458. if int(platform.mac_ver()[0][3]) <= 4:
  1459. dtool_config["PHAVE_UCONTEXT_H"] = 'UNDEF'
  1460. if (sys.platform.startswith("freebsd")):
  1461. dtool_config["IS_LINUX"] = 'UNDEF'
  1462. dtool_config["HAVE_VIDEO4LINUX"] = 'UNDEF'
  1463. dtool_config["IS_FREEBSD"] = '1'
  1464. dtool_config["PHAVE_ALLOCA_H"] = 'UNDEF'
  1465. dtool_config["PHAVE_MALLOC_H"] = 'UNDEF'
  1466. dtool_config["PHAVE_LINUX_INPUT_H"] = 'UNDEF'
  1467. dtool_config["HAVE_PROC_CURPROC_FILE"] = '1'
  1468. dtool_config["HAVE_PROC_CURPROC_MAP"] = '1'
  1469. dtool_config["HAVE_PROC_CURPROC_CMDLINE"] = '1'
  1470. if (GetOptimize() <= 2 and sys.platform.startswith("win")):
  1471. dtool_config["USE_DEBUG_PYTHON"] = '1'
  1472. if (GetOptimize() <= 3):
  1473. if (dtool_config["HAVE_NET"] != 'UNDEF'):
  1474. dtool_config["DO_PSTATS"] = '1'
  1475. if (GetOptimize() <= 3):
  1476. dtool_config["DO_COLLISION_RECORDING"] = '1'
  1477. #if (GetOptimize() <= 2):
  1478. # dtool_config["TRACK_IN_INTERPRETER"] = '1'
  1479. if (GetOptimize() <= 3):
  1480. dtool_config["DO_MEMORY_USAGE"] = '1'
  1481. #if (GetOptimize() <= 1):
  1482. # dtool_config["DO_PIPELINING"] = '1'
  1483. if (GetOptimize() <= 3):
  1484. dtool_config["NOTIFY_DEBUG"] = '1'
  1485. # Now that we have OS_SIMPLE_THREADS, we can support
  1486. # SIMPLE_THREADS on exotic architectures like win64, so we no
  1487. # longer need to disable it for this platform.
  1488. ## if (sys.platform.startswith("win") and is_64):
  1489. ## dtool_config["SIMPLE_THREADS"] = 'UNDEF'
  1490. if (RTDIST or RUNTIME):
  1491. prc_parameters["DEFAULT_PRC_DIR"] = '""'
  1492. plugin_config["PANDA_PACKAGE_HOST_URL"] = HOST_URL
  1493. #plugin_config["P3D_PLUGIN_LOG_DIRECTORY"] = ""
  1494. plugin_config["P3D_PLUGIN_LOG_BASENAME1"] = ""
  1495. plugin_config["P3D_PLUGIN_LOG_BASENAME2"] = ""
  1496. plugin_config["P3D_PLUGIN_LOG_BASENAME3"] = ""
  1497. plugin_config["P3D_PLUGIN_P3D_PLUGIN"] = ""
  1498. plugin_config["P3D_PLUGIN_P3DPYTHON"] = ""
  1499. plugin_config["P3D_COREAPI_VERSION_STR"] = COREAPI_VERSION
  1500. plugin_config["P3D_PLUGIN_VERSION_STR"] = PLUGIN_VERSION
  1501. if PkgSkip("GTK2") == 0:
  1502. plugin_config["HAVE_GTK"] = '1'
  1503. if (RUNTIME):
  1504. dtool_config["HAVE_P3D_PLUGIN"] = '1'
  1505. # Whether it's present on the system doesn't matter here,
  1506. # as the runtime itself doesn't include or link with X11.
  1507. if (RUNTIME and sys.platform != "darwin" and not sys.platform.startswith("win")):
  1508. dtool_config["HAVE_X11"] = '1'
  1509. if ("GENERIC_DXERR_LIBRARY" in SDK):
  1510. dtool_config["USE_GENERIC_DXERR_LIBRARY"] = "1"
  1511. else:
  1512. dtool_config["USE_GENERIC_DXERR_LIBRARY"] = "UNDEF"
  1513. if (PkgSkip("SPEEDTREE")==0):
  1514. speedtree_parameters["SPEEDTREE_OPENGL"] = "UNDEF"
  1515. speedtree_parameters["SPEEDTREE_DIRECTX9"] = "UNDEF"
  1516. if SDK["SPEEDTREEAPI"] == "OpenGL":
  1517. speedtree_parameters["SPEEDTREE_OPENGL"] = "1"
  1518. elif SDK["SPEEDTREEAPI"] == "DirectX9":
  1519. speedtree_parameters["SPEEDTREE_DIRECTX9"] = "1"
  1520. speedtree_parameters["SPEEDTREE_BIN_DIR"] = (SDK["SPEEDTREE"] + "/Bin")
  1521. conf = "/* prc_parameters.h. Generated automatically by makepanda.py */\n"
  1522. for key in prc_parameters.keys():
  1523. if ((key == "DEFAULT_PRC_DIR") or (key[:4]=="PRC_")):
  1524. val = OverrideValue(key, prc_parameters[key])
  1525. if (val == 'UNDEF'): conf = conf + "#undef " + key + "\n"
  1526. else: conf = conf + "#define " + key + " " + val + "\n"
  1527. del prc_parameters[key]
  1528. ConditionalWriteFile(GetOutputDir() + '/include/prc_parameters.h', conf)
  1529. conf = "/* dtool_config.h. Generated automatically by makepanda.py */\n"
  1530. for key in dtool_config.keys():
  1531. val = OverrideValue(key, dtool_config[key])
  1532. if (val == 'UNDEF'): conf = conf + "#undef " + key + "\n"
  1533. else: conf = conf + "#define " + key + " " + val + "\n"
  1534. del dtool_config[key]
  1535. ConditionalWriteFile(GetOutputDir() + '/include/dtool_config.h', conf)
  1536. if (RTDIST or RUNTIME):
  1537. conf = "/* p3d_plugin_config.h. Generated automatically by makepanda.py */\n"
  1538. for key in plugin_config.keys():
  1539. val = plugin_config[key]
  1540. if (val == 'UNDEF'): conf = conf + "#undef " + key + "\n"
  1541. else: conf = conf + "#define " + key + " \"" + val.replace("\\", "\\\\") + "\"\n"
  1542. del plugin_config[key]
  1543. ConditionalWriteFile(GetOutputDir() + '/include/p3d_plugin_config.h', conf)
  1544. if (PkgSkip("SPEEDTREE")==0):
  1545. conf = "/* speedtree_parameters.h. Generated automatically by makepanda.py */\n"
  1546. for key in speedtree_parameters.keys():
  1547. val = OverrideValue(key, speedtree_parameters[key])
  1548. if (val == 'UNDEF'): conf = conf + "#undef " + key + "\n"
  1549. else: conf = conf + "#define " + key + " \"" + val.replace("\\", "\\\\") + "\"\n"
  1550. del speedtree_parameters[key]
  1551. ConditionalWriteFile(GetOutputDir() + '/include/speedtree_parameters.h', conf)
  1552. for x in PkgListGet():
  1553. if (PkgSkip(x)): ConditionalWriteFile(GetOutputDir() + '/tmp/dtool_have_'+x.lower()+'.dat',"0\n")
  1554. else: ConditionalWriteFile(GetOutputDir() + '/tmp/dtool_have_'+x.lower()+'.dat',"1\n")
  1555. WriteConfigSettings()
  1556. MoveAwayConflictingFiles()
  1557. if "libdtoolbase" in GetLibCache():
  1558. print "%sWARNING:%s Found conflicting Panda3D libraries from other ppremake build!" % (GetColor("red"), GetColor())
  1559. if "libp3dtoolconfig" in GetLibCache():
  1560. print "%sWARNING:%s Found conflicting Panda3D libraries from other makepanda build!" % (GetColor("red"), GetColor())
  1561. ##########################################################################################
  1562. #
  1563. # Generate pandaVersion.h, pythonversion, null.cxx, etc.
  1564. #
  1565. ##########################################################################################
  1566. PANDAVERSION_H="""
  1567. #define PANDA_MAJOR_VERSION $VERSION1
  1568. #define PANDA_MINOR_VERSION $VERSION2
  1569. #define PANDA_SEQUENCE_VERSION $VERSION3
  1570. #define PANDA_VERSION $NVERSION
  1571. #define PANDA_NUMERIC_VERSION $NVERSION
  1572. #define PANDA_VERSION_STR "$VERSION1.$VERSION2.$VERSION3"
  1573. #define PANDA_ABI_VERSION_STR "$VERSION1.$VERSION2"
  1574. #define PANDA_DISTRIBUTOR "$DISTRIBUTOR"
  1575. #define PANDA_PACKAGE_VERSION_STR "$RTDIST_VERSION"
  1576. #define PANDA_PACKAGE_HOST_URL "$HOST_URL"
  1577. """
  1578. PANDAVERSION_H_RUNTIME="""
  1579. #define PANDA_MAJOR_VERSION 0
  1580. #define PANDA_MINOR_VERSION 0
  1581. #define PANDA_SEQUENCE_VERSION 0
  1582. #define PANDA_VERSION_STR "0.0.0"
  1583. #define PANDA_ABI_VERSION_STR "0.0"
  1584. #define P3D_PLUGIN_MAJOR_VERSION $VERSION1
  1585. #define P3D_PLUGIN_MINOR_VERSION $VERSION2
  1586. #define P3D_PLUGIN_SEQUENCE_VERSION $VERSION3
  1587. #define P3D_PLUGIN_VERSION_STR "$VERSION1.$VERSION2.$VERSION3"
  1588. #define P3D_COREAPI_VERSION_STR "$COREAPI_VERSION"
  1589. #define PANDA_DISTRIBUTOR "$DISTRIBUTOR"
  1590. #define PANDA_PACKAGE_VERSION_STR ""
  1591. #define PANDA_PACKAGE_HOST_URL "$HOST_URL"
  1592. """
  1593. CHECKPANDAVERSION_CXX="""
  1594. # include "dtoolbase.h"
  1595. EXPCL_DTOOL int panda_version_$VERSION1_$VERSION2 = 0;
  1596. """
  1597. CHECKPANDAVERSION_H="""
  1598. # include "dtoolbase.h"
  1599. extern EXPCL_DTOOL int panda_version_$VERSION1_$VERSION2;
  1600. # ifndef WIN32
  1601. /* For Windows, exporting the symbol from the DLL is sufficient; the
  1602. DLL will not load unless all expected public symbols are defined.
  1603. Other systems may not mind if the symbol is absent unless we
  1604. explictly write code that references it. */
  1605. static int check_panda_version = panda_version_$VERSION1_$VERSION2;
  1606. # endif
  1607. """
  1608. P3DACTIVEX_RC="""#include "resource.h"
  1609. #define APSTUDIO_READONLY_SYMBOLS
  1610. #include "afxres.h"
  1611. #undef APSTUDIO_READONLY_SYMBOLS
  1612. #if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
  1613. #ifdef _WIN32
  1614. LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
  1615. #pragma code_page(1252)
  1616. #endif
  1617. #ifdef APSTUDIO_INVOKED
  1618. 1 TEXTINCLUDE
  1619. BEGIN
  1620. "resource.h\\0"
  1621. END
  1622. 2 TEXTINCLUDE
  1623. BEGIN
  1624. "#include ""afxres.h""\\r\\n"
  1625. "\\0"
  1626. END
  1627. 3 TEXTINCLUDE
  1628. BEGIN
  1629. "1 TYPELIB ""P3DActiveX.tlb""\\r\\n"
  1630. "\\0"
  1631. END
  1632. #endif
  1633. %s
  1634. IDB_P3DACTIVEX BITMAP "P3DActiveXCtrl.bmp"
  1635. IDD_PROPPAGE_P3DACTIVEX DIALOG 0, 0, 250, 62
  1636. STYLE DS_SETFONT | WS_CHILD
  1637. FONT 8, "MS Sans Serif"
  1638. BEGIN
  1639. LTEXT "TODO: Place controls to manipulate properties of P3DActiveX Control on this dialog.",
  1640. IDC_STATIC,7,25,229,16
  1641. END
  1642. #ifdef APSTUDIO_INVOKED
  1643. GUIDELINES DESIGNINFO
  1644. BEGIN
  1645. IDD_PROPPAGE_P3DACTIVEX, DIALOG
  1646. BEGIN
  1647. LEFTMARGIN, 7
  1648. RIGHTMARGIN, 243
  1649. TOPMARGIN, 7
  1650. BOTTOMMARGIN, 55
  1651. END
  1652. END
  1653. #endif
  1654. STRINGTABLE
  1655. BEGIN
  1656. IDS_P3DACTIVEX "P3DActiveX Control"
  1657. IDS_P3DACTIVEX_PPG "P3DActiveX Property Page"
  1658. END
  1659. STRINGTABLE
  1660. BEGIN
  1661. IDS_P3DACTIVEX_PPG_CAPTION "General"
  1662. END
  1663. #endif
  1664. #ifndef APSTUDIO_INVOKED
  1665. 1 TYPELIB "P3DActiveX.tlb"
  1666. #endif"""
  1667. def CreatePandaVersionFiles():
  1668. version1=int(VERSION.split(".")[0])
  1669. version2=int(VERSION.split(".")[1])
  1670. version3=int(VERSION.split(".")[2])
  1671. nversion=version1*1000000+version2*1000+version3
  1672. if (DISTRIBUTOR != "cmu"):
  1673. # Subtract 1 if we are not an official version.
  1674. nversion -= 1
  1675. if (RUNTIME):
  1676. pandaversion_h = PANDAVERSION_H_RUNTIME
  1677. else:
  1678. pandaversion_h = PANDAVERSION_H
  1679. pandaversion_h = pandaversion_h.replace("$VERSION1",str(version1))
  1680. pandaversion_h = pandaversion_h.replace("$VERSION2",str(version2))
  1681. pandaversion_h = pandaversion_h.replace("$VERSION3",str(version3))
  1682. pandaversion_h = pandaversion_h.replace("$NVERSION",str(nversion))
  1683. pandaversion_h = pandaversion_h.replace("$DISTRIBUTOR",DISTRIBUTOR)
  1684. pandaversion_h = pandaversion_h.replace("$RTDIST_VERSION",RTDIST_VERSION)
  1685. pandaversion_h = pandaversion_h.replace("$COREAPI_VERSION",COREAPI_VERSION)
  1686. pandaversion_h = pandaversion_h.replace("$HOST_URL",HOST_URL)
  1687. if (DISTRIBUTOR == "cmu"):
  1688. pandaversion_h += "\n#define PANDA_OFFICIAL_VERSION\n"
  1689. else:
  1690. pandaversion_h += "\n#undef PANDA_OFFICIAL_VERSION\n"
  1691. if not RUNTIME:
  1692. checkpandaversion_cxx = CHECKPANDAVERSION_CXX.replace("$VERSION1",str(version1))
  1693. checkpandaversion_cxx = checkpandaversion_cxx.replace("$VERSION2",str(version2))
  1694. checkpandaversion_cxx = checkpandaversion_cxx.replace("$VERSION3",str(version3))
  1695. checkpandaversion_cxx = checkpandaversion_cxx.replace("$NVERSION",str(nversion))
  1696. checkpandaversion_h = CHECKPANDAVERSION_H.replace("$VERSION1",str(version1))
  1697. checkpandaversion_h = checkpandaversion_h.replace("$VERSION2",str(version2))
  1698. checkpandaversion_h = checkpandaversion_h.replace("$VERSION3",str(version3))
  1699. checkpandaversion_h = checkpandaversion_h.replace("$NVERSION",str(nversion))
  1700. ConditionalWriteFile(GetOutputDir()+'/include/pandaVersion.h', pandaversion_h)
  1701. if RUNTIME:
  1702. ConditionalWriteFile(GetOutputDir()+'/include/checkPandaVersion.cxx', '')
  1703. ConditionalWriteFile(GetOutputDir()+'/include/checkPandaVersion.h', '')
  1704. else:
  1705. ConditionalWriteFile(GetOutputDir()+'/include/checkPandaVersion.cxx', checkpandaversion_cxx)
  1706. ConditionalWriteFile(GetOutputDir()+'/include/checkPandaVersion.h', checkpandaversion_h)
  1707. ConditionalWriteFile(GetOutputDir()+"/tmp/null.cxx","")
  1708. if RUNTIME:
  1709. p3dactivex_rc = {"name" : "Panda3D Game Engine Plug-in",
  1710. "version" : VERSION,
  1711. "description" : "Runs 3-D games and interactive applets",
  1712. "filename" : "p3dactivex.ocx",
  1713. "mimetype" : "application/x-panda3d",
  1714. "extension" : "p3d",
  1715. "filedesc" : "Panda3D applet"}
  1716. ConditionalWriteFile(GetOutputDir()+"/include/P3DActiveX.rc", P3DACTIVEX_RC % GenerateResourceFile(**p3dactivex_rc))
  1717. CreatePandaVersionFiles()
  1718. ##########################################################################################
  1719. #
  1720. # Copy the "direct" tree and panda3d.py
  1721. #
  1722. ##########################################################################################
  1723. if (PkgSkip("DIRECT")==0):
  1724. CopyTree(GetOutputDir()+'/direct', 'direct/src')
  1725. ConditionalWriteFile(GetOutputDir() + '/direct/__init__.py', "")
  1726. if (sys.platform.startswith("win")):
  1727. CopyFile(GetOutputDir()+'/bin/panda3d.py', 'direct/src/ffi/panda3d.py')
  1728. else:
  1729. CopyFile(GetOutputDir()+'/lib/panda3d.py', 'direct/src/ffi/panda3d.py')
  1730. ##########################################################################################
  1731. #
  1732. # Generate the PRC files into the ETC directory.
  1733. #
  1734. ##########################################################################################
  1735. confautoprc = ReadFile("makepanda/confauto.in")
  1736. if (PkgSkip("SPEEDTREE")==0):
  1737. # If SpeedTree is available, enable it in the config file
  1738. confautoprc = confautoprc.replace('#st#', '')
  1739. else:
  1740. # otherwise, disable it.
  1741. confautoprc = confautoprc.replace('#st#', '#')
  1742. if (os.path.isfile("makepanda/myconfig.in")):
  1743. configprc = ReadFile("makepanda/myconfig.in")
  1744. else:
  1745. configprc = ReadFile("makepanda/config.in")
  1746. if (sys.platform.startswith("win")):
  1747. configprc = configprc.replace("$HOME/.panda3d", "$USER_APPDATA/Panda3D-%s" % MAJOR_VERSION)
  1748. else:
  1749. configprc = configprc.replace("aux-display pandadx9", "")
  1750. configprc = configprc.replace("aux-display pandadx8", "")
  1751. if (sys.platform == "darwin"):
  1752. configprc = configprc.replace(".panda3d/cache", "Library/Caches/Panda3D-%s" % MAJOR_VERSION)
  1753. # OpenAL is not yet working well on OSX for us, so let's do this for now.
  1754. configprc = configprc.replace("p3openal_audio", "p3fmod_audio")
  1755. ConditionalWriteFile(GetOutputDir()+"/etc/Config.prc", configprc)
  1756. ConditionalWriteFile(GetOutputDir()+"/etc/Confauto.prc", confautoprc)
  1757. ##########################################################################################
  1758. #
  1759. # Copy the precompiled binaries and DLLs into the build.
  1760. #
  1761. ##########################################################################################
  1762. for pkg in PkgListGet():
  1763. if (PkgSkip(pkg)==0):
  1764. if (COMPILER == "MSVC"):
  1765. if (os.path.exists(GetThirdpartyDir()+pkg.lower()+"/bin")):
  1766. CopyAllFiles(GetOutputDir()+"/bin/",GetThirdpartyDir()+pkg.lower()+"/bin/")
  1767. if (COMPILER == "LINUX"):
  1768. if (os.path.exists(GetThirdpartyDir()+pkg.lower()+"/lib")):
  1769. CopyAllFiles(GetOutputDir()+"/lib/",GetThirdpartyDir()+pkg.lower()+"/lib/")
  1770. if (COMPILER=="MSVC"):
  1771. CopyAllFiles(GetOutputDir()+"/bin/", GetThirdpartyDir()+"extras"+"/bin/")
  1772. if (sys.platform.startswith("win")):
  1773. if (PkgSkip("PYTHON")==0):
  1774. pydll = "/" + SDK["PYTHONVERSION"].replace(".", "")
  1775. if (GetOptimize() <= 2): pydll += "_d.dll"
  1776. else: pydll += ".dll"
  1777. CopyFile(GetOutputDir()+"/bin"+pydll, SDK["PYTHON"]+pydll)
  1778. if not RTDIST:
  1779. CopyTree(GetOutputDir()+"/python", SDK["PYTHON"])
  1780. ConditionalWriteFile(GetOutputDir()+"/python/panda.pth", "..\n../bin\n")
  1781. ########################################################################
  1782. ##
  1783. ## Copy various stuff into the build.
  1784. ##
  1785. ########################################################################
  1786. CopyFile(GetOutputDir()+"/", "doc/LICENSE")
  1787. CopyFile(GetOutputDir()+"/", "doc/ReleaseNotes")
  1788. if (PkgSkip("PANDATOOL")==0):
  1789. CopyAllFiles(GetOutputDir()+"/plugins/", "pandatool/src/scripts/", ".mel")
  1790. CopyAllFiles(GetOutputDir()+"/plugins/", "pandatool/src/scripts/", ".ms")
  1791. if (PkgSkip("PYTHON")==0 and os.path.isdir(GetThirdpartyBase()+"/Pmw")):
  1792. CopyTree(GetOutputDir()+'/Pmw', GetThirdpartyBase()+'/Pmw')
  1793. ConditionalWriteFile(GetOutputDir()+'/include/ctl3d.h', '/* dummy file to make MAX happy */')
  1794. ########################################################################
  1795. #
  1796. # Copy header files to the built/include/parser-inc directory.
  1797. #
  1798. ########################################################################
  1799. CopyTree(GetOutputDir()+'/include/parser-inc','dtool/src/parser-inc')
  1800. MakeDirectory(GetOutputDir()+'/include/parser-inc/openssl')
  1801. MakeDirectory(GetOutputDir()+'/include/parser-inc/netinet')
  1802. MakeDirectory(GetOutputDir()+'/include/parser-inc/Cg')
  1803. MakeDirectory(GetOutputDir()+'/include/parser-inc/Core')
  1804. MakeDirectory(GetOutputDir()+'/include/parser-inc/Forest')
  1805. MakeDirectory(GetOutputDir()+'/include/parser-inc/Renderers')
  1806. MakeDirectory(GetOutputDir()+'/include/parser-inc/Renderers/OpenGL')
  1807. MakeDirectory(GetOutputDir()+'/include/parser-inc/Renderers/DirectX9')
  1808. MakeDirectory(GetOutputDir()+'/include/parser-inc/glew')
  1809. CopyAllFiles(GetOutputDir()+'/include/parser-inc/openssl/','dtool/src/parser-inc/')
  1810. CopyAllFiles(GetOutputDir()+'/include/parser-inc/netinet/','dtool/src/parser-inc/')
  1811. CopyFile(GetOutputDir()+'/include/parser-inc/Cg/','dtool/src/parser-inc/cg.h')
  1812. CopyFile(GetOutputDir()+'/include/parser-inc/Cg/','dtool/src/parser-inc/cgGL.h')
  1813. CopyFile(GetOutputDir()+'/include/parser-inc/Core/','dtool/src/parser-inc/Core.h')
  1814. CopyFile(GetOutputDir()+'/include/parser-inc/Forest/','dtool/src/parser-inc/Forest.h')
  1815. CopyFile(GetOutputDir()+'/include/parser-inc/Renderers/OpenGL/','dtool/src/parser-inc/OpenGLRenderer.h')
  1816. CopyFile(GetOutputDir()+'/include/parser-inc/Renderers/DirectX9/','dtool/src/parser-inc/DirectX9Renderer.h')
  1817. CopyFile(GetOutputDir()+'/include/parser-inc/glew/','dtool/src/parser-inc/glew.h')
  1818. DeleteCVS(GetOutputDir()+'/include/parser-inc')
  1819. ########################################################################
  1820. #
  1821. # Transfer all header files to the built/include directory.
  1822. #
  1823. ########################################################################
  1824. CopyAllHeaders('dtool/src/dtoolbase')
  1825. CopyAllHeaders('dtool/src/dtoolutil', skip=["pandaVersion.h", "checkPandaVersion.h"])
  1826. CopyFile(GetOutputDir()+'/include/','dtool/src/dtoolutil/vector_src.cxx')
  1827. CopyAllHeaders('dtool/metalibs/dtool')
  1828. CopyAllHeaders('dtool/src/cppparser')
  1829. CopyAllHeaders('dtool/src/prc', skip=["prc_parameters.h"])
  1830. CopyAllHeaders('dtool/src/dconfig')
  1831. CopyAllHeaders('dtool/src/interrogatedb')
  1832. CopyAllHeaders('dtool/metalibs/dtoolconfig')
  1833. CopyAllHeaders('dtool/src/pystub')
  1834. CopyAllHeaders('dtool/src/interrogate')
  1835. CopyAllHeaders('dtool/src/test_interrogate')
  1836. CopyAllHeaders('panda/src/putil')
  1837. CopyAllHeaders('panda/src/pandabase')
  1838. CopyAllHeaders('panda/src/express')
  1839. CopyAllHeaders('panda/src/downloader')
  1840. CopyAllHeaders('panda/metalibs/pandaexpress')
  1841. CopyAllHeaders('panda/src/pipeline')
  1842. CopyAllHeaders('panda/src/putil')
  1843. CopyAllHeaders('dtool/src/prckeys')
  1844. CopyAllHeaders('panda/src/audio')
  1845. CopyAllHeaders('panda/src/event')
  1846. CopyAllHeaders('panda/src/linmath')
  1847. CopyAllHeaders('panda/src/mathutil')
  1848. CopyAllHeaders('panda/src/gsgbase')
  1849. CopyAllHeaders('panda/src/pnmimage')
  1850. CopyAllHeaders('panda/src/nativenet')
  1851. CopyAllHeaders('panda/src/net')
  1852. CopyAllHeaders('panda/src/pstatclient')
  1853. CopyAllHeaders('panda/src/gobj')
  1854. CopyAllHeaders('panda/src/movies')
  1855. CopyAllHeaders('panda/src/lerp')
  1856. CopyAllHeaders('panda/src/pgraphnodes')
  1857. CopyAllHeaders('panda/src/pgraph')
  1858. CopyAllHeaders('panda/src/cull')
  1859. CopyAllHeaders('panda/src/chan')
  1860. CopyAllHeaders('panda/src/char')
  1861. CopyAllHeaders('panda/src/dgraph')
  1862. CopyAllHeaders('panda/src/display')
  1863. CopyAllHeaders('panda/src/device')
  1864. CopyAllHeaders('panda/src/pnmtext')
  1865. CopyAllHeaders('panda/src/text')
  1866. CopyAllHeaders('panda/src/grutil')
  1867. CopyAllHeaders('panda/src/vision')
  1868. CopyAllHeaders('panda/src/awesomium')
  1869. CopyAllHeaders('panda/src/tform')
  1870. CopyAllHeaders('panda/src/collide')
  1871. CopyAllHeaders('panda/src/parametrics')
  1872. CopyAllHeaders('panda/src/pgui')
  1873. CopyAllHeaders('panda/src/pnmimagetypes')
  1874. CopyAllHeaders('panda/src/recorder')
  1875. CopyAllHeaders('panda/src/vrpn')
  1876. CopyAllHeaders('panda/src/wgldisplay')
  1877. CopyAllHeaders('panda/src/ode')
  1878. CopyAllHeaders('panda/metalibs/pandaode')
  1879. CopyAllHeaders('panda/src/physics')
  1880. CopyAllHeaders('panda/src/particlesystem')
  1881. CopyAllHeaders('panda/src/dxml')
  1882. CopyAllHeaders('panda/metalibs/panda')
  1883. CopyAllHeaders('panda/src/audiotraits')
  1884. CopyAllHeaders('panda/src/audiotraits')
  1885. CopyAllHeaders('panda/src/distort')
  1886. CopyAllHeaders('panda/src/downloadertools')
  1887. CopyAllHeaders('panda/src/windisplay')
  1888. CopyAllHeaders('panda/src/dxgsg8')
  1889. CopyAllHeaders('panda/metalibs/pandadx8')
  1890. CopyAllHeaders('panda/src/dxgsg9')
  1891. CopyAllHeaders('panda/metalibs/pandadx9')
  1892. CopyAllHeaders('panda/src/egg')
  1893. CopyAllHeaders('panda/src/egg2pg')
  1894. CopyAllHeaders('panda/src/framework')
  1895. CopyAllHeaders('panda/metalibs/pandafx')
  1896. CopyAllHeaders('panda/src/glstuff')
  1897. CopyAllHeaders('panda/src/glgsg')
  1898. CopyAllHeaders('panda/src/glesgsg')
  1899. CopyAllHeaders('panda/src/gles2gsg')
  1900. CopyAllHeaders('panda/metalibs/pandaegg')
  1901. if (sys.platform.startswith("win")):
  1902. CopyAllHeaders('panda/src/wgldisplay')
  1903. elif (sys.platform == "darwin"):
  1904. CopyAllHeaders('panda/src/osxdisplay')
  1905. else:
  1906. CopyAllHeaders('panda/src/x11display')
  1907. CopyAllHeaders('panda/src/glxdisplay')
  1908. CopyAllHeaders('panda/src/egldisplay')
  1909. CopyAllHeaders('panda/metalibs/pandagl')
  1910. CopyAllHeaders('panda/metalibs/pandagles')
  1911. CopyAllHeaders('panda/metalibs/pandagles2')
  1912. CopyAllHeaders('panda/src/physics')
  1913. CopyAllHeaders('panda/src/particlesystem')
  1914. CopyAllHeaders('panda/metalibs/pandaphysics')
  1915. CopyAllHeaders('panda/src/testbed')
  1916. if (PkgSkip("PHYSX")==0):
  1917. CopyAllHeaders('panda/src/physx')
  1918. CopyAllHeaders('panda/metalibs/pandaphysx')
  1919. if (PkgSkip("BULLET")==0):
  1920. CopyAllHeaders('panda/src/bullet')
  1921. CopyAllHeaders('panda/metalibs/pandabullet')
  1922. if (PkgSkip("SPEEDTREE")==0):
  1923. CopyAllHeaders('panda/src/speedtree')
  1924. if (PkgSkip("DIRECT")==0):
  1925. CopyAllHeaders('direct/src/directbase')
  1926. CopyAllHeaders('direct/src/dcparser')
  1927. CopyAllHeaders('direct/src/deadrec')
  1928. CopyAllHeaders('direct/src/distributed')
  1929. CopyAllHeaders('direct/src/interval')
  1930. CopyAllHeaders('direct/src/showbase')
  1931. CopyAllHeaders('direct/metalibs/direct')
  1932. CopyAllHeaders('direct/src/dcparse')
  1933. if (RUNTIME or RTDIST):
  1934. CopyAllHeaders('direct/src/plugin', skip=["p3d_plugin_config.h"])
  1935. if (RUNTIME):
  1936. CopyAllHeaders('direct/src/plugin_npapi')
  1937. CopyAllHeaders('direct/src/plugin_standalone')
  1938. if (PkgSkip("PANDATOOL")==0):
  1939. CopyAllHeaders('pandatool/src/pandatoolbase')
  1940. CopyAllHeaders('pandatool/src/converter')
  1941. CopyAllHeaders('pandatool/src/progbase')
  1942. CopyAllHeaders('pandatool/src/eggbase')
  1943. CopyAllHeaders('pandatool/src/bam')
  1944. CopyAllHeaders('pandatool/src/cvscopy')
  1945. CopyAllHeaders('pandatool/src/daeegg')
  1946. CopyAllHeaders('pandatool/src/daeprogs')
  1947. CopyAllHeaders('pandatool/src/dxf')
  1948. CopyAllHeaders('pandatool/src/dxfegg')
  1949. CopyAllHeaders('pandatool/src/dxfprogs')
  1950. CopyAllHeaders('pandatool/src/palettizer')
  1951. CopyAllHeaders('pandatool/src/egg-mkfont')
  1952. CopyAllHeaders('pandatool/src/eggcharbase')
  1953. CopyAllHeaders('pandatool/src/egg-optchar')
  1954. CopyAllHeaders('pandatool/src/egg-palettize')
  1955. CopyAllHeaders('pandatool/src/egg-qtess')
  1956. CopyAllHeaders('pandatool/src/eggprogs')
  1957. CopyAllHeaders('pandatool/src/flt')
  1958. CopyAllHeaders('pandatool/src/fltegg')
  1959. CopyAllHeaders('pandatool/src/fltprogs')
  1960. CopyAllHeaders('pandatool/src/imagebase')
  1961. CopyAllHeaders('pandatool/src/imageprogs')
  1962. CopyAllHeaders('pandatool/src/pfmprogs')
  1963. CopyAllHeaders('pandatool/src/lwo')
  1964. CopyAllHeaders('pandatool/src/lwoegg')
  1965. CopyAllHeaders('pandatool/src/lwoprogs')
  1966. CopyAllHeaders('pandatool/src/maya')
  1967. CopyAllHeaders('pandatool/src/mayaegg')
  1968. CopyAllHeaders('pandatool/src/maxegg')
  1969. CopyAllHeaders('pandatool/src/maxprogs')
  1970. CopyAllHeaders('pandatool/src/objegg')
  1971. CopyAllHeaders('pandatool/src/objprogs')
  1972. CopyAllHeaders('pandatool/src/vrml')
  1973. CopyAllHeaders('pandatool/src/vrmlegg')
  1974. CopyAllHeaders('pandatool/src/xfile')
  1975. CopyAllHeaders('pandatool/src/xfileegg')
  1976. CopyAllHeaders('pandatool/src/ptloader')
  1977. CopyAllHeaders('pandatool/src/miscprogs')
  1978. CopyAllHeaders('pandatool/src/pstatserver')
  1979. CopyAllHeaders('pandatool/src/softprogs')
  1980. CopyAllHeaders('pandatool/src/text-stats')
  1981. CopyAllHeaders('pandatool/src/vrmlprogs')
  1982. CopyAllHeaders('pandatool/src/win-stats')
  1983. CopyAllHeaders('pandatool/src/xfileprogs')
  1984. if (PkgSkip("CONTRIB")==0):
  1985. CopyAllHeaders('contrib/src/contribbase')
  1986. CopyAllHeaders('contrib/src/ai')
  1987. ########################################################################
  1988. #
  1989. # These definitions are syntactic shorthand. They make it easy
  1990. # to link with the usual libraries without listing them all.
  1991. #
  1992. ########################################################################
  1993. COMMON_DTOOL_LIBS=[
  1994. 'libp3dtool.dll',
  1995. 'libp3dtoolconfig.dll',
  1996. ]
  1997. COMMON_PANDA_LIBS=[
  1998. 'libpanda.dll',
  1999. 'libpandaexpress.dll'
  2000. ] + COMMON_DTOOL_LIBS
  2001. COMMON_EGG2X_LIBS=[
  2002. 'libeggbase.lib',
  2003. 'libprogbase.lib',
  2004. 'libconverter.lib',
  2005. 'libpandatoolbase.lib',
  2006. 'libpandaegg.dll',
  2007. ] + COMMON_PANDA_LIBS
  2008. COMMON_DTOOL_LIBS_PYSTUB = COMMON_DTOOL_LIBS + ['libp3pystub.dll']
  2009. COMMON_PANDA_LIBS_PYSTUB = COMMON_PANDA_LIBS + ['libp3pystub.dll']
  2010. COMMON_EGG2X_LIBS_PYSTUB = COMMON_EGG2X_LIBS + ['libp3pystub.dll']
  2011. ########################################################################
  2012. #
  2013. # This section contains a list of all the files that need to be compiled.
  2014. #
  2015. ########################################################################
  2016. print "Generating dependencies..."
  2017. sys.stdout.flush()
  2018. #
  2019. # Compile Panda icon resource file.
  2020. # We do it first because we need it at
  2021. # the time we compile an executable.
  2022. #
  2023. if (sys.platform.startswith("win")):
  2024. OPTS=['DIR:panda/src/configfiles']
  2025. TargetAdd('pandaIcon.res', opts=OPTS, input='pandaIcon.rc')
  2026. #
  2027. # DIRECTORY: dtool/src/dtoolbase/
  2028. #
  2029. OPTS=['DIR:dtool/src/dtoolbase', 'BUILDING:DTOOL']
  2030. TargetAdd('dtoolbase_composite1.obj', opts=OPTS, input='dtoolbase_composite1.cxx')
  2031. TargetAdd('dtoolbase_composite2.obj', opts=OPTS, input='dtoolbase_composite2.cxx')
  2032. TargetAdd('dtoolbase_lookup3.obj', opts=OPTS, input='lookup3.c')
  2033. TargetAdd('dtoolbase_indent.obj', opts=OPTS, input='indent.cxx')
  2034. #
  2035. # DIRECTORY: dtool/src/dtoolutil/
  2036. #
  2037. OPTS=['DIR:dtool/src/dtoolutil', 'BUILDING:DTOOL']
  2038. TargetAdd('dtoolutil_composite.obj', opts=OPTS, input='dtoolutil_composite.cxx')
  2039. if (sys.platform == 'darwin'):
  2040. TargetAdd('dtoolutil_filename_assist.obj', opts=OPTS, input='filename_assist.mm')
  2041. #
  2042. # DIRECTORY: dtool/metalibs/dtool/
  2043. #
  2044. OPTS=['DIR:dtool/metalibs/dtool', 'BUILDING:DTOOL']
  2045. TargetAdd('dtool_dtool.obj', opts=OPTS, input='dtool.cxx')
  2046. TargetAdd('libp3dtool.dll', input='dtool_dtool.obj')
  2047. TargetAdd('libp3dtool.dll', input='dtoolutil_composite.obj')
  2048. if (sys.platform == 'darwin'):
  2049. TargetAdd('libp3dtool.dll', input='dtoolutil_filename_assist.obj')
  2050. TargetAdd('libp3dtool.dll', input='dtoolbase_composite1.obj')
  2051. TargetAdd('libp3dtool.dll', input='dtoolbase_composite2.obj')
  2052. TargetAdd('libp3dtool.dll', input='dtoolbase_indent.obj')
  2053. TargetAdd('libp3dtool.dll', input='dtoolbase_lookup3.obj')
  2054. TargetAdd('libp3dtool.dll', opts=['ADVAPI','WINSHELL','WINKERNEL'])
  2055. #
  2056. # DIRECTORY: dtool/src/cppparser/
  2057. #
  2058. if (not RUNTIME):
  2059. OPTS=['DIR:dtool/src/cppparser', 'BISONPREFIX_cppyy']
  2060. CreateFile(GetOutputDir()+"/include/cppBison.h")
  2061. TargetAdd('cppParser_cppBison.obj', opts=OPTS, input='cppBison.yxx')
  2062. TargetAdd('cppBison.h', input='cppParser_cppBison.obj', opts=['DEPENDENCYONLY'])
  2063. TargetAdd('cppParser_composite.obj', opts=OPTS, input='cppParser_composite.cxx')
  2064. TargetAdd('libcppParser.ilb', input='cppParser_composite.obj')
  2065. TargetAdd('libcppParser.ilb', input='cppParser_cppBison.obj')
  2066. #
  2067. # DIRECTORY: dtool/src/prc/
  2068. #
  2069. OPTS=['DIR:dtool/src/prc', 'BUILDING:DTOOLCONFIG', 'OPENSSL']
  2070. TargetAdd('prc_composite.obj', opts=OPTS, input='prc_composite.cxx')
  2071. #
  2072. # DIRECTORY: dtool/src/dconfig/
  2073. #
  2074. OPTS=['DIR:dtool/src/dconfig', 'BUILDING:DTOOLCONFIG']
  2075. TargetAdd('dconfig_composite.obj', opts=OPTS, input='dconfig_composite.cxx')
  2076. #
  2077. # DIRECTORY: dtool/src/interrogatedb/
  2078. #
  2079. OPTS=['DIR:dtool/src/interrogatedb', 'BUILDING:DTOOLCONFIG']
  2080. TargetAdd('interrogatedb_composite.obj', opts=OPTS, input='interrogatedb_composite.cxx')
  2081. #
  2082. # DIRECTORY: dtool/metalibs/dtoolconfig/
  2083. #
  2084. OPTS=['DIR:dtool/metalibs/dtoolconfig', 'BUILDING:DTOOLCONFIG']
  2085. if (PkgSkip("PYTHON")):
  2086. TargetAdd('dtoolconfig_pydtool.obj', opts=OPTS, input="null.cxx")
  2087. else:
  2088. TargetAdd('dtoolconfig_pydtool.obj', opts=OPTS, input="pydtool.cxx")
  2089. TargetAdd('dtoolconfig_dtoolconfig.obj', opts=OPTS, input='dtoolconfig.cxx')
  2090. TargetAdd('dtoolconfig_pydtool.obj', dep='dtool_have_python.dat')
  2091. TargetAdd('libp3dtoolconfig.dll', input='dtoolconfig_dtoolconfig.obj')
  2092. TargetAdd('libp3dtoolconfig.dll', input='dtoolconfig_pydtool.obj')
  2093. TargetAdd('libp3dtoolconfig.dll', input='interrogatedb_composite.obj')
  2094. TargetAdd('libp3dtoolconfig.dll', input='dconfig_composite.obj')
  2095. TargetAdd('libp3dtoolconfig.dll', input='prc_composite.obj')
  2096. TargetAdd('libp3dtoolconfig.dll', input='libp3dtool.dll')
  2097. TargetAdd('libp3dtoolconfig.dll', opts=['ADVAPI', 'OPENSSL'])
  2098. #
  2099. # DIRECTORY: dtool/src/pystub/
  2100. #
  2101. OPTS=['DIR:dtool/src/pystub', 'BUILDING:DTOOLCONFIG']
  2102. TargetAdd('pystub_pystub.obj', opts=OPTS, input='pystub.cxx')
  2103. TargetAdd('libp3pystub.dll', input='pystub_pystub.obj')
  2104. TargetAdd('libp3pystub.dll', input='libp3dtool.dll')
  2105. TargetAdd('libp3pystub.dll', opts=['ADVAPI'])
  2106. #
  2107. # DIRECTORY: dtool/src/interrogate/
  2108. #
  2109. if (not RUNTIME):
  2110. OPTS=['DIR:dtool/src/interrogate', 'DIR:dtool/src/cppparser', 'DIR:dtool/src/interrogatedb']
  2111. TargetAdd('interrogate_composite.obj', opts=OPTS, input='interrogate_composite.cxx')
  2112. TargetAdd('interrogate.exe', input='interrogate_composite.obj')
  2113. TargetAdd('interrogate.exe', input='libcppParser.ilb')
  2114. TargetAdd('interrogate.exe', input=COMMON_DTOOL_LIBS_PYSTUB)
  2115. TargetAdd('interrogate.exe', opts=['ADVAPI', 'OPENSSL', 'WINSHELL'])
  2116. TargetAdd('interrogate_module_interrogate_module.obj', opts=OPTS, input='interrogate_module.cxx')
  2117. TargetAdd('interrogate_module.exe', input='interrogate_module_interrogate_module.obj')
  2118. TargetAdd('interrogate_module.exe', input='libcppParser.ilb')
  2119. TargetAdd('interrogate_module.exe', input=COMMON_DTOOL_LIBS_PYSTUB)
  2120. TargetAdd('interrogate_module.exe', opts=['ADVAPI', 'OPENSSL', 'WINSHELL'])
  2121. if (not RTDIST):
  2122. TargetAdd('parse_file_parse_file.obj', opts=OPTS, input='parse_file.cxx')
  2123. TargetAdd('parse_file.exe', input='parse_file_parse_file.obj')
  2124. TargetAdd('parse_file.exe', input='libcppParser.ilb')
  2125. TargetAdd('parse_file.exe', input=COMMON_DTOOL_LIBS_PYSTUB)
  2126. TargetAdd('parse_file.exe', opts=['ADVAPI', 'OPENSSL', 'WINSHELL'])
  2127. #
  2128. # DIRECTORY: dtool/src/prckeys/
  2129. #
  2130. if (PkgSkip("OPENSSL")==0 and not RUNTIME and not RTDIST):
  2131. OPTS=['DIR:dtool/src/prckeys', 'OPENSSL']
  2132. TargetAdd('make-prc-key_makePrcKey.obj', opts=OPTS, input='makePrcKey.cxx')
  2133. TargetAdd('make-prc-key.exe', input='make-prc-key_makePrcKey.obj')
  2134. TargetAdd('make-prc-key.exe', input=COMMON_DTOOL_LIBS_PYSTUB)
  2135. TargetAdd('make-prc-key.exe', opts=['ADVAPI', 'OPENSSL', 'WINSHELL'])
  2136. #
  2137. # DIRECTORY: dtool/src/test_interrogate/
  2138. #
  2139. if (not RTDIST and not RUNTIME):
  2140. OPTS=['DIR:dtool/src/test_interrogate']
  2141. TargetAdd('test_interrogate_test_interrogate.obj', opts=OPTS, input='test_interrogate.cxx')
  2142. TargetAdd('test_interrogate.exe', input='test_interrogate_test_interrogate.obj')
  2143. TargetAdd('test_interrogate.exe', input=COMMON_DTOOL_LIBS_PYSTUB)
  2144. TargetAdd('test_interrogate.exe', opts=['ADVAPI', 'OPENSSL', 'WINSHELL'])
  2145. #
  2146. # DIRECTORY: panda/src/pandabase/
  2147. #
  2148. OPTS=['DIR:panda/src/pandabase', 'BUILDING:PANDAEXPRESS']
  2149. TargetAdd('pandabase_pandabase.obj', opts=OPTS, input='pandabase.cxx')
  2150. #
  2151. # DIRECTORY: panda/src/express/
  2152. #
  2153. OPTS=['DIR:panda/src/express', 'BUILDING:PANDAEXPRESS', 'OPENSSL', 'ZLIB']
  2154. TargetAdd('express_composite1.obj', opts=OPTS, input='express_composite1.cxx')
  2155. TargetAdd('express_composite2.obj', opts=OPTS, input='express_composite2.cxx')
  2156. IGATEFILES=GetDirectoryContents('panda/src/express', ["*.h", "*_composite.cxx"])
  2157. TargetAdd('libexpress.in', opts=OPTS, input=IGATEFILES)
  2158. TargetAdd('libexpress.in', opts=['IMOD:pandaexpress', 'ILIB:libexpress', 'SRCDIR:panda/src/express'])
  2159. TargetAdd('libexpress_igate.obj', input='libexpress.in', opts=["DEPENDENCYONLY"])
  2160. #
  2161. # DIRECTORY: panda/src/downloader/
  2162. #
  2163. OPTS=['DIR:panda/src/downloader', 'BUILDING:PANDAEXPRESS', 'OPENSSL', 'ZLIB']
  2164. TargetAdd('downloader_composite.obj', opts=OPTS, input='downloader_composite.cxx')
  2165. IGATEFILES=GetDirectoryContents('panda/src/downloader', ["*.h", "*_composite.cxx"])
  2166. TargetAdd('libdownloader.in', opts=OPTS, input=IGATEFILES)
  2167. TargetAdd('libdownloader.in', opts=['IMOD:pandaexpress', 'ILIB:libdownloader', 'SRCDIR:panda/src/downloader'])
  2168. TargetAdd('libdownloader_igate.obj', input='libdownloader.in', opts=["DEPENDENCYONLY"])
  2169. #
  2170. # DIRECTORY: panda/metalibs/pandaexpress/
  2171. #
  2172. OPTS=['DIR:panda/metalibs/pandaexpress', 'BUILDING:PANDAEXPRESS', 'ZLIB']
  2173. TargetAdd('pandaexpress_pandaexpress.obj', opts=OPTS, input='pandaexpress.cxx')
  2174. TargetAdd('libpandaexpress_module.obj', input='libdownloader.in')
  2175. TargetAdd('libpandaexpress_module.obj', input='libexpress.in')
  2176. TargetAdd('libpandaexpress_module.obj', opts=['ADVAPI', 'OPENSSL'])
  2177. TargetAdd('libpandaexpress_module.obj', opts=['IMOD:pandaexpress', 'ILIB:libpandaexpress'])
  2178. TargetAdd('libpandaexpress.dll', input='pandaexpress_pandaexpress.obj')
  2179. TargetAdd('libpandaexpress.dll', input='libpandaexpress_module.obj')
  2180. TargetAdd('libpandaexpress.dll', input='downloader_composite.obj')
  2181. TargetAdd('libpandaexpress.dll', input='libdownloader_igate.obj')
  2182. TargetAdd('libpandaexpress.dll', input='express_composite1.obj')
  2183. TargetAdd('libpandaexpress.dll', input='express_composite2.obj')
  2184. TargetAdd('libpandaexpress.dll', input='libexpress_igate.obj')
  2185. TargetAdd('libpandaexpress.dll', input='pandabase_pandabase.obj')
  2186. TargetAdd('libpandaexpress.dll', input=COMMON_DTOOL_LIBS)
  2187. TargetAdd('libpandaexpress.dll', opts=['ADVAPI', 'WINSOCK2', 'OPENSSL', 'ZLIB'])
  2188. #
  2189. # DIRECTORY: panda/src/pipeline/
  2190. #
  2191. if (not RUNTIME):
  2192. OPTS=['DIR:panda/src/pipeline', 'BUILDING:PANDA']
  2193. TargetAdd('pipeline_composite.obj', opts=OPTS, input='pipeline_composite.cxx')
  2194. TargetAdd('pipeline_contextSwitch.obj', opts=OPTS, input='contextSwitch.c')
  2195. IGATEFILES=GetDirectoryContents('panda/src/pipeline', ["*.h", "*_composite.cxx"])
  2196. TargetAdd('libpipeline.in', opts=OPTS, input=IGATEFILES)
  2197. TargetAdd('libpipeline.in', opts=['IMOD:panda', 'ILIB:libpipeline', 'SRCDIR:panda/src/pipeline'])
  2198. TargetAdd('libpipeline_igate.obj', input='libpipeline.in', opts=["DEPENDENCYONLY"])
  2199. #
  2200. # DIRECTORY: panda/src/putil/
  2201. #
  2202. if (not RUNTIME):
  2203. OPTS=['DIR:panda/src/putil', 'BUILDING:PANDA', 'ZLIB']
  2204. TargetAdd('putil_composite1.obj', opts=OPTS, input='putil_composite1.cxx')
  2205. TargetAdd('putil_composite2.obj', opts=OPTS, input='putil_composite2.cxx')
  2206. IGATEFILES=GetDirectoryContents('panda/src/putil', ["*.h", "*_composite.cxx"])
  2207. IGATEFILES.remove("test_bam.h")
  2208. TargetAdd('libputil.in', opts=OPTS, input=IGATEFILES)
  2209. TargetAdd('libputil.in', opts=['IMOD:panda', 'ILIB:libputil', 'SRCDIR:panda/src/putil'])
  2210. TargetAdd('libputil_igate.obj', input='libputil.in', opts=["DEPENDENCYONLY"])
  2211. #
  2212. # DIRECTORY: panda/src/audio/
  2213. #
  2214. if (not RUNTIME):
  2215. OPTS=['DIR:panda/src/audio', 'BUILDING:PANDA']
  2216. TargetAdd('audio_composite.obj', opts=OPTS, input='audio_composite.cxx')
  2217. IGATEFILES=["audio.h"]
  2218. TargetAdd('libaudio.in', opts=OPTS, input=IGATEFILES)
  2219. TargetAdd('libaudio.in', opts=['IMOD:panda', 'ILIB:libaudio', 'SRCDIR:panda/src/audio'])
  2220. TargetAdd('libaudio_igate.obj', input='libaudio.in', opts=["DEPENDENCYONLY"])
  2221. #
  2222. # DIRECTORY: panda/src/event/
  2223. #
  2224. if (not RUNTIME):
  2225. OPTS=['DIR:panda/src/event', 'BUILDING:PANDA']
  2226. TargetAdd('event_composite.obj', opts=OPTS, input='event_composite.cxx')
  2227. IGATEFILES=GetDirectoryContents('panda/src/event', ["*.h", "*_composite.cxx"])
  2228. TargetAdd('libevent.in', opts=OPTS, input=IGATEFILES)
  2229. TargetAdd('libevent.in', opts=['IMOD:panda', 'ILIB:libevent', 'SRCDIR:panda/src/event'])
  2230. TargetAdd('libevent_igate.obj', input='libevent.in', opts=["DEPENDENCYONLY"])
  2231. #
  2232. # DIRECTORY: panda/src/linmath/
  2233. #
  2234. if (not RUNTIME):
  2235. OPTS=['DIR:panda/src/linmath', 'BUILDING:PANDA']
  2236. TargetAdd('linmath_composite.obj', opts=OPTS, input='linmath_composite.cxx')
  2237. IGATEFILES=GetDirectoryContents('panda/src/linmath', ["*.h", "*_ext.I", "*_composite.cxx"])
  2238. IGATEFILES.remove('lmat_ops_src.h')
  2239. IGATEFILES.remove('cast_to_double.h')
  2240. IGATEFILES.remove('lmat_ops.h')
  2241. IGATEFILES.remove('cast_to_float.h')
  2242. TargetAdd('liblinmath.in', opts=OPTS, input=IGATEFILES)
  2243. TargetAdd('liblinmath.in', opts=['IMOD:panda', 'ILIB:liblinmath', 'SRCDIR:panda/src/linmath'])
  2244. TargetAdd('liblinmath_igate.obj', input='liblinmath.in', opts=["DEPENDENCYONLY"])
  2245. #
  2246. # DIRECTORY: panda/src/mathutil/
  2247. #
  2248. if (not RUNTIME):
  2249. OPTS=['DIR:panda/src/mathutil', 'BUILDING:PANDA', 'FFTW']
  2250. TargetAdd('mathutil_composite.obj', opts=OPTS, input='mathutil_composite.cxx')
  2251. IGATEFILES=GetDirectoryContents('panda/src/mathutil', ["*.h", "*_composite.cxx"])
  2252. TargetAdd('libmathutil.in', opts=OPTS, input=IGATEFILES)
  2253. TargetAdd('libmathutil.in', opts=['IMOD:panda', 'ILIB:libmathutil', 'SRCDIR:panda/src/mathutil'])
  2254. TargetAdd('libmathutil_igate.obj', input='libmathutil.in', opts=["DEPENDENCYONLY"])
  2255. #
  2256. # DIRECTORY: panda/src/gsgbase/
  2257. #
  2258. if (not RUNTIME):
  2259. OPTS=['DIR:panda/src/gsgbase', 'BUILDING:PANDA']
  2260. TargetAdd('gsgbase_composite.obj', opts=OPTS, input='gsgbase_composite.cxx')
  2261. IGATEFILES=GetDirectoryContents('panda/src/gsgbase', ["*.h", "*_composite.cxx"])
  2262. TargetAdd('libgsgbase.in', opts=OPTS, input=IGATEFILES)
  2263. TargetAdd('libgsgbase.in', opts=['IMOD:panda', 'ILIB:libgsgbase', 'SRCDIR:panda/src/gsgbase'])
  2264. TargetAdd('libgsgbase_igate.obj', input='libgsgbase.in', opts=["DEPENDENCYONLY"])
  2265. #
  2266. # DIRECTORY: panda/src/pnmimage/
  2267. #
  2268. if (not RUNTIME):
  2269. OPTS=['DIR:panda/src/pnmimage', 'BUILDING:PANDA', 'ZLIB']
  2270. TargetAdd('pnmimage_composite.obj', opts=OPTS, input='pnmimage_composite.cxx')
  2271. IGATEFILES=GetDirectoryContents('panda/src/pnmimage', ["*.h", "*_composite.cxx"])
  2272. TargetAdd('libpnmimage.in', opts=OPTS, input=IGATEFILES)
  2273. TargetAdd('libpnmimage.in', opts=['IMOD:panda', 'ILIB:libpnmimage', 'SRCDIR:panda/src/pnmimage'])
  2274. TargetAdd('libpnmimage_igate.obj', input='libpnmimage.in', opts=["DEPENDENCYONLY"])
  2275. #
  2276. # DIRECTORY: panda/src/nativenet/
  2277. #
  2278. if (not RUNTIME):
  2279. OPTS=['DIR:panda/src/nativenet', 'OPENSSL', 'BUILDING:PANDA']
  2280. TargetAdd('nativenet_composite.obj', opts=OPTS, input='nativenet_composite1.cxx')
  2281. IGATEFILES=GetDirectoryContents('panda/src/nativenet', ["*.h", "*_composite.cxx"])
  2282. TargetAdd('libnativenet.in', opts=OPTS, input=IGATEFILES)
  2283. TargetAdd('libnativenet.in', opts=['IMOD:panda', 'ILIB:libnativenet', 'SRCDIR:panda/src/nativenet'])
  2284. TargetAdd('libnativenet_igate.obj', input='libnativenet.in', opts=["DEPENDENCYONLY"])
  2285. #
  2286. # DIRECTORY: panda/src/net/
  2287. #
  2288. if (not RUNTIME):
  2289. OPTS=['DIR:panda/src/net', 'BUILDING:PANDA']
  2290. TargetAdd('net_composite.obj', opts=OPTS, input='net_composite.cxx')
  2291. IGATEFILES=GetDirectoryContents('panda/src/net', ["*.h", "*_composite.cxx"])
  2292. IGATEFILES.remove("datagram_ui.h")
  2293. TargetAdd('libnet.in', opts=OPTS, input=IGATEFILES)
  2294. TargetAdd('libnet.in', opts=['IMOD:panda', 'ILIB:libnet', 'SRCDIR:panda/src/net'])
  2295. TargetAdd('libnet_igate.obj', input='libnet.in', opts=["DEPENDENCYONLY"])
  2296. #
  2297. # DIRECTORY: panda/src/pstatclient/
  2298. #
  2299. if (not RUNTIME):
  2300. OPTS=['DIR:panda/src/pstatclient', 'BUILDING:PANDA']
  2301. TargetAdd('pstatclient_composite.obj', opts=OPTS, input='pstatclient_composite.cxx')
  2302. IGATEFILES=GetDirectoryContents('panda/src/pstatclient', ["*.h", "*_composite.cxx"])
  2303. TargetAdd('libpstatclient.in', opts=OPTS, input=IGATEFILES)
  2304. TargetAdd('libpstatclient.in', opts=['IMOD:panda', 'ILIB:libpstatclient', 'SRCDIR:panda/src/pstatclient'])
  2305. TargetAdd('libpstatclient_igate.obj', input='libpstatclient.in', opts=["DEPENDENCYONLY"])
  2306. #
  2307. # DIRECTORY: panda/src/gobj/
  2308. #
  2309. if (not RUNTIME):
  2310. OPTS=['DIR:panda/src/gobj', 'BUILDING:PANDA', 'NVIDIACG', 'ZLIB', 'SQUISH', "BIGOBJ"]
  2311. TargetAdd('gobj_composite1.obj', opts=OPTS, input='gobj_composite1.cxx')
  2312. TargetAdd('gobj_composite2.obj', opts=OPTS, input='gobj_composite2.cxx')
  2313. IGATEFILES=GetDirectoryContents('panda/src/gobj', ["*.h", "*_composite.cxx"])
  2314. if ("cgfx_states.h" in IGATEFILES): IGATEFILES.remove("cgfx_states.h")
  2315. TargetAdd('libgobj.in', opts=OPTS, input=IGATEFILES)
  2316. TargetAdd('libgobj.in', opts=['IMOD:panda', 'ILIB:libgobj', 'SRCDIR:panda/src/gobj'])
  2317. TargetAdd('libgobj_igate.obj', input='libgobj.in', opts=["DEPENDENCYONLY"])
  2318. #
  2319. # DIRECTORY: panda/src/lerp/
  2320. #
  2321. if (not RUNTIME):
  2322. OPTS=['DIR:panda/src/lerp', 'BUILDING:PANDA']
  2323. TargetAdd('lerp_composite.obj', opts=OPTS, input='lerp_composite.cxx')
  2324. IGATEFILES=GetDirectoryContents('panda/src/lerp', ["*.h", "*_composite.cxx"])
  2325. IGATEFILES.remove("lerpchans.h")
  2326. TargetAdd('liblerp.in', opts=OPTS, input=IGATEFILES)
  2327. TargetAdd('liblerp.in', opts=['IMOD:panda', 'ILIB:liblerp', 'SRCDIR:panda/src/lerp'])
  2328. TargetAdd('liblerp_igate.obj', input='liblerp.in', opts=["DEPENDENCYONLY"])
  2329. #
  2330. # DIRECTORY: panda/src/pgraphnodes/
  2331. #
  2332. if (not RUNTIME):
  2333. OPTS=['DIR:panda/src/pgraphnodes', 'BUILDING:PANDA', "BIGOBJ"]
  2334. TargetAdd('pgraphnodes_composite1.obj', opts=OPTS, input='pgraphnodes_composite1.cxx')
  2335. TargetAdd('pgraphnodes_composite2.obj', opts=OPTS, input='pgraphnodes_composite2.cxx')
  2336. IGATEFILES=GetDirectoryContents('panda/src/pgraphnodes', ["*.h", "*_composite.cxx"])
  2337. TargetAdd('libpgraphnodes.in', opts=OPTS, input=IGATEFILES)
  2338. TargetAdd('libpgraphnodes.in', opts=['IMOD:panda', 'ILIB:libpgraphnodes', 'SRCDIR:panda/src/pgraphnodes'])
  2339. TargetAdd('libpgraphnodes_igate.obj', input='libpgraphnodes.in', opts=["DEPENDENCYONLY"])
  2340. #
  2341. # DIRECTORY: panda/src/pgraph/
  2342. #
  2343. if (not RUNTIME):
  2344. OPTS=['DIR:panda/src/pgraph', 'BUILDING:PANDA','BIGOBJ']
  2345. TargetAdd('pgraph_nodePath.obj', opts=OPTS, input='nodePath.cxx')
  2346. TargetAdd('pgraph_composite1.obj', opts=OPTS, input='pgraph_composite1.cxx')
  2347. TargetAdd('pgraph_composite2.obj', opts=OPTS, input='pgraph_composite2.cxx')
  2348. TargetAdd('pgraph_composite3.obj', opts=OPTS, input='pgraph_composite3.cxx')
  2349. TargetAdd('pgraph_composite4.obj', opts=OPTS, input='pgraph_composite4.cxx')
  2350. IGATEFILES=GetDirectoryContents('panda/src/pgraph', ["*.h", "nodePath.cxx", "*_composite.cxx"])
  2351. TargetAdd('libpgraph.in', opts=OPTS, input=IGATEFILES)
  2352. TargetAdd('libpgraph.in', opts=['IMOD:panda', 'ILIB:libpgraph', 'SRCDIR:panda/src/pgraph'])
  2353. TargetAdd('libpgraph_igate.obj', input='libpgraph.in', opts=["DEPENDENCYONLY","BIGOBJ"])
  2354. #
  2355. # DIRECTORY: panda/src/cull/
  2356. #
  2357. if (not RUNTIME):
  2358. OPTS=['DIR:panda/src/cull', 'BUILDING:PANDA', 'BIGOBJ']
  2359. TargetAdd('cull_composite.obj', opts=OPTS, input='cull_composite.cxx')
  2360. IGATEFILES=GetDirectoryContents('panda/src/cull', ["*.h", "*_composite.cxx"])
  2361. TargetAdd('libcull.in', opts=OPTS, input=IGATEFILES)
  2362. TargetAdd('libcull.in', opts=['IMOD:panda', 'ILIB:libcull', 'SRCDIR:panda/src/cull'])
  2363. TargetAdd('libcull_igate.obj', input='libcull.in', opts=["DEPENDENCYONLY"])
  2364. #
  2365. # DIRECTORY: panda/src/chan/
  2366. #
  2367. if (not RUNTIME):
  2368. OPTS=['DIR:panda/src/chan', 'BUILDING:PANDA', 'BIGOBJ']
  2369. TargetAdd('chan_composite.obj', opts=OPTS, input='chan_composite.cxx')
  2370. IGATEFILES=GetDirectoryContents('panda/src/chan', ["*.h", "*_composite.cxx"])
  2371. IGATEFILES.remove('movingPart.h')
  2372. IGATEFILES.remove('animChannelFixed.h')
  2373. TargetAdd('libchan.in', opts=OPTS, input=IGATEFILES)
  2374. TargetAdd('libchan.in', opts=['IMOD:panda', 'ILIB:libchan', 'SRCDIR:panda/src/chan'])
  2375. TargetAdd('libchan_igate.obj', input='libchan.in', opts=["DEPENDENCYONLY"])
  2376. # DIRECTORY: panda/src/char/
  2377. #
  2378. if (not RUNTIME):
  2379. OPTS=['DIR:panda/src/char', 'BUILDING:PANDA', 'BIGOBJ']
  2380. TargetAdd('char_composite.obj', opts=OPTS, input='char_composite.cxx')
  2381. IGATEFILES=GetDirectoryContents('panda/src/char', ["*.h", "*_composite.cxx"])
  2382. TargetAdd('libchar.in', opts=OPTS, input=IGATEFILES)
  2383. TargetAdd('libchar.in', opts=['IMOD:panda', 'ILIB:libchar', 'SRCDIR:panda/src/char'])
  2384. TargetAdd('libchar_igate.obj', input='libchar.in', opts=["DEPENDENCYONLY"])
  2385. #
  2386. # DIRECTORY: panda/src/dgraph/
  2387. #
  2388. if (not RUNTIME):
  2389. OPTS=['DIR:panda/src/dgraph', 'BUILDING:PANDA']
  2390. TargetAdd('dgraph_composite.obj', opts=OPTS, input='dgraph_composite.cxx')
  2391. IGATEFILES=GetDirectoryContents('panda/src/dgraph', ["*.h", "*_composite.cxx"])
  2392. TargetAdd('libdgraph.in', opts=OPTS, input=IGATEFILES)
  2393. TargetAdd('libdgraph.in', opts=['IMOD:panda', 'ILIB:libdgraph', 'SRCDIR:panda/src/dgraph'])
  2394. TargetAdd('libdgraph_igate.obj', input='libdgraph.in', opts=["DEPENDENCYONLY"])
  2395. #
  2396. # DIRECTORY: panda/src/display/
  2397. #
  2398. if (not RUNTIME):
  2399. OPTS=['DIR:panda/src/display', 'BUILDING:PANDA', 'BIGOBJ']
  2400. TargetAdd('display_composite.obj', opts=OPTS, input='display_composite.cxx')
  2401. IGATEFILES=GetDirectoryContents('panda/src/display', ["*.h", "*_composite.cxx"])
  2402. IGATEFILES.remove("renderBuffer.h")
  2403. TargetAdd('libdisplay.in', opts=OPTS, input=IGATEFILES)
  2404. TargetAdd('libdisplay.in', opts=['IMOD:panda', 'ILIB:libdisplay', 'SRCDIR:panda/src/display'])
  2405. TargetAdd('libdisplay_igate.obj', input='libdisplay.in', opts=["DEPENDENCYONLY"])
  2406. if (RTDIST and sys.platform == "darwin"):
  2407. OPTS=['DIR:panda/src/display']
  2408. TargetAdd('subprocessWindowBuffer.obj', opts=OPTS, input='subprocessWindowBuffer.cxx')
  2409. TargetAdd('libsubprocbuffer.ilb', input='subprocessWindowBuffer.obj')
  2410. #
  2411. # DIRECTORY: panda/src/device/
  2412. #
  2413. if (not RUNTIME):
  2414. OPTS=['DIR:panda/src/device', 'BUILDING:PANDA', 'BIGOBJ']
  2415. TargetAdd('device_composite.obj', opts=OPTS, input='device_composite.cxx')
  2416. IGATEFILES=GetDirectoryContents('panda/src/device', ["*.h", "*_composite.cxx"])
  2417. TargetAdd('libdevice.in', opts=OPTS, input=IGATEFILES)
  2418. TargetAdd('libdevice.in', opts=['IMOD:panda', 'ILIB:libdevice', 'SRCDIR:panda/src/device'])
  2419. TargetAdd('libdevice_igate.obj', input='libdevice.in', opts=["DEPENDENCYONLY"])
  2420. #
  2421. # DIRECTORY: panda/src/pnmtext/
  2422. #
  2423. if (PkgSkip("FREETYPE")==0 and not RUNTIME):
  2424. OPTS=['DIR:panda/src/pnmtext', 'BUILDING:PANDA', 'FREETYPE']
  2425. TargetAdd('pnmtext_composite.obj', opts=OPTS, input='pnmtext_composite.cxx')
  2426. IGATEFILES=GetDirectoryContents('panda/src/pnmtext', ["*.h", "*_composite.cxx"])
  2427. TargetAdd('libpnmtext.in', opts=OPTS, input=IGATEFILES)
  2428. TargetAdd('libpnmtext.in', opts=['IMOD:panda', 'ILIB:libpnmtext', 'SRCDIR:panda/src/pnmtext'])
  2429. TargetAdd('libpnmtext_igate.obj', input='libpnmtext.in', opts=["DEPENDENCYONLY"])
  2430. #
  2431. # DIRECTORY: panda/src/text/
  2432. #
  2433. if (not RUNTIME):
  2434. OPTS=['DIR:panda/src/text', 'BUILDING:PANDA', 'ZLIB', 'FREETYPE', 'BIGOBJ']
  2435. TargetAdd('text_composite.obj', opts=OPTS, input='text_composite.cxx')
  2436. IGATEFILES=GetDirectoryContents('panda/src/text', ["*.h", "*_composite.cxx"])
  2437. TargetAdd('libtext.in', opts=OPTS, input=IGATEFILES)
  2438. TargetAdd('libtext.in', opts=['IMOD:panda', 'ILIB:libtext', 'SRCDIR:panda/src/text'])
  2439. TargetAdd('libtext_igate.obj', input='libtext.in', opts=["DEPENDENCYONLY"])
  2440. #
  2441. # DIRECTORY: panda/src/movies/
  2442. #
  2443. if (not RUNTIME):
  2444. OPTS=['DIR:panda/src/movies', 'BUILDING:PANDA', 'FFMPEG']
  2445. TargetAdd('movies_composite1.obj', opts=OPTS, input='movies_composite1.cxx')
  2446. IGATEFILES=GetDirectoryContents('panda/src/movies', ["*.h", "*_composite.cxx"])
  2447. TargetAdd('libmovies.in', opts=OPTS, input=IGATEFILES)
  2448. TargetAdd('libmovies.in', opts=['IMOD:panda', 'ILIB:libmovies', 'SRCDIR:panda/src/movies'])
  2449. TargetAdd('libmovies_igate.obj', input='libmovies.in', opts=["DEPENDENCYONLY"])
  2450. #
  2451. # DIRECTORY: panda/src/grutil/
  2452. #
  2453. if (not RUNTIME):
  2454. OPTS=['DIR:panda/src/grutil', 'BUILDING:PANDA', 'FFMPEG', 'BIGOBJ']
  2455. TargetAdd('grutil_multitexReducer.obj', opts=OPTS, input='multitexReducer.cxx')
  2456. TargetAdd('grutil_composite1.obj', opts=OPTS, input='grutil_composite1.cxx')
  2457. TargetAdd('grutil_composite2.obj', opts=OPTS, input='grutil_composite2.cxx')
  2458. IGATEFILES=GetDirectoryContents('panda/src/grutil', ["*.h", "*_composite.cxx"])
  2459. TargetAdd('libgrutil.in', opts=OPTS, input=IGATEFILES)
  2460. TargetAdd('libgrutil.in', opts=['IMOD:panda', 'ILIB:libgrutil', 'SRCDIR:panda/src/grutil'])
  2461. TargetAdd('libgrutil_igate.obj', input='libgrutil.in', opts=["DEPENDENCYONLY"])
  2462. #
  2463. # DIRECTORY: panda/src/tform/
  2464. #
  2465. if (not RUNTIME):
  2466. OPTS=['DIR:panda/src/tform', 'BUILDING:PANDA', 'BIGOBJ']
  2467. TargetAdd('tform_composite.obj', opts=OPTS, input='tform_composite.cxx')
  2468. IGATEFILES=GetDirectoryContents('panda/src/tform', ["*.h", "*_composite.cxx"])
  2469. TargetAdd('libtform.in', opts=OPTS, input=IGATEFILES)
  2470. TargetAdd('libtform.in', opts=['IMOD:panda', 'ILIB:libtform', 'SRCDIR:panda/src/tform'])
  2471. TargetAdd('libtform_igate.obj', input='libtform.in', opts=["DEPENDENCYONLY"])
  2472. #
  2473. # DIRECTORY: panda/src/collide/
  2474. #
  2475. if (not RUNTIME):
  2476. OPTS=['DIR:panda/src/collide', 'BUILDING:PANDA', 'BIGOBJ']
  2477. TargetAdd('collide_composite.obj', opts=OPTS, input='collide_composite.cxx')
  2478. IGATEFILES=GetDirectoryContents('panda/src/collide', ["*.h", "*_composite.cxx"])
  2479. TargetAdd('libcollide.in', opts=OPTS, input=IGATEFILES)
  2480. TargetAdd('libcollide.in', opts=['IMOD:panda', 'ILIB:libcollide', 'SRCDIR:panda/src/collide'])
  2481. TargetAdd('libcollide_igate.obj', input='libcollide.in', opts=["DEPENDENCYONLY"])
  2482. #
  2483. # DIRECTORY: panda/src/parametrics/
  2484. #
  2485. if (not RUNTIME):
  2486. OPTS=['DIR:panda/src/parametrics', 'BUILDING:PANDA', 'BIGOBJ']
  2487. TargetAdd('parametrics_composite.obj', opts=OPTS, input='parametrics_composite.cxx')
  2488. IGATEFILES=GetDirectoryContents('panda/src/parametrics', ["*.h", "*_composite.cxx"])
  2489. TargetAdd('libparametrics.in', opts=OPTS, input=IGATEFILES)
  2490. TargetAdd('libparametrics.in', opts=['IMOD:panda', 'ILIB:libparametrics', 'SRCDIR:panda/src/parametrics'])
  2491. TargetAdd('libparametrics_igate.obj', input='libparametrics.in', opts=["DEPENDENCYONLY"])
  2492. #
  2493. # DIRECTORY: panda/src/pgui/
  2494. #
  2495. if (not RUNTIME):
  2496. OPTS=['DIR:panda/src/pgui', 'BUILDING:PANDA', 'BIGOBJ']
  2497. TargetAdd('pgui_composite.obj', opts=OPTS, input='pgui_composite.cxx')
  2498. IGATEFILES=GetDirectoryContents('panda/src/pgui', ["*.h", "*_composite.cxx"])
  2499. TargetAdd('libpgui.in', opts=OPTS, input=IGATEFILES)
  2500. TargetAdd('libpgui.in', opts=['IMOD:panda', 'ILIB:libpgui', 'SRCDIR:panda/src/pgui'])
  2501. TargetAdd('libpgui_igate.obj', input='libpgui.in', opts=["DEPENDENCYONLY"])
  2502. #
  2503. # DIRECTORY: panda/src/pnmimagetypes/
  2504. #
  2505. if (not RUNTIME):
  2506. OPTS=['DIR:panda/src/pnmimagetypes', 'DIR:panda/src/pnmimage', 'BUILDING:PANDA', 'PNG', 'ZLIB', 'JPEG', 'ZLIB', 'JPEG', 'TIFF']
  2507. TargetAdd('pnmimagetypes_composite.obj', opts=OPTS, input='pnmimagetypes_composite.cxx')
  2508. #
  2509. # DIRECTORY: panda/src/recorder/
  2510. #
  2511. if (not RUNTIME):
  2512. OPTS=['DIR:panda/src/recorder', 'BUILDING:PANDA']
  2513. TargetAdd('recorder_composite.obj', opts=OPTS, input='recorder_composite.cxx')
  2514. IGATEFILES=GetDirectoryContents('panda/src/recorder', ["*.h", "*_composite.cxx"])
  2515. TargetAdd('librecorder.in', opts=OPTS, input=IGATEFILES)
  2516. TargetAdd('librecorder.in', opts=['IMOD:panda', 'ILIB:librecorder', 'SRCDIR:panda/src/recorder'])
  2517. TargetAdd('librecorder_igate.obj', input='librecorder.in', opts=["DEPENDENCYONLY"])
  2518. #
  2519. # DIRECTORY: panda/src/vrpn/
  2520. #
  2521. if (PkgSkip("VRPN")==0 and not RUNTIME):
  2522. OPTS=['DIR:panda/src/vrpn', 'BUILDING:PANDA', 'VRPN']
  2523. TargetAdd('vrpn_composite.obj', opts=OPTS, input='vrpn_composite.cxx')
  2524. IGATEFILES=GetDirectoryContents('panda/src/vrpn', ["*.h", "*_composite.cxx"])
  2525. TargetAdd('libvrpn.in', opts=OPTS, input=IGATEFILES)
  2526. TargetAdd('libvrpn.in', opts=['IMOD:panda', 'ILIB:libvrpn', 'SRCDIR:panda/src/vrpn'])
  2527. TargetAdd('libvrpn_igate.obj', input='libvrpn.in', opts=["DEPENDENCYONLY"])
  2528. #
  2529. # DIRECTORY: panda/src/dxml/
  2530. #
  2531. DefSymbol("TINYXML", "TIXML_USE_STL", "")
  2532. if (RUNTIME or RTDIST):
  2533. OPTS=['DIR:panda/src/dxml', 'TINYXML']
  2534. TargetAdd('tinyxml_composite1.obj', opts=OPTS, input='tinyxml_composite1.cxx')
  2535. TargetAdd('libp3tinyxml.ilb', input='tinyxml_composite1.obj')
  2536. if (not RUNTIME):
  2537. OPTS=['DIR:panda/src/dxml', 'BUILDING:PANDA', 'TINYXML']
  2538. TargetAdd('dxml_composite1.obj', opts=OPTS, input='dxml_composite1.cxx')
  2539. IGATEFILES=GetDirectoryContents('panda/src/dxml', ["*.h", "dxml_composite1.cxx"])
  2540. TargetAdd('libdxml.in', opts=OPTS, input=IGATEFILES)
  2541. TargetAdd('libdxml.in', opts=['IMOD:panda', 'ILIB:libdxml', 'SRCDIR:panda/src/dxml'])
  2542. TargetAdd('libdxml_igate.obj', input='libdxml.in', opts=["DEPENDENCYONLY"])
  2543. #
  2544. # DIRECTORY: panda/metalibs/panda/
  2545. #
  2546. if (not RUNTIME):
  2547. OPTS=['DIR:panda/metalibs/panda', 'BUILDING:PANDA', 'VRPN', 'JPEG', 'PNG',
  2548. 'TIFF', 'ZLIB', 'OPENSSL', 'FREETYPE', 'FFTW', 'ADVAPI', 'WINSOCK2','SQUISH',
  2549. 'NVIDIACG', 'WINUSER', 'WINMM', 'FFMPEG', 'SWSCALE']
  2550. TargetAdd('panda_panda.obj', opts=OPTS, input='panda.cxx')
  2551. TargetAdd('libpanda_module.obj', input='librecorder.in')
  2552. TargetAdd('libpanda_module.obj', input='libpgraphnodes.in')
  2553. TargetAdd('libpanda_module.obj', input='libpgraph.in')
  2554. TargetAdd('libpanda_module.obj', input='libcull.in')
  2555. TargetAdd('libpanda_module.obj', input='libgrutil.in')
  2556. TargetAdd('libpanda_module.obj', input='libchan.in')
  2557. TargetAdd('libpanda_module.obj', input='libpstatclient.in')
  2558. TargetAdd('libpanda_module.obj', input='libchar.in')
  2559. TargetAdd('libpanda_module.obj', input='libcollide.in')
  2560. TargetAdd('libpanda_module.obj', input='libdevice.in')
  2561. TargetAdd('libpanda_module.obj', input='libdgraph.in')
  2562. TargetAdd('libpanda_module.obj', input='libdisplay.in')
  2563. TargetAdd('libpanda_module.obj', input='libpipeline.in')
  2564. TargetAdd('libpanda_module.obj', input='libevent.in')
  2565. TargetAdd('libpanda_module.obj', input='libgobj.in')
  2566. TargetAdd('libpanda_module.obj', input='libgsgbase.in')
  2567. TargetAdd('libpanda_module.obj', input='liblinmath.in')
  2568. TargetAdd('libpanda_module.obj', input='libmathutil.in')
  2569. TargetAdd('libpanda_module.obj', input='libparametrics.in')
  2570. TargetAdd('libpanda_module.obj', input='libpnmimage.in')
  2571. TargetAdd('libpanda_module.obj', input='libtext.in')
  2572. TargetAdd('libpanda_module.obj', input='libtform.in')
  2573. TargetAdd('libpanda_module.obj', input='liblerp.in')
  2574. TargetAdd('libpanda_module.obj', input='libputil.in')
  2575. TargetAdd('libpanda_module.obj', input='libaudio.in')
  2576. TargetAdd('libpanda_module.obj', input='libnativenet.in')
  2577. TargetAdd('libpanda_module.obj', input='libnet.in')
  2578. TargetAdd('libpanda_module.obj', input='libpgui.in')
  2579. TargetAdd('libpanda_module.obj', input='libmovies.in')
  2580. TargetAdd('libpanda_module.obj', input='libdxml.in')
  2581. TargetAdd('libpanda.dll', input='panda_panda.obj')
  2582. TargetAdd('libpanda.dll', input='libpanda_module.obj')
  2583. TargetAdd('libpanda.dll', input='recorder_composite.obj')
  2584. TargetAdd('libpanda.dll', input='librecorder_igate.obj')
  2585. TargetAdd('libpanda.dll', input='pgraphnodes_composite1.obj')
  2586. TargetAdd('libpanda.dll', input='pgraphnodes_composite2.obj')
  2587. TargetAdd('libpanda.dll', input='libpgraphnodes_igate.obj')
  2588. TargetAdd('libpanda.dll', input='pgraph_nodePath.obj')
  2589. TargetAdd('libpanda.dll', input='pgraph_composite1.obj')
  2590. TargetAdd('libpanda.dll', input='pgraph_composite2.obj')
  2591. TargetAdd('libpanda.dll', input='pgraph_composite3.obj')
  2592. TargetAdd('libpanda.dll', input='pgraph_composite4.obj')
  2593. TargetAdd('libpanda.dll', input='libpgraph_igate.obj')
  2594. TargetAdd('libpanda.dll', input='cull_composite.obj')
  2595. TargetAdd('libpanda.dll', input='movies_composite1.obj')
  2596. TargetAdd('libpanda.dll', input='libmovies_igate.obj')
  2597. TargetAdd('libpanda.dll', input='grutil_multitexReducer.obj')
  2598. TargetAdd('libpanda.dll', input='grutil_composite1.obj')
  2599. TargetAdd('libpanda.dll', input='grutil_composite2.obj')
  2600. TargetAdd('libpanda.dll', input='libgrutil_igate.obj')
  2601. TargetAdd('libpanda.dll', input='chan_composite.obj')
  2602. TargetAdd('libpanda.dll', input='libchan_igate.obj')
  2603. TargetAdd('libpanda.dll', input='pstatclient_composite.obj')
  2604. TargetAdd('libpanda.dll', input='libpstatclient_igate.obj')
  2605. TargetAdd('libpanda.dll', input='char_composite.obj')
  2606. TargetAdd('libpanda.dll', input='libchar_igate.obj')
  2607. TargetAdd('libpanda.dll', input='collide_composite.obj')
  2608. TargetAdd('libpanda.dll', input='libcollide_igate.obj')
  2609. TargetAdd('libpanda.dll', input='device_composite.obj')
  2610. TargetAdd('libpanda.dll', input='libdevice_igate.obj')
  2611. TargetAdd('libpanda.dll', input='dgraph_composite.obj')
  2612. TargetAdd('libpanda.dll', input='libdgraph_igate.obj')
  2613. TargetAdd('libpanda.dll', input='display_composite.obj')
  2614. TargetAdd('libpanda.dll', input='libdisplay_igate.obj')
  2615. TargetAdd('libpanda.dll', input='pipeline_composite.obj')
  2616. TargetAdd('libpanda.dll', input='pipeline_contextSwitch.obj')
  2617. TargetAdd('libpanda.dll', input='libpipeline_igate.obj')
  2618. TargetAdd('libpanda.dll', input='event_composite.obj')
  2619. TargetAdd('libpanda.dll', input='libevent_igate.obj')
  2620. TargetAdd('libpanda.dll', input='gobj_composite1.obj')
  2621. TargetAdd('libpanda.dll', input='gobj_composite2.obj')
  2622. TargetAdd('libpanda.dll', input='libgobj_igate.obj')
  2623. TargetAdd('libpanda.dll', input='gsgbase_composite.obj')
  2624. TargetAdd('libpanda.dll', input='libgsgbase_igate.obj')
  2625. TargetAdd('libpanda.dll', input='linmath_composite.obj')
  2626. TargetAdd('libpanda.dll', input='liblinmath_igate.obj')
  2627. TargetAdd('libpanda.dll', input='mathutil_composite.obj')
  2628. TargetAdd('libpanda.dll', input='libmathutil_igate.obj')
  2629. TargetAdd('libpanda.dll', input='parametrics_composite.obj')
  2630. TargetAdd('libpanda.dll', input='libparametrics_igate.obj')
  2631. TargetAdd('libpanda.dll', input='pnmimagetypes_composite.obj')
  2632. TargetAdd('libpanda.dll', input='pnmimage_composite.obj')
  2633. TargetAdd('libpanda.dll', input='libpnmimage_igate.obj')
  2634. TargetAdd('libpanda.dll', input='text_composite.obj')
  2635. TargetAdd('libpanda.dll', input='libtext_igate.obj')
  2636. TargetAdd('libpanda.dll', input='tform_composite.obj')
  2637. TargetAdd('libpanda.dll', input='libtform_igate.obj')
  2638. TargetAdd('libpanda.dll', input='lerp_composite.obj')
  2639. TargetAdd('libpanda.dll', input='liblerp_igate.obj')
  2640. TargetAdd('libpanda.dll', input='putil_composite1.obj')
  2641. TargetAdd('libpanda.dll', input='putil_composite2.obj')
  2642. TargetAdd('libpanda.dll', input='libputil_igate.obj')
  2643. TargetAdd('libpanda.dll', input='audio_composite.obj')
  2644. TargetAdd('libpanda.dll', input='libaudio_igate.obj')
  2645. TargetAdd('libpanda.dll', input='pgui_composite.obj')
  2646. TargetAdd('libpanda.dll', input='libpgui_igate.obj')
  2647. TargetAdd('libpanda.dll', input='net_composite.obj')
  2648. TargetAdd('libpanda.dll', input='libnet_igate.obj')
  2649. TargetAdd('libpanda.dll', input='nativenet_composite.obj')
  2650. TargetAdd('libpanda.dll', input='libnativenet_igate.obj')
  2651. TargetAdd('libpanda.dll', input='pandabase_pandabase.obj')
  2652. TargetAdd('libpanda.dll', input='libpandaexpress.dll')
  2653. TargetAdd('libpanda.dll', input='dxml_composite1.obj')
  2654. TargetAdd('libpanda.dll', input='libdxml_igate.obj')
  2655. TargetAdd('libpanda.dll', input='libp3dtoolconfig.dll')
  2656. TargetAdd('libpanda.dll', input='libp3dtool.dll')
  2657. if PkgSkip("VRPN")==0:
  2658. TargetAdd('libpanda.dll', input="vrpn_composite.obj")
  2659. TargetAdd('libpanda.dll', input="libvrpn_igate.obj")
  2660. TargetAdd('libpanda_module.obj', input='libvrpn.in')
  2661. if PkgSkip("FREETYPE")==0:
  2662. TargetAdd('libpanda.dll', input="pnmtext_composite.obj")
  2663. TargetAdd('libpanda.dll', input="libpnmtext_igate.obj")
  2664. TargetAdd('libpanda_module.obj', input='libpnmtext.in')
  2665. TargetAdd('libpanda_module.obj', opts=OPTS)
  2666. TargetAdd('libpanda_module.obj', opts=['IMOD:panda', 'ILIB:libpanda'])
  2667. TargetAdd('libpanda.dll', dep='dtool_have_vrpn.dat')
  2668. TargetAdd('libpanda.dll', dep='dtool_have_freetype.dat')
  2669. TargetAdd('libpanda.dll', opts=OPTS)
  2670. #
  2671. # DIRECTORY: panda/src/vision/
  2672. #
  2673. if (not RUNTIME):
  2674. OPTS=['DIR:panda/src/vision', 'BUILDING:VISION', 'ARTOOLKIT', 'OPENCV', 'DX9', 'DIRECTCAM', 'JPEG']
  2675. TargetAdd('vision_composite1.obj', opts=OPTS, input='vision_composite1.cxx')
  2676. IGATEFILES=GetDirectoryContents('panda/src/vision', ["*.h", "*_composite.cxx"])
  2677. TargetAdd('libvision.in', opts=OPTS, input=IGATEFILES)
  2678. TargetAdd('libvision.in', opts=['IMOD:p3vision', 'ILIB:libvision', 'SRCDIR:panda/src/vision'])
  2679. TargetAdd('libvision_igate.obj', input='libvision.in', opts=["DEPENDENCYONLY"])
  2680. TargetAdd('libp3vision_module.obj', input='libvision.in')
  2681. TargetAdd('libp3vision_module.obj', opts=OPTS)
  2682. TargetAdd('libp3vision_module.obj', opts=['IMOD:p3vision', 'ILIB:libp3vision'])
  2683. TargetAdd('libp3vision.dll', input='vision_composite1.obj')
  2684. TargetAdd('libp3vision.dll', input='libvision_igate.obj')
  2685. TargetAdd('libp3vision.dll', input='libp3vision_module.obj')
  2686. TargetAdd('libp3vision.dll', input=COMMON_PANDA_LIBS)
  2687. TargetAdd('libp3vision.dll', opts=OPTS)
  2688. #
  2689. # DIRECTORY: panda/src/awesomium
  2690. #
  2691. if PkgSkip("AWESOMIUM") == 0 and not RUNTIME:
  2692. OPTS=['DIR:panda/src/awesomium', 'BUILDING:PANDAAWESOMIUM', 'AWESOMIUM']
  2693. TargetAdd('pandaawesomium_composite1.obj', opts=OPTS, input='pandaawesomium_composite1.cxx')
  2694. IGATEFILES=GetDirectoryContents('panda/src/awesomium', ["*.h", "*_composite1.cxx"])
  2695. TargetAdd('libawesomium.in', opts=OPTS, input=IGATEFILES)
  2696. TargetAdd('libawesomium.in', opts=['IMOD:p3awesomium', 'ILIB:libawesomium', 'SRCDIR:panda/src/awesomium'])
  2697. TargetAdd('libawesomium_igate.obj', input='libawesomium.in', opts=["DEPENDENCYONLY"])
  2698. TargetAdd('libp3awesomium_module.obj', input='libawesomium.in')
  2699. TargetAdd('libp3awesomium_module.obj', opts=OPTS)
  2700. TargetAdd('libp3awesomium_module.obj', opts=['IMOD:p3awesomium', 'ILIB:libp3awesomium'])
  2701. TargetAdd('libp3awesomium.dll', input='pandaawesomium_composite1.obj')
  2702. TargetAdd('libp3awesomium.dll', input='libawesomium_igate.obj')
  2703. TargetAdd('libp3awesomium.dll', input='libp3awesomium_module.obj')
  2704. TargetAdd('libp3awesomium.dll', input=COMMON_PANDA_LIBS)
  2705. TargetAdd('libp3awesomium.dll', opts=OPTS)
  2706. #
  2707. # DIRECTORY: panda/src/skel
  2708. #
  2709. if (not RUNTIME):
  2710. OPTS=['DIR:panda/src/skel', 'BUILDING:PANDASKEL', 'ADVAPI']
  2711. TargetAdd('skel_composite.obj', opts=OPTS, input='skel_composite.cxx')
  2712. IGATEFILES=GetDirectoryContents("panda/src/skel", ["*.h", "*_composite.cxx"])
  2713. TargetAdd('libskel.in', opts=OPTS, input=IGATEFILES)
  2714. TargetAdd('libskel.in', opts=['IMOD:pandaskel', 'ILIB:libskel', 'SRCDIR:panda/src/skel'])
  2715. TargetAdd('libskel_igate.obj', input='libskel.in', opts=["DEPENDENCYONLY"])
  2716. #
  2717. # DIRECTORY: panda/src/skel
  2718. #
  2719. if (not RUNTIME):
  2720. OPTS=['BUILDING:PANDASKEL', 'ADVAPI']
  2721. TargetAdd('libpandaskel_module.obj', input='libskel.in')
  2722. TargetAdd('libpandaskel_module.obj', opts=OPTS)
  2723. TargetAdd('libpandaskel_module.obj', opts=['IMOD:pandaskel', 'ILIB:libpandaskel'])
  2724. TargetAdd('libpandaskel.dll', input='skel_composite.obj')
  2725. TargetAdd('libpandaskel.dll', input='libskel_igate.obj')
  2726. TargetAdd('libpandaskel.dll', input='libpandaskel_module.obj')
  2727. TargetAdd('libpandaskel.dll', input=COMMON_PANDA_LIBS)
  2728. TargetAdd('libpandaskel.dll', opts=OPTS)
  2729. #
  2730. # DIRECTORY: panda/src/distort/
  2731. #
  2732. if (not RUNTIME):
  2733. OPTS=['DIR:panda/src/distort', 'BUILDING:PANDAFX']
  2734. TargetAdd('distort_composite.obj', opts=OPTS, input='distort_composite.cxx')
  2735. IGATEFILES=GetDirectoryContents('panda/src/distort', ["*.h", "*_composite.cxx"])
  2736. TargetAdd('libdistort.in', opts=OPTS, input=IGATEFILES)
  2737. TargetAdd('libdistort.in', opts=['IMOD:pandafx', 'ILIB:libdistort', 'SRCDIR:panda/src/distort'])
  2738. TargetAdd('libdistort_igate.obj', input='libdistort.in', opts=["DEPENDENCYONLY"])
  2739. #
  2740. # DIRECTORY: panda/metalibs/pandafx/
  2741. #
  2742. if (not RUNTIME):
  2743. OPTS=['DIR:panda/metalibs/pandafx', 'DIR:panda/src/distort', 'BUILDING:PANDAFX', 'NVIDIACG']
  2744. TargetAdd('pandafx_pandafx.obj', opts=OPTS, input='pandafx.cxx')
  2745. TargetAdd('libpandafx_module.obj', input='libdistort.in')
  2746. TargetAdd('libpandafx_module.obj', opts=OPTS)
  2747. TargetAdd('libpandafx_module.obj', opts=['IMOD:pandafx', 'ILIB:libpandafx'])
  2748. TargetAdd('libpandafx.dll', input='pandafx_pandafx.obj')
  2749. TargetAdd('libpandafx.dll', input='libpandafx_module.obj')
  2750. TargetAdd('libpandafx.dll', input='distort_composite.obj')
  2751. TargetAdd('libpandafx.dll', input='libdistort_igate.obj')
  2752. TargetAdd('libpandafx.dll', input=COMMON_PANDA_LIBS)
  2753. TargetAdd('libpandafx.dll', opts=['ADVAPI', 'NVIDIACG'])
  2754. #
  2755. # DIRECTORY: panda/src/audiotraits/
  2756. #
  2757. if PkgSkip("FMODEX") == 0 and not RUNTIME:
  2758. OPTS=['DIR:panda/src/audiotraits', 'BUILDING:FMOD_AUDIO', 'FMODEX']
  2759. TargetAdd('fmod_audio_fmod_audio_composite.obj', opts=OPTS, input='fmod_audio_composite.cxx')
  2760. TargetAdd('libp3fmod_audio.dll', input='fmod_audio_fmod_audio_composite.obj')
  2761. TargetAdd('libp3fmod_audio.dll', input=COMMON_PANDA_LIBS)
  2762. TargetAdd('libp3fmod_audio.dll', opts=['MODULE', 'ADVAPI', 'WINUSER', 'WINMM', 'FMODEX'])
  2763. if PkgSkip("OPENAL") == 0 and not RUNTIME:
  2764. OPTS=['DIR:panda/src/audiotraits', 'BUILDING:OPENAL_AUDIO', 'OPENAL']
  2765. TargetAdd('openal_audio_openal_audio_composite.obj', opts=OPTS, input='openal_audio_composite.cxx')
  2766. TargetAdd('libp3openal_audio.dll', input='openal_audio_openal_audio_composite.obj')
  2767. TargetAdd('libp3openal_audio.dll', input=COMMON_PANDA_LIBS)
  2768. TargetAdd('libp3openal_audio.dll', opts=['MODULE', 'ADVAPI', 'WINUSER', 'WINMM', 'OPENAL'])
  2769. #
  2770. # DIRECTORY: panda/src/downloadertools/
  2771. #
  2772. if (PkgSkip("OPENSSL")==0 and not RTDIST and not RUNTIME and PkgSkip("DEPLOYTOOLS")==0):
  2773. OPTS=['DIR:panda/src/downloadertools', 'OPENSSL', 'ZLIB', 'ADVAPI', 'WINSOCK2', 'WINSHELL']
  2774. TargetAdd('apply_patch_apply_patch.obj', opts=OPTS, input='apply_patch.cxx')
  2775. TargetAdd('apply_patch.exe', input=['apply_patch_apply_patch.obj'])
  2776. TargetAdd('apply_patch.exe', input=COMMON_PANDA_LIBS_PYSTUB)
  2777. TargetAdd('apply_patch.exe', opts=OPTS)
  2778. TargetAdd('build_patch_build_patch.obj', opts=OPTS, input='build_patch.cxx')
  2779. TargetAdd('build_patch.exe', input=['build_patch_build_patch.obj'])
  2780. TargetAdd('build_patch.exe', input=COMMON_PANDA_LIBS_PYSTUB)
  2781. TargetAdd('build_patch.exe', opts=OPTS)
  2782. TargetAdd('check_adler_check_adler.obj', opts=OPTS, input='check_adler.cxx')
  2783. TargetAdd('check_adler.exe', input=['check_adler_check_adler.obj'])
  2784. TargetAdd('check_adler.exe', input=COMMON_PANDA_LIBS_PYSTUB)
  2785. TargetAdd('check_adler.exe', opts=OPTS)
  2786. TargetAdd('check_crc_check_crc.obj', opts=OPTS, input='check_crc.cxx')
  2787. TargetAdd('check_crc.exe', input=['check_crc_check_crc.obj'])
  2788. TargetAdd('check_crc.exe', input=COMMON_PANDA_LIBS_PYSTUB)
  2789. TargetAdd('check_crc.exe', opts=OPTS)
  2790. TargetAdd('check_md5_check_md5.obj', opts=OPTS, input='check_md5.cxx')
  2791. TargetAdd('check_md5.exe', input=['check_md5_check_md5.obj'])
  2792. TargetAdd('check_md5.exe', input=COMMON_PANDA_LIBS_PYSTUB)
  2793. TargetAdd('check_md5.exe', opts=OPTS)
  2794. TargetAdd('pdecrypt_pdecrypt.obj', opts=OPTS, input='pdecrypt.cxx')
  2795. TargetAdd('pdecrypt.exe', input=['pdecrypt_pdecrypt.obj'])
  2796. TargetAdd('pdecrypt.exe', input=COMMON_PANDA_LIBS_PYSTUB)
  2797. TargetAdd('pdecrypt.exe', opts=OPTS)
  2798. TargetAdd('pencrypt_pencrypt.obj', opts=OPTS, input='pencrypt.cxx')
  2799. TargetAdd('pencrypt.exe', input=['pencrypt_pencrypt.obj'])
  2800. TargetAdd('pencrypt.exe', input=COMMON_PANDA_LIBS_PYSTUB)
  2801. TargetAdd('pencrypt.exe', opts=OPTS)
  2802. TargetAdd('show_ddb_show_ddb.obj', opts=OPTS, input='show_ddb.cxx')
  2803. TargetAdd('show_ddb.exe', input=['show_ddb_show_ddb.obj'])
  2804. TargetAdd('show_ddb.exe', input=COMMON_PANDA_LIBS_PYSTUB)
  2805. TargetAdd('show_ddb.exe', opts=OPTS)
  2806. #
  2807. # DIRECTORY: panda/src/downloadertools/
  2808. #
  2809. if (PkgSkip("ZLIB")==0 and not RTDIST and not RUNTIME and PkgSkip("DEPLOYTOOLS")==0):
  2810. OPTS=['DIR:panda/src/downloadertools', 'ZLIB', 'OPENSSL', 'ADVAPI', 'WINSOCK2', 'WINSHELL']
  2811. TargetAdd('multify_multify.obj', opts=OPTS, input='multify.cxx')
  2812. TargetAdd('multify.exe', input=['multify_multify.obj'])
  2813. TargetAdd('multify.exe', input=COMMON_PANDA_LIBS_PYSTUB)
  2814. TargetAdd('multify.exe', opts=OPTS)
  2815. TargetAdd('pzip_pzip.obj', opts=OPTS, input='pzip.cxx')
  2816. TargetAdd('pzip.exe', input=['pzip_pzip.obj'])
  2817. TargetAdd('pzip.exe', input=COMMON_PANDA_LIBS_PYSTUB)
  2818. TargetAdd('pzip.exe', opts=OPTS)
  2819. TargetAdd('punzip_punzip.obj', opts=OPTS, input='punzip.cxx')
  2820. TargetAdd('punzip.exe', input=['punzip_punzip.obj'])
  2821. TargetAdd('punzip.exe', input=COMMON_PANDA_LIBS_PYSTUB)
  2822. TargetAdd('punzip.exe', opts=OPTS)
  2823. #
  2824. # DIRECTORY: panda/src/windisplay/
  2825. #
  2826. if (sys.platform.startswith("win") and not RUNTIME):
  2827. OPTS=['DIR:panda/src/windisplay', 'BUILDING:PANDAWIN']
  2828. TargetAdd('windisplay_composite.obj', opts=OPTS+["BIGOBJ"], input='windisplay_composite.cxx')
  2829. TargetAdd('windisplay_windetectdx8.obj', opts=OPTS + ["DX8"], input='winDetectDx8.cxx')
  2830. TargetAdd('windisplay_windetectdx9.obj', opts=OPTS + ["DX9"], input='winDetectDx9.cxx')
  2831. TargetAdd('libp3windisplay.dll', input='windisplay_composite.obj')
  2832. TargetAdd('libp3windisplay.dll', input='windisplay_windetectdx8.obj')
  2833. TargetAdd('libp3windisplay.dll', input='windisplay_windetectdx9.obj')
  2834. TargetAdd('libp3windisplay.dll', input=COMMON_PANDA_LIBS)
  2835. TargetAdd('libp3windisplay.dll', opts=['WINIMM', 'WINGDI', 'WINKERNEL', 'WINOLDNAMES', 'WINUSER', 'WINMM',"BIGOBJ"])
  2836. #
  2837. # DIRECTORY: panda/metalibs/pandadx8/
  2838. #
  2839. if PkgSkip("DX8")==0 and not RUNTIME:
  2840. OPTS=['DIR:panda/src/dxgsg8', 'DIR:panda/metalibs/pandadx8', 'BUILDING:PANDADX', 'DX8']
  2841. TargetAdd('dxgsg8_dxGraphicsStateGuardian8.obj', opts=OPTS, input='dxGraphicsStateGuardian8.cxx')
  2842. TargetAdd('dxgsg8_composite.obj', opts=OPTS, input='dxgsg8_composite.cxx')
  2843. TargetAdd('pandadx8_pandadx8.obj', opts=OPTS, input='pandadx8.cxx')
  2844. TargetAdd('libpandadx8.dll', input='pandadx8_pandadx8.obj')
  2845. TargetAdd('libpandadx8.dll', input='dxgsg8_dxGraphicsStateGuardian8.obj')
  2846. TargetAdd('libpandadx8.dll', input='dxgsg8_composite.obj')
  2847. TargetAdd('libpandadx8.dll', input='libp3windisplay.dll')
  2848. TargetAdd('libpandadx8.dll', input=COMMON_PANDA_LIBS)
  2849. TargetAdd('libpandadx8.dll', opts=['MODULE', 'ADVAPI', 'WINGDI', 'WINKERNEL', 'WINUSER', 'WINMM', 'DX8'])
  2850. #
  2851. # DIRECTORY: panda/metalibs/pandadx9/
  2852. #
  2853. if PkgSkip("DX9")==0 and not RUNTIME:
  2854. OPTS=['DIR:panda/src/dxgsg9', 'BUILDING:PANDADX', 'DX9', 'NVIDIACG', 'CGDX9']
  2855. TargetAdd('dxgsg9_dxGraphicsStateGuardian9.obj', opts=OPTS, input='dxGraphicsStateGuardian9.cxx')
  2856. TargetAdd('dxgsg9_composite.obj', opts=OPTS, input='dxgsg9_composite.cxx')
  2857. OPTS=['DIR:panda/metalibs/pandadx9', 'BUILDING:PANDADX', 'DX9', 'NVIDIACG', 'CGDX9']
  2858. TargetAdd('pandadx9_pandadx9.obj', opts=OPTS, input='pandadx9.cxx')
  2859. TargetAdd('libpandadx9.dll', input='pandadx9_pandadx9.obj')
  2860. TargetAdd('libpandadx9.dll', input='dxgsg9_dxGraphicsStateGuardian9.obj')
  2861. TargetAdd('libpandadx9.dll', input='dxgsg9_composite.obj')
  2862. TargetAdd('libpandadx9.dll', input='libp3windisplay.dll')
  2863. TargetAdd('libpandadx9.dll', input=COMMON_PANDA_LIBS)
  2864. TargetAdd('libpandadx9.dll', opts=['MODULE', 'ADVAPI', 'WINGDI', 'WINKERNEL', 'WINUSER', 'WINMM', 'DX9', 'NVIDIACG', 'CGDX9'])
  2865. #
  2866. # DIRECTORY: panda/src/egg/
  2867. #
  2868. if (not RUNTIME):
  2869. OPTS=['DIR:panda/src/egg', 'BUILDING:PANDAEGG', 'ZLIB', 'BISONPREFIX_eggyy', 'FLEXDASHI']
  2870. CreateFile(GetOutputDir()+"/include/parser.h")
  2871. TargetAdd('egg_parser.obj', opts=OPTS, input='parser.yxx')
  2872. TargetAdd('parser.h', input='egg_parser.obj', opts=['DEPENDENCYONLY'])
  2873. TargetAdd('egg_lexer.obj', opts=OPTS, input='lexer.lxx')
  2874. TargetAdd('egg_composite1.obj', opts=OPTS, input='egg_composite1.cxx')
  2875. TargetAdd('egg_composite2.obj', opts=OPTS, input='egg_composite2.cxx')
  2876. IGATEFILES=GetDirectoryContents('panda/src/egg', ["*.h", "*_composite.cxx"])
  2877. if "parser.h" in IGATEFILES: IGATEFILES.remove("parser.h")
  2878. TargetAdd('libegg.in', opts=OPTS, input=IGATEFILES)
  2879. TargetAdd('libegg.in', opts=['IMOD:pandaegg', 'ILIB:libegg', 'SRCDIR:panda/src/egg'])
  2880. TargetAdd('libegg_igate.obj', input='libegg.in', opts=["DEPENDENCYONLY"])
  2881. #
  2882. # DIRECTORY: panda/src/egg2pg/
  2883. #
  2884. if (not RUNTIME):
  2885. OPTS=['DIR:panda/src/egg2pg', 'BUILDING:PANDAEGG']
  2886. TargetAdd('egg2pg_composite.obj', opts=OPTS, input='egg2pg_composite.cxx')
  2887. IGATEFILES=['load_egg_file.h']
  2888. TargetAdd('libegg2pg.in', opts=OPTS, input=IGATEFILES)
  2889. TargetAdd('libegg2pg.in', opts=['IMOD:pandaegg', 'ILIB:libegg2pg', 'SRCDIR:panda/src/egg2pg'])
  2890. TargetAdd('libegg2pg_igate.obj', input='libegg2pg.in', opts=["DEPENDENCYONLY"])
  2891. #
  2892. # DIRECTORY: panda/src/framework/
  2893. #
  2894. if (not RUNTIME):
  2895. OPTS=['DIR:panda/src/framework', 'BUILDING:FRAMEWORK']
  2896. TargetAdd('framework_composite.obj', opts=OPTS, input='framework_composite.cxx')
  2897. TargetAdd('libp3framework.dll', input='framework_composite.obj')
  2898. TargetAdd('libp3framework.dll', input=COMMON_PANDA_LIBS)
  2899. TargetAdd('libp3framework.dll', opts=['ADVAPI'])
  2900. #
  2901. # DIRECTORY: panda/src/glstuff/
  2902. #
  2903. if (not RUNTIME):
  2904. OPTS=['DIR:panda/src/glstuff', 'NVIDIACG', 'CGGL']
  2905. TargetAdd('glstuff_glpure.obj', opts=OPTS, input='glpure.cxx')
  2906. TargetAdd('libp3glstuff.dll', input='glstuff_glpure.obj')
  2907. TargetAdd('libp3glstuff.dll', input=COMMON_PANDA_LIBS)
  2908. TargetAdd('libp3glstuff.dll', opts=['ADVAPI', 'GL', 'NVIDIACG', 'CGGL'])
  2909. #
  2910. # DIRECTORY: panda/src/glgsg/
  2911. #
  2912. if (not RUNTIME and PkgSkip("GL")==0):
  2913. OPTS=['DIR:panda/src/glgsg', 'DIR:panda/src/glstuff', 'BUILDING:PANDAGL', 'NVIDIACG']
  2914. TargetAdd('glgsg_config_glgsg.obj', opts=OPTS, input='config_glgsg.cxx')
  2915. TargetAdd('glgsg_glgsg.obj', opts=OPTS, input='glgsg.cxx')
  2916. #
  2917. # DIRECTORY: panda/src/glesgsg/
  2918. #
  2919. if (not RUNTIME and PkgSkip("GLES")==0):
  2920. OPTS=['DIR:panda/src/glesgsg', 'DIR:panda/src/glstuff', 'BUILDING:PANDAGLES']
  2921. TargetAdd('glesgsg_config_glesgsg.obj', opts=OPTS, input='config_glesgsg.cxx')
  2922. TargetAdd('glesgsg_glesgsg.obj', opts=OPTS, input='glesgsg.cxx')
  2923. #
  2924. # DIRECTORY: panda/src/gles2gsg/
  2925. #
  2926. if (not RUNTIME and PkgSkip("GLES2")==0):
  2927. OPTS=['DIR:panda/src/gles2gsg', 'DIR:panda/src/glstuff', 'BUILDING:PANDAGLES2']
  2928. TargetAdd('gles2gsg_config_gles2gsg.obj', opts=OPTS, input='config_gles2gsg.cxx')
  2929. TargetAdd('gles2gsg_gles2gsg.obj', opts=OPTS, input='gles2gsg.cxx')
  2930. #
  2931. # DIRECTORY: panda/metalibs/pandaegg/
  2932. #
  2933. if (not RUNTIME):
  2934. OPTS=['DIR:panda/metalibs/pandaegg', 'DIR:panda/src/egg', 'BUILDING:PANDAEGG']
  2935. TargetAdd('pandaegg_pandaegg.obj', opts=OPTS, input='pandaegg.cxx')
  2936. TargetAdd('libpandaegg_module.obj', input='libegg2pg.in')
  2937. TargetAdd('libpandaegg_module.obj', input='libegg.in')
  2938. TargetAdd('libpandaegg_module.obj', opts=OPTS)
  2939. TargetAdd('libpandaegg_module.obj', opts=['IMOD:pandaegg', 'ILIB:libpandaegg'])
  2940. TargetAdd('libpandaegg.dll', input='pandaegg_pandaegg.obj')
  2941. TargetAdd('libpandaegg.dll', input='libpandaegg_module.obj')
  2942. TargetAdd('libpandaegg.dll', input='egg2pg_composite.obj')
  2943. TargetAdd('libpandaegg.dll', input='libegg2pg_igate.obj')
  2944. TargetAdd('libpandaegg.dll', input='egg_composite1.obj')
  2945. TargetAdd('libpandaegg.dll', input='egg_composite2.obj')
  2946. TargetAdd('libpandaegg.dll', input='egg_parser.obj')
  2947. TargetAdd('libpandaegg.dll', input='egg_lexer.obj')
  2948. TargetAdd('libpandaegg.dll', input='libegg_igate.obj')
  2949. TargetAdd('libpandaegg.dll', input=COMMON_PANDA_LIBS)
  2950. TargetAdd('libpandaegg.dll', opts=['ADVAPI'])
  2951. #
  2952. # DIRECTORY: panda/src/mesadisplay/
  2953. #
  2954. if (not sys.platform.startswith("win") and PkgSkip("GL")==0 and PkgSkip("OSMESA")==0 and not RUNTIME):
  2955. OPTS=['DIR:panda/src/mesadisplay', 'DIR:panda/src/glstuff', 'BUILDING:PANDAMESA', 'NVIDIACG', 'GL', 'OSMESA']
  2956. TargetAdd('mesadisplay_composite.obj', opts=OPTS, input='mesadisplay_composite.cxx')
  2957. OPTS=['DIR:panda/metalibs/pandagl', 'BUILDING:PANDAMESA', 'NVIDIACG', 'GL']
  2958. TargetAdd('libpandamesa.dll', input='mesadisplay_composite.obj')
  2959. TargetAdd('libpandamesa.dll', input='libp3glstuff.dll')
  2960. TargetAdd('libpandamesa.dll', input='libpandafx.dll')
  2961. TargetAdd('libpandamesa.dll', input=COMMON_PANDA_LIBS)
  2962. TargetAdd('libpandamesa.dll', opts=['MODULE', 'GL', 'OSMESA'])
  2963. #
  2964. # DIRECTORY: panda/src/x11display/
  2965. #
  2966. if (sys.platform != "win32" and sys.platform != "darwin" and PkgSkip("X11")==0 and not RUNTIME):
  2967. OPTS=['DIR:panda/src/x11display', 'BUILDING:PANDAX11', 'X11']
  2968. TargetAdd('x11display_composite.obj', opts=OPTS, input='x11display_composite.cxx')
  2969. #
  2970. # DIRECTORY: panda/src/glxdisplay/
  2971. #
  2972. if (sys.platform != "win32" and sys.platform != "darwin" and PkgSkip("GL")==0 and PkgSkip("X11")==0 and not RUNTIME):
  2973. OPTS=['DIR:panda/src/glxdisplay', 'BUILDING:PANDAGL', 'GL', 'NVIDIACG', 'CGGL']
  2974. TargetAdd('glxdisplay_composite.obj', opts=OPTS, input='glxdisplay_composite.cxx')
  2975. OPTS=['DIR:panda/metalibs/pandagl', 'BUILDING:PANDAGL', 'GL', 'NVIDIACG', 'CGGL']
  2976. TargetAdd('pandagl_pandagl.obj', opts=OPTS, input='pandagl.cxx')
  2977. TargetAdd('libpandagl.dll', input='x11display_composite.obj')
  2978. TargetAdd('libpandagl.dll', input='pandagl_pandagl.obj')
  2979. TargetAdd('libpandagl.dll', input='glgsg_config_glgsg.obj')
  2980. TargetAdd('libpandagl.dll', input='glgsg_glgsg.obj')
  2981. TargetAdd('libpandagl.dll', input='glxdisplay_composite.obj')
  2982. TargetAdd('libpandagl.dll', input='libp3glstuff.dll')
  2983. TargetAdd('libpandagl.dll', input=COMMON_PANDA_LIBS)
  2984. TargetAdd('libpandagl.dll', opts=['MODULE', 'GL', 'NVIDIACG', 'CGGL', 'X11', 'XRANDR', 'XF86DGA', 'XCURSOR'])
  2985. #
  2986. # DIRECTORY: panda/src/osxdisplay/
  2987. #
  2988. if (sys.platform == 'darwin' and PkgSkip("GL")==0 and not RUNTIME):
  2989. OPTS=['DIR:panda/src/osxdisplay', 'BUILDING:PANDAGL', 'GL', 'NVIDIACG', 'CGGL']
  2990. TargetAdd('osxdisplay_composite1.obj', opts=OPTS, input='osxdisplay_composite1.cxx')
  2991. TargetAdd('osxdisplay_osxGraphicsWindow.obj', opts=OPTS, input='osxGraphicsWindow.mm')
  2992. OPTS=['DIR:panda/metalibs/pandagl', 'BUILDING:PANDAGL', 'GL', 'NVIDIACG', 'CGGL']
  2993. TargetAdd('pandagl_pandagl.obj', opts=OPTS, input='pandagl.cxx')
  2994. TargetAdd('libpandagl.dll', input='pandagl_pandagl.obj')
  2995. TargetAdd('libpandagl.dll', input='glgsg_config_glgsg.obj')
  2996. TargetAdd('libpandagl.dll', input='glgsg_glgsg.obj')
  2997. TargetAdd('libpandagl.dll', input='osxdisplay_composite1.obj')
  2998. TargetAdd('libpandagl.dll', input='osxdisplay_osxGraphicsWindow.obj')
  2999. TargetAdd('libpandagl.dll', input='libp3glstuff.dll')
  3000. TargetAdd('libpandagl.dll', input='libpandafx.dll')
  3001. TargetAdd('libpandagl.dll', input=COMMON_PANDA_LIBS)
  3002. TargetAdd('libpandagl.dll', opts=['MODULE', 'GL', 'NVIDIACG', 'CGGL', 'CARBON', 'AGL', 'COCOA'])
  3003. #
  3004. # DIRECTORY: panda/src/wgldisplay/
  3005. #
  3006. if (sys.platform == "win32" and PkgSkip("GL")==0 and not RUNTIME):
  3007. OPTS=['DIR:panda/src/wgldisplay', 'DIR:panda/src/glstuff', 'BUILDING:PANDAGL', 'NVIDIACG', 'CGGL']
  3008. TargetAdd('wgldisplay_composite.obj', opts=OPTS, input='wgldisplay_composite.cxx')
  3009. OPTS=['DIR:panda/metalibs/pandagl', 'BUILDING:PANDAGL', 'NVIDIACG', 'CGGL']
  3010. TargetAdd('pandagl_pandagl.obj', opts=OPTS, input='pandagl.cxx')
  3011. TargetAdd('libpandagl.dll', input='pandagl_pandagl.obj')
  3012. TargetAdd('libpandagl.dll', input='glgsg_config_glgsg.obj')
  3013. TargetAdd('libpandagl.dll', input='glgsg_glgsg.obj')
  3014. TargetAdd('libpandagl.dll', input='wgldisplay_composite.obj')
  3015. TargetAdd('libpandagl.dll', input='libp3windisplay.dll')
  3016. TargetAdd('libpandagl.dll', input='libp3glstuff.dll')
  3017. TargetAdd('libpandagl.dll', input='libpandafx.dll')
  3018. TargetAdd('libpandagl.dll', input=COMMON_PANDA_LIBS)
  3019. TargetAdd('libpandagl.dll', opts=['MODULE', 'WINGDI', 'GL', 'WINKERNEL', 'WINOLDNAMES', 'WINUSER', 'WINMM', 'NVIDIACG', 'CGGL'])
  3020. #
  3021. # DIRECTORY: panda/src/egldisplay/
  3022. #
  3023. if (PkgSkip("EGL")==0 and PkgSkip("GLES")==0 and PkgSkip("X11")==0 and not RUNTIME):
  3024. DefSymbol('GLES', 'OPENGLES_1', '')
  3025. OPTS=['DIR:panda/src/egldisplay', 'DIR:panda/src/glstuff', 'BUILDING:PANDAGLES', 'GLES', 'EGL']
  3026. TargetAdd('pandagles_egldisplay_composite1.obj', opts=OPTS, input='egldisplay_composite1.cxx')
  3027. OPTS=['DIR:panda/metalibs/pandagles', 'BUILDING:PANDAGLES', 'GLES', 'EGL']
  3028. TargetAdd('pandagles_pandagles.obj', opts=OPTS, input='pandagles.cxx')
  3029. # Uncomment this as soon as x11-specific stuff is removed from egldisplay
  3030. #TargetAdd('libpandagles.dll', input='x11display_composite.obj')
  3031. TargetAdd('libpandagles.dll', input='pandagles_pandagles.obj')
  3032. TargetAdd('libpandagles.dll', input='glesgsg_config_glesgsg.obj')
  3033. TargetAdd('libpandagles.dll', input='glesgsg_glesgsg.obj')
  3034. TargetAdd('libpandagles.dll', input='pandagles_egldisplay_composite1.obj')
  3035. TargetAdd('libpandagles.dll', input='libp3glstuff.dll')
  3036. TargetAdd('libpandagles.dll', input=COMMON_PANDA_LIBS)
  3037. TargetAdd('libpandagles.dll', opts=['MODULE', 'GLES', 'EGL', 'X11', 'XRANDR', 'XF86DGA', 'XCURSOR'])
  3038. #
  3039. # DIRECTORY: panda/src/egldisplay/
  3040. #
  3041. if (PkgSkip("EGL")==0 and PkgSkip("GLES2")==0 and PkgSkip("X11")==0 and not RUNTIME):
  3042. DefSymbol('GLES2', 'OPENGLES_2', '')
  3043. OPTS=['DIR:panda/src/egldisplay', 'DIR:panda/src/glstuff', 'BUILDING:PANDAGLES2', 'GLES2', 'EGL']
  3044. TargetAdd('pandagles2_egldisplay_composite1.obj', opts=OPTS, input='egldisplay_composite1.cxx')
  3045. OPTS=['DIR:panda/metalibs/pandagles2', 'BUILDING:PANDAGLES2', 'GLES2', 'EGL']
  3046. TargetAdd('pandagles2_pandagles2.obj', opts=OPTS, input='pandagles2.cxx')
  3047. # Uncomment this as soon as x11-specific stuff is removed from egldisplay
  3048. #TargetAdd('libpandagles2.dll', input='x11display_composite.obj')
  3049. TargetAdd('libpandagles2.dll', input='pandagles2_pandagles2.obj')
  3050. TargetAdd('libpandagles2.dll', input='gles2gsg_config_gles2gsg.obj')
  3051. TargetAdd('libpandagles2.dll', input='gles2gsg_gles2gsg.obj')
  3052. TargetAdd('libpandagles2.dll', input='pandagles2_egldisplay_composite1.obj')
  3053. TargetAdd('libpandagles2.dll', input='libp3glstuff.dll')
  3054. TargetAdd('libpandagles2.dll', input=COMMON_PANDA_LIBS)
  3055. TargetAdd('libpandagles2.dll', opts=['MODULE', 'GLES2', 'EGL', 'X11', 'XRANDR', 'XF86DGA', 'XCURSOR'])
  3056. #
  3057. # DIRECTORY: panda/src/ode/
  3058. #
  3059. if (PkgSkip("ODE")==0 and not RUNTIME):
  3060. OPTS=['DIR:panda/src/ode', 'BUILDING:PANDAODE', 'ODE']
  3061. TargetAdd('pode_composite1.obj', opts=OPTS, input='pode_composite1.cxx')
  3062. TargetAdd('pode_composite2.obj', opts=OPTS, input='pode_composite2.cxx')
  3063. TargetAdd('pode_composite3.obj', opts=OPTS, input='pode_composite3.cxx')
  3064. IGATEFILES=GetDirectoryContents('panda/src/ode', ["*.h", "*_composite.cxx"])
  3065. IGATEFILES.remove("odeConvexGeom.h")
  3066. IGATEFILES.remove("odeHeightFieldGeom.h")
  3067. IGATEFILES.remove("odeHelperStructs.h")
  3068. TargetAdd('libpandaode.in', opts=OPTS, input=IGATEFILES)
  3069. TargetAdd('libpandaode.in', opts=['IMOD:pandaode', 'ILIB:libpandaode', 'SRCDIR:panda/src/ode'])
  3070. TargetAdd('libpandaode_igate.obj', input='libpandaode.in', opts=["DEPENDENCYONLY"])
  3071. #
  3072. # DIRECTORY: panda/metalibs/pandaode/
  3073. #
  3074. if (PkgSkip("ODE")==0 and not RUNTIME):
  3075. OPTS=['DIR:panda/metalibs/pandaode', 'BUILDING:PANDAODE', 'ODE']
  3076. TargetAdd('pandaode_pandaode.obj', opts=OPTS, input='pandaode.cxx')
  3077. TargetAdd('libpandaode_module.obj', input='libpandaode.in')
  3078. TargetAdd('libpandaode_module.obj', opts=OPTS)
  3079. TargetAdd('libpandaode_module.obj', opts=['IMOD:pandaode', 'ILIB:libpandaode'])
  3080. TargetAdd('libpandaode.dll', input='pandaode_pandaode.obj')
  3081. TargetAdd('libpandaode.dll', input='libpandaode_module.obj')
  3082. TargetAdd('libpandaode.dll', input='pode_composite1.obj')
  3083. TargetAdd('libpandaode.dll', input='pode_composite2.obj')
  3084. TargetAdd('libpandaode.dll', input='pode_composite3.obj')
  3085. TargetAdd('libpandaode.dll', input='libpandaode_igate.obj')
  3086. TargetAdd('libpandaode.dll', input=COMMON_PANDA_LIBS)
  3087. TargetAdd('libpandaode.dll', opts=['WINUSER', 'ODE'])
  3088. #
  3089. # DIRECTORY: panda/src/bullet/
  3090. #
  3091. if (PkgSkip("BULLET")==0 and not RUNTIME):
  3092. OPTS=['DIR:panda/src/bullet', 'BUILDING:PANDABULLET', 'BULLET']
  3093. TargetAdd('bullet_composite.obj', opts=OPTS, input='bullet_composite.cxx')
  3094. IGATEFILES=GetDirectoryContents('panda/src/bullet', ["*.h", "*_composite.cxx"])
  3095. TargetAdd('libpandabullet.in', opts=OPTS, input=IGATEFILES)
  3096. TargetAdd('libpandabullet.in', opts=['IMOD:pandabullet', 'ILIB:libpandabullet', 'SRCDIR:panda/src/bullet'])
  3097. TargetAdd('libpandabullet_igate.obj', input='libpandabullet.in', opts=["DEPENDENCYONLY"])
  3098. #
  3099. # DIRECTORY: panda/metalibs/pandabullet/
  3100. #
  3101. if (PkgSkip("BULLET")==0 and not RUNTIME):
  3102. OPTS=['DIR:panda/metalibs/pandabullet', 'BUILDING:PANDABULLET', 'BULLET']
  3103. TargetAdd('pandabullet_pandabullet.obj', opts=OPTS, input='pandabullet.cxx')
  3104. TargetAdd('libpandabullet_module.obj', input='libpandabullet.in')
  3105. TargetAdd('libpandabullet_module.obj', opts=OPTS)
  3106. TargetAdd('libpandabullet_module.obj', opts=['IMOD:pandabullet', 'ILIB:libpandabullet'])
  3107. TargetAdd('libpandabullet.dll', input='pandabullet_pandabullet.obj')
  3108. TargetAdd('libpandabullet.dll', input='libpandabullet_module.obj')
  3109. TargetAdd('libpandabullet.dll', input='bullet_composite.obj')
  3110. TargetAdd('libpandabullet.dll', input='libpandabullet_igate.obj')
  3111. TargetAdd('libpandabullet.dll', input=COMMON_PANDA_LIBS)
  3112. TargetAdd('libpandabullet.dll', opts=['WINUSER', 'BULLET'])
  3113. #
  3114. # DIRECTORY: panda/src/physx/
  3115. #
  3116. if (PkgSkip("PHYSX")==0):
  3117. OPTS=['DIR:panda/src/physx', 'BUILDING:PANDAPHYSX', 'PHYSX', 'NOPPC']
  3118. TargetAdd('physx_composite.obj', opts=OPTS, input='physx_composite.cxx')
  3119. IGATEFILES=GetDirectoryContents('panda/src/physx', ["*.h", "*_composite.cxx"])
  3120. TargetAdd('libpandaphysx.in', opts=OPTS, input=IGATEFILES)
  3121. TargetAdd('libpandaphysx.in', opts=['IMOD:pandaphysx', 'ILIB:libpandaphysx', 'SRCDIR:panda/src/physx'])
  3122. TargetAdd('libpandaphysx_igate.obj', input='libpandaphysx.in', opts=["DEPENDENCYONLY"])
  3123. #
  3124. # DIRECTORY: panda/metalibs/pandaphysx/
  3125. #
  3126. if (PkgSkip("PHYSX")==0):
  3127. OPTS=['DIR:panda/metalibs/pandaphysx', 'BUILDING:PANDAPHYSX', 'PHYSX', 'NOPPC']
  3128. TargetAdd('pandaphysx_pandaphysx.obj', opts=OPTS, input='pandaphysx.cxx')
  3129. TargetAdd('libpandaphysx_module.obj', input='libpandaphysx.in')
  3130. TargetAdd('libpandaphysx_module.obj', opts=OPTS)
  3131. TargetAdd('libpandaphysx_module.obj', opts=['IMOD:pandaphysx', 'ILIB:libpandaphysx'])
  3132. TargetAdd('libpandaphysx.dll', input='pandaphysx_pandaphysx.obj')
  3133. TargetAdd('libpandaphysx.dll', input='libpandaphysx_module.obj')
  3134. TargetAdd('libpandaphysx.dll', input='physx_composite.obj')
  3135. TargetAdd('libpandaphysx.dll', input='libpandaphysx_igate.obj')
  3136. TargetAdd('libpandaphysx.dll', input=COMMON_PANDA_LIBS)
  3137. TargetAdd('libpandaphysx.dll', opts=['WINUSER', 'PHYSX', 'NOPPC'])
  3138. #
  3139. # DIRECTORY: panda/src/physics/
  3140. #
  3141. if (not RUNTIME):
  3142. OPTS=['DIR:panda/src/physics', 'BUILDING:PANDAPHYSICS']
  3143. TargetAdd('physics_composite.obj', opts=OPTS, input='physics_composite.cxx')
  3144. IGATEFILES=GetDirectoryContents('panda/src/physics', ["*.h", "*_composite.cxx"])
  3145. IGATEFILES.remove("forces.h")
  3146. TargetAdd('libphysics.in', opts=OPTS, input=IGATEFILES)
  3147. TargetAdd('libphysics.in', opts=['IMOD:pandaphysics', 'ILIB:libphysics', 'SRCDIR:panda/src/physics'])
  3148. TargetAdd('libphysics_igate.obj', input='libphysics.in', opts=["DEPENDENCYONLY"])
  3149. #
  3150. # DIRECTORY: panda/src/particlesystem/
  3151. #
  3152. if (not RUNTIME):
  3153. OPTS=['DIR:panda/src/particlesystem', 'BUILDING:PANDAPHYSICS']
  3154. TargetAdd('particlesystem_composite.obj', opts=OPTS, input='particlesystem_composite.cxx')
  3155. IGATEFILES=GetDirectoryContents('panda/src/particlesystem', ["*.h", "*_composite.cxx"])
  3156. IGATEFILES.remove('orientedParticle.h')
  3157. IGATEFILES.remove('orientedParticleFactory.h')
  3158. IGATEFILES.remove('particlefactories.h')
  3159. IGATEFILES.remove('emitters.h')
  3160. IGATEFILES.remove('particles.h')
  3161. TargetAdd('libparticlesystem.in', opts=OPTS, input=IGATEFILES)
  3162. TargetAdd('libparticlesystem.in', opts=['IMOD:pandaphysics', 'ILIB:libparticlesystem', 'SRCDIR:panda/src/particlesystem'])
  3163. #
  3164. # DIRECTORY: panda/metalibs/pandaphysics/
  3165. #
  3166. if (not RUNTIME):
  3167. OPTS=['DIR:panda/metalibs/pandaphysics', 'BUILDING:PANDAPHYSICS']
  3168. TargetAdd('pandaphysics_pandaphysics.obj', opts=OPTS, input='pandaphysics.cxx')
  3169. TargetAdd('libpandaphysics_module.obj', input='libphysics.in')
  3170. TargetAdd('libpandaphysics_module.obj', input='libparticlesystem.in')
  3171. TargetAdd('libpandaphysics_module.obj', opts=OPTS)
  3172. TargetAdd('libpandaphysics_module.obj', opts=['IMOD:pandaphysics', 'ILIB:libpandaphysics'])
  3173. TargetAdd('libpandaphysics.dll', input='pandaphysics_pandaphysics.obj')
  3174. TargetAdd('libpandaphysics.dll', input='libpandaphysics_module.obj')
  3175. TargetAdd('libpandaphysics.dll', input='physics_composite.obj')
  3176. TargetAdd('libpandaphysics.dll', input='libphysics_igate.obj')
  3177. TargetAdd('libpandaphysics.dll', input='particlesystem_composite.obj')
  3178. TargetAdd('libpandaphysics.dll', input='libparticlesystem_igate.obj')
  3179. TargetAdd('libpandaphysics.dll', input=COMMON_PANDA_LIBS)
  3180. TargetAdd('libpandaphysics.dll', opts=['ADVAPI'])
  3181. #
  3182. # DIRECTORY: panda/src/speedtree/
  3183. #
  3184. if (PkgSkip("SPEEDTREE")==0):
  3185. OPTS=['DIR:panda/src/speedtree', 'BUILDING:PANDASPEEDTREE', 'SPEEDTREE']
  3186. TargetAdd('pandaspeedtree_composite1.obj', opts=OPTS, input='pandaspeedtree_composite1.cxx')
  3187. IGATEFILES=GetDirectoryContents('panda/src/speedtree', ["*.h", "*_composite.cxx"])
  3188. TargetAdd('libpandaspeedtree.in', opts=OPTS, input=IGATEFILES)
  3189. TargetAdd('libpandaspeedtree.in', opts=['IMOD:pandaspeedtree', 'ILIB:libpandaspeedtree', 'SRCDIR:panda/src/speedtree'])
  3190. TargetAdd('libpandaspeedtree_igate.obj', input='libpandaspeedtree.in', opts=["DEPENDENCYONLY"])
  3191. TargetAdd('libpandaspeedtree_module.obj', input='libpandaspeedtree.in')
  3192. TargetAdd('libpandaspeedtree_module.obj', opts=OPTS)
  3193. TargetAdd('libpandaspeedtree_module.obj', opts=['IMOD:pandaspeedtree', 'ILIB:libpandaspeedtree'])
  3194. TargetAdd('libpandaspeedtree.dll', input='pandaspeedtree_composite1.obj')
  3195. TargetAdd('libpandaspeedtree.dll', input='libpandaspeedtree_igate.obj')
  3196. TargetAdd('libpandaspeedtree.dll', input='libpandaspeedtree_module.obj')
  3197. TargetAdd('libpandaspeedtree.dll', input=COMMON_PANDA_LIBS)
  3198. TargetAdd('libpandaspeedtree.dll', opts=['SPEEDTREE'])
  3199. if SDK["SPEEDTREEAPI"] == 'OpenGL':
  3200. TargetAdd('libpandaspeedtree.dll', opts=['GL', 'NVIDIACG', 'CGGL'])
  3201. elif SDK["SPEEDTREEAPI"] == 'DirectX9':
  3202. TargetAdd('libpandaspeedtree.dll', opts=['DX9', 'NVIDIACG', 'CGDX9'])
  3203. #
  3204. # DIRECTORY: panda/src/testbed/
  3205. #
  3206. if (not RTDIST and not RUNTIME and PkgSkip("PVIEW")==0):
  3207. OPTS=['DIR:panda/src/testbed']
  3208. TargetAdd('pview_pview.obj', opts=OPTS, input='pview.cxx')
  3209. TargetAdd('pview.exe', input='pview_pview.obj')
  3210. TargetAdd('pview.exe', input='libp3framework.dll')
  3211. TargetAdd('pview.exe', input='libpandaegg.dll')
  3212. TargetAdd('pview.exe', input=COMMON_PANDA_LIBS_PYSTUB)
  3213. TargetAdd('pview.exe', opts=['ADVAPI', 'WINSOCK2', 'WINSHELL'])
  3214. #
  3215. # DIRECTORY: panda/src/tinydisplay/
  3216. #
  3217. if (not RUNTIME and (sys.platform == "win32" or sys.platform == "darwin" or PkgSkip("X11")==0) and PkgSkip("TINYDISPLAY")==0):
  3218. OPTS=['DIR:panda/src/tinydisplay', 'BUILDING:TINYDISPLAY']
  3219. TargetAdd('tinydisplay_composite1.obj', opts=OPTS, input='tinydisplay_composite1.cxx')
  3220. TargetAdd('tinydisplay_composite2.obj', opts=OPTS, input='tinydisplay_composite2.cxx')
  3221. TargetAdd('tinydisplay_ztriangle_1.obj', opts=OPTS, input='ztriangle_1.cxx')
  3222. TargetAdd('tinydisplay_ztriangle_2.obj', opts=OPTS, input='ztriangle_2.cxx')
  3223. TargetAdd('tinydisplay_ztriangle_3.obj', opts=OPTS, input='ztriangle_3.cxx')
  3224. TargetAdd('tinydisplay_ztriangle_4.obj', opts=OPTS, input='ztriangle_4.cxx')
  3225. TargetAdd('tinydisplay_ztriangle_table.obj', opts=OPTS, input='ztriangle_table.cxx')
  3226. if (sys.platform == "darwin"):
  3227. TargetAdd('tinydisplay_tinyOsxGraphicsWindow.obj', opts=OPTS, input='tinyOsxGraphicsWindow.mm')
  3228. TargetAdd('libtinydisplay.dll', input='tinydisplay_tinyOsxGraphicsWindow.obj')
  3229. TargetAdd('libtinydisplay.dll', opts=['CARBON', 'AGL', 'COCOA'])
  3230. elif (sys.platform == "win32"):
  3231. TargetAdd('libtinydisplay.dll', input='libp3windisplay.dll')
  3232. TargetAdd('libtinydisplay.dll', opts=['WINIMM', 'WINGDI', 'WINKERNEL', 'WINOLDNAMES', 'WINUSER', 'WINMM'])
  3233. else:
  3234. TargetAdd('libtinydisplay.dll', input='x11display_composite.obj')
  3235. TargetAdd('libtinydisplay.dll', opts=['X11', 'XRANDR', 'XF86DGA', 'XCURSOR'])
  3236. TargetAdd('libtinydisplay.dll', input='tinydisplay_composite1.obj')
  3237. TargetAdd('libtinydisplay.dll', input='tinydisplay_composite2.obj')
  3238. TargetAdd('libtinydisplay.dll', input='tinydisplay_ztriangle_1.obj')
  3239. TargetAdd('libtinydisplay.dll', input='tinydisplay_ztriangle_2.obj')
  3240. TargetAdd('libtinydisplay.dll', input='tinydisplay_ztriangle_3.obj')
  3241. TargetAdd('libtinydisplay.dll', input='tinydisplay_ztriangle_4.obj')
  3242. TargetAdd('libtinydisplay.dll', input='tinydisplay_ztriangle_table.obj')
  3243. TargetAdd('libtinydisplay.dll', input=COMMON_PANDA_LIBS)
  3244. #
  3245. # DIRECTORY: direct/src/directbase/
  3246. #
  3247. if (PkgSkip("DIRECT")==0):
  3248. OPTS=['DIR:direct/src/directbase', 'PYTHON']
  3249. TargetAdd('directbase_directbase.obj', opts=OPTS+['BUILDING:DIRECT'], input='directbase.cxx')
  3250. if (PkgSkip("PYTHON")==0 and not RTDIST and not RUNTIME):
  3251. DefSymbol("BUILDING:PACKPANDA", "IMPORT_MODULE", "direct.directscripts.packpanda")
  3252. TargetAdd('packpanda.obj', opts=OPTS+['BUILDING:PACKPANDA'], input='ppython.cxx')
  3253. TargetAdd('packpanda.exe', input='packpanda.obj')
  3254. TargetAdd('packpanda.exe', opts=['PYTHON'])
  3255. DefSymbol("BUILDING:EGGCACHER", "IMPORT_MODULE", "direct.directscripts.eggcacher")
  3256. TargetAdd('eggcacher.obj', opts=OPTS+['BUILDING:EGGCACHER'], input='ppython.cxx')
  3257. TargetAdd('eggcacher.exe', input='eggcacher.obj')
  3258. TargetAdd('eggcacher.exe', opts=['PYTHON'])
  3259. #
  3260. # DIRECTORY: direct/src/dcparser/
  3261. #
  3262. if (PkgSkip("DIRECT")==0):
  3263. OPTS=['DIR:direct/src/dcparser', 'WITHINPANDA', 'BUILDING:DIRECT', 'BISONPREFIX_dcyy']
  3264. CreateFile(GetOutputDir()+"/include/dcParser.h")
  3265. TargetAdd('dcparser_dcParser.obj', opts=OPTS, input='dcParser.yxx')
  3266. TargetAdd('dcParser.h', input='egg_parser.obj', opts=['DEPENDENCYONLY'])
  3267. TargetAdd('dcparser_dcLexer.obj', opts=OPTS, input='dcLexer.lxx')
  3268. TargetAdd('dcparser_composite.obj', opts=OPTS, input='dcparser_composite.cxx')
  3269. IGATEFILES=GetDirectoryContents('direct/src/dcparser', ["*.h", "*_composite.cxx"])
  3270. if "dcParser.h" in IGATEFILES: IGATEFILES.remove("dcParser.h")
  3271. if "dcmsgtypes.h" in IGATEFILES: IGATEFILES.remove('dcmsgtypes.h')
  3272. TargetAdd('libdcparser.in', opts=OPTS, input=IGATEFILES)
  3273. TargetAdd('libdcparser.in', opts=['IMOD:p3direct', 'ILIB:libdcparser', 'SRCDIR:direct/src/dcparser'])
  3274. TargetAdd('libdcparser_igate.obj', input='libdcparser.in', opts=["DEPENDENCYONLY"])
  3275. #
  3276. # DIRECTORY: direct/src/deadrec/
  3277. #
  3278. if (PkgSkip("DIRECT")==0):
  3279. OPTS=['DIR:direct/src/deadrec', 'BUILDING:DIRECT']
  3280. TargetAdd('deadrec_composite.obj', opts=OPTS, input='deadrec_composite.cxx')
  3281. IGATEFILES=GetDirectoryContents('direct/src/deadrec', ["*.h", "*_composite.cxx"])
  3282. TargetAdd('libdeadrec.in', opts=OPTS, input=IGATEFILES)
  3283. TargetAdd('libdeadrec.in', opts=['IMOD:p3direct', 'ILIB:libdeadrec', 'SRCDIR:direct/src/deadrec'])
  3284. TargetAdd('libdeadrec_igate.obj', input='libdeadrec.in', opts=["DEPENDENCYONLY"])
  3285. #
  3286. # DIRECTORY: direct/src/distributed/
  3287. #
  3288. if (PkgSkip("DIRECT")==0):
  3289. OPTS=['DIR:direct/src/distributed', 'DIR:direct/src/dcparser', 'WITHINPANDA', 'BUILDING:DIRECT', 'OPENSSL']
  3290. TargetAdd('distributed_config_distributed.obj', opts=OPTS, input='config_distributed.cxx')
  3291. TargetAdd('distributed_cConnectionRepository.obj', opts=OPTS, input='cConnectionRepository.cxx')
  3292. TargetAdd('distributed_cDistributedSmoothNodeBase.obj', opts=OPTS, input='cDistributedSmoothNodeBase.cxx')
  3293. IGATEFILES=GetDirectoryContents('direct/src/distributed', ["*.h", "*.cxx"])
  3294. TargetAdd('libdistributed.in', opts=OPTS, input=IGATEFILES)
  3295. TargetAdd('libdistributed.in', opts=['IMOD:p3direct', 'ILIB:libdistributed', 'SRCDIR:direct/src/distributed'])
  3296. TargetAdd('libdistributed_igate.obj', input='libdistributed.in', opts=["DEPENDENCYONLY"])
  3297. #
  3298. # DIRECTORY: direct/src/interval/
  3299. #
  3300. if (PkgSkip("DIRECT")==0):
  3301. OPTS=['DIR:direct/src/interval', 'BUILDING:DIRECT']
  3302. TargetAdd('interval_composite.obj', opts=OPTS, input='interval_composite.cxx')
  3303. IGATEFILES=GetDirectoryContents('direct/src/interval', ["*.h", "*_composite.cxx"])
  3304. TargetAdd('libinterval.in', opts=OPTS, input=IGATEFILES)
  3305. TargetAdd('libinterval.in', opts=['IMOD:p3direct', 'ILIB:libinterval', 'SRCDIR:direct/src/interval'])
  3306. TargetAdd('libinterval_igate.obj', input='libinterval.in', opts=["DEPENDENCYONLY"])
  3307. #
  3308. # DIRECTORY: direct/src/showbase/
  3309. #
  3310. if (PkgSkip("DIRECT")==0):
  3311. OPTS=['DIR:direct/src/showbase', 'BUILDING:DIRECT']
  3312. TargetAdd('showbase_showBase.obj', opts=OPTS, input='showBase.cxx')
  3313. if (sys.platform == "darwin"):
  3314. TargetAdd('showbase_showBase_assist.obj', opts=OPTS, input='showBase_assist.mm')
  3315. IGATEFILES=GetDirectoryContents('direct/src/showbase', ["*.h", "showBase.cxx"])
  3316. TargetAdd('libshowbase.in', opts=OPTS, input=IGATEFILES)
  3317. TargetAdd('libshowbase.in', opts=['IMOD:p3direct', 'ILIB:libshowbase', 'SRCDIR:direct/src/showbase'])
  3318. TargetAdd('libshowbase_igate.obj', input='libshowbase.in', opts=["DEPENDENCYONLY"])
  3319. #
  3320. # DIRECTORY: direct/metalibs/direct/
  3321. #
  3322. if (PkgSkip("DIRECT")==0):
  3323. OPTS=['DIR:direct/metalibs/direct', 'BUILDING:DIRECT']
  3324. TargetAdd('direct_direct.obj', opts=OPTS, input='direct.cxx')
  3325. TargetAdd('libp3direct_module.obj', input='libdcparser.in')
  3326. TargetAdd('libp3direct_module.obj', input='libshowbase.in')
  3327. TargetAdd('libp3direct_module.obj', input='libdeadrec.in')
  3328. TargetAdd('libp3direct_module.obj', input='libinterval.in')
  3329. TargetAdd('libp3direct_module.obj', input='libdistributed.in')
  3330. TargetAdd('libp3direct_module.obj', opts=OPTS)
  3331. TargetAdd('libp3direct_module.obj', opts=['IMOD:p3direct', 'ILIB:libp3direct'])
  3332. TargetAdd('libp3direct.dll', input='direct_direct.obj')
  3333. TargetAdd('libp3direct.dll', input='libp3direct_module.obj')
  3334. TargetAdd('libp3direct.dll', input='directbase_directbase.obj')
  3335. TargetAdd('libp3direct.dll', input='dcparser_composite.obj')
  3336. TargetAdd('libp3direct.dll', input='dcparser_dcParser.obj')
  3337. TargetAdd('libp3direct.dll', input='dcparser_dcLexer.obj')
  3338. TargetAdd('libp3direct.dll', input='libdcparser_igate.obj')
  3339. TargetAdd('libp3direct.dll', input='showbase_showBase.obj')
  3340. if (sys.platform == "darwin"):
  3341. TargetAdd('libp3direct.dll', input='showbase_showBase_assist.obj')
  3342. TargetAdd('libp3direct.dll', input='libshowbase_igate.obj')
  3343. TargetAdd('libp3direct.dll', input='deadrec_composite.obj')
  3344. TargetAdd('libp3direct.dll', input='libdeadrec_igate.obj')
  3345. TargetAdd('libp3direct.dll', input='interval_composite.obj')
  3346. TargetAdd('libp3direct.dll', input='libinterval_igate.obj')
  3347. TargetAdd('libp3direct.dll', input='distributed_config_distributed.obj')
  3348. TargetAdd('libp3direct.dll', input='distributed_cConnectionRepository.obj')
  3349. TargetAdd('libp3direct.dll', input='distributed_cDistributedSmoothNodeBase.obj')
  3350. TargetAdd('libp3direct.dll', input='libdistributed_igate.obj')
  3351. TargetAdd('libp3direct.dll', input=COMMON_PANDA_LIBS)
  3352. TargetAdd('libp3direct.dll', opts=['ADVAPI', 'OPENSSL', 'WINUSER'])
  3353. #
  3354. # DIRECTORY: direct/src/dcparse/
  3355. #
  3356. if (PkgSkip("PYTHON")==0 and PkgSkip("DIRECT")==0 and not RTDIST and not RUNTIME):
  3357. OPTS=['DIR:direct/src/dcparse', 'DIR:direct/src/dcparser', 'WITHINPANDA', 'ADVAPI']
  3358. TargetAdd('dcparse_dcparse.obj', opts=OPTS, input='dcparse.cxx')
  3359. TargetAdd('p3dcparse.exe', input='dcparse_dcparse.obj')
  3360. TargetAdd('p3dcparse.exe', input='libp3direct.dll')
  3361. TargetAdd('p3dcparse.exe', input=COMMON_PANDA_LIBS_PYSTUB)
  3362. TargetAdd('p3dcparse.exe', opts=['ADVAPI'])
  3363. #
  3364. # DIRECTORY: direct/src/plugin/
  3365. #
  3366. if (RTDIST or RUNTIME):
  3367. # Explicitly define this as we don't include dtool_config.h here.
  3368. if (sys.platform != "darwin" and not sys.platform.startswith("win")):
  3369. DefSymbol("RUNTIME", "HAVE_X11", "1")
  3370. OPTS=['DIR:direct/src/plugin', 'BUILDING:P3D_PLUGIN', 'RUNTIME', 'OPENSSL']
  3371. TargetAdd('plugin_common.obj', opts=OPTS, input='plugin_common_composite1.cxx')
  3372. OPTS += ['ZLIB', 'JPEG', 'PNG', 'MSIMG']
  3373. TargetAdd('plugin_plugin.obj', opts=OPTS, input='p3d_plugin_composite1.cxx')
  3374. TargetAdd('plugin_mkdir_complete.obj', opts=OPTS, input='mkdir_complete.cxx')
  3375. TargetAdd('plugin_wstring_encode.obj', opts=OPTS, input='wstring_encode.cxx')
  3376. TargetAdd('plugin_parse_color.obj', opts=OPTS, input='parse_color.cxx')
  3377. TargetAdd('plugin_get_twirl_data.obj', opts=OPTS, input='get_twirl_data.cxx')
  3378. TargetAdd('plugin_find_root_dir.obj', opts=OPTS, input='find_root_dir.cxx')
  3379. if (sys.platform == "darwin"):
  3380. TargetAdd('plugin_find_root_dir_assist.obj', opts=OPTS, input='find_root_dir_assist.mm')
  3381. TargetAdd('plugin_binaryXml.obj', opts=OPTS, input='binaryXml.cxx')
  3382. TargetAdd('plugin_fileSpec.obj', opts=OPTS, input='fileSpec.cxx')
  3383. TargetAdd('plugin_handleStream.obj', opts=OPTS, input='handleStream.cxx')
  3384. TargetAdd('plugin_handleStreamBuf.obj', opts=OPTS, input='handleStreamBuf.cxx')
  3385. if (RTDIST):
  3386. for fname in ("p3d_plugin.dll", "libp3d_plugin_static.ilb"):
  3387. TargetAdd(fname, input='plugin_plugin.obj')
  3388. TargetAdd(fname, input='plugin_mkdir_complete.obj')
  3389. TargetAdd(fname, input='plugin_wstring_encode.obj')
  3390. TargetAdd(fname, input='plugin_parse_color.obj')
  3391. TargetAdd(fname, input='plugin_find_root_dir.obj')
  3392. if (sys.platform == "darwin"):
  3393. TargetAdd(fname, input='plugin_find_root_dir_assist.obj')
  3394. TargetAdd(fname, input='plugin_fileSpec.obj')
  3395. TargetAdd(fname, input='plugin_binaryXml.obj')
  3396. TargetAdd(fname, input='plugin_handleStream.obj')
  3397. TargetAdd(fname, input='plugin_handleStreamBuf.obj')
  3398. TargetAdd(fname, input='libp3tinyxml.ilb')
  3399. if (sys.platform == "darwin"):
  3400. TargetAdd(fname, input='libsubprocbuffer.ilb')
  3401. TargetAdd(fname, opts=['OPENSSL', 'ZLIB', 'JPEG', 'PNG', 'X11', 'ADVAPI', 'WINUSER', 'WINGDI', 'WINSHELL', 'WINCOMCTL', 'WINOLE', 'MSIMG'])
  3402. TargetAdd("libp3d_plugin_static.ilb", input='plugin_get_twirl_data.obj')
  3403. if (PkgSkip("PYTHON")==0 and RTDIST):
  3404. TargetAdd('p3dpython_p3dpython_composite1.obj', opts=OPTS, input='p3dpython_composite1.cxx')
  3405. TargetAdd('p3dpython_p3dPythonMain.obj', opts=OPTS, input='p3dPythonMain.cxx')
  3406. TargetAdd('p3dpython.exe', input='p3dpython_p3dpython_composite1.obj')
  3407. TargetAdd('p3dpython.exe', input='p3dpython_p3dPythonMain.obj')
  3408. TargetAdd('p3dpython.exe', input=COMMON_PANDA_LIBS)
  3409. TargetAdd('p3dpython.exe', input='libp3tinyxml.ilb')
  3410. TargetAdd('p3dpython.exe', opts=['NOSTRIP', 'PYTHON', 'WINUSER'])
  3411. TargetAdd('libp3dpython.dll', input='p3dpython_p3dpython_composite1.obj')
  3412. TargetAdd('libp3dpython.dll', input=COMMON_PANDA_LIBS)
  3413. TargetAdd('libp3dpython.dll', input='libp3tinyxml.ilb')
  3414. TargetAdd('libp3dpython.dll', opts=['PYTHON', 'WINUSER'])
  3415. if (sys.platform.startswith("win")):
  3416. DefSymbol("NON_CONSOLE", "NON_CONSOLE", "")
  3417. OPTS.append("NON_CONSOLE")
  3418. TargetAdd('p3dpythonw_p3dpython_composite1.obj', opts=OPTS, input='p3dpython_composite1.cxx')
  3419. TargetAdd('p3dpythonw_p3dPythonMain.obj', opts=OPTS, input='p3dPythonMain.cxx')
  3420. TargetAdd('p3dpythonw.exe', input='p3dpythonw_p3dpython_composite1.obj')
  3421. TargetAdd('p3dpythonw.exe', input='p3dpythonw_p3dPythonMain.obj')
  3422. TargetAdd('p3dpythonw.exe', input=COMMON_PANDA_LIBS)
  3423. TargetAdd('p3dpythonw.exe', input='libp3tinyxml.ilb')
  3424. TargetAdd('p3dpythonw.exe', opts=['SUBSYSTEM:WINDOWS', 'PYTHON', 'WINUSER'])
  3425. if (PkgSkip("OPENSSL")==0 and RTDIST):
  3426. OPTS=['DIR:direct/src/plugin', 'DIR:panda/src/express', 'OPENSSL']
  3427. if (sys.platform=="darwin"): OPTS += ['OPT:2']
  3428. if (PkgSkip("FLTK")==0):
  3429. OPTS.append("FLTK")
  3430. TargetAdd('plugin_p3dCert.obj', opts=OPTS, input='p3dCert.cxx')
  3431. TargetAdd('p3dcert.exe', input='plugin_mkdir_complete.obj')
  3432. TargetAdd('p3dcert.exe', input='plugin_wstring_encode.obj')
  3433. TargetAdd('p3dcert.exe', input='plugin_p3dCert.obj')
  3434. OPTS=['OPENSSL', 'FLTK', 'WINCOMCTL', 'WINSOCK']
  3435. else:
  3436. OPTS.append("WX")
  3437. TargetAdd('plugin_p3dCert.obj', opts=OPTS, input='p3dCert_wx.cxx')
  3438. TargetAdd('p3dcert.exe', input='plugin_mkdir_complete.obj')
  3439. TargetAdd('p3dcert.exe', input='plugin_wstring_encode.obj')
  3440. TargetAdd('p3dcert.exe', input='plugin_p3dCert.obj')
  3441. OPTS=['NOSTRIP', 'OPENSSL', 'WX', 'CARBON', 'WINOLE', 'WINOLEAUT', 'WINUSER', 'ADVAPI', 'WINSHELL', 'WINCOMCTL', 'WINGDI', 'WINCOMDLG']
  3442. if (sys.platform=="darwin"): OPTS.append("GL")
  3443. if (sys.platform=="darwin"): OPTS += ['OPT:2']
  3444. TargetAdd('p3dcert.exe', opts=OPTS)
  3445. #
  3446. # DIRECTORY: direct/src/plugin_npapi/
  3447. #
  3448. if (RUNTIME and PkgSkip("NPAPI")==0):
  3449. OPTS=['DIR:direct/src/plugin_npapi', 'RUNTIME']
  3450. if (sys.platform.startswith("win")):
  3451. nppanda3d_rc = {"name" : "Panda3D Game Engine Plug-in",
  3452. "version" : VERSION,
  3453. "description" : "Runs 3-D games and interactive applets",
  3454. "filename" : "nppanda3d.dll",
  3455. "mimetype" : "application/x-panda3d",
  3456. "extension" : "p3d",
  3457. "filedesc" : "Panda3D applet"}
  3458. TargetAdd('nppanda3d.res', opts=OPTS, winrc=nppanda3d_rc)
  3459. elif (sys.platform=="darwin"):
  3460. TargetAdd('nppanda3d.rsrc', opts=OPTS, input='nppanda3d.r')
  3461. OPTS += ['NPAPI', 'GTK2']
  3462. TargetAdd('plugin_npapi_nppanda3d_composite1.obj', opts=OPTS, input='nppanda3d_composite1.cxx')
  3463. TargetAdd('nppanda3d.plugin', input='plugin_common.obj')
  3464. TargetAdd('nppanda3d.plugin', input='plugin_parse_color.obj')
  3465. TargetAdd('nppanda3d.plugin', input='plugin_get_twirl_data.obj')
  3466. TargetAdd('nppanda3d.plugin', input='plugin_wstring_encode.obj')
  3467. TargetAdd('nppanda3d.plugin', input='plugin_npapi_nppanda3d_composite1.obj')
  3468. if (sys.platform.startswith("win")):
  3469. TargetAdd('nppanda3d.plugin', input='nppanda3d.res')
  3470. TargetAdd('nppanda3d.plugin', input='nppanda3d.def', ipath=OPTS)
  3471. elif (sys.platform == "darwin"):
  3472. TargetAdd('nppanda3d.plugin', input='nppanda3d.rsrc')
  3473. TargetAdd('nppanda3d.plugin', input='nppanda3d.plist', ipath=OPTS)
  3474. TargetAdd('nppanda3d.plugin', input='plugin_find_root_dir_assist.obj')
  3475. TargetAdd('nppanda3d.plugin', input='libp3tinyxml.ilb')
  3476. TargetAdd('nppanda3d.plugin', opts=['NPAPI', 'OPENSSL', 'WINUSER', 'WINSHELL', 'WINOLE', 'CARBON'])
  3477. #
  3478. # DIRECTORY: direct/src/plugin_activex/
  3479. #
  3480. if (RUNTIME and sys.platform.startswith("win")):
  3481. OPTS=['DIR:direct/src/plugin_activex', 'RUNTIME', 'ACTIVEX']
  3482. DefSymbol('ACTIVEX', '_USRDLL', '')
  3483. DefSymbol('ACTIVEX', '_WINDLL', '')
  3484. DefSymbol('ACTIVEX', '_AFXDLL', '')
  3485. DefSymbol('ACTIVEX', '_MBCS', '')
  3486. TargetAdd('P3DActiveX.tlb', opts=OPTS, input='P3DActiveX.idl')
  3487. TargetAdd('P3DActiveX.res', opts=OPTS, input='P3DActiveX.rc')
  3488. TargetAdd('plugin_activex_p3dactivex_composite1.obj', opts=OPTS, input='p3dactivex_composite1.cxx')
  3489. TargetAdd('p3dactivex.ocx', input='plugin_common.obj')
  3490. TargetAdd('p3dactivex.ocx', input='plugin_parse_color.obj')
  3491. TargetAdd('p3dactivex.ocx', input='plugin_get_twirl_data.obj')
  3492. TargetAdd('p3dactivex.ocx', input='plugin_wstring_encode.obj')
  3493. TargetAdd('p3dactivex.ocx', input='plugin_activex_p3dactivex_composite1.obj')
  3494. TargetAdd('p3dactivex.ocx', input='P3DActiveX.res')
  3495. TargetAdd('p3dactivex.ocx', input='P3DActiveX.def', ipath=OPTS)
  3496. TargetAdd('p3dactivex.ocx', input='libp3tinyxml.ilb')
  3497. TargetAdd('p3dactivex.ocx', opts=['MFC', 'WINSOCK2', 'OPENSSL'])
  3498. #
  3499. # DIRECTORY: direct/src/plugin_standalone/
  3500. #
  3501. if (RUNTIME):
  3502. OPTS=['DIR:direct/src/plugin_standalone', 'RUNTIME', 'OPENSSL']
  3503. TargetAdd('plugin_standalone_panda3d.obj', opts=OPTS, input='panda3d.cxx')
  3504. TargetAdd('plugin_standalone_panda3dBase.obj', opts=OPTS, input='panda3dBase.cxx')
  3505. if (sys.platform.startswith("win")):
  3506. panda3d_rc = {"name" : "Panda3D Game Engine Plug-in",
  3507. "version" : VERSION,
  3508. "description" : "Runs 3-D games and interactive applets",
  3509. "filename" : "panda3d.exe",
  3510. "mimetype" : "application/x-panda3d",
  3511. "extension" : "p3d",
  3512. "filedesc" : "Panda3D applet",
  3513. "icon" : "panda3d.ico"}
  3514. TargetAdd('panda3d.res', opts=OPTS, winrc=panda3d_rc)
  3515. TargetAdd('plugin_standalone_panda3dMain.obj', opts=OPTS, input='panda3dMain.cxx')
  3516. TargetAdd('panda3d.exe', input='plugin_standalone_panda3d.obj')
  3517. TargetAdd('panda3d.exe', input='plugin_standalone_panda3dMain.obj')
  3518. TargetAdd('panda3d.exe', input='plugin_standalone_panda3dBase.obj')
  3519. TargetAdd('panda3d.exe', input='plugin_common.obj')
  3520. TargetAdd('panda3d.exe', input='plugin_wstring_encode.obj')
  3521. if (sys.platform == "darwin"):
  3522. TargetAdd('panda3d.exe', input='plugin_find_root_dir_assist.obj')
  3523. elif (sys.platform.startswith("win")):
  3524. TargetAdd('panda3d.exe', input='panda3d.res')
  3525. TargetAdd('panda3d.exe', input='libpandaexpress.dll')
  3526. TargetAdd('panda3d.exe', input='libp3dtoolconfig.dll')
  3527. TargetAdd('panda3d.exe', input='libp3dtool.dll')
  3528. TargetAdd('panda3d.exe', input='libp3pystub.dll')
  3529. TargetAdd('panda3d.exe', input='libp3tinyxml.ilb')
  3530. TargetAdd('panda3d.exe', opts=['NOICON', 'OPENSSL', 'ZLIB', 'WINGDI', 'WINUSER', 'WINSHELL', 'ADVAPI', 'WINSOCK2', 'WINOLE', 'CARBON'])
  3531. if (sys.platform == "darwin"):
  3532. TargetAdd('plugin_standalone_panda3dMac.obj', opts=OPTS, input='panda3dMac.cxx')
  3533. TargetAdd('Panda3D.app', input='plugin_standalone_panda3d.obj')
  3534. TargetAdd('Panda3D.app', input='plugin_standalone_panda3dMac.obj')
  3535. TargetAdd('Panda3D.app', input='plugin_standalone_panda3dBase.obj')
  3536. TargetAdd('Panda3D.app', input='plugin_common.obj')
  3537. TargetAdd('Panda3D.app', input='plugin_find_root_dir_assist.obj')
  3538. TargetAdd('Panda3D.app', input='libpandaexpress.dll')
  3539. TargetAdd('Panda3D.app', input='libp3dtoolconfig.dll')
  3540. TargetAdd('Panda3D.app', input='libp3dtool.dll')
  3541. TargetAdd('Panda3D.app', input='libp3pystub.dll')
  3542. TargetAdd('Panda3D.app', input='libp3tinyxml.ilb')
  3543. TargetAdd('Panda3D.app', input='panda3d_mac.plist', ipath=OPTS)
  3544. TargetAdd('Panda3D.app', input='models/plugin_images/panda3d.icns')
  3545. TargetAdd('Panda3D.app', opts=['NOSTRIP', 'OPENSSL', 'ZLIB', 'WINGDI', 'WINUSER', 'WINSHELL', 'ADVAPI', 'WINSOCK2', 'WINOLE', 'CARBON'])
  3546. elif (sys.platform.startswith("win")):
  3547. TargetAdd('plugin_standalone_panda3dWinMain.obj', opts=OPTS, input='panda3dWinMain.cxx')
  3548. TargetAdd('panda3dw.exe', input='plugin_standalone_panda3d.obj')
  3549. TargetAdd('panda3dw.exe', input='plugin_standalone_panda3dWinMain.obj')
  3550. TargetAdd('panda3dw.exe', input='plugin_standalone_panda3dBase.obj')
  3551. TargetAdd('panda3dw.exe', input='plugin_wstring_encode.obj')
  3552. TargetAdd('panda3dw.exe', input='plugin_common.obj')
  3553. TargetAdd('panda3dw.exe', input='libpandaexpress.dll')
  3554. TargetAdd('panda3dw.exe', input='libp3dtoolconfig.dll')
  3555. TargetAdd('panda3dw.exe', input='libp3dtool.dll')
  3556. TargetAdd('panda3dw.exe', input='libp3pystub.dll')
  3557. TargetAdd('panda3dw.exe', input='libp3tinyxml.ilb')
  3558. TargetAdd('panda3dw.exe', opts=['OPENSSL', 'ZLIB', 'WINGDI', 'WINUSER', 'WINSHELL', 'ADVAPI', 'WINSOCK2', 'WINOLE', 'CARBON'])
  3559. if (RTDIST):
  3560. OPTS=['BUILDING:P3D_PLUGIN', 'DIR:direct/src/plugin_standalone', 'DIR:direct/src/plugin', 'DIR:dtool/src/dtoolbase', 'DIR:dtool/src/dtoolutil', 'DIR:dtool/src/pystub', 'DIR:dtool/src/prc', 'DIR:dtool/src/dconfig', 'DIR:panda/src/express', 'DIR:panda/src/downloader', 'RUNTIME', 'P3DEMBED', 'OPENSSL', 'JPEG', 'PNG', 'ZLIB']
  3561. # This is arguably a big fat ugly hack, but doing it otherwise would complicate the build process considerably.
  3562. DefSymbol("P3DEMBED", "LINK_ALL_STATIC", "")
  3563. TargetAdd('plugin_standalone_panda3dBase.obj', opts=OPTS, input='panda3dBase.cxx')
  3564. TargetAdd('plugin_standalone_p3dEmbedMain.obj', opts=OPTS, input='p3dEmbedMain.cxx')
  3565. TargetAdd('plugin_standalone_p3dEmbed.obj', opts=OPTS, input='p3dEmbed.cxx')
  3566. TargetAdd('plugin_standalone_pystub.obj', opts=OPTS, input='pystub.cxx')
  3567. TargetAdd('plugin_standalone_dtoolbase_composite1.obj', opts=OPTS, input='dtoolbase_composite1.cxx')
  3568. TargetAdd('plugin_standalone_dtoolbase_composite2.obj', opts=OPTS, input='dtoolbase_composite2.cxx')
  3569. TargetAdd('plugin_standalone_lookup3.obj', opts=OPTS, input='lookup3.c')
  3570. TargetAdd('plugin_standalone_indent.obj', opts=OPTS, input='indent.cxx')
  3571. TargetAdd('plugin_standalone_dtoolutil_composite.obj', opts=OPTS, input='dtoolutil_composite.cxx')
  3572. if (sys.platform == 'darwin'):
  3573. TargetAdd('plugin_standalone_dtoolutil_filename_assist.obj', opts=OPTS, input='filename_assist.mm')
  3574. TargetAdd('plugin_standalone_prc_composite.obj', opts=OPTS, input='prc_composite.cxx')
  3575. TargetAdd('plugin_standalone_dconfig_composite.obj', opts=OPTS, input='dconfig_composite.cxx')
  3576. TargetAdd('plugin_standalone_express_composite.obj', opts=OPTS, input='express_composite.cxx')
  3577. TargetAdd('plugin_standalone_downloader_composite.obj', opts=OPTS, input='downloader_composite.cxx')
  3578. TargetAdd('p3dembed.exe', input='plugin_standalone_panda3dBase.obj')
  3579. TargetAdd('p3dembed.exe', input='plugin_standalone_p3dEmbedMain.obj')
  3580. TargetAdd('p3dembed.exe', input='plugin_standalone_p3dEmbed.obj')
  3581. TargetAdd('p3dembed.exe', input='plugin_standalone_pystub.obj')
  3582. TargetAdd('p3dembed.exe', input='plugin_standalone_dtoolbase_composite1.obj')
  3583. TargetAdd('p3dembed.exe', input='plugin_standalone_dtoolbase_composite2.obj')
  3584. TargetAdd('p3dembed.exe', input='plugin_standalone_lookup3.obj')
  3585. TargetAdd('p3dembed.exe', input='plugin_standalone_indent.obj')
  3586. TargetAdd('p3dembed.exe', input='plugin_standalone_dtoolutil_composite.obj')
  3587. if (sys.platform == 'darwin'):
  3588. TargetAdd('p3dembed.exe', input='plugin_standalone_dtoolutil_filename_assist.obj')
  3589. TargetAdd('p3dembed.exe', input='plugin_standalone_prc_composite.obj')
  3590. TargetAdd('p3dembed.exe', input='plugin_standalone_dconfig_composite.obj')
  3591. TargetAdd('p3dembed.exe', input='plugin_standalone_express_composite.obj')
  3592. TargetAdd('p3dembed.exe', input='plugin_standalone_downloader_composite.obj')
  3593. TargetAdd('p3dembed.exe', input='plugin_common.obj')
  3594. if (sys.platform == "darwin"):
  3595. TargetAdd('p3dembed.exe', input='plugin_find_root_dir_assist.obj')
  3596. if (sys.platform == "darwin"):
  3597. TargetAdd('p3dembed.exe', input='libsubprocbuffer.ilb')
  3598. TargetAdd('p3dembed.exe', input='libp3tinyxml.ilb')
  3599. TargetAdd('p3dembed.exe', input='libp3d_plugin_static.ilb')
  3600. TargetAdd('p3dembed.exe', opts=['NOICON', 'NOSTRIP', 'WINGDI', 'WINSOCK2', 'ZLIB', 'WINUSER', 'OPENSSL', 'JPEG', 'WINOLE', 'CARBON', 'MSIMG', 'WINCOMCTL', 'ADVAPI', 'WINSHELL', 'X11', 'PNG'])
  3601. if (sys.platform.startswith("win")):
  3602. OPTS.append("P3DEMBEDW")
  3603. DefSymbol("P3DEMBEDW", "P3DEMBEDW", "")
  3604. TargetAdd('plugin_standalone_p3dEmbedWinMain.obj', opts=OPTS, input='p3dEmbedMain.cxx')
  3605. TargetAdd('p3dembedw.exe', input='plugin_standalone_panda3dBase.obj')
  3606. TargetAdd('p3dembedw.exe', input='plugin_standalone_p3dEmbedWinMain.obj')
  3607. TargetAdd('p3dembedw.exe', input='plugin_standalone_p3dEmbed.obj')
  3608. TargetAdd('p3dembedw.exe', input='plugin_standalone_pystub.obj')
  3609. TargetAdd('p3dembedw.exe', input='plugin_standalone_dtoolbase_composite1.obj')
  3610. TargetAdd('p3dembedw.exe', input='plugin_standalone_dtoolbase_composite2.obj')
  3611. TargetAdd('p3dembedw.exe', input='plugin_standalone_lookup3.obj')
  3612. TargetAdd('p3dembedw.exe', input='plugin_standalone_indent.obj')
  3613. TargetAdd('p3dembedw.exe', input='plugin_standalone_dtoolutil_composite.obj')
  3614. TargetAdd('p3dembedw.exe', input='plugin_standalone_prc_composite.obj')
  3615. TargetAdd('p3dembedw.exe', input='plugin_standalone_dconfig_composite.obj')
  3616. TargetAdd('p3dembedw.exe', input='plugin_standalone_express_composite.obj')
  3617. TargetAdd('p3dembedw.exe', input='plugin_standalone_downloader_composite.obj')
  3618. TargetAdd('p3dembedw.exe', input='plugin_common.obj')
  3619. TargetAdd('p3dembedw.exe', input='libp3tinyxml.ilb')
  3620. TargetAdd('p3dembedw.exe', input='libp3d_plugin_static.ilb')
  3621. TargetAdd('p3dembedw.exe', opts=['NOICON', 'NOSTRIP', 'WINGDI', 'WINSOCK2', 'ZLIB', 'WINUSER', 'OPENSSL', 'JPEG', 'WINOLE', 'MSIMG', 'WINCOMCTL', 'ADVAPI', 'WINSHELL', 'PNG'])
  3622. #
  3623. # DIRECTORY: pandatool/src/pandatoolbase/
  3624. #
  3625. if (PkgSkip("PANDATOOL")==0):
  3626. OPTS=['DIR:pandatool/src/pandatoolbase']
  3627. TargetAdd('pandatoolbase_composite1.obj', opts=OPTS, input='pandatoolbase_composite1.cxx')
  3628. TargetAdd('libpandatoolbase.lib', input='pandatoolbase_composite1.obj')
  3629. #
  3630. # DIRECTORY: pandatool/src/converter/
  3631. #
  3632. if (PkgSkip("PANDATOOL")==0):
  3633. OPTS=['DIR:pandatool/src/converter']
  3634. TargetAdd('converter_somethingToEggConverter.obj', opts=OPTS, input='somethingToEggConverter.cxx')
  3635. TargetAdd('libconverter.lib', input='converter_somethingToEggConverter.obj')
  3636. #
  3637. # DIRECTORY: pandatool/src/progbase/
  3638. #
  3639. if (PkgSkip("PANDATOOL")==0):
  3640. OPTS=['DIR:pandatool/src/progbase', 'ZLIB']
  3641. TargetAdd('progbase_composite1.obj', opts=OPTS, input='progbase_composite1.cxx')
  3642. TargetAdd('libprogbase.lib', input='progbase_composite1.obj')
  3643. #
  3644. # DIRECTORY: pandatool/src/eggbase/
  3645. #
  3646. if (PkgSkip("PANDATOOL")==0):
  3647. OPTS=['DIR:pandatool/src/eggbase']
  3648. TargetAdd('eggbase_composite1.obj', opts=OPTS, input='eggbase_composite1.cxx')
  3649. TargetAdd('libeggbase.lib', input='eggbase_composite1.obj')
  3650. #
  3651. # DIRECTORY: pandatool/src/bam/
  3652. #
  3653. if (PkgSkip("PANDATOOL")==0):
  3654. OPTS=['DIR:pandatool/src/bam']
  3655. TargetAdd('bam-info_bamInfo.obj', opts=OPTS, input='bamInfo.cxx')
  3656. TargetAdd('bam-info.exe', input='bam-info_bamInfo.obj')
  3657. TargetAdd('bam-info.exe', input='libprogbase.lib')
  3658. TargetAdd('bam-info.exe', input='libpandatoolbase.lib')
  3659. TargetAdd('bam-info.exe', input='libpandaegg.dll')
  3660. TargetAdd('bam-info.exe', input=COMMON_PANDA_LIBS_PYSTUB)
  3661. TargetAdd('bam-info.exe', opts=['ADVAPI', 'FFTW'])
  3662. TargetAdd('bam2egg_bamToEgg.obj', opts=OPTS, input='bamToEgg.cxx')
  3663. TargetAdd('bam2egg.exe', input='bam2egg_bamToEgg.obj')
  3664. TargetAdd('bam2egg.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
  3665. TargetAdd('bam2egg.exe', opts=['ADVAPI', 'FFTW'])
  3666. TargetAdd('egg2bam_eggToBam.obj', opts=OPTS, input='eggToBam.cxx')
  3667. TargetAdd('egg2bam.exe', input='egg2bam_eggToBam.obj')
  3668. TargetAdd('egg2bam.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
  3669. TargetAdd('egg2bam.exe', opts=['ADVAPI', 'FFTW'])
  3670. #
  3671. # DIRECTORY: pandatool/src/cvscopy/
  3672. #
  3673. if (PkgSkip("PANDATOOL")==0):
  3674. OPTS=['DIR:pandatool/src/cvscopy']
  3675. TargetAdd('cvscopy_composite1.obj', opts=OPTS, input='cvscopy_composite1.cxx')
  3676. TargetAdd('libcvscopy.lib', input='cvscopy_composite1.obj')
  3677. #
  3678. # DIRECTORY: pandatool/src/daeegg/
  3679. #
  3680. if (PkgSkip("PANDATOOL")==0 and PkgSkip("FCOLLADA")==0):
  3681. OPTS=['DIR:pandatool/src/daeegg', 'FCOLLADA']
  3682. TargetAdd('daeegg_composite1.obj', opts=OPTS, input='daeegg_composite1.cxx')
  3683. TargetAdd('libdaeegg.lib', input='daeegg_composite1.obj')
  3684. TargetAdd('libdaeegg.lib', opts=['FCOLLADA', 'CARBON'])
  3685. #
  3686. # DIRECTORY: pandatool/src/daeprogs/
  3687. #
  3688. if (PkgSkip("PANDATOOL")==0 and PkgSkip("FCOLLADA")==0):
  3689. OPTS=['DIR:pandatool/src/daeprogs', 'FCOLLADA']
  3690. TargetAdd('dae2egg_daeToEgg.obj', opts=OPTS, input='daeToEgg.cxx')
  3691. TargetAdd('dae2egg.exe', input='dae2egg_daeToEgg.obj')
  3692. TargetAdd('dae2egg.exe', input='libdaeegg.lib')
  3693. TargetAdd('dae2egg.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
  3694. TargetAdd('dae2egg.exe', opts=['WINUSER', 'FCOLLADA', 'CARBON'])
  3695. #
  3696. # DIRECTORY: pandatool/src/dxf/
  3697. #
  3698. if (PkgSkip("PANDATOOL")==0):
  3699. OPTS=['DIR:pandatool/src/dxf']
  3700. TargetAdd('dxf_composite1.obj', opts=OPTS, input='dxf_composite1.cxx')
  3701. TargetAdd('libdxf.lib', input='dxf_composite1.obj')
  3702. #
  3703. # DIRECTORY: pandatool/src/dxfegg/
  3704. #
  3705. if (PkgSkip("PANDATOOL")==0):
  3706. OPTS=['DIR:pandatool/src/dxfegg']
  3707. TargetAdd('dxfegg_dxfToEggConverter.obj', opts=OPTS, input='dxfToEggConverter.cxx')
  3708. TargetAdd('dxfegg_dxfToEggLayer.obj', opts=OPTS, input='dxfToEggLayer.cxx')
  3709. TargetAdd('libdxfegg.lib', input='dxfegg_dxfToEggConverter.obj')
  3710. TargetAdd('libdxfegg.lib', input='dxfegg_dxfToEggLayer.obj')
  3711. #
  3712. # DIRECTORY: pandatool/src/dxfprogs/
  3713. #
  3714. if (PkgSkip("PANDATOOL")==0):
  3715. OPTS=['DIR:pandatool/src/dxfprogs']
  3716. TargetAdd('dxf-points_dxfPoints.obj', opts=OPTS, input='dxfPoints.cxx')
  3717. TargetAdd('dxf-points.exe', input='dxf-points_dxfPoints.obj')
  3718. TargetAdd('dxf-points.exe', input='libprogbase.lib')
  3719. TargetAdd('dxf-points.exe', input='libdxf.lib')
  3720. TargetAdd('dxf-points.exe', input='libpandatoolbase.lib')
  3721. TargetAdd('dxf-points.exe', input=COMMON_PANDA_LIBS_PYSTUB)
  3722. TargetAdd('dxf-points.exe', opts=['ADVAPI', 'FFTW'])
  3723. TargetAdd('dxf2egg_dxfToEgg.obj', opts=OPTS, input='dxfToEgg.cxx')
  3724. TargetAdd('dxf2egg.exe', input='dxf2egg_dxfToEgg.obj')
  3725. TargetAdd('dxf2egg.exe', input='libdxfegg.lib')
  3726. TargetAdd('dxf2egg.exe', input='libdxf.lib')
  3727. TargetAdd('dxf2egg.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
  3728. TargetAdd('dxf2egg.exe', opts=['ADVAPI', 'FFTW'])
  3729. TargetAdd('egg2dxf_eggToDXF.obj', opts=OPTS, input='eggToDXF.cxx')
  3730. TargetAdd('egg2dxf_eggToDXFLayer.obj', opts=OPTS, input='eggToDXFLayer.cxx')
  3731. TargetAdd('egg2dxf.exe', input='egg2dxf_eggToDXF.obj')
  3732. TargetAdd('egg2dxf.exe', input='egg2dxf_eggToDXFLayer.obj')
  3733. TargetAdd('egg2dxf.exe', input='libdxf.lib')
  3734. TargetAdd('egg2dxf.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
  3735. TargetAdd('egg2dxf.exe', opts=['ADVAPI', 'FFTW'])
  3736. #
  3737. # DIRECTORY: pandatool/src/objegg/
  3738. #
  3739. if (PkgSkip("PANDATOOL")==0):
  3740. OPTS=['DIR:pandatool/src/objegg']
  3741. TargetAdd('objegg_objToEggConverter.obj', opts=OPTS, input='objToEggConverter.cxx')
  3742. TargetAdd('objegg_config_objegg.obj', opts=OPTS, input='config_objegg.cxx')
  3743. TargetAdd('libobjegg.lib', input='objegg_objToEggConverter.obj')
  3744. TargetAdd('libobjegg.lib', input='objegg_config_objegg.obj')
  3745. #
  3746. # DIRECTORY: pandatool/src/objprogs/
  3747. #
  3748. if (PkgSkip("PANDATOOL")==0):
  3749. OPTS=['DIR:pandatool/src/objprogs']
  3750. TargetAdd('obj2egg_objToEgg.obj', opts=OPTS, input='objToEgg.cxx')
  3751. TargetAdd('obj2egg.exe', input='obj2egg_objToEgg.obj')
  3752. TargetAdd('obj2egg.exe', input='libobjegg.lib')
  3753. TargetAdd('obj2egg.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
  3754. #
  3755. # DIRECTORY: pandatool/src/palettizer/
  3756. #
  3757. if (PkgSkip("PANDATOOL")==0):
  3758. OPTS=['DIR:pandatool/src/palettizer']
  3759. TargetAdd('palettizer_composite1.obj', opts=OPTS, input='palettizer_composite1.cxx')
  3760. TargetAdd('libpalettizer.lib', input='palettizer_composite1.obj')
  3761. #
  3762. # DIRECTORY: pandatool/src/egg-mkfont/
  3763. #
  3764. if (PkgSkip("FREETYPE")==0) and (PkgSkip("PANDATOOL")==0):
  3765. OPTS=['DIR:pandatool/src/egg-mkfont', 'DIR:pandatool/src/palettizer', 'FREETYPE']
  3766. TargetAdd('egg-mkfont_eggMakeFont.obj', opts=OPTS, input='eggMakeFont.cxx')
  3767. TargetAdd('egg-mkfont_rangeDescription.obj', opts=OPTS, input='rangeDescription.cxx')
  3768. TargetAdd('egg-mkfont_rangeIterator.obj', opts=OPTS, input='rangeIterator.cxx')
  3769. TargetAdd('egg-mkfont.exe', input='egg-mkfont_eggMakeFont.obj')
  3770. TargetAdd('egg-mkfont.exe', input='egg-mkfont_rangeDescription.obj')
  3771. TargetAdd('egg-mkfont.exe', input='egg-mkfont_rangeIterator.obj')
  3772. TargetAdd('egg-mkfont.exe', input='libpalettizer.lib')
  3773. TargetAdd('egg-mkfont.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
  3774. TargetAdd('egg-mkfont.exe', opts=['ADVAPI', 'FREETYPE'])
  3775. #
  3776. # DIRECTORY: pandatool/src/eggcharbase/
  3777. #
  3778. if (PkgSkip("PANDATOOL")==0):
  3779. OPTS=['DIR:pandatool/src/eggcharbase', 'ZLIB']
  3780. TargetAdd('eggcharbase_composite1.obj', opts=OPTS, input='eggcharbase_composite1.cxx')
  3781. TargetAdd('libeggcharbase.lib', input='eggcharbase_composite1.obj')
  3782. #
  3783. # DIRECTORY: pandatool/src/egg-optchar/
  3784. #
  3785. if (PkgSkip("PANDATOOL")==0):
  3786. OPTS=['DIR:pandatool/src/egg-optchar']
  3787. TargetAdd('egg-optchar_config_egg_optchar.obj', opts=OPTS, input='config_egg_optchar.cxx')
  3788. TargetAdd('egg-optchar_eggOptchar.obj', opts=OPTS, input='eggOptchar.cxx')
  3789. TargetAdd('egg-optchar_eggOptcharUserData.obj', opts=OPTS, input='eggOptcharUserData.cxx')
  3790. TargetAdd('egg-optchar_vertexMembership.obj', opts=OPTS, input='vertexMembership.cxx')
  3791. TargetAdd('egg-optchar.exe', input='egg-optchar_config_egg_optchar.obj')
  3792. TargetAdd('egg-optchar.exe', input='egg-optchar_eggOptchar.obj')
  3793. TargetAdd('egg-optchar.exe', input='egg-optchar_eggOptcharUserData.obj')
  3794. TargetAdd('egg-optchar.exe', input='egg-optchar_vertexMembership.obj')
  3795. TargetAdd('egg-optchar.exe', input='libeggcharbase.lib')
  3796. TargetAdd('egg-optchar.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
  3797. TargetAdd('egg-optchar.exe', opts=['ADVAPI', 'FREETYPE'])
  3798. #
  3799. # DIRECTORY: pandatool/src/egg-palettize/
  3800. #
  3801. if (PkgSkip("PANDATOOL")==0):
  3802. OPTS=['DIR:pandatool/src/egg-palettize', 'DIR:pandatool/src/palettizer']
  3803. TargetAdd('egg-palettize_eggPalettize.obj', opts=OPTS, input='eggPalettize.cxx')
  3804. TargetAdd('egg-palettize.exe', input='egg-palettize_eggPalettize.obj')
  3805. TargetAdd('egg-palettize.exe', input='libpalettizer.lib')
  3806. TargetAdd('egg-palettize.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
  3807. TargetAdd('egg-palettize.exe', opts=['ADVAPI'])
  3808. #
  3809. # DIRECTORY: pandatool/src/egg-qtess/
  3810. #
  3811. if (PkgSkip("PANDATOOL")==0):
  3812. OPTS=['DIR:pandatool/src/egg-qtess']
  3813. TargetAdd('egg-qtess_composite1.obj', opts=OPTS, input='egg-qtess_composite1.cxx')
  3814. TargetAdd('egg-qtess.exe', input='egg-qtess_composite1.obj')
  3815. TargetAdd('egg-qtess.exe', input='libeggbase.lib')
  3816. TargetAdd('egg-qtess.exe', input='libprogbase.lib')
  3817. TargetAdd('egg-qtess.exe', input='libconverter.lib')
  3818. TargetAdd('egg-qtess.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
  3819. TargetAdd('egg-qtess.exe', opts=['ADVAPI'])
  3820. #
  3821. # DIRECTORY: pandatool/src/eggprogs/
  3822. #
  3823. if (PkgSkip("PANDATOOL")==0):
  3824. OPTS=['DIR:pandatool/src/eggprogs']
  3825. TargetAdd('egg-crop_eggCrop.obj', opts=OPTS, input='eggCrop.cxx')
  3826. TargetAdd('egg-crop.exe', input='egg-crop_eggCrop.obj')
  3827. TargetAdd('egg-crop.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
  3828. TargetAdd('egg-crop.exe', opts=['ADVAPI'])
  3829. TargetAdd('egg-make-tube_eggMakeTube.obj', opts=OPTS, input='eggMakeTube.cxx')
  3830. TargetAdd('egg-make-tube.exe', input='egg-make-tube_eggMakeTube.obj')
  3831. TargetAdd('egg-make-tube.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
  3832. TargetAdd('egg-make-tube.exe', opts=['ADVAPI'])
  3833. TargetAdd('egg-texture-cards_eggTextureCards.obj', opts=OPTS, input='eggTextureCards.cxx')
  3834. TargetAdd('egg-texture-cards.exe', input='egg-texture-cards_eggTextureCards.obj')
  3835. TargetAdd('egg-texture-cards.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
  3836. TargetAdd('egg-texture-cards.exe', opts=['ADVAPI'])
  3837. TargetAdd('egg-topstrip_eggTopstrip.obj', opts=OPTS, input='eggTopstrip.cxx')
  3838. TargetAdd('egg-topstrip.exe', input='egg-topstrip_eggTopstrip.obj')
  3839. TargetAdd('egg-topstrip.exe', input='libeggcharbase.lib')
  3840. TargetAdd('egg-topstrip.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
  3841. TargetAdd('egg-topstrip.exe', opts=['ADVAPI'])
  3842. TargetAdd('egg-trans_eggTrans.obj', opts=OPTS, input='eggTrans.cxx')
  3843. TargetAdd('egg-trans.exe', input='egg-trans_eggTrans.obj')
  3844. TargetAdd('egg-trans.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
  3845. TargetAdd('egg-trans.exe', opts=['ADVAPI'])
  3846. TargetAdd('egg2c_eggToC.obj', opts=OPTS, input='eggToC.cxx')
  3847. TargetAdd('egg2c.exe', input='egg2c_eggToC.obj')
  3848. TargetAdd('egg2c.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
  3849. TargetAdd('egg2c.exe', opts=['ADVAPI'])
  3850. TargetAdd('egg-rename_eggRename.obj', opts=OPTS, input='eggRename.cxx')
  3851. TargetAdd('egg-rename.exe', input='egg-rename_eggRename.obj')
  3852. TargetAdd('egg-rename.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
  3853. TargetAdd('egg-rename.exe', opts=['ADVAPI'])
  3854. TargetAdd('egg-retarget-anim_eggRetargetAnim.obj', opts=OPTS, input='eggRetargetAnim.cxx')
  3855. TargetAdd('egg-retarget-anim.exe', input='egg-retarget-anim_eggRetargetAnim.obj')
  3856. TargetAdd('egg-retarget-anim.exe', input='libeggcharbase.lib')
  3857. TargetAdd('egg-retarget-anim.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
  3858. TargetAdd('egg-retarget-anim.exe', opts=['ADVAPI'])
  3859. TargetAdd('egg-list-textures_eggListTextures.obj', opts=OPTS, input='eggListTextures.cxx')
  3860. TargetAdd('egg-list-textures.exe', input='egg-list-textures_eggListTextures.obj')
  3861. TargetAdd('egg-list-textures.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
  3862. TargetAdd('egg-list-textures.exe', opts=['ADVAPI'])
  3863. #
  3864. # DIRECTORY: pandatool/src/flt/
  3865. #
  3866. if (PkgSkip("PANDATOOL")==0):
  3867. OPTS=['DIR:pandatool/src/flt', 'ZLIB']
  3868. TargetAdd('flt_fltVectorRecord.obj', opts=OPTS, input='fltVectorRecord.cxx')
  3869. TargetAdd('flt_composite1.obj', opts=OPTS, input='flt_composite1.cxx')
  3870. TargetAdd('libflt.lib', input=['flt_fltVectorRecord.obj', 'flt_composite1.obj'])
  3871. #
  3872. # DIRECTORY: pandatool/src/fltegg/
  3873. #
  3874. if (PkgSkip("PANDATOOL")==0):
  3875. OPTS=['DIR:pandatool/src/fltegg']
  3876. TargetAdd('fltegg_fltToEggConverter.obj', opts=OPTS, input='fltToEggConverter.cxx')
  3877. TargetAdd('fltegg_fltToEggLevelState.obj', opts=OPTS, input='fltToEggLevelState.cxx')
  3878. TargetAdd('libfltegg.lib', input=['fltegg_fltToEggConverter.obj', 'fltegg_fltToEggLevelState.obj'])
  3879. #
  3880. # DIRECTORY: pandatool/src/fltprogs/
  3881. #
  3882. if (PkgSkip("PANDATOOL")==0):
  3883. OPTS=['DIR:pandatool/src/fltprogs', 'DIR:pandatool/src/flt', 'DIR:pandatool/src/cvscopy']
  3884. TargetAdd('egg2flt_eggToFlt.obj', opts=OPTS, input='eggToFlt.cxx')
  3885. TargetAdd('egg2flt.exe', input='egg2flt_eggToFlt.obj')
  3886. TargetAdd('egg2flt.exe', input='libflt.lib')
  3887. TargetAdd('egg2flt.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
  3888. TargetAdd('egg2flt.exe', opts=['ADVAPI'])
  3889. TargetAdd('flt-info_fltInfo.obj', opts=OPTS, input='fltInfo.cxx')
  3890. TargetAdd('flt-info.exe', input='flt-info_fltInfo.obj')
  3891. TargetAdd('flt-info.exe', input='libflt.lib')
  3892. TargetAdd('flt-info.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
  3893. TargetAdd('flt-info.exe', opts=['ADVAPI'])
  3894. TargetAdd('flt-trans_fltTrans.obj', opts=OPTS, input='fltTrans.cxx')
  3895. TargetAdd('flt-trans.exe', input='flt-trans_fltTrans.obj')
  3896. TargetAdd('flt-trans.exe', input='libflt.lib')
  3897. TargetAdd('flt-trans.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
  3898. TargetAdd('flt-trans.exe', opts=['ADVAPI'])
  3899. TargetAdd('flt2egg_fltToEgg.obj', opts=OPTS, input='fltToEgg.cxx')
  3900. TargetAdd('flt2egg.exe', input='flt2egg_fltToEgg.obj')
  3901. TargetAdd('flt2egg.exe', input='libflt.lib')
  3902. TargetAdd('flt2egg.exe', input='libfltegg.lib')
  3903. TargetAdd('flt2egg.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
  3904. TargetAdd('flt2egg.exe', opts=['ADVAPI'])
  3905. TargetAdd('fltcopy_fltCopy.obj', opts=OPTS, input='fltCopy.cxx')
  3906. TargetAdd('fltcopy.exe', input='fltcopy_fltCopy.obj')
  3907. TargetAdd('fltcopy.exe', input='libcvscopy.lib')
  3908. TargetAdd('fltcopy.exe', input='libflt.lib')
  3909. TargetAdd('fltcopy.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
  3910. TargetAdd('fltcopy.exe', opts=['ADVAPI'])
  3911. #
  3912. # DIRECTORY: pandatool/src/imagebase/
  3913. #
  3914. if (PkgSkip("PANDATOOL")==0):
  3915. OPTS=['DIR:pandatool/src/imagebase']
  3916. TargetAdd('imagebase_composite1.obj', opts=OPTS, input='imagebase_composite1.cxx')
  3917. TargetAdd('libimagebase.lib', input='imagebase_composite1.obj')
  3918. #
  3919. # DIRECTORY: pandatool/src/imageprogs/
  3920. #
  3921. if (PkgSkip("PANDATOOL")==0):
  3922. OPTS=['DIR:pandatool/src/imageprogs']
  3923. TargetAdd('image-info_imageInfo.obj', opts=OPTS, input='imageInfo.cxx')
  3924. TargetAdd('image-info.exe', input='image-info_imageInfo.obj')
  3925. TargetAdd('image-info.exe', input='libimagebase.lib')
  3926. TargetAdd('image-info.exe', input='libprogbase.lib')
  3927. TargetAdd('image-info.exe', input='libpandatoolbase.lib')
  3928. TargetAdd('image-info.exe', input='libpandaegg.dll')
  3929. TargetAdd('image-info.exe', input=COMMON_PANDA_LIBS)
  3930. TargetAdd('image-info.exe', input='libp3pystub.dll')
  3931. TargetAdd('image-info.exe', opts=['ADVAPI'])
  3932. TargetAdd('image-resize_imageResize.obj', opts=OPTS, input='imageResize.cxx')
  3933. TargetAdd('image-resize.exe', input='image-resize_imageResize.obj')
  3934. TargetAdd('image-resize.exe', input='libimagebase.lib')
  3935. TargetAdd('image-resize.exe', input='libprogbase.lib')
  3936. TargetAdd('image-resize.exe', input='libpandatoolbase.lib')
  3937. TargetAdd('image-resize.exe', input='libpandaegg.dll')
  3938. TargetAdd('image-resize.exe', input=COMMON_PANDA_LIBS)
  3939. TargetAdd('image-resize.exe', input='libp3pystub.dll')
  3940. TargetAdd('image-resize.exe', opts=['ADVAPI'])
  3941. TargetAdd('image-trans_imageTrans.obj', opts=OPTS, input='imageTrans.cxx')
  3942. TargetAdd('image-trans.exe', input='image-trans_imageTrans.obj')
  3943. TargetAdd('image-trans.exe', input='libimagebase.lib')
  3944. TargetAdd('image-trans.exe', input='libprogbase.lib')
  3945. TargetAdd('image-trans.exe', input='libpandatoolbase.lib')
  3946. TargetAdd('image-trans.exe', input='libpandaegg.dll')
  3947. TargetAdd('image-trans.exe', input=COMMON_PANDA_LIBS)
  3948. TargetAdd('image-trans.exe', input='libp3pystub.dll')
  3949. TargetAdd('image-trans.exe', opts=['ADVAPI'])
  3950. #
  3951. # DIRECTORY: pandatool/src/pfmprogs/
  3952. #
  3953. if (PkgSkip("PANDATOOL")==0):
  3954. OPTS=['DIR:pandatool/src/pfmprogs']
  3955. TargetAdd('pfm-trans_pfmTrans.obj', opts=OPTS, input='pfmTrans.cxx')
  3956. TargetAdd('pfm-trans.exe', input='pfm-trans_pfmTrans.obj')
  3957. TargetAdd('pfm-trans.exe', input='libprogbase.lib')
  3958. TargetAdd('pfm-trans.exe', input='libpandatoolbase.lib')
  3959. TargetAdd('pfm-trans.exe', input=COMMON_PANDA_LIBS)
  3960. TargetAdd('pfm-trans.exe', input='libp3pystub.dll')
  3961. TargetAdd('pfm-trans.exe', opts=['ADVAPI'])
  3962. #
  3963. # DIRECTORY: pandatool/src/lwo/
  3964. #
  3965. if (PkgSkip("PANDATOOL")==0):
  3966. OPTS=['DIR:pandatool/src/lwo']
  3967. TargetAdd('lwo_composite1.obj', opts=OPTS, input='lwo_composite1.cxx')
  3968. TargetAdd('liblwo.lib', input='lwo_composite1.obj')
  3969. #
  3970. # DIRECTORY: pandatool/src/lwoegg/
  3971. #
  3972. if (PkgSkip("PANDATOOL")==0):
  3973. OPTS=['DIR:pandatool/src/lwoegg']
  3974. TargetAdd('lwoegg_composite1.obj', opts=OPTS, input='lwoegg_composite1.cxx')
  3975. TargetAdd('liblwoegg.lib', input='lwoegg_composite1.obj')
  3976. #
  3977. # DIRECTORY: pandatool/src/lwoprogs/
  3978. #
  3979. if (PkgSkip("PANDATOOL")==0):
  3980. OPTS=['DIR:pandatool/src/lwoprogs', 'DIR:pandatool/src/lwo']
  3981. TargetAdd('lwo-scan_lwoScan.obj', opts=OPTS, input='lwoScan.cxx')
  3982. TargetAdd('lwo-scan.exe', input='lwo-scan_lwoScan.obj')
  3983. TargetAdd('lwo-scan.exe', input='liblwo.lib')
  3984. TargetAdd('lwo-scan.exe', input='libprogbase.lib')
  3985. TargetAdd('lwo-scan.exe', input='libpandatoolbase.lib')
  3986. TargetAdd('lwo-scan.exe', input='libpandaegg.dll')
  3987. TargetAdd('lwo-scan.exe', input=COMMON_PANDA_LIBS)
  3988. TargetAdd('lwo-scan.exe', input='libp3pystub.dll')
  3989. TargetAdd('lwo-scan.exe', opts=['ADVAPI'])
  3990. TargetAdd('lwo2egg_lwoToEgg.obj', opts=OPTS, input='lwoToEgg.cxx')
  3991. TargetAdd('lwo2egg.exe', input='lwo2egg_lwoToEgg.obj')
  3992. TargetAdd('lwo2egg.exe', input='liblwo.lib')
  3993. TargetAdd('lwo2egg.exe', input='liblwoegg.lib')
  3994. TargetAdd('lwo2egg.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
  3995. TargetAdd('lwo2egg.exe', opts=['ADVAPI'])
  3996. #
  3997. # DIRECTORY: pandatool/src/maya/
  3998. #
  3999. for VER in MAYAVERSIONS:
  4000. VNUM=VER[4:]
  4001. if (PkgSkip(VER)==0) and (PkgSkip("PANDATOOL")==0):
  4002. OPTS=['DIR:pandatool/src/maya', VER]
  4003. TargetAdd('maya'+VNUM+'_composite1.obj', opts=OPTS, input='maya_composite1.cxx')
  4004. TargetAdd('libmaya'+VNUM+'.lib', input='maya'+VNUM+'_composite1.obj')
  4005. #
  4006. # DIRECTORY: pandatool/src/mayaegg/
  4007. #
  4008. for VER in MAYAVERSIONS:
  4009. VNUM=VER[4:]
  4010. if (PkgSkip(VER)==0) and (PkgSkip("PANDATOOL")==0):
  4011. OPTS=['DIR:pandatool/src/mayaegg', 'DIR:pandatool/src/maya', VER]
  4012. TargetAdd('mayaegg'+VNUM+'_loader.obj', opts=OPTS, input='mayaEggLoader.cxx')
  4013. TargetAdd('mayaegg'+VNUM+'_composite1.obj', opts=OPTS, input='mayaegg_composite1.cxx')
  4014. TargetAdd('libmayaegg'+VNUM+'.lib', input='mayaegg'+VNUM+'_loader.obj')
  4015. TargetAdd('libmayaegg'+VNUM+'.lib', input='mayaegg'+VNUM+'_composite1.obj')
  4016. #
  4017. # DIRECTORY: pandatool/src/maxegg/
  4018. #
  4019. for VER in MAXVERSIONS:
  4020. VNUM=VER[3:]
  4021. if (PkgSkip(VER)==0) and (PkgSkip("PANDATOOL")==0):
  4022. OPTS=['DIR:pandatool/src/maxegg', VER, "WINCOMCTL", "WINCOMDLG", "WINUSER", "MSFORSCOPE"]
  4023. TargetAdd('maxEgg'+VNUM+'.res', opts=OPTS, input='maxEgg.rc')
  4024. TargetAdd('maxegg'+VNUM+'_loader.obj', opts=OPTS, input='maxEggLoader.cxx')
  4025. TargetAdd('maxegg'+VNUM+'_composite1.obj', opts=OPTS, input='maxegg_composite1.cxx')
  4026. TargetAdd('maxegg'+VNUM+'.dlo', input='maxegg'+VNUM+'_composite1.obj')
  4027. TargetAdd('maxegg'+VNUM+'.dlo', input='maxEgg'+VNUM+'.res')
  4028. TargetAdd('maxegg'+VNUM+'.dlo', input='maxEgg.def', ipath=OPTS)
  4029. TargetAdd('maxegg'+VNUM+'.dlo', input=COMMON_EGG2X_LIBS_PYSTUB)
  4030. TargetAdd('maxegg'+VNUM+'.dlo', opts=OPTS)
  4031. #
  4032. # DIRECTORY: pandatool/src/maxprogs/
  4033. #
  4034. for VER in MAXVERSIONS:
  4035. VNUM=VER[3:]
  4036. if (PkgSkip(VER)==0) and (PkgSkip("PANDATOOL")==0):
  4037. OPTS=['DIR:pandatool/src/maxprogs', VER, "WINCOMCTL", "WINCOMDLG", "WINUSER", "MSFORSCOPE"]
  4038. TargetAdd('maxImportRes.res', opts=OPTS, input='maxImportRes.rc')
  4039. TargetAdd('maxprogs'+VNUM+'_maxeggimport.obj', opts=OPTS, input='maxEggImport.cxx')
  4040. TargetAdd('maxeggimport'+VNUM+'.dle', input='maxegg'+VNUM+'_loader.obj')
  4041. TargetAdd('maxeggimport'+VNUM+'.dle', input='maxprogs'+VNUM+'_maxeggimport.obj')
  4042. TargetAdd('maxeggimport'+VNUM+'.dle', input='libpandaegg.dll')
  4043. TargetAdd('maxeggimport'+VNUM+'.dle', input='libpanda.dll')
  4044. TargetAdd('maxeggimport'+VNUM+'.dle', input='libpandaexpress.dll')
  4045. TargetAdd('maxeggimport'+VNUM+'.dle', input='maxImportRes.res')
  4046. TargetAdd('maxeggimport'+VNUM+'.dle', input='maxEggImport.def', ipath=OPTS)
  4047. TargetAdd('maxeggimport'+VNUM+'.dle', input=COMMON_DTOOL_LIBS)
  4048. TargetAdd('maxeggimport'+VNUM+'.dle', opts=OPTS)
  4049. #
  4050. # DIRECTORY: pandatool/src/vrml/
  4051. #
  4052. if (PkgSkip("PANDATOOL")==0):
  4053. OPTS=['DIR:pandatool/src/vrml', 'ZLIB', 'BISONPREFIX_vrmlyy']
  4054. CreateFile(GetOutputDir()+"/include/vrmlParser.h")
  4055. TargetAdd('pvrml_vrmlParser.obj', opts=OPTS, input='vrmlParser.yxx')
  4056. TargetAdd('vrmlParser.h', input='pvrml_vrmlParser.obj', opts=['DEPENDENCYONLY'])
  4057. TargetAdd('pvrml_vrmlLexer.obj', opts=OPTS, input='vrmlLexer.lxx')
  4058. TargetAdd('pvrml_parse_vrml.obj', opts=OPTS, input='parse_vrml.cxx')
  4059. TargetAdd('pvrml_standard_nodes.obj', opts=OPTS, input='standard_nodes.cxx')
  4060. TargetAdd('pvrml_vrmlNode.obj', opts=OPTS, input='vrmlNode.cxx')
  4061. TargetAdd('pvrml_vrmlNodeType.obj', opts=OPTS, input='vrmlNodeType.cxx')
  4062. TargetAdd('libpvrml.lib', input='pvrml_parse_vrml.obj')
  4063. TargetAdd('libpvrml.lib', input='pvrml_standard_nodes.obj')
  4064. TargetAdd('libpvrml.lib', input='pvrml_vrmlNode.obj')
  4065. TargetAdd('libpvrml.lib', input='pvrml_vrmlNodeType.obj')
  4066. TargetAdd('libpvrml.lib', input='pvrml_vrmlParser.obj')
  4067. TargetAdd('libpvrml.lib', input='pvrml_vrmlLexer.obj')
  4068. #
  4069. # DIRECTORY: pandatool/src/vrmlegg/
  4070. #
  4071. if (PkgSkip("PANDATOOL")==0):
  4072. OPTS=['DIR:pandatool/src/vrmlegg', 'DIR:pandatool/src/vrml']
  4073. TargetAdd('vrmlegg_indexedFaceSet.obj', opts=OPTS, input='indexedFaceSet.cxx')
  4074. TargetAdd('vrmlegg_vrmlAppearance.obj', opts=OPTS, input='vrmlAppearance.cxx')
  4075. TargetAdd('vrmlegg_vrmlToEggConverter.obj', opts=OPTS, input='vrmlToEggConverter.cxx')
  4076. TargetAdd('libvrmlegg.lib', input='vrmlegg_indexedFaceSet.obj')
  4077. TargetAdd('libvrmlegg.lib', input='vrmlegg_vrmlAppearance.obj')
  4078. TargetAdd('libvrmlegg.lib', input='vrmlegg_vrmlToEggConverter.obj')
  4079. #
  4080. # DIRECTORY: pandatool/src/xfile/
  4081. #
  4082. if (PkgSkip("PANDATOOL")==0):
  4083. OPTS=['DIR:pandatool/src/xfile', 'ZLIB', 'BISONPREFIX_xyy', 'FLEXDASHI']
  4084. CreateFile(GetOutputDir()+"/include/xParser.h")
  4085. TargetAdd('xfile_xParser.obj', opts=OPTS, input='xParser.yxx')
  4086. TargetAdd('xParser.h', input='xfile_xParser.obj', opts=['DEPENDENCYONLY'])
  4087. TargetAdd('xfile_xLexer.obj', opts=OPTS, input='xLexer.lxx')
  4088. TargetAdd('xfile_composite1.obj', opts=OPTS, input='xfile_composite1.cxx')
  4089. TargetAdd('libxfile.lib', input='xfile_composite1.obj')
  4090. TargetAdd('libxfile.lib', input='xfile_xParser.obj')
  4091. TargetAdd('libxfile.lib', input='xfile_xLexer.obj')
  4092. #
  4093. # DIRECTORY: pandatool/src/xfileegg/
  4094. #
  4095. if (PkgSkip("PANDATOOL")==0):
  4096. OPTS=['DIR:pandatool/src/xfileegg', 'DIR:pandatool/src/xfile']
  4097. TargetAdd('xfileegg_composite1.obj', opts=OPTS, input='xfileegg_composite1.cxx')
  4098. TargetAdd('libxfileegg.lib', input='xfileegg_composite1.obj')
  4099. #
  4100. # DIRECTORY: pandatool/src/ptloader/
  4101. #
  4102. if (PkgSkip("PANDATOOL")==0):
  4103. OPTS=['DIR:pandatool/src/ptloader', 'DIR:pandatool/src/flt', 'DIR:pandatool/src/lwo', 'DIR:pandatool/src/xfile', 'DIR:pandatool/src/xfileegg', 'DIR:pandatool/src/daeegg', 'BUILDING:PTLOADER', 'FCOLLADA']
  4104. TargetAdd('ptloader_config_ptloader.obj', opts=OPTS, input='config_ptloader.cxx')
  4105. TargetAdd('ptloader_loaderFileTypePandatool.obj', opts=OPTS, input='loaderFileTypePandatool.cxx')
  4106. TargetAdd('libp3ptloader.dll', input='ptloader_config_ptloader.obj')
  4107. TargetAdd('libp3ptloader.dll', input='ptloader_loaderFileTypePandatool.obj')
  4108. TargetAdd('libp3ptloader.dll', input='libfltegg.lib')
  4109. TargetAdd('libp3ptloader.dll', input='libflt.lib')
  4110. TargetAdd('libp3ptloader.dll', input='liblwoegg.lib')
  4111. TargetAdd('libp3ptloader.dll', input='liblwo.lib')
  4112. TargetAdd('libp3ptloader.dll', input='libdxfegg.lib')
  4113. TargetAdd('libp3ptloader.dll', input='libdxf.lib')
  4114. TargetAdd('libp3ptloader.dll', input='libobjegg.lib')
  4115. TargetAdd('libp3ptloader.dll', input='libvrmlegg.lib')
  4116. TargetAdd('libp3ptloader.dll', input='libpvrml.lib')
  4117. TargetAdd('libp3ptloader.dll', input='libxfileegg.lib')
  4118. TargetAdd('libp3ptloader.dll', input='libxfile.lib')
  4119. if (PkgSkip("FCOLLADA")==0): TargetAdd('libp3ptloader.dll', input='libdaeegg.lib')
  4120. TargetAdd('libp3ptloader.dll', input='libeggbase.lib')
  4121. TargetAdd('libp3ptloader.dll', input='libprogbase.lib')
  4122. TargetAdd('libp3ptloader.dll', input='libconverter.lib')
  4123. TargetAdd('libp3ptloader.dll', input='libpandatoolbase.lib')
  4124. TargetAdd('libp3ptloader.dll', input='libpandaegg.dll')
  4125. TargetAdd('libp3ptloader.dll', input=COMMON_PANDA_LIBS)
  4126. TargetAdd('libp3ptloader.dll', opts=['MODULE', 'ADVAPI', 'FCOLLADA', 'WINUSER'])
  4127. #
  4128. # DIRECTORY: pandatool/src/miscprogs/
  4129. #
  4130. if (PkgSkip("PANDATOOL")==0):
  4131. OPTS=['DIR:pandatool/src/miscprogs']
  4132. TargetAdd('bin2c_binToC.obj', opts=OPTS, input='binToC.cxx')
  4133. TargetAdd('bin2c.exe', input='bin2c_binToC.obj')
  4134. TargetAdd('bin2c.exe', input='libprogbase.lib')
  4135. TargetAdd('bin2c.exe', input='libpandatoolbase.lib')
  4136. TargetAdd('bin2c.exe', input=COMMON_PANDA_LIBS)
  4137. TargetAdd('bin2c.exe', input='libp3pystub.dll')
  4138. TargetAdd('bin2c.exe', opts=['ADVAPI'])
  4139. #
  4140. # DIRECTORY: pandatool/src/pstatserver/
  4141. #
  4142. if (PkgSkip("PANDATOOL")==0):
  4143. OPTS=['DIR:pandatool/src/pstatserver']
  4144. TargetAdd('pstatserver_composite1.obj', opts=OPTS, input='pstatserver_composite1.cxx')
  4145. TargetAdd('libpstatserver.lib', input='pstatserver_composite1.obj')
  4146. #
  4147. # DIRECTORY: pandatool/src/softprogs/
  4148. #
  4149. if (PkgSkip("PANDATOOL")==0):
  4150. OPTS=['DIR:pandatool/src/softprogs', 'OPENSSL']
  4151. TargetAdd('softcvs_softCVS.obj', opts=OPTS, input='softCVS.cxx')
  4152. TargetAdd('softcvs_softFilename.obj', opts=OPTS, input='softFilename.cxx')
  4153. TargetAdd('softcvs.exe', input='softcvs_softCVS.obj')
  4154. TargetAdd('softcvs.exe', input='softcvs_softFilename.obj')
  4155. TargetAdd('softcvs.exe', input='libprogbase.lib')
  4156. TargetAdd('softcvs.exe', input='libpandatoolbase.lib')
  4157. TargetAdd('softcvs.exe', input='libpandaegg.dll')
  4158. TargetAdd('softcvs.exe', input=COMMON_PANDA_LIBS)
  4159. TargetAdd('softcvs.exe', input='libp3pystub.dll')
  4160. TargetAdd('softcvs.exe', opts=['ADVAPI'])
  4161. #
  4162. # DIRECTORY: pandatool/src/text-stats/
  4163. #
  4164. if (PkgSkip("PANDATOOL")==0):
  4165. OPTS=['DIR:pandatool/src/text-stats']
  4166. TargetAdd('text-stats_textMonitor.obj', opts=OPTS, input='textMonitor.cxx')
  4167. TargetAdd('text-stats_textStats.obj', opts=OPTS, input='textStats.cxx')
  4168. TargetAdd('text-stats.exe', input='text-stats_textMonitor.obj')
  4169. TargetAdd('text-stats.exe', input='text-stats_textStats.obj')
  4170. TargetAdd('text-stats.exe', input='libprogbase.lib')
  4171. TargetAdd('text-stats.exe', input='libpstatserver.lib')
  4172. TargetAdd('text-stats.exe', input='libpandatoolbase.lib')
  4173. TargetAdd('text-stats.exe', input='libpandaegg.dll')
  4174. TargetAdd('text-stats.exe', input=COMMON_PANDA_LIBS)
  4175. TargetAdd('text-stats.exe', input='libp3pystub.dll')
  4176. TargetAdd('text-stats.exe', opts=['ADVAPI'])
  4177. #
  4178. # DIRECTORY: pandatool/src/vrmlprogs/
  4179. #
  4180. if (PkgSkip("PANDATOOL")==0):
  4181. OPTS=['DIR:pandatool/src/vrmlprogs', 'DIR:pandatool/src/vrml', 'DIR:pandatool/src/vrmlegg']
  4182. TargetAdd('vrml-trans_vrmlTrans.obj', opts=OPTS, input='vrmlTrans.cxx')
  4183. TargetAdd('vrml-trans.exe', input='vrml-trans_vrmlTrans.obj')
  4184. TargetAdd('vrml-trans.exe', input='libpvrml.lib')
  4185. TargetAdd('vrml-trans.exe', input='libprogbase.lib')
  4186. TargetAdd('vrml-trans.exe', input='libpandatoolbase.lib')
  4187. TargetAdd('vrml-trans.exe', input=COMMON_PANDA_LIBS)
  4188. TargetAdd('vrml-trans.exe', input='libp3pystub.dll')
  4189. TargetAdd('vrml-trans.exe', opts=['ADVAPI'])
  4190. TargetAdd('vrml2egg_vrmlToEgg.obj', opts=OPTS, input='vrmlToEgg.cxx')
  4191. TargetAdd('vrml2egg.exe', input='vrml2egg_vrmlToEgg.obj')
  4192. TargetAdd('vrml2egg.exe', input='libvrmlegg.lib')
  4193. TargetAdd('vrml2egg.exe', input='libpvrml.lib')
  4194. TargetAdd('vrml2egg.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
  4195. TargetAdd('vrml2egg.exe', opts=['ADVAPI'])
  4196. #
  4197. # DIRECTORY: pandatool/src/win-stats/
  4198. # DIRECTORY: pandatool/src/gtk-stats/
  4199. #
  4200. if (PkgSkip("PANDATOOL")==0 and (sys.platform.startswith("win") or PkgSkip("GTK2")==0)):
  4201. if (sys.platform.startswith("win")):
  4202. OPTS=['DIR:pandatool/src/win-stats']
  4203. TargetAdd('pstats_composite1.obj', opts=OPTS, input='winstats_composite1.cxx')
  4204. else:
  4205. OPTS=['DIR:pandatool/src/gtk-stats', 'GTK2']
  4206. TargetAdd('pstats_composite1.obj', opts=OPTS, input='gtkstats_composite1.cxx')
  4207. TargetAdd('pstats.exe', input='pstats_composite1.obj')
  4208. TargetAdd('pstats.exe', input='libpstatserver.lib')
  4209. TargetAdd('pstats.exe', input='libprogbase.lib')
  4210. TargetAdd('pstats.exe', input='libpandatoolbase.lib')
  4211. TargetAdd('pstats.exe', input=COMMON_PANDA_LIBS)
  4212. TargetAdd('pstats.exe', input='libp3pystub.dll')
  4213. TargetAdd('pstats.exe', opts=['WINSOCK', 'WINIMM', 'WINGDI', 'WINKERNEL', 'WINOLDNAMES', 'WINUSER', 'WINMM', 'GTK2'])
  4214. #
  4215. # DIRECTORY: pandatool/src/xfileprogs/
  4216. #
  4217. if (PkgSkip("PANDATOOL")==0):
  4218. OPTS=['DIR:pandatool/src/xfileprogs', 'DIR:pandatool/src/xfile', 'DIR:pandatool/src/xfileegg']
  4219. TargetAdd('egg2x_eggToX.obj', opts=OPTS, input='eggToX.cxx')
  4220. TargetAdd('egg2x.exe', input='egg2x_eggToX.obj')
  4221. TargetAdd('egg2x.exe', input='libxfileegg.lib')
  4222. TargetAdd('egg2x.exe', input='libxfile.lib')
  4223. TargetAdd('egg2x.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
  4224. TargetAdd('egg2x.exe', opts=['ADVAPI'])
  4225. TargetAdd('x-trans_xFileTrans.obj', opts=OPTS, input='xFileTrans.cxx')
  4226. TargetAdd('x-trans.exe', input='x-trans_xFileTrans.obj')
  4227. TargetAdd('x-trans.exe', input='libprogbase.lib')
  4228. TargetAdd('x-trans.exe', input='libxfile.lib')
  4229. TargetAdd('x-trans.exe', input='libpandatoolbase.lib')
  4230. TargetAdd('x-trans.exe', input=COMMON_PANDA_LIBS)
  4231. TargetAdd('x-trans.exe', input='libp3pystub.dll')
  4232. TargetAdd('x-trans.exe', opts=['ADVAPI'])
  4233. TargetAdd('x2egg_xFileToEgg.obj', opts=OPTS, input='xFileToEgg.cxx')
  4234. TargetAdd('x2egg.exe', input='x2egg_xFileToEgg.obj')
  4235. TargetAdd('x2egg.exe', input='libxfileegg.lib')
  4236. TargetAdd('x2egg.exe', input='libxfile.lib')
  4237. TargetAdd('x2egg.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
  4238. TargetAdd('x2egg.exe', opts=['ADVAPI'])
  4239. #
  4240. # DIRECTORY: pandatool/src/mayaprogs/
  4241. #
  4242. for VER in MAYAVERSIONS:
  4243. VNUM=VER[4:]
  4244. if (PkgSkip(VER)==0) and (PkgSkip("PANDATOOL")==0):
  4245. OPTS=['DIR:pandatool/src/mayaprogs', 'DIR:pandatool/src/maya', 'DIR:pandatool/src/mayaegg', 'DIR:pandatool/src/cvscopy', 'BUILDING:MISC', VER]
  4246. TargetAdd('mayaeggimport'+VNUM+'_mayaeggimport.obj', opts=OPTS, input='mayaEggImport.cxx')
  4247. TargetAdd('mayaeggimport'+VNUM+'.mll', input='mayaegg'+VNUM+'_loader.obj')
  4248. TargetAdd('mayaeggimport'+VNUM+'.mll', input='mayaeggimport'+VNUM+'_mayaeggimport.obj')
  4249. TargetAdd('mayaeggimport'+VNUM+'.mll', input='libpandaegg.dll')
  4250. TargetAdd('mayaeggimport'+VNUM+'.mll', input=COMMON_PANDA_LIBS)
  4251. if sys.platform.startswith("win32"):
  4252. TargetAdd('mayaeggimport'+VNUM+'.mll', input='libp3pystub.dll')
  4253. TargetAdd('mayaeggimport'+VNUM+'.mll', opts=['ADVAPI', VER])
  4254. TargetAdd('mayaloader'+VNUM+'_config_mayaloader.obj', opts=OPTS, input='config_mayaloader.cxx')
  4255. TargetAdd('libp3mayaloader'+VNUM+'.dll', input='mayaloader'+VNUM+'_config_mayaloader.obj')
  4256. TargetAdd('libp3mayaloader'+VNUM+'.dll', input='libmayaegg'+VNUM+'.lib')
  4257. TargetAdd('libp3mayaloader'+VNUM+'.dll', input='libp3ptloader.dll')
  4258. TargetAdd('libp3mayaloader'+VNUM+'.dll', input='libmaya'+VNUM+'.lib')
  4259. TargetAdd('libp3mayaloader'+VNUM+'.dll', input='libfltegg.lib')
  4260. TargetAdd('libp3mayaloader'+VNUM+'.dll', input='libflt.lib')
  4261. TargetAdd('libp3mayaloader'+VNUM+'.dll', input='liblwoegg.lib')
  4262. TargetAdd('libp3mayaloader'+VNUM+'.dll', input='liblwo.lib')
  4263. TargetAdd('libp3mayaloader'+VNUM+'.dll', input='libdxfegg.lib')
  4264. TargetAdd('libp3mayaloader'+VNUM+'.dll', input='libdxf.lib')
  4265. TargetAdd('libp3mayaloader'+VNUM+'.dll', input='libobjegg.lib')
  4266. TargetAdd('libp3mayaloader'+VNUM+'.dll', input='libvrmlegg.lib')
  4267. TargetAdd('libp3mayaloader'+VNUM+'.dll', input='libpvrml.lib')
  4268. TargetAdd('libp3mayaloader'+VNUM+'.dll', input='libxfileegg.lib')
  4269. TargetAdd('libp3mayaloader'+VNUM+'.dll', input='libxfile.lib')
  4270. TargetAdd('libp3mayaloader'+VNUM+'.dll', input='libeggbase.lib')
  4271. TargetAdd('libp3mayaloader'+VNUM+'.dll', input='libprogbase.lib')
  4272. TargetAdd('libp3mayaloader'+VNUM+'.dll', input='libconverter.lib')
  4273. TargetAdd('libp3mayaloader'+VNUM+'.dll', input='libpandatoolbase.lib')
  4274. TargetAdd('libp3mayaloader'+VNUM+'.dll', input='libpandaegg.dll')
  4275. TargetAdd('libp3mayaloader'+VNUM+'.dll', input=COMMON_PANDA_LIBS)
  4276. TargetAdd('libp3mayaloader'+VNUM+'.dll', opts=['ADVAPI', VER])
  4277. TargetAdd('mayapview'+VNUM+'_mayaPview.obj', opts=OPTS, input='mayaPview.cxx')
  4278. TargetAdd('libmayapview'+VNUM+'.mll', input='mayapview'+VNUM+'_mayaPview.obj')
  4279. TargetAdd('libmayapview'+VNUM+'.mll', input='libmayaegg'+VNUM+'.lib')
  4280. TargetAdd('libmayapview'+VNUM+'.mll', input='libmaya'+VNUM+'.lib')
  4281. TargetAdd('libmayapview'+VNUM+'.mll', input='libp3framework.dll')
  4282. if (sys.platform.startswith("win")):
  4283. TargetAdd('libmayapview'+VNUM+'.mll', input=COMMON_EGG2X_LIBS_PYSTUB)
  4284. else:
  4285. TargetAdd('libmayapview'+VNUM+'.mll', input=COMMON_EGG2X_LIBS)
  4286. TargetAdd('libmayapview'+VNUM+'.mll', opts=['ADVAPI', VER])
  4287. TargetAdd('maya2egg'+VNUM+'_mayaToEgg.obj', opts=OPTS, input='mayaToEgg.cxx')
  4288. TargetAdd('maya2egg'+VNUM+'-wrapped.exe', input='maya2egg'+VNUM+'_mayaToEgg.obj')
  4289. TargetAdd('maya2egg'+VNUM+'-wrapped.exe', input='libmayaegg'+VNUM+'.lib')
  4290. TargetAdd('maya2egg'+VNUM+'-wrapped.exe', input='libmaya'+VNUM+'.lib')
  4291. if (sys.platform.startswith("win")):
  4292. TargetAdd('maya2egg'+VNUM+'-wrapped.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
  4293. else:
  4294. TargetAdd('maya2egg'+VNUM+'-wrapped.exe', input=COMMON_EGG2X_LIBS)
  4295. if (sys.platform == "darwin" and int(VNUM) >= 2009):
  4296. TargetAdd('maya2egg'+VNUM+'-wrapped.exe', opts=['ADVAPI', 'NOPPC', VER])
  4297. else:
  4298. TargetAdd('maya2egg'+VNUM+'-wrapped.exe', opts=['ADVAPI', VER])
  4299. TargetAdd('egg2maya'+VNUM+'_eggToMaya.obj', opts=OPTS, input='eggToMaya.cxx')
  4300. TargetAdd('egg2maya'+VNUM+'-wrapped.exe', input='egg2maya'+VNUM+'_eggToMaya.obj')
  4301. TargetAdd('egg2maya'+VNUM+'-wrapped.exe', input='libmayaegg'+VNUM+'.lib')
  4302. TargetAdd('egg2maya'+VNUM+'-wrapped.exe', input='libmaya'+VNUM+'.lib')
  4303. if (sys.platform.startswith("win")):
  4304. TargetAdd('egg2maya'+VNUM+'-wrapped.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
  4305. else:
  4306. TargetAdd('egg2maya'+VNUM+'-wrapped.exe', input=COMMON_EGG2X_LIBS)
  4307. if (sys.platform == "darwin" and int(VNUM) >= 2009):
  4308. TargetAdd('egg2maya'+VNUM+'-wrapped.exe', opts=['ADVAPI', 'NOPPC', VER])
  4309. else:
  4310. TargetAdd('egg2maya'+VNUM+'-wrapped.exe', opts=['ADVAPI', VER])
  4311. TargetAdd('mayacopy'+VNUM+'_mayaCopy.obj', opts=OPTS, input='mayaCopy.cxx')
  4312. TargetAdd('mayacopy'+VNUM+'-wrapped.exe', input='mayacopy'+VNUM+'_mayaCopy.obj')
  4313. TargetAdd('mayacopy'+VNUM+'-wrapped.exe', input='libcvscopy.lib')
  4314. TargetAdd('mayacopy'+VNUM+'-wrapped.exe', input='libmaya'+VNUM+'.lib')
  4315. if sys.platform == "win32":
  4316. TargetAdd('mayacopy'+VNUM+'-wrapped.exe', input=COMMON_EGG2X_LIBS_PYSTUB)
  4317. else:
  4318. TargetAdd('mayacopy'+VNUM+'-wrapped.exe', input=COMMON_EGG2X_LIBS)
  4319. if (sys.platform == "darwin" and int(VNUM) >= 2009):
  4320. TargetAdd('mayacopy'+VNUM+'-wrapped.exe', opts=['ADVAPI', 'NOPPC', VER])
  4321. else:
  4322. TargetAdd('mayacopy'+VNUM+'-wrapped.exe', opts=['ADVAPI', VER])
  4323. TargetAdd('mayasavepview'+VNUM+'_mayaSavePview.obj', opts=OPTS, input='mayaSavePview.cxx')
  4324. TargetAdd('libmayasavepview'+VNUM+'.mll', input='mayasavepview'+VNUM+'_mayaSavePview.obj')
  4325. TargetAdd('libmayasavepview'+VNUM+'.mll', opts=['ADVAPI', VER])
  4326. TargetAdd('mayaWrapper'+VNUM+'.obj', opts=OPTS, input='mayaWrapper.cxx')
  4327. TargetAdd('maya2egg'+VNUM+'.exe', input='mayaWrapper'+VNUM+'.obj')
  4328. TargetAdd('maya2egg'+VNUM+'.exe', opts=['ADVAPI'])
  4329. TargetAdd('mayacopy'+VNUM+'.exe', input='mayaWrapper'+VNUM+'.obj')
  4330. TargetAdd('mayacopy'+VNUM+'.exe', opts=['ADVAPI'])
  4331. #
  4332. # DIRECTORY: contrib/src/ai/
  4333. #
  4334. if (PkgSkip("CONTRIB")==0 and not RUNTIME):
  4335. OPTS=['DIR:contrib/src/ai', 'BUILDING:PANDAAI']
  4336. TargetAdd('ai_composite1.obj', opts=OPTS, input='ai_composite1.cxx')
  4337. IGATEFILES=GetDirectoryContents('contrib/src/ai', ["*.h", "*_composite.cxx"])
  4338. TargetAdd('libpandaai.in', opts=OPTS, input=IGATEFILES)
  4339. TargetAdd('libpandaai.in', opts=['IMOD:pandaai', 'ILIB:libpandaai', 'SRCDIR:contrib/src/ai'])
  4340. TargetAdd('libpandaai_igate.obj', input='libpandaai.in', opts=["DEPENDENCYONLY"])
  4341. TargetAdd('libpandaai_module.obj', input='libpandaai.in')
  4342. TargetAdd('libpandaai_module.obj', opts=OPTS)
  4343. TargetAdd('libpandaai_module.obj', opts=['IMOD:pandaai', 'ILIB:libpandaai'])
  4344. TargetAdd('libpandaai.dll', input='libpandaai_module.obj')
  4345. TargetAdd('libpandaai.dll', input='ai_composite1.obj')
  4346. TargetAdd('libpandaai.dll', input='libpandaai_igate.obj')
  4347. TargetAdd('libpandaai.dll', input=COMMON_PANDA_LIBS)
  4348. #
  4349. # Run genpycode
  4350. #
  4351. if (PkgSkip("PYTHON")==0 and not RUNTIME):
  4352. # We're phasing out the concept of PandaModules, so do not
  4353. # add new libraries here. See direct/src/ffi/panda3d.py
  4354. TargetAdd('PandaModules.py', input='libpandaexpress.dll')
  4355. TargetAdd('PandaModules.py', input='libpanda.dll')
  4356. TargetAdd('PandaModules.py', input='libpandaphysics.dll')
  4357. TargetAdd('PandaModules.py', input='libpandafx.dll')
  4358. if (PkgSkip("DIRECT")==0):
  4359. TargetAdd('PandaModules.py', input='libp3direct.dll')
  4360. TargetAdd('PandaModules.py', input='libp3vision.dll')
  4361. TargetAdd('PandaModules.py', input='libpandaskel.dll')
  4362. TargetAdd('PandaModules.py', input='libpandaegg.dll')
  4363. if (PkgSkip("AWESOMIUM")==0):
  4364. TargetAdd('PandaModules.py', input='libp3awesomium.dll')
  4365. if (PkgSkip("ODE")==0):
  4366. TargetAdd('PandaModules.py', input='libpandaode.dll')
  4367. #
  4368. # Generate the models directory and samples directory
  4369. #
  4370. if (PkgSkip("DIRECT")==0 and not RUNTIME):
  4371. model_extensions = ["*.egg"]
  4372. if (PkgSkip("PANDATOOL")==0):
  4373. model_extensions.append("*.flt")
  4374. for model in GetDirectoryContents("dmodels/src/misc", model_extensions):
  4375. if (PkgSkip("ZLIB")==0 and PkgSkip("DEPLOYTOOLS")==0 and not RTDIST):
  4376. newname = model[:-4] + ".egg.pz"
  4377. else:
  4378. newname = model[:-4] + ".egg"
  4379. TargetAdd(GetOutputDir()+"/models/misc/"+newname, input="dmodels/src/misc/"+model)
  4380. for model in GetDirectoryContents("dmodels/src/gui", model_extensions):
  4381. if (PkgSkip("ZLIB")==0 and PkgSkip("DEPLOYTOOLS")==0 and not RTDIST):
  4382. newname = model[:-4] + ".egg.pz"
  4383. else:
  4384. newname = model[:-4] + ".egg"
  4385. TargetAdd(GetOutputDir()+"/models/gui/"+newname, input="dmodels/src/gui/"+model)
  4386. for model in GetDirectoryContents("models", model_extensions):
  4387. if (PkgSkip("ZLIB")==0 and PkgSkip("DEPLOYTOOLS")==0 and not RTDIST):
  4388. newname = model[:-4] + ".egg.pz"
  4389. else:
  4390. newname = model[:-4] + ".egg"
  4391. TargetAdd(GetOutputDir()+"/models/"+newname, input="models/"+model)
  4392. CopyAllFiles(GetOutputDir()+"/models/audio/sfx/", "dmodels/src/audio/sfx/", ".wav")
  4393. CopyAllFiles(GetOutputDir()+"/models/icons/", "dmodels/src/icons/", ".gif")
  4394. CopyAllFiles(GetOutputDir()+"/models/maps/", "models/maps/", ".jpg")
  4395. CopyAllFiles(GetOutputDir()+"/models/maps/", "models/maps/", ".png")
  4396. CopyAllFiles(GetOutputDir()+"/models/maps/", "models/maps/", ".rgb")
  4397. CopyAllFiles(GetOutputDir()+"/models/maps/", "models/maps/", ".rgba")
  4398. CopyAllFiles(GetOutputDir()+"/models/maps/", "dmodels/src/maps/", ".jpg")
  4399. CopyAllFiles(GetOutputDir()+"/models/maps/", "dmodels/src/maps/", ".png")
  4400. CopyAllFiles(GetOutputDir()+"/models/maps/", "dmodels/src/maps/", ".rgb")
  4401. CopyAllFiles(GetOutputDir()+"/models/maps/", "dmodels/src/maps/", ".rgba")
  4402. #
  4403. # Build the rtdist.
  4404. #
  4405. if (RTDIST):
  4406. OPTS=['DIR:direct/src/p3d']
  4407. TargetAdd('_panda3d', opts=OPTS, input='panda3d.pdef')
  4408. TargetAdd('_coreapi', opts=OPTS, input='coreapi.pdef')
  4409. TargetAdd('_thirdparty', opts=OPTS, input='thirdparty.pdef')
  4410. #
  4411. # Distribute prebuilt .p3d files as executable.
  4412. #
  4413. if (PkgSkip("DIRECT")==0 and not RUNTIME and not RTDIST):
  4414. if (sys.platform.startswith("win")):
  4415. OPTS=['DIR:direct/src/p3d']
  4416. TargetAdd('p3dWrapper.obj', opts=OPTS, input='p3dWrapper.c')
  4417. TargetAdd('p3dWrapper.exe', input='p3dWrapper.obj')
  4418. TargetAdd('p3dWrapper.exe', opts=["ADVAPI"])
  4419. for g in glob.glob("direct/src/p3d/*.p3d"):
  4420. base = os.path.basename(g)
  4421. base = base.split(".", 1)[0]
  4422. if (sys.platform.startswith("win")):
  4423. TargetAdd(base+".exe", input='p3dWrapper.exe')
  4424. CopyFile(GetOutputDir()+"/bin/"+base+".p3d", g)
  4425. else:
  4426. CopyFile(GetOutputDir()+"/bin/"+base, g)
  4427. oscmd("chmod +x "+GetOutputDir()+"/bin/"+base)
  4428. ##########################################################################################
  4429. #
  4430. # Dependency-Based Distributed Build System.
  4431. #
  4432. ##########################################################################################
  4433. DEPENDENCYQUEUE=[]
  4434. for target in TARGET_LIST:
  4435. name = target.name
  4436. inputs = target.inputs
  4437. opts = target.opts
  4438. deps = target.deps
  4439. DEPENDENCYQUEUE.append([CompileAnything, [name, inputs, opts], [name], deps, []])
  4440. def BuildWorker(taskqueue, donequeue):
  4441. while (1):
  4442. task = taskqueue.get()
  4443. sys.stdout.flush()
  4444. if (task == 0): return
  4445. try:
  4446. apply(task[0],task[1])
  4447. donequeue.put(task)
  4448. except:
  4449. donequeue.put(0)
  4450. def AllSourcesReady(task, pending):
  4451. sources = task[3]
  4452. for x in sources:
  4453. if (x in pending):
  4454. return 0
  4455. altsources = task[4]
  4456. for x in altsources:
  4457. if (x in pending):
  4458. return 0
  4459. return 1
  4460. def ParallelMake(tasklist):
  4461. # Create the communication queues.
  4462. donequeue=Queue.Queue()
  4463. taskqueue=Queue.Queue()
  4464. # Build up a table listing all the pending targets
  4465. pending = {}
  4466. for task in tasklist:
  4467. for target in task[2]:
  4468. pending[target] = 1
  4469. # Create the workers
  4470. for slave in range(THREADCOUNT):
  4471. th = threading.Thread(target=BuildWorker, args=[taskqueue,donequeue])
  4472. th.setDaemon(1)
  4473. th.start()
  4474. # Feed tasks to the workers.
  4475. tasksqueued = 0
  4476. while (1):
  4477. if (tasksqueued < THREADCOUNT*2):
  4478. extras = []
  4479. for task in tasklist:
  4480. if (tasksqueued < THREADCOUNT*3) & (AllSourcesReady(task, pending)):
  4481. if (NeedsBuild(task[2], task[3])):
  4482. tasksqueued += 1
  4483. taskqueue.put(task)
  4484. else:
  4485. for target in task[2]:
  4486. del pending[target]
  4487. else:
  4488. extras.append(task)
  4489. tasklist = extras
  4490. sys.stdout.flush()
  4491. if (tasksqueued == 0): break
  4492. donetask = donequeue.get()
  4493. if (donetask == 0):
  4494. exit("Build process aborting.")
  4495. sys.stdout.flush()
  4496. tasksqueued -= 1
  4497. JustBuilt(donetask[2], donetask[3])
  4498. for target in donetask[2]:
  4499. del pending[target]
  4500. # Kill the workers.
  4501. for slave in range(THREADCOUNT):
  4502. taskqueue.put(0)
  4503. # Make sure there aren't any unsatisfied tasks
  4504. if (len(tasklist)>0):
  4505. exit("Dependency problem - task unsatisfied: "+str(tasklist[0][2]))
  4506. def SequentialMake(tasklist):
  4507. i = 0
  4508. for task in tasklist:
  4509. if (NeedsBuild(task[2], task[3])):
  4510. apply(task[0], task[1] + [(i * 100.0) / len(tasklist)])
  4511. JustBuilt(task[2], task[3])
  4512. i += 1
  4513. def RunDependencyQueue(tasklist):
  4514. if (THREADCOUNT!=0):
  4515. ParallelMake(tasklist)
  4516. else:
  4517. SequentialMake(tasklist)
  4518. try:
  4519. RunDependencyQueue(DEPENDENCYQUEUE)
  4520. except:
  4521. SaveDependencyCache()
  4522. raise
  4523. ##########################################################################################
  4524. #
  4525. # The Installers
  4526. #
  4527. # Under windows, we can build an 'exe' package using NSIS
  4528. # Under linux, we can build a 'deb' package or an 'rpm' package.
  4529. # Under OSX, we can make a 'dmg' package.
  4530. #
  4531. ##########################################################################################
  4532. def MakeInstallerNSIS(file, fullname, smdirectory, installdir):
  4533. if (os.path.isfile(file)):
  4534. os.remove(file)
  4535. elif (os.path.isdir(file)):
  4536. shutil.rmtree(file)
  4537. if (RUNTIME):
  4538. # Invoke the make_installer script.
  4539. AddToPathEnv("PATH", GetOutputDir() + "\\bin")
  4540. AddToPathEnv("PATH", GetOutputDir() + "\\plugins")
  4541. oscmd(SDK["PYTHONEXEC"] + " direct\\src\\plugin_installer\\make_installer.py --version %s" % VERSION)
  4542. shutil.move("direct\\src\\plugin_installer\\p3d-setup.exe", file)
  4543. return
  4544. print "Building "+fullname+" installer. This can take up to an hour."
  4545. if (COMPRESSOR != "lzma"):
  4546. print("Note: you are using zlib, which is faster, but lzma gives better compression.")
  4547. if (os.path.exists("nsis-output.exe")):
  4548. os.remove("nsis-output.exe")
  4549. WriteFile(GetOutputDir()+"/tmp/__init__.py", "")
  4550. psource=os.path.abspath(".")
  4551. panda=os.path.abspath(GetOutputDir())
  4552. cmd=GetThirdpartyBase()+"/win-nsis/makensis /V2 "
  4553. cmd=cmd+'/DCOMPRESSOR="'+COMPRESSOR+'" '
  4554. cmd=cmd+'/DNAME="'+fullname+'" '
  4555. cmd=cmd+'/DSMDIRECTORY="'+smdirectory+'" '
  4556. cmd=cmd+'/DINSTALLDIR="'+installdir+'" '
  4557. cmd=cmd+'/DOUTFILE="'+psource+'\\nsis-output.exe" '
  4558. cmd=cmd+'/DLICENSE="'+panda+'\\LICENSE" '
  4559. cmd=cmd+'/DLANGUAGE="English" '
  4560. cmd=cmd+'/DRUNTEXT="Visit the Panda Manual" '
  4561. cmd=cmd+'/DIBITMAP="panda-install.bmp" '
  4562. cmd=cmd+'/DUBITMAP="panda-install.bmp" '
  4563. cmd=cmd+'/DPANDA="'+panda+'" '
  4564. cmd=cmd+'/DPANDACONF="'+panda+'\\etc" '
  4565. cmd=cmd+'/DPSOURCE="'+psource+'" '
  4566. cmd=cmd+'/DPYEXTRAS="'+os.path.abspath(GetThirdpartyBase())+'\\win-extras" '
  4567. cmd=cmd+'"'+psource+'\\direct\\src\\directscripts\\packpanda.nsi"'
  4568. oscmd(cmd)
  4569. os.rename("nsis-output.exe", file)
  4570. INSTALLER_DEB_FILE="""
  4571. Package: panda3dMAJOR
  4572. Version: VERSION
  4573. Section: libdevel
  4574. Priority: optional
  4575. Architecture: ARCH
  4576. Essential: no
  4577. Depends: DEPENDS
  4578. Recommends: panda3d-runtime, python-wxversion, python-profiler (>= PV), python-tk (>= PV), RECOMMENDS
  4579. Provides: panda3d
  4580. Conflicts: panda3d
  4581. Replaces: panda3d
  4582. Maintainer: rdb <[email protected]>
  4583. Installed-Size: INSTSIZE
  4584. Description: The Panda3D free 3D engine SDK
  4585. Panda3D is a game engine which includes graphics, audio, I/O, collision detection, and other abilities relevant to the creation of 3D games. Panda3D is open source and free software under the revised BSD license, and can be used for both free and commercial game development at no financial cost.
  4586. Panda3D's intended game-development language is Python. The engine itself is written in C++, and utilizes an automatic wrapper-generator to expose the complete functionality of the engine in a Python interface.
  4587. .
  4588. This package contains the SDK for development with Panda3D, install panda3d-runtime for the runtime files.
  4589. """
  4590. RUNTIME_INSTALLER_DEB_FILE="""
  4591. Package: panda3d-runtime
  4592. Version: VERSION
  4593. Section: web
  4594. Priority: optional
  4595. Architecture: ARCH
  4596. Essential: no
  4597. Depends: DEPENDS
  4598. Provides: panda3d-runtime
  4599. Maintainer: rdb <[email protected]>
  4600. Installed-Size: INSTSIZE
  4601. Description: Runtime binary and browser plugin for the Panda3D Game Engine
  4602. This package contains the runtime distribution and browser plugin of the Panda3D engine. It allows you view webpages that contain Panda3D content and to run games created with Panda3D that are packaged as .p3d file.
  4603. """
  4604. # We're not putting "python" in the "Requires" field,
  4605. # since the rpm-based distros don't have a common
  4606. # naming for the Python package.
  4607. INSTALLER_SPEC_FILE="""
  4608. %{!?python_sitearch: %global python_sitearch %(%{__python} -c "from distutils.sysconfig import get_python_lib; print get_python_lib(1)")}
  4609. Summary: The Panda3D free 3D engine SDK
  4610. Name: panda3d
  4611. Version: VERSION
  4612. Release: RPMRELEASE
  4613. License: BSD License
  4614. Group: Development/Libraries
  4615. BuildRoot: PANDASOURCE/targetroot
  4616. %description
  4617. Panda3D is a game engine which includes graphics, audio, I/O, collision detection, and other abilities relevant to the creation of 3D games. Panda3D is open source and free software under the revised BSD license, and can be used for both free and commercial game development at no financial cost.
  4618. Panda3D's intended game-development language is Python. The engine itself is written in C++, and utilizes an automatic wrapper-generator to expose the complete functionality of the engine in a Python interface.
  4619. This package contains the SDK for development with Panda3D, install panda3d-runtime for the runtime files.
  4620. %post
  4621. /sbin/ldconfig
  4622. %postun
  4623. /sbin/ldconfig
  4624. %files
  4625. %defattr(-,root,root)
  4626. /etc/Confauto.prc
  4627. /etc/Config.prc
  4628. /usr/share/panda3d
  4629. /usr/share/mime-info/panda3d.mime
  4630. /usr/share/mime-info/panda3d.keys
  4631. /usr/share/mime/packages/panda3d.xml
  4632. /usr/share/application-registry/panda3d.applications
  4633. /usr/share/applications/*.desktop
  4634. /etc/ld.so.conf.d/panda3d.conf
  4635. /usr/bin
  4636. /usr/%_lib/panda3d
  4637. %{python_sitearch}
  4638. /usr/include/panda3d
  4639. """
  4640. RUNTIME_INSTALLER_SPEC_FILE="""
  4641. Summary: Runtime binary and browser plugin for the Panda3D Game Engine
  4642. Name: panda3d-runtime
  4643. Version: VERSION
  4644. Release: RPMRELEASE
  4645. License: BSD License
  4646. Group: Productivity/Graphics/Other
  4647. BuildRoot: PANDASOURCE/targetroot
  4648. %description
  4649. This package contains the runtime distribution and browser plugin of the Panda3D engine. It allows you view webpages that contain Panda3D content and to run games created with Panda3D that are packaged as .p3d file.
  4650. %files
  4651. %defattr(-,root,root)
  4652. /usr/bin/panda3d
  4653. /usr/%_lib/nppanda3d.so
  4654. /usr/%_lib/mozilla/plugins/nppanda3d.so
  4655. /usr/%_lib/mozilla-firefox/plugins/nppanda3d.so
  4656. /usr/%_lib/xulrunner-addons/plugins/nppanda3d.so
  4657. /usr/share/mime-info/panda3d-runtime.mime
  4658. /usr/share/mime-info/panda3d-runtime.keys
  4659. /usr/share/mime/packages/panda3d-runtime.xml
  4660. /usr/share/application-registry/panda3d-runtime.applications
  4661. /usr/share/applications/*.desktop
  4662. """
  4663. # plist file for Mac OSX
  4664. Info_plist = """<?xml version="1.0" encoding="UTF-8"?>
  4665. <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  4666. <plist version="1.0">
  4667. <dict>
  4668. <key>CFBundleIdentifier</key>
  4669. <string>%(package_id)s</string>
  4670. <key>CFBundleShortVersionString</key>
  4671. <string>%(version)s</string>
  4672. <key>IFPkgFlagRelocatable</key>
  4673. <false/>
  4674. <key>IFPkgFlagAuthorizationAction</key>
  4675. <string>RootAuthorization</string>
  4676. <key>IFPkgFlagAllowBackRev</key>
  4677. <true/>
  4678. </dict>
  4679. </plist>
  4680. """
  4681. # FreeBSD pkg-descr
  4682. INSTALLER_PKG_DESCR_FILE = """
  4683. Panda3D is a game engine which includes graphics, audio, I/O, collision detection, and other abilities relevant to the creation of 3D games. Panda3D is open source and free software under the revised BSD license, and can be used for both free and commercial game development at no financial cost.
  4684. Panda3D's intended game-development language is Python. The engine itself is written in C++, and utilizes an automatic wrapper-generator to expose the complete functionality of the engine in a Python interface.
  4685. This package contains the SDK for development with Panda3D, install panda3d-runtime for the runtime files.
  4686. WWW: http://www.panda3d.org/
  4687. """
  4688. def MakeInstallerLinux():
  4689. if RUNTIME: # No worries, it won't be used
  4690. PYTHONV = "python"
  4691. else:
  4692. PYTHONV = SDK["PYTHONVERSION"]
  4693. PV = PYTHONV.replace("python", "")
  4694. if (os.path.isdir("targetroot")): oscmd("chmod -R 755 targetroot")
  4695. oscmd("rm -rf targetroot data.tar.gz control.tar.gz panda3d.spec")
  4696. oscmd("mkdir --mode=0755 targetroot")
  4697. # Invoke installpanda.py to install it into a temporary dir
  4698. if RUNTIME:
  4699. InstallRuntime(destdir = "targetroot", prefix = "/usr", outputdir = GetOutputDir())
  4700. else:
  4701. InstallPanda(destdir = "targetroot", prefix = "/usr", outputdir = GetOutputDir())
  4702. oscmd("chmod -R 755 targetroot/usr/share/panda3d")
  4703. if (os.path.exists("/usr/bin/rpmbuild") and not os.path.exists("/usr/bin/dpkg-deb")):
  4704. oscmd("rm -rf targetroot/DEBIAN")
  4705. oscmd("rpm -E '%_target_cpu' > "+GetOutputDir()+"/tmp/architecture.txt")
  4706. ARCH = ReadFile(GetOutputDir()+"/tmp/architecture.txt").strip()
  4707. pandasource = os.path.abspath(os.getcwd())
  4708. if (RUNTIME):
  4709. txt = RUNTIME_INSTALLER_SPEC_FILE[1:]
  4710. else:
  4711. txt = INSTALLER_SPEC_FILE[1:]
  4712. txt = txt.replace("VERSION", VERSION).replace("RPMRELEASE", RPMRELEASE).replace("PANDASOURCE", pandasource).replace("PV", PV)
  4713. WriteFile("panda3d.spec", txt)
  4714. oscmd("fakeroot rpmbuild --define '_rpmdir "+pandasource+"' --buildroot '"+os.path.abspath("targetroot")+"' -bb panda3d.spec")
  4715. if (RUNTIME):
  4716. oscmd("mv "+ARCH+"/panda3d-runtime-"+VERSION+"-"+RPMRELEASE+"."+ARCH+".rpm .")
  4717. else:
  4718. oscmd("mv "+ARCH+"/panda3d-"+VERSION+"-"+RPMRELEASE+"."+ARCH+".rpm .")
  4719. oscmd("rm -rf "+ARCH, True)
  4720. if (os.path.exists("/usr/bin/dpkg-deb")):
  4721. oscmd("dpkg --print-architecture > "+GetOutputDir()+"/tmp/architecture.txt")
  4722. ARCH = ReadFile(GetOutputDir()+"/tmp/architecture.txt").strip()
  4723. if (RUNTIME):
  4724. txt = RUNTIME_INSTALLER_DEB_FILE[1:]
  4725. else:
  4726. txt = INSTALLER_DEB_FILE[1:]
  4727. txt = txt.replace("VERSION", DEBVERSION).replace("ARCH", ARCH).replace("PV", PV).replace("MAJOR", MAJOR_VERSION)
  4728. txt = txt.replace("INSTSIZE", str(GetDirectorySize("targetroot") / 1024))
  4729. oscmd("mkdir --mode=0755 -p targetroot/DEBIAN")
  4730. oscmd("cd targetroot ; (find usr -type f -exec md5sum {} \;) > DEBIAN/md5sums")
  4731. if (not RUNTIME):
  4732. oscmd("cd targetroot ; (find etc -type f -exec md5sum {} \;) >> DEBIAN/md5sums")
  4733. WriteFile("targetroot/DEBIAN/conffiles","/etc/Config.prc\n")
  4734. WriteFile("targetroot/DEBIAN/postinst","#!/bin/sh\necho running ldconfig\nldconfig\n")
  4735. oscmd("cp targetroot/DEBIAN/postinst targetroot/DEBIAN/postrm")
  4736. oscmd("mkdir targetroot/debian")
  4737. WriteFile("targetroot/debian/control", "")
  4738. if (RUNTIME):
  4739. oscmd("ln -s .. targetroot/debian/panda3d-runtime")
  4740. oscmd("cd targetroot ; dpkg-shlibdeps -xpanda3d-runtime debian/panda3d-runtime/usr/lib*/*.so* debian/panda3d-runtime/usr/bin/*")
  4741. depends = ReadFile("targetroot/debian/substvars").replace("shlibs:Depends=", "").strip()
  4742. WriteFile("targetroot/DEBIAN/control", txt.replace("DEPENDS", depends))
  4743. else:
  4744. oscmd("ln -s .. targetroot/debian/panda3d" + MAJOR_VERSION)
  4745. oscmd("cd targetroot ; dpkg-gensymbols -v%s -ppanda3d%s -eusr%s/panda3d/lib*.so* -ODEBIAN/symbols >/dev/null" % (DEBVERSION, MAJOR_VERSION, libdir))
  4746. # Library dependencies are required, binary dependencies are recommended. Dunno why -xlibphysx-extras is needed, prolly a bug in their package
  4747. oscmd("cd targetroot ; LD_LIBRARY_PATH=usr%s/panda3d dpkg-shlibdeps --ignore-missing-info --warnings=2 -xpanda3d%s -xlibphysx-extras -Tdebian/substvars_dep debian/panda3d%s/usr/lib*/panda3d/lib*.so*" % (libdir, MAJOR_VERSION, MAJOR_VERSION))
  4748. oscmd("cd targetroot ; LD_LIBRARY_PATH=usr%s/panda3d dpkg-shlibdeps --ignore-missing-info --warnings=2 -xpanda3d%s -Tdebian/substvars_rec debian/panda3d%s/usr/bin/*" % (libdir, MAJOR_VERSION, MAJOR_VERSION))
  4749. depends = ReadFile("targetroot/debian/substvars_dep").replace("shlibs:Depends=", "").strip()
  4750. recommends = ReadFile("targetroot/debian/substvars_rec").replace("shlibs:Depends=", "").strip()
  4751. if PkgSkip("PYTHON")==0:
  4752. depends += ", " + PYTHONV + ", python-pmw"
  4753. if PkgSkip("NVIDIACG")==0:
  4754. depends += ", nvidia-cg-toolkit"
  4755. WriteFile("targetroot/DEBIAN/control", txt.replace("DEPENDS", depends).replace("RECOMMENDS", recommends))
  4756. oscmd("rm -rf targetroot/debian")
  4757. oscmd("chmod -R 755 targetroot/DEBIAN")
  4758. if (RUNTIME):
  4759. oscmd("cd targetroot/DEBIAN ; chmod 644 control md5sums")
  4760. oscmd("fakeroot dpkg-deb -b targetroot panda3d-runtime_"+DEBVERSION+"_"+ARCH+".deb")
  4761. else:
  4762. oscmd("cd targetroot/DEBIAN ; chmod 644 control md5sums conffiles symbols")
  4763. oscmd("fakeroot dpkg-deb -b targetroot panda3d"+MAJOR_VERSION+"_"+DEBVERSION+"_"+ARCH+".deb")
  4764. oscmd("chmod -R 755 targetroot")
  4765. if not (os.path.exists("/usr/bin/rpmbuild") or os.path.exists("/usr/bin/dpkg-deb")):
  4766. exit("To build an installer, either rpmbuild or dpkg-deb must be present on your system!")
  4767. # oscmd("chmod -R 755 targetroot")
  4768. # oscmd("rm -rf targetroot data.tar.gz control.tar.gz panda3d.spec "+ARCH)
  4769. def MakeInstallerOSX():
  4770. if (RUNTIME):
  4771. # Invoke the make_installer script.
  4772. AddToPathEnv("DYLD_LIBRARY_PATH", GetOutputDir() + "/plugins")
  4773. oscmd(SDK["PYTHONEXEC"] + " direct/src/plugin_installer/make_installer.py --version %s" % VERSION)
  4774. return
  4775. import compileall
  4776. if (os.path.isfile("Panda3D-%s.dmg" % VERSION)): oscmd("rm -f Panda3D-%s.dmg" % VERSION)
  4777. if (os.path.exists("dstroot")): oscmd("rm -rf dstroot")
  4778. if (os.path.exists("Panda3D-rw.dmg")): oscmd('rm -f Panda3D-rw.dmg')
  4779. #TODO: add postflight script
  4780. #oscmd("sed -e 's@\\$1@%s@' < direct/src/directscripts/profilepaths-osx.command >> Panda3D-tpl-rw/panda3dpaths.command" % VERSION)
  4781. oscmd("mkdir -p dstroot/base/Developer/Panda3D/lib")
  4782. oscmd("mkdir -p dstroot/base/Developer/Panda3D/etc")
  4783. oscmd("cp %s/etc/Config.prc dstroot/base/Developer/Panda3D/etc/Config.prc" % GetOutputDir())
  4784. oscmd("cp %s/etc/Confauto.prc dstroot/base/Developer/Panda3D/etc/Confauto.prc" % GetOutputDir())
  4785. oscmd("cp -R %s/models dstroot/base/Developer/Panda3D/models" % GetOutputDir())
  4786. oscmd("cp -R doc/LICENSE dstroot/base/Developer/Panda3D/LICENSE")
  4787. oscmd("cp -R doc/ReleaseNotes dstroot/base/Developer/Panda3D/ReleaseNotes")
  4788. if os.path.isdir(GetOutputDir()+"/plugins"):
  4789. oscmd("cp -R %s/plugins dstroot/base/Developer/Panda3D/plugins" % GetOutputDir())
  4790. for base in os.listdir(GetOutputDir()+"/lib"):
  4791. if (not base.endswith(".a")):
  4792. libname = "dstroot/base/Developer/Panda3D/lib/" + base
  4793. # We really need to specify -R in order not to follow symlinks
  4794. # On OSX, just specifying -P is not enough to do that.
  4795. oscmd("cp -R -P " + GetOutputDir() + "/lib/" + base + " " + libname)
  4796. # Execute install_name_tool to make them reference an absolute path
  4797. if (libname.endswith(".dylib") and not os.path.islink(libname)):
  4798. oscmd("install_name_tool -id /Developer/Panda3D/lib/%s %s" % (base, libname), True)
  4799. oscmd("otool -L %s | grep .dylib > %s/tmp/otool-libs.txt" % (libname, GetOutputDir()), True)
  4800. for line in open(GetOutputDir()+"/tmp/otool-libs.txt", "r"):
  4801. if len(line.strip()) > 0 and not line.strip().endswith(":"):
  4802. libdep = line.strip().split(" ", 1)[0]
  4803. if not libdep.startswith("/"):
  4804. oscmd("install_name_tool -change %s /Developer/Panda3D/lib/%s %s" % (libdep, os.path.basename(libdep), libname), True)
  4805. # Temporary script that should clean up the poison that the early 1.7.0 builds injected into environment.plist
  4806. oscmd("mkdir -p dstroot/scripts/base/")
  4807. postinstall = open("dstroot/scripts/base/postinstall", "w")
  4808. print >>postinstall, "#!/usr/bin/python"
  4809. print >>postinstall, "import os, sys, plistlib"
  4810. print >>postinstall, "home = os.environ['HOME']"
  4811. print >>postinstall, "if not os.path.isdir(os.path.join(home, '.MacOSX')):"
  4812. print >>postinstall, " sys.exit()"
  4813. print >>postinstall, "plist = dict()"
  4814. print >>postinstall, "envfile = os.path.join(home, '.MacOSX', 'environment.plist')"
  4815. print >>postinstall, "if os.path.exists(envfile):"
  4816. print >>postinstall, " try:"
  4817. print >>postinstall, " plist = plistlib.readPlist(envfile)"
  4818. print >>postinstall, " except: sys.exit(0)"
  4819. print >>postinstall, "else:"
  4820. print >>postinstall, " sys.exit(0)"
  4821. print >>postinstall, "paths = {'PATH' : '/Developer/Tools/Panda3D', 'DYLD_LIBRARY_PATH' : '/Developer/Panda3D/lib', 'PYTHONPATH' : '/Developer/Panda3D/lib',"
  4822. print >>postinstall, " 'MAYA_SCRIPT_PATH' : '/Developer/Panda3D/plugins', 'MAYA_PLUG_IN_PATH' : '/Developer/Panda3D/plugins'}"
  4823. print >>postinstall, "for env, path in paths.items():"
  4824. print >>postinstall, " if env in plist:"
  4825. print >>postinstall, " paths = plist[env].split(':')"
  4826. print >>postinstall, " if '' in paths: paths.remove('')"
  4827. print >>postinstall, " if path in paths: paths.remove(path)"
  4828. print >>postinstall, " if len(paths) == 0:"
  4829. print >>postinstall, " del plist[env]"
  4830. print >>postinstall, " else:"
  4831. print >>postinstall, " plist[env] = ':'.join(paths)"
  4832. print >>postinstall, "if len(plist) == 0:"
  4833. print >>postinstall, " os.remove(envfile)"
  4834. print >>postinstall, "else:"
  4835. print >>postinstall, " plistlib.writePlist(plist, envfile)"
  4836. postinstall.close()
  4837. postflight = open("dstroot/scripts/base/postflight", "w")
  4838. print >>postflight, "#!/usr/bin/env bash\n"
  4839. print >>postflight, "RESULT=`/usr/bin/open 'http://www.panda3d.org/wiki/index.php/Getting_Started_on_OSX'`"
  4840. print >>postflight, "\nexit 0"
  4841. postflight.close()
  4842. oscmd("chmod +x dstroot/scripts/base/postinstall")
  4843. oscmd("chmod +x dstroot/scripts/base/postflight")
  4844. oscmd("mkdir -p dstroot/tools/Developer/Tools/Panda3D")
  4845. oscmd("mkdir -p dstroot/tools/Developer/Panda3D")
  4846. oscmd("mkdir -p dstroot/tools/etc/paths.d")
  4847. # Trailing newline is important, works around a bug in OSX
  4848. WriteFile("dstroot/tools/etc/paths.d/Panda3D", "/Developer/Tools/Panda3D\n")
  4849. for base in os.listdir(GetOutputDir()+"/bin"):
  4850. binname = "dstroot/tools/Developer/Tools/Panda3D/" + base
  4851. # OSX needs the -R argument to copy symbolic links correctly, it doesn't have -d. How weird.
  4852. oscmd("cp -R " + GetOutputDir() + "/bin/" + base + " " + binname)
  4853. # Execute install_name_tool to make the binaries reference an absolute path
  4854. if (not os.path.islink(binname)):
  4855. oscmd("otool -L %s | grep .dylib > %s/tmp/otool-libs.txt" % (binname, GetOutputDir()), True)
  4856. for line in open(GetOutputDir()+"/tmp/otool-libs.txt", "r"):
  4857. if len(line.strip()) > 0 and not line.strip().endswith(":"):
  4858. libdep = line.strip().split(" ", 1)[0]
  4859. if not libdep.startswith("/"):
  4860. oscmd("install_name_tool -change %s /Developer/Panda3D/lib/%s %s" % (libdep, os.path.basename(libdep), binname), True)
  4861. if PkgSkip("PYTHON")==0:
  4862. PV = SDK["PYTHONVERSION"].replace("python", "")
  4863. oscmd("mkdir -p dstroot/pythoncode/usr/bin")
  4864. oscmd("mkdir -p dstroot/pythoncode/Developer/Panda3D/lib/direct")
  4865. oscmd("mkdir -p dstroot/pythoncode/Library/Python/%s/site-packages" % PV)
  4866. WriteFile("dstroot/pythoncode/Library/Python/%s/site-packages/Panda3D.pth" % PV, "/Developer/Panda3D/lib")
  4867. oscmd("cp -R %s/pandac dstroot/pythoncode/Developer/Panda3D/lib/pandac" % GetOutputDir())
  4868. oscmd("cp -R direct/src/* dstroot/pythoncode/Developer/Panda3D/lib/direct")
  4869. oscmd("cp direct/src/ffi/panda3d.py dstroot/pythoncode/Developer/Panda3D/lib/panda3d.py")
  4870. oscmd("ln -s %s dstroot/pythoncode/usr/bin/ppython" % SDK["PYTHONEXEC"])
  4871. if os.path.isdir(GetOutputDir()+"/Pmw"):
  4872. oscmd("cp -R %s/Pmw dstroot/pythoncode/Developer/Panda3D/lib/Pmw" % GetOutputDir())
  4873. compileall.compile_dir("dstroot/pythoncode/Developer/Panda3D/lib/Pmw")
  4874. WriteFile("dstroot/pythoncode/Developer/Panda3D/lib/direct/__init__.py", "")
  4875. for base in os.listdir("dstroot/pythoncode/Developer/Panda3D/lib/direct"):
  4876. if ((base != "extensions") and (base != "extensions_native")):
  4877. compileall.compile_dir("dstroot/pythoncode/Developer/Panda3D/lib/direct/"+base)
  4878. oscmd("mkdir -p dstroot/headers/Developer/Panda3D")
  4879. oscmd("cp -R %s/include dstroot/headers/Developer/Panda3D/include" % GetOutputDir())
  4880. if os.path.isdir("samples"):
  4881. oscmd("mkdir -p dstroot/samples/Developer/Examples/Panda3D")
  4882. oscmd("cp -R samples/* dstroot/samples/Developer/Examples/Panda3D/")
  4883. # Dummy package uninstall16 which just contains a preflight script to remove /Applications/Panda3D/ .
  4884. oscmd("mkdir -p dstroot/scripts/uninstall16/")
  4885. preflight = open("dstroot/scripts/uninstall16/preflight", "w")
  4886. print >>preflight, "#!/usr/bin/python"
  4887. print >>preflight, "import os, re, sys, shutil"
  4888. print >>preflight, "if os.path.isdir('/Applications/Panda3D'): shutil.rmtree('/Applications/Panda3D')"
  4889. print >>preflight, "bash_profile = os.path.join(os.environ['HOME'], '.bash_profile')"
  4890. print >>preflight, "if not os.path.isfile(bash_profile): sys.exit(0)"
  4891. print >>preflight, "pattern = re.compile('''PANDA_VERSION=[0-9][.][0-9][.][0-9]"
  4892. print >>preflight, "PANDA_PATH=/Applications/Panda3D/[$A-Z.0-9_]+"
  4893. print >>preflight, "if \[ -d \$PANDA_PATH \]"
  4894. print >>preflight, "then(.+?)fi"
  4895. print >>preflight, "''', flags = re.DOTALL | re.MULTILINE)"
  4896. print >>preflight, "bpfile = open(bash_profile, 'r')"
  4897. print >>preflight, "bpdata = bpfile.read()"
  4898. print >>preflight, "bpfile.close()"
  4899. print >>preflight, "newbpdata = pattern.sub('', bpdata)"
  4900. print >>preflight, "if newbpdata == bpdata: sys.exit(0)"
  4901. print >>preflight, "bpfile = open(bash_profile, 'w')"
  4902. print >>preflight, "bpfile.write(newbpdata)"
  4903. print >>preflight, "bpfile.close()"
  4904. preflight.close()
  4905. oscmd("chmod +x dstroot/scripts/uninstall16/preflight")
  4906. oscmd("chmod -R 0775 dstroot/*")
  4907. # We need to be root to perform a chown. Bleh.
  4908. # Fortunately PackageMaker does it for us, on 10.5 and above.
  4909. #oscmd("chown -R root:admin dstroot/*", True)
  4910. oscmd("mkdir -p dstroot/Panda3D/Panda3D.mpkg/Contents/Packages/")
  4911. oscmd("mkdir -p dstroot/Panda3D/Panda3D.mpkg/Contents/Resources/en.lproj/")
  4912. pkgs = ["base", "tools", "headers", "uninstall16"]
  4913. if PkgSkip("PYTHON")==0: pkgs.append("pythoncode")
  4914. if os.path.isdir("samples"): pkgs.append("samples")
  4915. for pkg in pkgs:
  4916. plist = open("/tmp/Info_plist", "w")
  4917. plist.write(Info_plist % { "package_id" : "org.panda3d.panda3d.%s.pkg" % pkg, "version" : VERSION })
  4918. plist.close()
  4919. if not os.path.isdir("dstroot/" + pkg):
  4920. os.makedirs("dstroot/" + pkg)
  4921. if os.path.exists("/Developer/usr/bin/packagemaker"):
  4922. cmd = '/Developer/usr/bin/packagemaker --info /tmp/Info_plist --version ' + VERSION + ' --out dstroot/Panda3D/Panda3D.mpkg/Contents/Packages/' + pkg + '.pkg --target 10.4 --domain system --root dstroot/' + pkg + '/ --no-relocate'
  4923. if os.path.isdir("dstroot/scripts/" + pkg):
  4924. cmd += ' --scripts dstroot/scripts/' + pkg
  4925. elif os.path.exists("/Developer/Tools/packagemaker"):
  4926. cmd = '/Developer/Tools/packagemaker -build -f dstroot/' + pkg + '/ -p dstroot/Panda3D/Panda3D.mpkg/Contents/Packages/' + pkg + '.pkg -i /tmp/Info_plist'
  4927. else:
  4928. exit("PackageMaker could not be found!")
  4929. oscmd(cmd)
  4930. if os.path.isfile("/tmp/Info_plist"):
  4931. oscmd("rm -f /tmp/Info_plist")
  4932. dist = open("dstroot/Panda3D/Panda3D.mpkg/Contents/distribution.dist", "w")
  4933. print >>dist, '<?xml version="1.0" encoding="utf-8"?>'
  4934. print >>dist, '<installer-script minSpecVersion="1.000000" authoringTool="com.apple.PackageMaker" authoringToolVersion="3.0.3" authoringToolBuild="174">'
  4935. print >>dist, ' <title>Panda3D</title>'
  4936. print >>dist, ' <options customize="always" allow-external-scripts="no" rootVolumeOnly="false"/>'
  4937. # The following script is to enable the "Uninstall 1.6.x" option only when Panda3D 1.6.x is actually installed.
  4938. print >>dist, ''' <script>
  4939. function have16installed() {
  4940. return system.files.fileExistsAtPath(my.target.mountpoint + '/Applications/Panda3D');
  4941. }</script>'''
  4942. print >>dist, ' <license language="en" mime-type="text/plain">%s</license>' % ReadFile("doc/LICENSE")
  4943. print >>dist, ' <choices-outline>'
  4944. print >>dist, ' <line choice="uninstall16"/>'
  4945. print >>dist, ' <line choice="base"/>'
  4946. print >>dist, ' <line choice="tools"/>'
  4947. if PkgSkip("PYTHON")==0:
  4948. print >>dist, ' <line choice="pythoncode"/>'
  4949. if os.path.isdir("samples"):
  4950. print >>dist, ' <line choice="samples"/>'
  4951. print >>dist, ' <line choice="headers"/>'
  4952. print >>dist, ' </choices-outline>'
  4953. print >>dist, ' <choice id="uninstall16" title="Uninstall Panda3D 1.6.x" tooltip="Uninstalls Panda3D 1.6.x before installing Panda3D %s" description="If this option is checked, Panda3D 1.6.x is removed from /Applications/Panda3D/ before the new version is installed. This is recommended to avoid library conflicts. WARNING: EVERYTHING UNDER /Applications/Panda3D WILL BE DELETED. MAKE SURE YOU HAVE BACKED UP IMPORTANT DATA!" selected="have16installed()" enabled="have16installed()" visible="have16installed()">' % VERSION
  4954. print >>dist, ' <pkg-ref id="org.panda3d.panda3d.uninstall16.pkg"/>'
  4955. print >>dist, ' </choice>'
  4956. print >>dist, ' <choice id="base" title="Panda3D Base Installation" description="This package contains the Panda3D libraries, configuration files and models/textures that are needed to use Panda3D. Location: /Developer/Panda3D/" start_enabled="false">'
  4957. print >>dist, ' <pkg-ref id="org.panda3d.panda3d.base.pkg"/>'
  4958. print >>dist, ' </choice>'
  4959. print >>dist, ' <choice id="tools" title="Tools" tooltip="Useful tools and model converters to help with Panda3D development" description="This package contains the various utilities that ship with Panda3D, including packaging tools, model converters, and many more. Location: /Developer/Tools/Panda3D/">'
  4960. print >>dist, ' <pkg-ref id="org.panda3d.panda3d.tools.pkg"/>'
  4961. print >>dist, ' </choice>'
  4962. if PkgSkip("PYTHON")==0:
  4963. print >>dist, ' <choice id="pythoncode" title="Python Code" tooltip="Code you\'ll need for Python development" description="This package contains the \'direct\', \'pandac\' and \'panda3d\' python packages that are needed to do Python development with Panda3D. Location: /Developer/Panda3D/">'
  4964. print >>dist, ' <pkg-ref id="org.panda3d.panda3d.pythoncode.pkg"/>'
  4965. print >>dist, ' </choice>'
  4966. if os.path.isdir("samples"):
  4967. print >>dist, ' <choice id="samples" title="Sample Programs" tooltip="Python sample programs that use Panda3D" description="This package contains the Python sample programs that can help you with learning how to use Panda3D. Location: /Developer/Examples/Panda3D/">'
  4968. print >>dist, ' <pkg-ref id="org.panda3d.panda3d.samples.pkg"/>'
  4969. print >>dist, ' </choice>'
  4970. print >>dist, ' <choice id="headers" title="C++ Header Files" tooltip="Header files for C++ development with Panda3D" description="This package contains the C++ header files that are needed in order to do C++ development with Panda3D. You don\'t need this if you want to develop in Python. Location: /Developer/Panda3D/include/" start_selected="false">'
  4971. print >>dist, ' <pkg-ref id="org.panda3d.panda3d.headers.pkg"/>'
  4972. print >>dist, ' </choice>'
  4973. print >>dist, ' <pkg-ref id="org.panda3d.panda3d.uninstall16.pkg" installKBytes="0" version="1" auth="Root">file:./Contents/Packages/uninstall16.pkg</pkg-ref>'
  4974. print >>dist, ' <pkg-ref id="org.panda3d.panda3d.base.pkg" installKBytes="%d" version="1" auth="Root">file:./Contents/Packages/base.pkg</pkg-ref>' % (GetDirectorySize("dstroot/base") / 1024)
  4975. print >>dist, ' <pkg-ref id="org.panda3d.panda3d.tools.pkg" installKBytes="%d" version="1" auth="Root">file:./Contents/Packages/tools.pkg</pkg-ref>' % (GetDirectorySize("dstroot/tools") / 1024)
  4976. if PkgSkip("PYTHON")==0:
  4977. print >>dist, ' <pkg-ref id="org.panda3d.panda3d.pythoncode.pkg" installKBytes="%d" version="1" auth="Root">file:./Contents/Packages/pythoncode.pkg</pkg-ref>' % (GetDirectorySize("dstroot/pythoncode") / 1024)
  4978. if os.path.isdir("samples"):
  4979. print >>dist, ' <pkg-ref id="org.panda3d.panda3d.samples.pkg" installKBytes="%d" version="1" auth="Root">file:./Contents/Packages/samples.pkg</pkg-ref>' % (GetDirectorySize("dstroot/samples") / 1024)
  4980. print >>dist, ' <pkg-ref id="org.panda3d.panda3d.headers.pkg" installKBytes="%d" version="1" auth="Root">file:./Contents/Packages/headers.pkg</pkg-ref>' % (GetDirectorySize("dstroot/headers") / 1024)
  4981. print >>dist, '</installer-script>'
  4982. dist.close()
  4983. oscmd('hdiutil create Panda3D-rw.dmg -srcfolder dstroot/Panda3D')
  4984. oscmd('hdiutil convert Panda3D-rw.dmg -format UDBZ -o Panda3D-%s.dmg' % VERSION)
  4985. oscmd('rm -f Panda3D-rw.dmg')
  4986. def MakeInstallerFreeBSD():
  4987. import compileall
  4988. oscmd("rm -rf targetroot pkg-descr pkg-plist")
  4989. oscmd("mkdir targetroot")
  4990. # Invoke installpanda.py to install it into a temporary dir
  4991. if RUNTIME:
  4992. InstallRuntime(destdir = "targetroot", prefix = "/usr/local", outputdir = GetOutputDir())
  4993. else:
  4994. InstallPanda(destdir = "targetroot", prefix = "/usr/local", outputdir = GetOutputDir())
  4995. if (not os.path.exists("/usr/sbin/pkg_create")):
  4996. exit("Cannot create an installer without pkg_create")
  4997. if (RUNTIME):
  4998. descr_txt = RUNTIME_INSTALLER_PKG_DESCR_FILE[1:]
  4999. else:
  5000. descr_txt = INSTALLER_PKG_DESCR_FILE[1:]
  5001. descr_txt = descr_txt.replace("VERSION", VERSION)
  5002. if (RUNTIME):
  5003. plist_txt = "@name panda3d-runtime-%s\n" % VERSION
  5004. else:
  5005. plist_txt = "@name panda3d-%s\n" % VERSION
  5006. for root, dirs, files in os.walk("targetroot/usr/local/", True):
  5007. for f in files:
  5008. plist_txt += os.path.join(root, f)[21:] + "\n"
  5009. if (not RUNTIME):
  5010. plist_txt += "@exec /sbin/ldconfig -m /usr/local/lib\n"
  5011. plist_txt += "@unexec /sbin/ldconfig -R\n"
  5012. for remdir in ("lib/panda3d", "share/panda3d", "include/panda3d"):
  5013. for root, dirs, files in os.walk("targetroot/usr/local/" + remdir, False):
  5014. for d in dirs:
  5015. plist_txt += "@dirrm %s\n" % os.path.join(root, d)[21:]
  5016. plist_txt += "@dirrm %s\n" % remdir
  5017. WriteFile("pkg-plist", plist_txt)
  5018. WriteFile("pkg-descr", descr_txt)
  5019. cmd = "pkg_create"
  5020. if GetVerbose():
  5021. cmd += " --verbose"
  5022. if PkgSkip("PYTHON")==0:
  5023. # If this version of Python was installed from a package, let's mark it as dependency.
  5024. oscmd("rm -f %s/tmp/python-pkg.txt" % GetOutputDir())
  5025. oscmd("pkg_info -E 'python%s>=%s' > %s/tmp/python-pkg.txt" % (SDK["PYTHONVERSION"][6:9:2], SDK["PYTHONVERSION"][6:9], GetOutputDir()), True)
  5026. if (os.path.isfile(GetOutputDir() + "/tmp/python-pkg.txt")):
  5027. python_pkg = ReadFile(GetOutputDir() + "/tmp/python-pkg.txt").strip()
  5028. if (python_pkg):
  5029. cmd += " -P " + python_pkg
  5030. cmd += " -p /usr/local -S \"%s\"" % os.path.abspath("targetroot")
  5031. if (RUNTIME):
  5032. cmd += " -c -\"The Panda3D free 3D engine runtime\" -o graphics/panda3d-runtime"
  5033. else:
  5034. cmd += " -c -\"The Panda3D free 3D engine SDK\" -o devel/panda3d"
  5035. cmd += " -d pkg-descr -f pkg-plist panda3d-%s" % VERSION
  5036. oscmd(cmd)
  5037. if (INSTALLER != 0):
  5038. ProgressOutput(100.0, "Building installer")
  5039. if (sys.platform.startswith("win")):
  5040. dbg = ""
  5041. if (GetOptimize() <= 2): dbg = "-dbg"
  5042. if (is_64):
  5043. if (RUNTIME):
  5044. MakeInstallerNSIS("Panda3D-Runtime-"+VERSION+dbg+"-x64.exe", "Panda3D", "Panda3D "+VERSION, "C:\\Panda3D-"+VERSION)
  5045. else:
  5046. MakeInstallerNSIS("Panda3D-"+VERSION+dbg+"-x64.exe", "Panda3D", "Panda3D "+VERSION, "C:\\Panda3D-"+VERSION)
  5047. else:
  5048. if (RUNTIME):
  5049. MakeInstallerNSIS("Panda3D-Runtime-"+VERSION+dbg+".exe", "Panda3D", "Panda3D "+VERSION, "C:\\Panda3D-"+VERSION)
  5050. else:
  5051. MakeInstallerNSIS("Panda3D-"+VERSION+dbg+".exe", "Panda3D", "Panda3D "+VERSION, "C:\\Panda3D-"+VERSION)
  5052. elif (sys.platform == "linux2"):
  5053. MakeInstallerLinux()
  5054. elif (sys.platform == "darwin"):
  5055. MakeInstallerOSX()
  5056. elif (sys.platform.startswith("freebsd")):
  5057. MakeInstallerFreeBSD()
  5058. else:
  5059. exit("Do not know how to make an installer for this platform")
  5060. ##########################################################################################
  5061. #
  5062. # Print final status report.
  5063. #
  5064. ##########################################################################################
  5065. SaveDependencyCache()
  5066. MoveBackConflictingFiles()
  5067. WARNINGS.append("Elapsed Time: "+PrettyTime(time.time() - STARTTIME))
  5068. printStatus("Makepanda Final Status Report", WARNINGS)
  5069. print GetColor("green") + "Build successfully finished, elapsed time: " + PrettyTime(time.time() - STARTTIME) + GetColor()