makepanda.py 188 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842
  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. import sys,os,time,stat,string,re,getopt,cPickle,fnmatch,threading,Queue,signal,shutil
  15. ########################################################################
  16. ##
  17. ## PARSING THE COMMAND LINE OPTIONS
  18. ##
  19. ## You might be tempted to change the defaults by editing them
  20. ## here. Don't do it. Instead, create a script that compiles
  21. ## panda with your preferred options. Or, create
  22. ## a 'makepandaPreferences' file and put it into your python path.
  23. ##
  24. ########################################################################
  25. COMPILER=0
  26. THIRDPARTYLIBS=0
  27. VC80CRTVERSION=""
  28. OPTIMIZE="3"
  29. INSTALLER=0
  30. GENMAN=0
  31. VERSION=0
  32. VERBOSE=1
  33. COMPRESSOR="zlib"
  34. PACKAGES=["PYTHON","ZLIB","PNG","JPEG","TIFF","VRPN","FMOD","FMODEX","OPENAL","NVIDIACG",
  35. "OPENSSL","FREETYPE","FFTW","MILES","ARTOOLKIT","DIRECTCAM",
  36. "MAYA6","MAYA65","MAYA7","MAYA8","MAYA85","MAX6","MAX7","MAX8","MAX9",
  37. "FFMPEG","PANDATOOL","PANDAAPP","DX8","DX9"]
  38. OMIT=PACKAGES[:]
  39. WARNINGS=[]
  40. DIRECTXSDK = {}
  41. MAYASDK = {}
  42. MAXSDK = {}
  43. MAXSDKCS = {}
  44. PYTHONSDK=0
  45. STARTTIME=time.time()
  46. SLAVEFILE=0
  47. DEPENDENCYQUEUE=[]
  48. TIMESTAMPCACHE = {}
  49. FINDSOURCESTUBS = {}
  50. BUILTFROMCACHE = {}
  51. CXXINCLUDECACHE = {}
  52. THREADCOUNT=0
  53. DXVERSIONS=["8","9"]
  54. MAYAVERSIONS=["6","65","7","8","85"]
  55. MAXVERSIONS=["6","7","8","9"]
  56. ICACHEPATH="built/tmp/makepanda-dcache"
  57. INTERRUPT=0
  58. MAINTHREAD=threading.currentThread()
  59. ##########################################################################################
  60. #
  61. # If there is a makepandaPreferences.py, import it
  62. #
  63. ##########################################################################################
  64. try:
  65. from makepandaPreferences import *
  66. except ImportError:
  67. pass
  68. ########################################################################
  69. ##
  70. ## The Timestamp Cache
  71. ##
  72. ## The make utility is constantly fetching the timestamps of files.
  73. ## This can represent the bulk of the file accesses during the make
  74. ## process. The timestamp cache eliminates redundant checks.
  75. ##
  76. ########################################################################
  77. def GetTimestamp(path):
  78. if TIMESTAMPCACHE.has_key(path):
  79. return TIMESTAMPCACHE[path]
  80. try: date = os.path.getmtime(path)
  81. except: date = 0
  82. TIMESTAMPCACHE[path] = date
  83. return date
  84. def ClearTimestamp(path):
  85. del TIMESTAMPCACHE[path]
  86. ########################################################################
  87. ##
  88. ## The Dependency cache.
  89. ##
  90. ## Makepanda's strategy for file dependencies is different from most
  91. ## make-utilities. Whenever a file is built, makepanda records
  92. ## that the file was built, and it records what the input files were,
  93. ## and what their dates were. Whenever a file is about to be built,
  94. ## panda compares the current list of input files and their dates,
  95. ## to the previous list of input files and their dates. If they match,
  96. ## there is no need to build the file.
  97. ##
  98. ########################################################################
  99. def JustBuilt(files,others):
  100. dates = []
  101. for file in files:
  102. del TIMESTAMPCACHE[file]
  103. dates.append(GetTimestamp(file))
  104. for file in others:
  105. dates.append(GetTimestamp(file))
  106. key = tuple(files)
  107. BUILTFROMCACHE[key] = [others,dates]
  108. def NeedsBuild(files,others):
  109. dates = []
  110. for file in files:
  111. dates.append(GetTimestamp(file))
  112. for file in others:
  113. dates.append(GetTimestamp(file))
  114. key = tuple(files)
  115. if (BUILTFROMCACHE.has_key(key)):
  116. if (BUILTFROMCACHE[key] == [others,dates]):
  117. return 0
  118. else:
  119. oldothers = BUILTFROMCACHE[key][0]
  120. if (oldothers != others):
  121. for f in files:
  122. print "CAUTION: file dependencies changed: "+f
  123. if (VERBOSE > 1):
  124. add = SetDifference(others, oldothers)
  125. sub = SetDifference(oldothers, others)
  126. print " - Add: "+str(add)
  127. print " - Sub: "+str(sub)
  128. return 1
  129. ########################################################################
  130. ##
  131. ## The CXX include cache:
  132. ##
  133. ## The following routine scans a CXX file and returns a list of
  134. ## the include-directives inside that file. It's not recursive:
  135. ## it just returns the includes that are textually inside the
  136. ## file. If you need recursive dependencies, you need the higher-level
  137. ## routine CxxCalcDependencies, defined elsewhere.
  138. ##
  139. ## Since scanning a CXX file is slow, we cache the result. It records
  140. ## the date of the source file and the list of includes that it
  141. ## contains. It assumes that if the file date hasn't changed, that
  142. ## the list of include-statements inside the file has not changed
  143. ## either. Once again, this particular routine does not return
  144. ## recursive dependencies --- it only returns an explicit list of
  145. ## include statements that are textually inside the file. That
  146. ## is what the cache stores, as well.
  147. ##
  148. ########################################################################
  149. global CxxIncludeRegex
  150. CxxIncludeRegex = re.compile('^[ \t]*[#][ \t]*include[ \t]+"([^"]+)"[ \t\r\n]*$')
  151. def CxxGetIncludes(path):
  152. date = GetTimestamp(path)
  153. if (CXXINCLUDECACHE.has_key(path)):
  154. cached = CXXINCLUDECACHE[path]
  155. if (cached[0]==date): return cached[1]
  156. try: sfile = open(path, 'rb')
  157. except:
  158. exit("Cannot open source file \""+path+"\" for reading.")
  159. include = []
  160. for line in sfile:
  161. match = CxxIncludeRegex.match(line,0)
  162. if (match):
  163. incname = match.group(1)
  164. include.append(incname)
  165. sfile.close()
  166. CXXINCLUDECACHE[path] = [date, include]
  167. return include
  168. ########################################################################
  169. ##
  170. ## Error exit has to be done carefully, because the
  171. ## dependency cache must be saved, and because this can
  172. ## only be done by the main thread.
  173. ##
  174. ########################################################################
  175. def SaveDependencyCache():
  176. try: icache = open(ICACHEPATH,'wb')
  177. except: icache = 0
  178. if (icache!=0):
  179. print "Storing dependency cache."
  180. cPickle.dump(CXXINCLUDECACHE, icache, 1)
  181. cPickle.dump(BUILTFROMCACHE, icache, 1)
  182. icache.close()
  183. def LoadDependencyCache():
  184. global CXXINCLUDECACHE
  185. global BUILTFROMCACHE
  186. try: icache = open(ICACHEPATH,'rb')
  187. except: icache = 0
  188. if (icache!=0):
  189. CXXINCLUDECACHE = cPickle.load(icache)
  190. BUILTFROMCACHE = cPickle.load(icache)
  191. icache.close()
  192. LoadDependencyCache()
  193. def exit(msg):
  194. if (threading.currentThread() == MAINTHREAD):
  195. SaveDependencyCache()
  196. print "Elapsed Time: "+PrettyTime(time.time() - STARTTIME)
  197. print msg
  198. sys.stdout.flush()
  199. sys.stderr.flush()
  200. os._exit(1)
  201. else:
  202. print msg
  203. raise "initiate-exit"
  204. ########################################################################
  205. ##
  206. ## GetDirectoryContents
  207. ##
  208. ## At times, makepanda will use a function like "os.listdir" to process
  209. ## all the files in a directory. Unfortunately, that means that any
  210. ## accidental addition of a file to a directory could cause makepanda
  211. ## to misbehave without warning.
  212. ##
  213. ## To alleviate this weakness, we created GetDirectoryContents. This
  214. ## uses "os.listdir" to fetch the directory contents, but then it
  215. ## compares the results to the appropriate CVS/Entries to see if
  216. ## they match. If not, it prints a big warning message.
  217. ##
  218. ########################################################################
  219. def GetDirectoryContents(dir, filters="*", skip=[]):
  220. if (type(filters)==str):
  221. filters = [filters]
  222. actual = {}
  223. files = os.listdir(dir)
  224. for filter in filters:
  225. for file in fnmatch.filter(files, filter):
  226. if (skip.count(file)==0) and (os.path.isfile(dir + "/" + file)):
  227. actual[file] = 1
  228. if (os.path.isfile(dir + "/CVS/Entries")):
  229. cvs = {}
  230. srchandle = open(dir+"/CVS/Entries", "r")
  231. files = []
  232. for line in srchandle:
  233. if (line[0]=="/"):
  234. s = line.split("/",2)
  235. if (len(s)==3):
  236. files.append(s[1])
  237. srchandle.close()
  238. for filter in filters:
  239. for file in fnmatch.filter(files, filter):
  240. if (skip.count(file)==0):
  241. cvs[file] = 1
  242. for file in actual.keys():
  243. if (cvs.has_key(file)==0):
  244. msg = "WARNING: %s is in %s, but not in CVS"%(file, dir)
  245. print msg
  246. WARNINGS.append(msg)
  247. for file in cvs.keys():
  248. if (actual.has_key(file)==0):
  249. msg = "WARNING: %s is not in %s, but is in CVS"%(file, dir)
  250. print msg
  251. WARNINGS.append(msg)
  252. results = actual.keys()
  253. results.sort()
  254. return results
  255. ########################################################################
  256. ##
  257. ## Utility routines.
  258. ##
  259. ########################################################################
  260. if sys.platform == "win32":
  261. import _winreg
  262. def TryRegistryKey(path):
  263. try:
  264. key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, path, 0, _winreg.KEY_READ)
  265. return key
  266. except: pass
  267. try:
  268. key = _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, path, 0, _winreg.KEY_READ | 256)
  269. return key
  270. except: pass
  271. return 0
  272. def ListRegistryKeys(path):
  273. result=[]
  274. index=0
  275. key = TryRegistryKey(path)
  276. if (key != 0):
  277. try:
  278. while (1):
  279. result.append(_winreg.EnumKey(key, index))
  280. index = index + 1
  281. except: pass
  282. _winreg.CloseKey(key)
  283. return result
  284. def GetRegistryKey(path, subkey):
  285. k1=0
  286. key = TryRegistryKey(path)
  287. if (key != 0):
  288. try:
  289. k1, k2 = _winreg.QueryValueEx(key, subkey)
  290. except: pass
  291. _winreg.CloseKey(key)
  292. return k1
  293. def oscmd(cmd):
  294. print cmd
  295. sys.stdout.flush()
  296. if sys.platform == "win32":
  297. exe = cmd.split()[0]+".exe"
  298. if os.path.isfile(exe)==0:
  299. for i in os.environ["PATH"].split(";"):
  300. if os.path.isfile(os.path.join(i, exe)):
  301. exe = os.path.join(i, exe)
  302. break
  303. if os.path.isfile(exe)==0:
  304. exit("Cannot find "+exe+" on search path")
  305. res = os.spawnl(os.P_WAIT, exe, cmd)
  306. else:
  307. res = os.system(cmd)
  308. if res != 0:
  309. exit("")
  310. def getbuilding(opts):
  311. building = 0
  312. for x in opts:
  313. if (x[:9]=="BUILDING_"): building = x[9:]
  314. return building
  315. def getoptlevel(opts,defval):
  316. for x in opts:
  317. if (x[:3]=="OPT"):
  318. n = int(x[3:])
  319. if (n > defval): defval = n
  320. return defval
  321. def PrettyTime(t):
  322. t = int(t)
  323. hours = t/3600
  324. t -= hours*3600
  325. minutes = t/60
  326. t -= minutes*60
  327. seconds = t
  328. if (hours): return str(hours)+" hours "+str(minutes)+" min"
  329. if (minutes): return str(minutes)+" min "+str(seconds)+" sec"
  330. return str(seconds)+" sec"
  331. def MakeDirectory(path):
  332. if os.path.isdir(path): return 0
  333. os.mkdir(path)
  334. def ReadFile(wfile):
  335. try:
  336. srchandle = open(wfile, "rb")
  337. data = srchandle.read()
  338. srchandle.close()
  339. return data
  340. except: exit("Cannot read "+wfile)
  341. def WriteFile(wfile,data):
  342. try:
  343. dsthandle = open(wfile, "wb")
  344. dsthandle.write(data)
  345. dsthandle.close()
  346. except: exit("Cannot write "+wfile)
  347. def ConditionalWriteFile(dest,desiredcontents):
  348. try:
  349. rfile = open(dest, 'rb')
  350. contents = rfile.read(-1)
  351. rfile.close()
  352. except:
  353. contents=0
  354. if contents != desiredcontents:
  355. if VERBOSE:
  356. print "Regenerating file: "+dest
  357. sys.stdout.flush()
  358. WriteFile(dest,desiredcontents)
  359. def SetDifference(add, sub):
  360. set = {}
  361. for x in add: set[x]=1
  362. for x in sub:
  363. if (set.has_key(x)):
  364. del set[x]
  365. return set.keys()
  366. def PkgSelected(pkglist, pkg):
  367. if (pkglist.count(pkg)==0): return 0
  368. if (OMIT.count(pkg)): return 0
  369. return 1
  370. def DeleteCVS(dir):
  371. for entry in os.listdir(dir):
  372. if (entry != ".") and (entry != ".."):
  373. subdir = dir + "/" + entry
  374. if (os.path.isdir(subdir)):
  375. if (entry == "CVS"):
  376. shutil.rmtree(subdir)
  377. else:
  378. DeleteCVS(subdir)
  379. def keyboardInterruptHandler(x,y):
  380. exit("keyboard interrupt")
  381. signal.signal(signal.SIGINT, keyboardInterruptHandler)
  382. ########################################################################
  383. ##
  384. ## Visual Studio Manifest Manipulation.
  385. ##
  386. ########################################################################
  387. VC80CRTVERSIONRE=re.compile(" name=['\"]Microsoft.VC80.CRT['\"] version=['\"]([0-9.]+)['\"] ")
  388. def getVC80CRTVersion(fn):
  389. manifest = ReadFile(fn)
  390. version = VC80CRTVERSIONRE.search(manifest)
  391. if (version == None):
  392. exit("Cannot locate version number in "+manifn)
  393. return version.group(1)
  394. def setVC80CRTVersion(fn, ver):
  395. manifest = ReadFile(fn)
  396. subst = " name='Microsoft.VC80.CRT' version='"+ver+"' "
  397. manifest = VC80CRTVERSIONRE.sub(subst, manifest)
  398. WriteFile(fn, manifest)
  399. ########################################################################
  400. ##
  401. ## Command-line parser.
  402. ##
  403. ## You can type "makepanda --help" to see all the options.
  404. ##
  405. ########################################################################
  406. def usage(problem):
  407. if (problem):
  408. print ""
  409. print problem
  410. print ""
  411. print "Makepanda generates a 'built' subdirectory containing a"
  412. print "compiled copy of Panda3D. Command-line arguments are:"
  413. print ""
  414. print " --help (print the help message you're reading now)"
  415. print " --package-info (help info about the optional packages)"
  416. print " --optimize X (optimization level can be 1,2,3,4)"
  417. print " --installer (build an installer)"
  418. print " --v1 X (set the major version number)"
  419. print " --v2 X (set the minor version number)"
  420. print " --v3 X (set the sequence version number)"
  421. print " --lzma (use lzma compression when building installer)"
  422. print " --slaves X (use the distributed build system. see manual)"
  423. print " --threads N (use the multithreaded build system. see manual)"
  424. print ""
  425. for pkg in PACKAGES:
  426. p = pkg.lower()
  427. print " --use-%-9s --no-%-9s (enable/disable use of %s)"%(p, p, pkg)
  428. print ""
  429. print " --nothing (disable every third-party lib)"
  430. print " --everything (enable every third-party lib)"
  431. print ""
  432. print " --quiet (print less output)"
  433. print " --verbose (print more output and debugging info)"
  434. print ""
  435. print "The simplest way to compile panda is to just type:"
  436. print ""
  437. print " makepanda --everything"
  438. print ""
  439. exit("")
  440. def parseopts(args):
  441. global OPTIMIZE,OMIT,INSTALLER,GENMAN
  442. global VERSION,COMPRESSOR,VERBOSE,SLAVEFILE,THREADCOUNT
  443. longopts = [
  444. "help","package-info",
  445. "optimize=","everything","nothing","installer","quiet","verbose",
  446. "version=","lzma","no-python","slaves=","threads="]
  447. anything = 0
  448. for pkg in PACKAGES: longopts.append("no-"+pkg.lower())
  449. for pkg in PACKAGES: longopts.append("use-"+pkg.lower())
  450. try:
  451. opts, extras = getopt.getopt(args, "", longopts)
  452. for option,value in opts:
  453. if (option=="--help"): raise "usage"
  454. elif (option=="--optimize"): OPTIMIZE=value
  455. elif (option=="--quiet"): VERBOSE-=1
  456. elif (option=="--verbose"): VERBOSE+=1
  457. elif (option=="--installer"): INSTALLER=1
  458. elif (option=="--genman"): GENMAN=1
  459. elif (option=="--everything"): OMIT=[]
  460. elif (option=="--nothing"): OMIT=PACKAGES[:]
  461. elif (option=="--slaves"): SLAVEFILE=value
  462. elif (option=="--threads"): THREADCOUNT=int(value)
  463. elif (option=="--version"):
  464. VERSION=value
  465. if (len(VERSION.split(".")) != 3): raise "usage"
  466. elif (option=="--lzma"): COMPRESSOR="lzma"
  467. else:
  468. for pkg in PACKAGES:
  469. if (option=="--use-"+pkg.lower()):
  470. if (OMIT.count(pkg)): OMIT.remove(pkg)
  471. break
  472. for pkg in PACKAGES:
  473. if (option=="--no-"+pkg.lower()):
  474. if (OMIT.count(pkg)==0): OMIT.append(pkg)
  475. break
  476. anything = 1
  477. except: usage(0)
  478. if (anything==0): usage(0)
  479. if (OPTIMIZE=="1"): OPTIMIZE=1
  480. elif (OPTIMIZE=="2"): OPTIMIZE=2
  481. elif (OPTIMIZE=="3"): OPTIMIZE=3
  482. elif (OPTIMIZE=="4"): OPTIMIZE=4
  483. else: usage("Invalid setting for OPTIMIZE")
  484. parseopts(sys.argv[1:])
  485. ########################################################################
  486. #
  487. # Locate the root of the panda tree
  488. #
  489. ########################################################################
  490. PANDASOURCE=os.path.dirname(os.path.abspath(sys.path[0]))
  491. if ((os.path.exists(os.path.join(PANDASOURCE,"makepanda/makepanda.py"))==0) or
  492. (os.path.exists(os.path.join(PANDASOURCE,"dtool","src","dtoolbase","dtoolbase.h"))==0) or
  493. (os.path.exists(os.path.join(PANDASOURCE,"panda","src","pandabase","pandabase.h"))==0)):
  494. exit("I am unable to locate the root of the panda source tree.")
  495. os.chdir(PANDASOURCE)
  496. ########################################################################
  497. ##
  498. ## If you have the "sdks" directory, supply all sdks
  499. ##
  500. ## This is a temporary hack, it may go away.
  501. ##
  502. ########################################################################
  503. if (os.path.isdir("sdks")):
  504. DIRECTXSDK["DX8"] = "sdks/directx8"
  505. DIRECTXSDK["DX9"] = "sdks/directx9"
  506. MAXSDKCS["MAX6"] = "sdks/maxsdk6"
  507. MAXSDKCS["MAX7"] = "sdks/maxsdk7"
  508. MAXSDKCS["MAX8"] = "sdks/maxsdk8"
  509. MAXSDKCS["MAX9"] = "sdks/maxsdk9"
  510. MAXSDK["MAX6"] = "sdks/maxsdk6"
  511. MAXSDK["MAX7"] = "sdks/maxsdk7"
  512. MAXSDK["MAX8"] = "sdks/maxsdk8"
  513. MAXSDK["MAX9"] = "sdks/maxsdk9"
  514. MAYASDK["MAYA6"] = "sdks/maya6"
  515. MAYASDK["MAYA65"] = "sdks/maya65"
  516. MAYASDK["MAYA7"] = "sdks/maya7"
  517. MAYASDK["MAYA8"] = "sdks/maya8"
  518. MAYASDK["MAYA85"] = "sdks/maya85"
  519. ########################################################################
  520. ##
  521. ## Locate the DirectX SDK
  522. ##
  523. ## Microsoft keeps changing the &*#$*& registry key for the DirectX SDK.
  524. ## The only way to reliably find it is to search through the installer's
  525. ## uninstall-directories, look in each one, and see if it contains the
  526. ## relevant files.
  527. ##
  528. ########################################################################
  529. if sys.platform == "win32":
  530. uninstaller = "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall";
  531. for subdir in ListRegistryKeys(uninstaller):
  532. if (subdir[0]=="{"):
  533. dir = GetRegistryKey(uninstaller+"\\"+subdir, "InstallLocation")
  534. if (dir != 0):
  535. if ((DIRECTXSDK.has_key("DX8")==0) and
  536. (os.path.isfile(dir+"\\Include\\d3d8.h")) and
  537. (os.path.isfile(dir+"\\Include\\d3dx8.h")) and
  538. (os.path.isfile(dir+"\\Lib\\d3d8.lib")) and
  539. (os.path.isfile(dir+"\\Lib\\d3dx8.lib"))):
  540. DIRECTXSDK["DX8"] = dir.replace("\\", "/").rstrip("/")
  541. if ((DIRECTXSDK.has_key("DX9")==0) and
  542. (os.path.isfile(dir+"\\Include\\d3d9.h")) and
  543. (os.path.isfile(dir+"\\Include\\d3dx9.h")) and
  544. (os.path.isfile(dir+"\\Include\\dxsdkver.h")) and
  545. (os.path.isfile(dir+"\\Lib\\x86\\d3d9.lib")) and
  546. (os.path.isfile(dir+"\\Lib\\x86\\d3dx9.lib"))):
  547. DIRECTXSDK["DX9"] = dir.replace("\\", "/").rstrip("/")
  548. for ver in DXVERSIONS:
  549. if (OMIT.count("DX"+ver)==0):
  550. if (DIRECTXSDK.has_key("DX"+ver)==0):
  551. WARNINGS.append("I cannot locate SDK for DX"+ver)
  552. WARNINGS.append("I have automatically added this command-line option: --no-dx"+ver)
  553. OMIT.append("DX"+ver)
  554. else:
  555. WARNINGS.append("Using DX"+ver+" sdk: "+DIRECTXSDK["DX"+ver])
  556. ########################################################################
  557. ##
  558. ## Locate the Maya SDK
  559. ##
  560. ########################################################################
  561. MAYAVERSIONINFO=[("MAYA6", "SOFTWARE\\Alias|Wavefront\\Maya\\6.0\\Setup\\InstallPath"),
  562. ("MAYA65", "SOFTWARE\\Alias|Wavefront\\Maya\\6.5\\Setup\\InstallPath"),
  563. ("MAYA7", "SOFTWARE\\Alias|Wavefront\\Maya\\7.0\\Setup\\InstallPath"),
  564. ("MAYA8", "SOFTWARE\\Alias\\Maya\\8.0\\Setup\\InstallPath"),
  565. ("MAYA85", "SOFTWARE\\Alias\\Maya\\8.5\\Setup\\InstallPath")
  566. ]
  567. for (ver,key) in MAYAVERSIONINFO:
  568. print "Checking for "+ver
  569. if (OMIT.count(ver)==0):
  570. if (sys.platform == "win32"):
  571. if (MAYASDK.has_key(ver)==0):
  572. MAYASDK[ver]=GetRegistryKey(key, "MAYA_INSTALL_LOCATION")
  573. if (MAYASDK[ver] == 0):
  574. WARNINGS.append("The registry does not appear to contain a pointer to the "+ver+" SDK.")
  575. WARNINGS.append("I have automatically added this command-line option: --no-"+ver.lower())
  576. OMIT.append(ver)
  577. else:
  578. MAYASDK[ver] = MAYASDK[ver].replace("\\", "/").rstrip("/")
  579. else:
  580. WARNINGS.append(ver+" not yet supported under linux")
  581. WARNINGS.append("I have automatically added this command-line option: --no-"+ver.lower())
  582. OMIT.append(ver)
  583. ########################################################################
  584. ##
  585. ## Locate the 3D Studio Max and Character Studio SDKs
  586. ##
  587. ########################################################################
  588. MAXVERSIONINFO = [("MAX6", "SOFTWARE\\Autodesk\\3DSMAX\\6.0", "installdir", "maxsdk\\cssdk\\include"),
  589. ("MAX7", "SOFTWARE\\Autodesk\\3DSMAX\\7.0", "Installdir", "maxsdk\\include\\CS"),
  590. ("MAX8", "SOFTWARE\\Autodesk\\3DSMAX\\8.0", "Installdir", "maxsdk\\include\\CS"),
  591. ("MAX9", "SOFTWARE\\Autodesk\\3DSMAX\\9.0", "Installdir", "maxsdk\\include\\CS"),
  592. ]
  593. for version,key1,key2,subdir in MAXVERSIONINFO:
  594. if (OMIT.count(version)==0):
  595. if (sys.platform == "win32"):
  596. if (MAXSDK.has_key(version)==0):
  597. top = GetRegistryKey(key1,key2)
  598. if (top == 0):
  599. WARNINGS.append("The registry does not appear to contain a pointer to "+version)
  600. WARNINGS.append("I have automatically added this command-line option: --no-"+version.lower())
  601. OMIT.append(version)
  602. else:
  603. if (os.path.isdir(top + "\\" + subdir)==0):
  604. WARNINGS.append("Your copy of "+version+" does not include the character studio SDK")
  605. WARNINGS.append("I have automatically added this command-line option: --no-"+version.lower())
  606. OMIT.append(version)
  607. else:
  608. MAXSDK[version] = top + "maxsdk"
  609. MAXSDKCS[version] = top + subdir
  610. else:
  611. WARNINGS.append(version+" not yet supported under linux")
  612. WARNINGS.append("I have automatically added this command-line option: --no-"+version.lower())
  613. OMIT.append(version)
  614. ########################################################################
  615. ##
  616. ## Locate the Python SDK
  617. ##
  618. ########################################################################
  619. if (OMIT.count("PYTHON")==0):
  620. if (sys.platform == "win32"):
  621. PYTHONSDK="thirdparty/win-python"
  622. else:
  623. if (os.path.isdir("/usr/include/python2.5")): PYTHONSDK = "/usr/include/python2.5"
  624. elif (os.path.isdir("/usr/include/python2.4")): PYTHONSDK = "/usr/include/python2.4"
  625. elif (os.path.isdir("/usr/include/python2.3")): PYTHONSDK = "/usr/include/python2.3"
  626. elif (os.path.isdir("/usr/include/python2.2")): PYTHONSDK = "/usr/include/python2.2"
  627. else: exit("Cannot find the python SDK")
  628. ########################################################################
  629. ##
  630. ## Choose a Compiler.
  631. ##
  632. ## This should also set up any environment variables needed to make
  633. ## the compiler work.
  634. ##
  635. ########################################################################
  636. def AddToPathEnv(path,add):
  637. if (os.environ.has_key(path)):
  638. os.environ[path] = add + ";" + os.environ[path]
  639. else:
  640. os.environ[path] = add
  641. def ChooseCompiler():
  642. global COMPILER, THIRDPARTYLIBS, VC80CRTVERSION
  643. # Try to use Linux GCC
  644. if (sys.platform[:5] == "linux"):
  645. COMPILER="LINUX"
  646. THIRDPARTYLIBS="thirdparty/linux-libs-a/"
  647. return
  648. # Panda now depends on visual studio 2005 or visual studio express 2005.
  649. vcdir = GetRegistryKey("SOFTWARE\\Microsoft\\VisualStudio\\SxS\\VC7", "8.0")
  650. print "VCDIR=",vcdir
  651. if (vcdir != 0) and (vcdir[-4:] == "\\VC\\"):
  652. vcdir = vcdir[:-3]
  653. platsdk=GetRegistryKey("SOFTWARE\\Microsoft\\MicrosoftSDK\\InstalledSDKs\\D2FF9F89-8AA2-4373-8A31-C838BF4DBBE1",
  654. "Install Dir")
  655. if (platsdk == 0): exit("Found VC Toolkit, but cannot locate MS Platform SDK")
  656. WARNINGS.append("Using visual studio: "+vcdir)
  657. AddToPathEnv("PATH", vcdir + "VC\\bin")
  658. AddToPathEnv("PATH", vcdir + "Common7\\IDE")
  659. AddToPathEnv("INCLUDE", vcdir + "VC\\include")
  660. AddToPathEnv("LIB", vcdir + "VC\\lib")
  661. AddToPathEnv("INCLUDE", platsdk + "include")
  662. AddToPathEnv("INCLUDE", platsdk + "include\\atl")
  663. AddToPathEnv("LIB", platsdk + "lib")
  664. COMPILER="MSVC"
  665. THIRDPARTYLIBS="thirdparty/win-libs-vc8/"
  666. VC80CRTVERSION = getVC80CRTVersion(THIRDPARTYLIBS+"extras/bin/Microsoft.VC80.CRT.manifest")
  667. return
  668. # Give up
  669. exit("Cannot locate Microsoft Visual Studio 2005 or Visual Studio Express 2005")
  670. ChooseCompiler()
  671. ##########################################################################################
  672. #
  673. # Disable packages that are currently broken or not supported.
  674. #
  675. ##########################################################################################
  676. if (OMIT.count("MILES")==0):
  677. WARNINGS.append("makepanda currently does not support miles sound system")
  678. WARNINGS.append("I have automatically added this command-line option: --no-miles")
  679. OMIT.append("MILES")
  680. if (sys.platform != "win32"):
  681. if (OMIT.count("DX8")==0): OMIT.append("DX8")
  682. if (OMIT.count("DX9")==0): OMIT.append("DX9")
  683. ##########################################################################################
  684. #
  685. # Verify that LD_LIBRARY_PATH contains the built/lib directory.
  686. #
  687. # If not, add it on a temporary basis, and issue a warning.
  688. #
  689. ##########################################################################################
  690. if (sys.platform != "win32"):
  691. BUILTLIB = os.path.abspath("built/lib")
  692. try:
  693. LDPATH = []
  694. f = file("/etc/ld.so.conf","r")
  695. for line in f: LDPATH.append(line.rstrip())
  696. f.close()
  697. except: LDPATH = []
  698. if (os.environ.has_key("LD_LIBRARY_PATH")):
  699. LDPATH = LDPATH + os.environ["LD_LIBRARY_PATH"].split(":")
  700. if (LDPATH.count(BUILTLIB)==0):
  701. WARNINGS.append("Caution: the built/lib directory is not in LD_LIBRARY_PATH")
  702. WARNINGS.append("or /etc/ld.so.conf. You must add it before using panda.")
  703. if (os.environ.has_key("LD_LIBRARY_PATH")):
  704. os.environ["LD_LIBRARY_PATH"] = BUILTLIB + ":" + os.environ["LD_LIBRARY_PATH"]
  705. else:
  706. os.environ["LD_LIBRARY_PATH"] = BUILTLIB
  707. #######################################################################
  708. #
  709. # Ensure that bison can find its skeleton file
  710. #
  711. #######################################################################
  712. if (sys.platform == "win32"):
  713. os.environ["BISON_SIMPLE"] = "thirdparty/win-util/bison.simple"
  714. ########################################################################
  715. ##
  716. ## Choose a version number for the installer
  717. ##
  718. ########################################################################
  719. if (VERSION == 0):
  720. try:
  721. f = file("dtool/PandaVersion.pp","r")
  722. pattern = re.compile('^[ \t]*[#][ \t]*define[ \t]+PANDA_VERSION[ \t]+([0-9]+)[ \t]+([0-9]+)[ \t]+([0-9]+)')
  723. for line in f:
  724. match = pattern.match(line,0)
  725. if (match):
  726. VERSION = match.group(1)+"."+match.group(2)+"."+match.group(3)
  727. break
  728. f.close()
  729. except: VERSION="0.0.0"
  730. ########################################################################
  731. #
  732. # Sanity check some command-line arguments.
  733. #
  734. ########################################################################
  735. if (INSTALLER) and (OMIT.count("PYTHON")):
  736. exit("Cannot build installer without python")
  737. ########################################################################
  738. ##
  739. ## Give a Status Report on Command-Line Options
  740. ##
  741. ########################################################################
  742. def printStatus(header,warnings):
  743. global VERBOSE
  744. if VERBOSE >= -2:
  745. print ""
  746. print "-------------------------------------------------------------------"
  747. print header
  748. tkeep = ""
  749. tomit = ""
  750. for x in PACKAGES:
  751. if (OMIT.count(x)==0): tkeep = tkeep + x + " "
  752. else: tomit = tomit + x + " "
  753. print "Makepanda: Compiler:",COMPILER
  754. print "Makepanda: Optimize:",OPTIMIZE
  755. print "Makepanda: Keep Pkg:",tkeep
  756. print "Makepanda: Omit Pkg:",tomit
  757. print "Makepanda: Verbose vs. Quiet Level:",VERBOSE
  758. if (GENMAN): print "Makepanda: Generate API reference manual"
  759. else : print "Makepanda: Don't generate API reference manual"
  760. if (sys.platform == "win32"):
  761. if INSTALLER: print "Makepanda: Build installer, using",COMPRESSOR
  762. else : print "Makepanda: Don't build installer"
  763. print "Makepanda: Version ID: "+VERSION
  764. for x in warnings: print "Makepanda: "+x
  765. print "-------------------------------------------------------------------"
  766. print ""
  767. sys.stdout.flush()
  768. printStatus("Makepanda Initial Status Report", WARNINGS)
  769. ########################################################################
  770. ##
  771. ## CxxFindSource: given a source file name and a directory list,
  772. ## searches the directory list for the given source file. Returns
  773. ## the full pathname of the located file.
  774. ##
  775. ## CxxFindHeader: given a source file, an include directive, and a
  776. ## directory list, searches the directory list for the given header
  777. ## file. Returns the full pathname of the located file.
  778. ##
  779. ## Of course, CxxFindSource and CxxFindHeader cannot find a source
  780. ## file that has not been created yet. This can cause dependency
  781. ## problems. So the function CreateStubHeader can be used to create
  782. ## a file that CxxFindSource or CxxFindHeader can subsequently find.
  783. ##
  784. ########################################################################
  785. def CxxFindSource(name, ipath):
  786. for dir in ipath:
  787. if (dir == "."): full = name
  788. else: full = dir + "/" + name
  789. if GetTimestamp(full) > 0: return full
  790. exit("Could not find source file: "+name)
  791. def CxxFindHeader(srcfile, incfile, ipath):
  792. if (incfile.startswith(".")):
  793. last = srcfile.rfind("/")
  794. if (last < 0): exit("CxxFindHeader cannot handle this case #1")
  795. srcdir = srcfile[:last+1]
  796. while (incfile[:1]=="."):
  797. if (incfile[:2]=="./"):
  798. incfile = incfile[2:]
  799. elif (incfile[:3]=="../"):
  800. incfile = incfile[3:]
  801. last = srcdir[:-1].rfind("/")
  802. if (last < 0): exit("CxxFindHeader cannot handle this case #2")
  803. srcdir = srcdir[:last+1]
  804. else: exit("CxxFindHeader cannot handle this case #3")
  805. full = srcdir + incfile
  806. if GetTimestamp(full) > 0: return full
  807. return 0
  808. else:
  809. for dir in ipath:
  810. full = dir + "/" + incfile
  811. if GetTimestamp(full) > 0: return full
  812. return 0
  813. def CreateStubHeader(file):
  814. if (os.path.exists(file)==0):
  815. WriteFile(file,"/* stub header */")
  816. ########################################################################
  817. ##
  818. ## FindLocation
  819. ##
  820. ########################################################################
  821. def FindLocation(fn, ipath):
  822. if (COMPILER=="LINUX"):
  823. if (fn.endswith(".cxx")): return CxxFindSource(fn, ipath)
  824. if (fn.endswith(".I")): return CxxFindSource(fn, ipath)
  825. if (fn.endswith(".h")): return CxxFindSource(fn, ipath)
  826. if (fn.endswith(".c")): return CxxFindSource(fn, ipath)
  827. if (fn.endswith(".yxx")): return CxxFindSource(fn, ipath)
  828. if (fn.endswith(".lxx")): return CxxFindSource(fn, ipath)
  829. if (fn.endswith(".obj")): return "built/tmp/"+fn[:-4]+".o"
  830. if (fn.endswith(".dll")): return "built/lib/"+fn[:-4]+".so"
  831. if (fn.endswith(".exe")): return "built/bin/"+fn[:-4]
  832. if (fn.endswith(".lib")): return "built/lib/"+fn[:-4]+".a"
  833. if (fn.endswith(".ilb")): return "built/tmp/"+fn[:-4]+".a"
  834. if (fn.endswith(".dat")): return "built/tmp/"+fn
  835. if (fn.endswith(".in")): return "built/pandac/input/"+fn
  836. if (COMPILER=="MSVC"):
  837. if (fn.endswith(".cxx")): return CxxFindSource(fn, ipath)
  838. if (fn.endswith(".I")): return CxxFindSource(fn, ipath)
  839. if (fn.endswith(".h")): return CxxFindSource(fn, ipath)
  840. if (fn.endswith(".c")): return CxxFindSource(fn, ipath)
  841. if (fn.endswith(".yxx")): return CxxFindSource(fn, ipath)
  842. if (fn.endswith(".lxx")): return CxxFindSource(fn, ipath)
  843. if (fn.endswith(".obj")): return "built/tmp/"+fn
  844. if (fn.endswith(".dll")): return "built/bin/"+fn
  845. if (fn.endswith(".dlo")): return "built/plugins/"+fn
  846. if (fn.endswith(".dli")): return "built/plugins/"+fn
  847. if (fn.endswith(".dle")): return "built/plugins/"+fn
  848. if (fn.endswith(".mll")): return "built/plugins/"+fn
  849. if (fn.endswith(".exe")): return "built/bin/"+fn
  850. if (fn.endswith(".lib")): return "built/lib/"+fn
  851. if (fn.endswith(".ilb")): return "built/tmp/"+fn[:-4]+".lib"
  852. if (fn.endswith(".dat")): return "built/tmp/"+fn
  853. if (fn.endswith(".in")): return "built/pandac/input/"+fn
  854. return fn
  855. def FindLocations(files, ipath):
  856. result = []
  857. for x in files:
  858. result.append(FindLocation(x, ipath))
  859. return result
  860. ########################################################################
  861. ##
  862. ## CxxCalcDependencies(srcfile, ipath, ignore)
  863. ##
  864. ## Calculate the dependencies of a source file given a
  865. ## particular include-path. Any file in the list of files to
  866. ## ignore is not considered.
  867. ##
  868. ########################################################################
  869. global CxxIgnoreHeader
  870. global CxxDependencyCache
  871. CxxIgnoreHeader = {}
  872. CxxDependencyCache = {}
  873. def CxxCalcDependencies(srcfile, ipath, ignore):
  874. if (CxxDependencyCache.has_key(srcfile)):
  875. return CxxDependencyCache[srcfile]
  876. if (ignore.count(srcfile)): return []
  877. dep = {}
  878. dep[srcfile] = 1
  879. includes = CxxGetIncludes(srcfile)
  880. for include in includes:
  881. if (CxxIgnoreHeader.has_key(include)==0):
  882. header = CxxFindHeader(srcfile, include, ipath)
  883. if (header!=0):
  884. if (ignore.count(header)==0):
  885. hdeps = CxxCalcDependencies(header, ipath, [srcfile]+ignore)
  886. for x in hdeps: dep[x] = 1
  887. else:
  888. if (VERBOSE > 1):
  889. print "CAUTION: header file "+include+" cannot be found in "+srcfile+" IPATH="+str(ipath)
  890. result = dep.keys()
  891. CxxDependencyCache[srcfile] = result
  892. return result
  893. ########################################################################
  894. ##
  895. ##
  896. ##
  897. ########################################################################
  898. def SDependencyQueue(ipath, call, targets, sources):
  899. xipath = ["built/tmp"] + ipath + ["built/include"]
  900. osources = {}
  901. for x in sources:
  902. file = FindLocation(x, xipath)
  903. if (x.endswith(".cxx")) or (x.endswith(".I")) or (x.endswith(".h")) or (x.endswith(".c")):
  904. for dep in CxxCalcDependencies(file, xipath, []):
  905. osources[dep] = 1
  906. else:
  907. osources[file] = 1
  908. osources = osources.keys()
  909. osources.sort()
  910. otargets = FindLocations(targets, xipath)
  911. DEPENDENCYQUEUE.append([call[0],call[1:],otargets,osources,[]])
  912. ########################################################################
  913. ##
  914. ## Routines to copy files into the build tree
  915. ##
  916. ########################################################################
  917. def CopyFile(dstfile,srcfile):
  918. if (dstfile[-1]=='/'):
  919. dstdir = dstfile
  920. fnl = srcfile.rfind("/")
  921. if (fnl < 0): fn = srcfile
  922. else: fn = srcfile[fnl+1:]
  923. dstfile = dstdir + fn
  924. if (NeedsBuild([dstfile],[srcfile])):
  925. global VERBOSE
  926. if VERBOSE >= 1:
  927. print "Copying \"%s\" --> \"%s\""%(srcfile, dstfile)
  928. WriteFile(dstfile,ReadFile(srcfile))
  929. JustBuilt([dstfile], [srcfile])
  930. def CopyAllFiles(dstdir, srcdir, suffix=""):
  931. for x in GetDirectoryContents(srcdir, ["*"+suffix]):
  932. CopyFile(dstdir+x, srcdir+x)
  933. def CompileAllModels(dstdir, srcdir):
  934. for x in GetDirectoryContents(srcdir, ["*.egg", "*.flt"]):
  935. eggpz = os.path.basename(x[:-4] + ".egg.pz")
  936. EnqueueEggPZ(dstdir + eggpz, srcdir + x)
  937. def CopyAllHeaders(dir, skip=[]):
  938. for filename in GetDirectoryContents(dir, ["*.h", "*.I", "*.T"], skip):
  939. srcfile = dir + "/" + filename
  940. dstfile = "built/include/" + filename
  941. if (NeedsBuild([dstfile],[srcfile])):
  942. WriteFile(dstfile,ReadFile(srcfile))
  943. JustBuilt([dstfile],[srcfile])
  944. def CopyTree(dstdir,srcdir):
  945. if (os.path.isdir(dstdir)): return 0
  946. if (COMPILER=="MSVC"): cmd = 'xcopy /I/Y/E/Q "' + srcdir + '" "' + dstdir + '"'
  947. if (COMPILER=="LINUX"): cmd = 'cp --recursive --force ' + srcdir + ' ' + dstdir
  948. oscmd(cmd)
  949. ########################################################################
  950. ##
  951. ## EnqueueCxx
  952. ##
  953. ########################################################################
  954. def CompileCxx(obj,src,ipath,opts):
  955. ipath = ["built/tmp"] + ipath + ["built/include"]
  956. wobj = FindLocation(obj, ipath)
  957. wsrc = FindLocation(src, ipath)
  958. if (COMPILER=="MSVC"):
  959. cmd = "cl /wd4996 /Fo" + wobj + " /nologo /c "
  960. if (OMIT.count("PYTHON")==0): cmd = cmd + " /Ithirdparty/win-python/include"
  961. for ver in DXVERSIONS:
  962. if (PkgSelected(opts,"DX"+ver)):
  963. cmd = cmd + ' /I"' + DIRECTXSDK["DX"+ver] + '/include"'
  964. for ver in MAYAVERSIONS:
  965. if (PkgSelected(opts,"MAYA"+ver)):
  966. cmd = cmd + ' /I"' + MAYASDK["MAYA"+ver] + '/include"'
  967. cmd = cmd + " /DMAYAVERSION=" + ver
  968. for ver in MAXVERSIONS:
  969. if (PkgSelected(opts,"MAX"+ver)):
  970. cmd = cmd + ' /I"' + MAXSDK["MAX"+ver] + '/include" /I"' + MAXSDKCS["MAX"+ver] + '" /DMAX' + ver
  971. for pkg in PACKAGES:
  972. if (pkg[:4] != "MAYA") and (pkg[:3]!="MAX") and (pkg[:2]!="DX") and PkgSelected(opts,pkg):
  973. cmd = cmd + " /I" + THIRDPARTYLIBS + pkg.lower() + "/include"
  974. for x in ipath: cmd = cmd + " /I" + x
  975. if (opts.count('NOFLOATWARN')): cmd = cmd + ' /wd4244 /wd4305'
  976. if (opts.count("WITHINPANDA")): cmd = cmd + ' /DWITHIN_PANDA'
  977. if (opts.count("MSFORSCOPE")): cmd = cmd + ' /Zc:forScope-'
  978. optlevel = getoptlevel(opts,OPTIMIZE)
  979. if (optlevel==1): cmd = cmd + " /MD /Zi /RTCs /GS"
  980. if (optlevel==2): cmd = cmd + " /MD /Zi "
  981. if (optlevel==3): cmd = cmd + " /MD /Zi /O2 /Ob2 /DFORCE_INLINING "
  982. if (optlevel==4): cmd = cmd + " /MD /Zi /Ox /Ob2 /DFORCE_INLINING /DNDEBUG /GL "
  983. cmd = cmd + " /Fd" + wobj[:-4] + ".pdb"
  984. building = getbuilding(opts)
  985. if (building): cmd = cmd + " /DBUILDING_" + building
  986. cmd = cmd + " /EHsc /Zm300 /DWIN32_VC /DWIN32 /W3 " + wsrc
  987. oscmd(cmd)
  988. if (COMPILER=="LINUX"):
  989. if (wsrc.endswith(".c")): cmd = 'gcc -fPIC -c -o ' + wobj
  990. else: cmd = 'g++ -ftemplate-depth-30 -fPIC -c -o ' + wobj
  991. if (OMIT.count("PYTHON")==0): cmd = cmd + ' -I"' + PYTHONSDK + '"'
  992. if (PkgSelected(opts,"VRPN")): cmd = cmd + ' -I' + THIRDPARTYLIBS + 'vrpn/include'
  993. if (PkgSelected(opts,"FFTW")): cmd = cmd + ' -I' + THIRDPARTYLIBS + 'fftw/include'
  994. if (PkgSelected(opts,"FMOD")): cmd = cmd + ' -I' + THIRDPARTYLIBS + 'fmod/include'
  995. if (PkgSelected(opts,"FMODEX")): cmd = cmd + ' -I' + THIRDPARTYLIBS + 'fmodex/include'
  996. if (PkgSelected(opts,"OPENAL")): cmd = cmd + ' -I' + THIRDPARTYLIBS + 'openal/include'
  997. if (PkgSelected(opts,"NVIDIACG")): cmd = cmd + ' -I' + THIRDPARTYLIBS + 'nvidiacg/include'
  998. if (PkgSelected(opts,"FFMPEG")): cmd = cmd + ' -I' + THIRDPARTYLIBS + 'ffmpeg/include'
  999. if (PkgSelected(opts,"FREETYPE")): cmd = cmd + ' -I/usr/include/freetype2'
  1000. for x in ipath: cmd = cmd + ' -I' + x
  1001. if (opts.count("WITHINPANDA")): cmd = cmd + ' -DWITHIN_PANDA'
  1002. optlevel = getoptlevel(opts,OPTIMIZE)
  1003. if (optlevel==1): cmd = cmd + " -g"
  1004. if (optlevel==2): cmd = cmd + " -O1"
  1005. if (optlevel==3): cmd = cmd + " -O2"
  1006. if (optlevel==4): cmd = cmd + " -O2 -DNDEBUG"
  1007. building = getbuilding(opts)
  1008. if (building): cmd = cmd + " -DBUILDING_" + building
  1009. cmd = cmd + ' ' + wsrc
  1010. oscmd(cmd)
  1011. def EnqueueCxx(obj=0,src=0,ipath=[],opts=[],xdep=[]):
  1012. if ((obj==0)|(src==0)):
  1013. exit("syntax error in EnqueueCxx directive")
  1014. SDependencyQueue(ipath, [CompileCxx,obj,src,ipath,opts], [obj], [src]+xdep)
  1015. ########################################################################
  1016. ##
  1017. ## CompileBison
  1018. ##
  1019. ########################################################################
  1020. def CompileBison(pre, dsth, obj, ipath, opts, src):
  1021. ifile = os.path.basename(src)
  1022. wsrc = FindLocation(src, ipath)
  1023. wobj = FindLocation(obj, ipath)
  1024. wdstc = "built/tmp/" + obj[:-4] + ".cxx"
  1025. wdsth = "built/include/" + dsth
  1026. ipath = ["built/tmp"] + ipath + ["built/include"]
  1027. if (COMPILER == "MSVC"):
  1028. oscmd('thirdparty/win-util/bison -y -d -obuilt/tmp/'+ifile+'.c -p '+pre+' '+wsrc)
  1029. CopyFile(wdstc, "built/tmp/"+ifile+".c")
  1030. CopyFile(wdsth, "built/tmp/"+ifile+".h")
  1031. if (COMPILER == "LINUX"):
  1032. oscmd("bison -y -d -obuilt/tmp/"+ifile+".c -p "+pre+" "+wsrc)
  1033. CopyFile(wdstc, "built/tmp/"+ifile+".c")
  1034. CopyFile(wdsth, "built/tmp/"+ifile+".h")
  1035. CompileCxx(obj,obj[:-4]+".cxx",ipath,opts)
  1036. def EnqueueBison(ipath=0,opts=0,pre=0,obj=0,dsth=0,src=0):
  1037. if ((ipath==0)|(opts==0)|(pre==0)|(obj==0)|(dsth==0)|(src==0)):
  1038. exit("syntax error in EnqueueBison directive")
  1039. SDependencyQueue(ipath, [CompileBison,pre,dsth,obj,ipath,opts,src], [obj, dsth], [src])
  1040. ########################################################################
  1041. ##
  1042. ## CompileFlex
  1043. ##
  1044. ########################################################################
  1045. def CompileFlex(pre,src,obj,ipath,opts,dashi):
  1046. wsrc=FindLocation(src, ipath)
  1047. wobj=FindLocation(obj, ipath)
  1048. wdst="built/tmp/"+obj[:-4]+".cxx"
  1049. ipath = ["built/tmp"] + ipath + ["built/include"]
  1050. if (COMPILER == "MSVC"):
  1051. if (dashi): oscmd("thirdparty/win-util/flex -i -P" + pre + " -o"+wdst+" "+wsrc)
  1052. else: oscmd("thirdparty/win-util/flex -P" + pre + " -o"+wdst+" "+wsrc)
  1053. if (COMPILER == "LINUX"):
  1054. if (dashi): oscmd("flex -i -P" + pre + " -o"+wdst+" "+wsrc)
  1055. else: oscmd("flex -P" + pre + " -o"+wdst+" "+wsrc)
  1056. CompileCxx(obj,obj[:-4]+".cxx",ipath,opts)
  1057. def EnqueueFlex(ipath=0,opts=0,pre=0,obj=0,src=0,dashi=0):
  1058. if ((ipath==0)|(opts==0)|(pre==0)|(obj==0)|(src==0)):
  1059. exit("syntax error in EnqueueFlex directive")
  1060. SDependencyQueue(ipath, [CompileFlex,pre,src,obj,ipath,opts,dashi], [obj], [src])
  1061. ########################################################################
  1062. ##
  1063. ## EnqueueIgate
  1064. ##
  1065. ########################################################################
  1066. def CompileIgate(ipath,opts,outd,obj,src,module,library,files):
  1067. outc = obj[:-4]+".cxx"
  1068. wobj = FindLocation(obj, ipath)
  1069. woutd = FindLocation(outd, ipath)
  1070. woutc = "built/tmp/"+outc
  1071. xipath = ipath + ["built/include"]
  1072. if (OMIT.count("PYTHON")):
  1073. WriteFile(woutc,"")
  1074. WriteFile(woutd,"")
  1075. CompileCxx(obj,outc,ipath,opts)
  1076. return
  1077. if (COMPILER=="MSVC"):
  1078. cmd = "built/bin/interrogate -srcdir "+src+" -I"+src
  1079. cmd = cmd + ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -longlong __int64 -D_X86_ -DWIN32_VC -D_WIN32'
  1080. cmd = cmd + ' -D"_declspec(param)=" -D_near -D_far -D__near -D__far -D__stdcall'
  1081. optlevel=getoptlevel(opts,OPTIMIZE)
  1082. if (optlevel==1): cmd = cmd + ' '
  1083. if (optlevel==2): cmd = cmd + ' '
  1084. if (optlevel==3): cmd = cmd + ' -DFORCE_INLINING'
  1085. if (optlevel==4): cmd = cmd + ' -DNDEBUG -DFORCE_INLINING'
  1086. cmd = cmd + ' -oc ' + woutc + ' -od ' + woutd
  1087. cmd = cmd + ' -fnames -string -refcount -assert -python-native'
  1088. cmd = cmd + ' -Sbuilt/include/parser-inc'
  1089. for x in xipath: cmd = cmd + ' -I' + x
  1090. cmd = cmd + ' -Sthirdparty/win-python/include'
  1091. for ver in DXVERSIONS:
  1092. if ((COMPILER=="MSVC") and PkgSelected(opts,"DX"+ver)):
  1093. cmd = cmd + ' -S"' + DIRECTXSDK["DX"+ver] + '/include"'
  1094. for ver in MAYAVERSIONS:
  1095. if ((COMPILER=="MSVC") and PkgSelected(opts,"MAYA"+ver)):
  1096. cmd = cmd + ' -S"' + MAYASDK["MAYA"+ver] + '/include"'
  1097. for pkg in PACKAGES:
  1098. if (PkgSelected(opts,pkg)):
  1099. cmd = cmd + " -S" + THIRDPARTYLIBS + pkg.lower() + "/include"
  1100. building = getbuilding(opts)
  1101. if (building): cmd = cmd + " -DBUILDING_"+building
  1102. if (opts.count("WITHINPANDA")): cmd = cmd + " -DWITHIN_PANDA"
  1103. cmd = cmd + ' -module ' + module + ' -library ' + library
  1104. for x in files: cmd = cmd + ' ' + x
  1105. oscmd(cmd)
  1106. CompileCxx(obj,outc,ipath,opts)
  1107. return
  1108. if (COMPILER=="LINUX"):
  1109. cmd = 'built/bin/interrogate -srcdir '+src
  1110. cmd = cmd + ' -DCPPPARSER -D__STDC__=1 -D__cplusplus -D__i386__ -D__const=const'
  1111. optlevel = getoptlevel(opts,OPTIMIZE)
  1112. if (optlevel==1): cmd = cmd + ' '
  1113. if (optlevel==2): cmd = cmd + ' '
  1114. if (optlevel==3): cmd = cmd + ' '
  1115. if (optlevel==4): cmd = cmd + ' -DNDEBUG '
  1116. cmd = cmd + ' -oc ' + woutc + ' -od ' + woutd
  1117. cmd = cmd + ' -fnames -string -refcount -assert -python-native'
  1118. cmd = cmd + ' -Sbuilt/include/parser-inc'
  1119. for x in xipath: cmd = cmd + ' -I' + x
  1120. cmd = cmd + ' -S'+PYTHONSDK
  1121. for pkg in PACKAGES:
  1122. if (PkgSelected(opts,pkg)):
  1123. cmd = cmd + " -S" + THIRDPARTYLIBS + pkg.lower() + "/include"
  1124. cmd = cmd + ' -S/usr/include'
  1125. building = getbuilding(opts)
  1126. if (building): cmd = cmd + " -DBUILDING_"+building
  1127. if (opts.count("WITHINPANDA")): cmd = cmd + " -DWITHIN_PANDA"
  1128. cmd = cmd + ' -module ' + module + ' -library ' + library
  1129. for ver in MAYAVERSIONS:
  1130. if (PkgSelected(opts, "MAYA"+ver)):
  1131. cmd = cmd + ' -I"' + MAYASDK["MAYA"+ver] + '/include"'
  1132. for x in files: cmd = cmd + ' ' + x
  1133. oscmd(cmd)
  1134. CompileCxx(obj,outc,ipath,opts)
  1135. return
  1136. def FindInterrogateInputs(dir, skip, also):
  1137. if (skip == "ALL"):
  1138. files = []
  1139. else:
  1140. files = GetDirectoryContents(dir, ["*.h"], skip)
  1141. files.sort()
  1142. for x in also: files.append(x)
  1143. return files
  1144. def EnqueueIgate(ipath=0, opts=0, outd=0, obj=0, src=0, module=0, library=0, also=0, skip=0):
  1145. if ((ipath==0)|(opts==0)|(outd==0)|(obj==0)|(src==0)|(module==0)|(library==0)|(also==0)|(skip==0)):
  1146. exit("syntax error in EnqueueIgate directive")
  1147. files = FindInterrogateInputs(src, skip, also)
  1148. dep = files + ["dtool_have_python.dat", "interrogate.exe"]
  1149. SDependencyQueue(ipath, [CompileIgate,ipath,opts,outd,obj,src,module,library,files], [obj, outd], dep)
  1150. ########################################################################
  1151. ##
  1152. ## EnqueueImod
  1153. ##
  1154. ########################################################################
  1155. def CompileImod(obj, module, library, ipath, opts, files):
  1156. outc = obj[:-4]+".cxx"
  1157. woutc = "built/tmp/"+outc
  1158. wfiles = FindLocations(files, ipath)
  1159. if (OMIT.count("PYTHON")):
  1160. WriteFile(woutc,"")
  1161. CompileCxx(obj,outc,ipath,opts)
  1162. return
  1163. if (COMPILER=="MSVC"):
  1164. cmd = 'built/bin/interrogate_module '
  1165. cmd = cmd + ' -oc ' + woutc + ' -module ' + module + ' -library ' + library + ' -python-native '
  1166. for x in wfiles: cmd = cmd + ' ' + x
  1167. oscmd(cmd)
  1168. CompileCxx(obj,outc,ipath,opts)
  1169. return
  1170. if (COMPILER=="LINUX"):
  1171. cmd = 'built/bin/interrogate_module '
  1172. cmd = cmd + ' -oc ' + woutc + ' -module ' + module + ' -library ' + library + ' -python-native '
  1173. for x in wfiles: cmd = cmd + ' ' + x
  1174. oscmd(cmd)
  1175. CompileCxx(obj,outc,ipath,opts)
  1176. return
  1177. def EnqueueImod(ipath=0, opts=0, obj=0, module=0, library=0, files=0):
  1178. if ((ipath==0)|(opts==0)|(obj==0)|(module==0)|(library==0)|(files==0)):
  1179. exit("syntax error in EnqueueImod directive")
  1180. dep = files + ["dtool_have_python.dat", "interrogate_module.exe"]
  1181. SDependencyQueue(ipath, [CompileImod, obj, module, library, ipath, opts, files], [obj], dep)
  1182. ########################################################################
  1183. ##
  1184. ## EnqueueLib
  1185. ##
  1186. ########################################################################
  1187. def CompileLib(lib, obj, opts):
  1188. wlib = FindLocation(lib, [])
  1189. wobj = FindLocations(obj, [])
  1190. if (COMPILER=="MSVC"):
  1191. cmd = 'link /lib /nologo /OUT:' + wlib
  1192. optlevel = getoptlevel(opts,OPTIMIZE)
  1193. if (optlevel==4): cmd = cmd + " /LTCG "
  1194. for x in wobj: cmd = cmd + ' ' + x
  1195. oscmd(cmd)
  1196. if (COMPILER=="LINUX"):
  1197. cmd = 'ar cru ' + wlib
  1198. for x in wobj: cmd=cmd + ' ' + x
  1199. oscmd(cmd)
  1200. def EnqueueLib(lib=0, obj=[], opts=[]):
  1201. if (lib==0): exit("syntax error in EnqueueLib directive")
  1202. SDependencyQueue([], [CompileLib,lib,obj,opts], [lib], obj)
  1203. ########################################################################
  1204. ##
  1205. ## EnqueueLink
  1206. ##
  1207. ########################################################################
  1208. def CompileLink(dll, obj, opts, ldef):
  1209. wdll = FindLocation(dll, [])
  1210. if (COMPILER=="MSVC"):
  1211. cmd = 'link /nologo /NOD:MFC80.LIB /NOD:LIBCI.LIB /NOD:MSVCRTD.LIB /DEBUG '
  1212. if (THIRDPARTYLIBS=="thirdparty/win-libs-vc8/"): cmd = cmd + " /nod:libc /nod:libcmtd /nod:atlthunk"
  1213. if (wdll.endswith(".exe")==0): cmd = cmd + " /DLL"
  1214. optlevel = getoptlevel(opts,OPTIMIZE)
  1215. if (optlevel==1): cmd = cmd + " /MAP /MAPINFO:EXPORTS"
  1216. if (optlevel==2): cmd = cmd + " /MAP:NUL "
  1217. if (optlevel==3): cmd = cmd + " /MAP:NUL "
  1218. if (optlevel==4): cmd = cmd + " /MAP:NUL /LTCG "
  1219. cmd = cmd + " /FIXED:NO /OPT:REF /STACK:4194304 /INCREMENTAL:NO "
  1220. if (ldef!=0): cmd = cmd + ' /DEF:"' + ldef + '"'
  1221. cmd = cmd + ' /OUT:' + wdll
  1222. if (dll.endswith(".dll")):
  1223. cmd = cmd + ' /IMPLIB:built/lib/'+dll[:-4]+".lib"
  1224. if (OMIT.count("PYTHON")==0): cmd = cmd + ' /LIBPATH:thirdparty/win-python/libs '
  1225. for x in obj:
  1226. if (x.endswith(".dll")): cmd = cmd + ' built/lib/' + x[:-4] + ".lib"
  1227. elif (x.endswith(".lib")):
  1228. dname = x[:-4]+".dll"
  1229. if (os.path.exists("built/bin/" + x[:-4] + ".dll")):
  1230. exit("Error: in makepanda, specify "+dname+", not "+x)
  1231. cmd = cmd + ' ' + FindLocation(x,[])
  1232. else: cmd = cmd + ' ' + FindLocation(x,[])
  1233. if (wdll[-4:]==".exe"): cmd = cmd + ' panda/src/configfiles/pandaIcon.obj'
  1234. for ver in DXVERSIONS:
  1235. if (PkgSelected(opts,"DX"+ver)):
  1236. cmd = cmd + ' /LIBPATH:"' + DIRECTXSDK["DX"+ver] + '/lib/x86"'
  1237. cmd = cmd + ' /LIBPATH:"' + DIRECTXSDK["DX"+ver] + '/lib"'
  1238. cmd = cmd + ' d3dVER.lib d3dxVER.lib dxerrVER.lib ddraw.lib dxguid.lib'.replace("VER",ver)
  1239. if (opts.count("WINSOCK")): cmd = cmd + " wsock32.lib"
  1240. if (opts.count("WINSOCK2")): cmd = cmd + " wsock32.lib ws2_32.lib"
  1241. if (opts.count("WINCOMCTL")): cmd = cmd + ' comctl32.lib'
  1242. if (opts.count("WINCOMDLG")): cmd = cmd + ' comdlg32.lib'
  1243. if (opts.count("WINUSER")): cmd = cmd + " user32.lib"
  1244. if (opts.count("WINMM")): cmd = cmd + " winmm.lib"
  1245. if (opts.count("WINIMM")): cmd = cmd + " imm32.lib"
  1246. if (opts.count("WINKERNEL")): cmd = cmd + " kernel32.lib"
  1247. if (opts.count("WINOLDNAMES")): cmd = cmd + " oldnames.lib"
  1248. if (opts.count("WINSHELL")): cmd = cmd + " shell32.lib"
  1249. if (opts.count("WINGDI")): cmd = cmd + " gdi32.lib"
  1250. if (opts.count("ADVAPI")): cmd = cmd + " advapi32.lib"
  1251. if (opts.count("GLUT")): cmd = cmd + " opengl32.lib glu32.lib"
  1252. if (PkgSelected(opts,"DIRECTCAM")): cmd = cmd + " strmiids.lib quartz.lib odbc32.lib odbccp32.lib"
  1253. if (PkgSelected(opts,"PNG")): cmd = cmd + ' ' + THIRDPARTYLIBS + 'png/lib/libpandapng.lib'
  1254. if (PkgSelected(opts,"JPEG")): cmd = cmd + ' ' + THIRDPARTYLIBS + 'jpeg/lib/libpandajpeg.lib'
  1255. if (PkgSelected(opts,"TIFF")): cmd = cmd + ' ' + THIRDPARTYLIBS + 'tiff/lib/libpandatiff.lib'
  1256. if (PkgSelected(opts,"ZLIB")): cmd = cmd + ' ' + THIRDPARTYLIBS + 'zlib/lib/libpandazlib1.lib'
  1257. if (PkgSelected(opts,"VRPN")):
  1258. cmd = cmd + ' ' + THIRDPARTYLIBS + 'vrpn/lib/vrpn.lib'
  1259. cmd = cmd + ' ' + THIRDPARTYLIBS + 'vrpn/lib/quat.lib'
  1260. if (PkgSelected(opts,"FMOD")):
  1261. cmd = cmd + ' ' + THIRDPARTYLIBS + 'fmod/lib/fmod.lib'
  1262. if (PkgSelected(opts,"FMODEX")):
  1263. cmd = cmd + ' ' + THIRDPARTYLIBS + 'fmodex/lib/fmodex_vc.lib'
  1264. if (PkgSelected(opts,"OPENAL")):
  1265. cmd = cmd + ' ' + THIRDPARTYLIBS + 'openal/lib/pandaopenal32.lib'
  1266. if (PkgSelected(opts,"MILES")):
  1267. cmd = cmd + ' ' + THIRDPARTYLIBS + 'miles/lib/mss32.lib'
  1268. if (PkgSelected(opts,"NVIDIACG")):
  1269. if (opts.count("CGGL")):
  1270. cmd = cmd + ' ' + THIRDPARTYLIBS + 'nvidiacg/lib/cgGL.lib'
  1271. if (opts.count("CGDX9")):
  1272. cmd = cmd + ' ' + THIRDPARTYLIBS + 'nvidiacg/lib/cgD3D9.lib'
  1273. cmd = cmd + ' ' + THIRDPARTYLIBS + 'nvidiacg/lib/cg.lib'
  1274. if (PkgSelected(opts,"OPENSSL")):
  1275. cmd = cmd + ' ' + THIRDPARTYLIBS + 'openssl/lib/libpandassl.lib'
  1276. cmd = cmd + ' ' + THIRDPARTYLIBS + 'openssl/lib/libpandaeay.lib'
  1277. if (PkgSelected(opts,"FREETYPE")):
  1278. cmd = cmd + ' ' + THIRDPARTYLIBS + 'freetype/lib/freetype.lib'
  1279. if (PkgSelected(opts,"FFTW")):
  1280. cmd = cmd + ' ' + THIRDPARTYLIBS + 'fftw/lib/rfftw.lib'
  1281. cmd = cmd + ' ' + THIRDPARTYLIBS + 'fftw/lib/fftw.lib'
  1282. if (PkgSelected(opts,"FFMPEG")):
  1283. cmd = cmd + ' ' + THIRDPARTYLIBS + 'ffmpeg/lib/avcodec-51-panda.lib'
  1284. cmd = cmd + ' ' + THIRDPARTYLIBS + 'ffmpeg/lib/avformat-50-panda.lib'
  1285. cmd = cmd + ' ' + THIRDPARTYLIBS + 'ffmpeg/lib/avutil-49-panda.lib'
  1286. if (PkgSelected(opts,"ARTOOLKIT")):
  1287. cmd = cmd + ' ' + THIRDPARTYLIBS + 'artoolkit/lib/libAR.lib'
  1288. for ver in MAYAVERSIONS:
  1289. if (PkgSelected(opts,"MAYA"+ver)):
  1290. cmd = cmd + ' "' + MAYASDK["MAYA"+ver] + '/lib/Foundation.lib"'
  1291. cmd = cmd + ' "' + MAYASDK["MAYA"+ver] + '/lib/OpenMaya.lib"'
  1292. cmd = cmd + ' "' + MAYASDK["MAYA"+ver] + '/lib/OpenMayaAnim.lib"'
  1293. cmd = cmd + ' "' + MAYASDK["MAYA"+ver] + '/lib/OpenMayaUI.lib"'
  1294. for ver in MAXVERSIONS:
  1295. if (PkgSelected(opts,"MAX"+ver)):
  1296. cmd = cmd + ' "' + MAXSDK["MAX"+ver] + '/lib/core.lib"'
  1297. cmd = cmd + ' "' + MAXSDK["MAX"+ver] + '/lib/edmodel.lib"'
  1298. cmd = cmd + ' "' + MAXSDK["MAX"+ver] + '/lib/gfx.lib"'
  1299. cmd = cmd + ' "' + MAXSDK["MAX"+ver] + '/lib/geom.lib"'
  1300. cmd = cmd + ' "' + MAXSDK["MAX"+ver] + '/lib/mesh.lib"'
  1301. cmd = cmd + ' "' + MAXSDK["MAX"+ver] + '/lib/maxutil.lib"'
  1302. cmd = cmd + ' "' + MAXSDK["MAX"+ver] + '/lib/paramblk2.lib"'
  1303. oscmd(cmd)
  1304. setVC80CRTVersion(wdll+".manifest", VC80CRTVERSION)
  1305. mtcmd = 'mt -manifest ' + wdll + '.manifest -outputresource:' + wdll
  1306. if (wdll.endswith(".exe")==0): mtcmd = mtcmd + ';2'
  1307. else: mtcmd = mtcmd + ';1'
  1308. oscmd(mtcmd)
  1309. if (COMPILER=="LINUX"):
  1310. if (dll.endswith(".exe")): cmd = 'g++ -o ' + wdll + ' -Lbuilt/lib -L/usr/X11R6/lib'
  1311. else: cmd = 'g++ -shared -o ' + wdll + ' -Lbuilt/lib -L/usr/X11R6/lib'
  1312. for x in obj:
  1313. suffix = x[-4:]
  1314. if (suffix==".obj"): cmd = cmd + ' built/tmp/' + x[:-4] + '.o'
  1315. elif (suffix==".dll"): cmd = cmd + ' -l' + x[3:-4]
  1316. elif (suffix==".lib"): cmd = cmd + ' built/lib/' + x[:-4] + '.a'
  1317. elif (suffix==".ilb"): cmd = cmd + ' built/tmp/' + x[:-4] + '.a'
  1318. #if (PkgSelected(opts,"FMOD")): cmd = cmd + ' -L' + THIRDPARTYLIBS + 'fmod/lib -lfmod'
  1319. if (PkgSelected(opts,"FMODEX")): cmd = cmd + ' -L' + THIRDPARTYLIBS + 'fmodex/lib -lfmodex'
  1320. #if (PkgSelected(opts,"OPENAL")): cmd = cmd + ' -L' + THIRDPARTYLIBS + 'openal/lib -lopenal'
  1321. if (PkgSelected(opts,"NVIDIACG")):
  1322. cmd = cmd + ' -Lthirdparty/nvidiacg/lib '
  1323. if (opts.count("CGGL")): cmd = cmd + " -lCgGL"
  1324. cmd = cmd + " -lCg "
  1325. if (PkgSelected(opts,"FFMPEG")): cmd = cmd + ' -L' + THIRDPARTYLIBS + 'ffmpeg/lib -lavformat -lavcodec -lavformat -lavutil'
  1326. if (PkgSelected(opts,"OPENAL")): cmd = cmd + ' -L' + THIRDPARTYLIBS + 'openal/lib -lpandaopenal'
  1327. if (PkgSelected(opts,"ZLIB")): cmd = cmd + " -lz"
  1328. if (PkgSelected(opts,"PNG")): cmd = cmd + " -lpng"
  1329. if (PkgSelected(opts,"JPEG")): cmd = cmd + " -ljpeg"
  1330. if (PkgSelected(opts,"TIFF")): cmd = cmd + " -ltiff"
  1331. if (PkgSelected(opts,"OPENSSL")): cmd = cmd + " -lssl"
  1332. if (PkgSelected(opts,"FREETYPE")): cmd = cmd + " -lfreetype"
  1333. if (PkgSelected(opts,"VRPN")): cmd = cmd + ' -L' + THIRDPARTYLIBS + 'vrpn/lib -lvrpn -lquat'
  1334. if (PkgSelected(opts,"FFTW")): cmd = cmd + ' -L' + THIRDPARTYLIBS + 'fftw/lib -lrfftw -lfftw'
  1335. if (opts.count("GLUT")): cmd = cmd + " -lGL -lGLU"
  1336. cmd = cmd + " -lpthread -ldl"
  1337. oscmd(cmd)
  1338. def EnqueueLink(dll=0, obj=[], opts=[], xdep=[], ldef=0):
  1339. if (dll==0): exit("syntax error in EnqueueLink directive")
  1340. SDependencyQueue([], [CompileLink, dll, obj, opts, ldef], [dll], obj + xdep)
  1341. ##########################################################################################
  1342. #
  1343. # EnqueueEggPZ
  1344. #
  1345. ##########################################################################################
  1346. def CompileEggPZ(eggpz, src):
  1347. if (src.endswith(".egg")):
  1348. CopyFile(eggpz[:-3], src)
  1349. elif (src.endswith(".flt")):
  1350. oscmd("built/bin/flt2egg -ps keep -o " + eggpz[:-3] + " " + src)
  1351. oscmd("built/bin/pzip " + eggpz[:-3])
  1352. def EnqueueEggPZ(eggpz, src):
  1353. dep = [src, "flt2egg.exe"]
  1354. SDependencyQueue([], [CompileEggPZ, eggpz, src], [eggpz], dep)
  1355. ##########################################################################################
  1356. #
  1357. # EnqueueBamPZ
  1358. #
  1359. ##########################################################################################
  1360. #
  1361. # def CompileBamPZ(preconv, bampz, src):
  1362. # oscmd("built/bin/egg2bam " + preconv + " -o " + bampz[:-3] + " " + src)
  1363. # oscmd("built/bin/pzip " + bampz[:-3])
  1364. #
  1365. # def EnqueueBamPZ(preconv, bampz, src):
  1366. # dep = [src, "egg2bam.exe"]
  1367. # SDependencyQueue([], [CompileBamPZ, preconv, bampz, src], [bampz], dep)
  1368. ##########################################################################################
  1369. #
  1370. # If the 'make depend' process discovers an 'include'
  1371. # directive that includes one of the following files,
  1372. # the specified file is not added as a dependency,
  1373. # nor is it traversed.
  1374. #
  1375. ##########################################################################################
  1376. CxxIgnoreHeader["Python.h"] = 1
  1377. CxxIgnoreHeader["Python/Python.h"] = 1
  1378. CxxIgnoreHeader["Cg/cg.h"] = 1
  1379. CxxIgnoreHeader["Cg/cgGL.h"] = 1
  1380. CxxIgnoreHeader["alloc.h"] = 1
  1381. CxxIgnoreHeader["ctype.h"] = 1
  1382. CxxIgnoreHeader["stdlib.h"] = 1
  1383. CxxIgnoreHeader["ipc_thread.h"] = 1
  1384. CxxIgnoreHeader["platform/symbian/symbian_print.h"] = 1
  1385. CxxIgnoreHeader["hxtypes.h"] = 1
  1386. CxxIgnoreHeader["hxcom.h"] = 1
  1387. CxxIgnoreHeader["hxiids.h"] = 1
  1388. CxxIgnoreHeader["hxpiids.h"] = 1
  1389. CxxIgnoreHeader["dsound.h"] = 1
  1390. CxxIgnoreHeader["hlxosstr.h"] = 1
  1391. CxxIgnoreHeader["ddraw.h"] = 1
  1392. CxxIgnoreHeader["mss.h"] = 1
  1393. CxxIgnoreHeader["MacSocket.h"] = 1
  1394. CxxIgnoreHeader["textureTransition.h"] = 1
  1395. CxxIgnoreHeader["transformTransition.h"] = 1
  1396. CxxIgnoreHeader["billboardTransition.h"] = 1
  1397. CxxIgnoreHeader["transformTransition.h"] = 1
  1398. CxxIgnoreHeader["transparencyTransition.h"] = 1
  1399. CxxIgnoreHeader["allTransitionsWrapper.h"] = 1
  1400. CxxIgnoreHeader["allTransitionsWrapper.h"] = 1
  1401. CxxIgnoreHeader["namedNode.h"] = 1
  1402. CxxIgnoreHeader["renderRelation.h"] = 1
  1403. CxxIgnoreHeader["renderTraverser.h"] = 1
  1404. CxxIgnoreHeader["get_rel_pos.h"] = 1
  1405. # Ignore Windows headers.
  1406. CxxIgnoreHeader["windows.h"] = 1
  1407. CxxIgnoreHeader["windef.h"] = 1
  1408. CxxIgnoreHeader["afxres.h"] = 1
  1409. # Ignore MAX headers
  1410. CxxIgnoreHeader["Max.h"] = 1
  1411. CxxIgnoreHeader["iparamb2.h"] = 1
  1412. CxxIgnoreHeader["iparamm2.h"] = 1
  1413. CxxIgnoreHeader["istdplug.h"] = 1
  1414. CxxIgnoreHeader["iskin.h"] = 1
  1415. CxxIgnoreHeader["stdmat.h"] = 1
  1416. CxxIgnoreHeader["phyexp.h"] = 1
  1417. CxxIgnoreHeader["bipexp.h"] = 1
  1418. CxxIgnoreHeader["modstack.h"] = 1
  1419. CxxIgnoreHeader["decomp.h"] = 1
  1420. CxxIgnoreHeader["shape.h"] = 1
  1421. CxxIgnoreHeader["simpobj.h"] = 1
  1422. CxxIgnoreHeader["surf_api.h"] = 1
  1423. # OpenSSL headers
  1424. CxxIgnoreHeader["openssl/evp.h"] = 1
  1425. CxxIgnoreHeader["openssl/rand.h"] = 1
  1426. CxxIgnoreHeader["openssl/md5.h"] = 1
  1427. CxxIgnoreHeader["openssl/err.h"] = 1
  1428. CxxIgnoreHeader["openssl/ssl.h"] = 1
  1429. CxxIgnoreHeader["openssl/pem.h"] = 1
  1430. CxxIgnoreHeader["openssl/rsa.h"] = 1
  1431. CxxIgnoreHeader["openssl/bio.h"] = 1
  1432. CxxIgnoreHeader["openssl/x509.h"] = 1
  1433. # STD headers
  1434. CxxIgnoreHeader["map"] = 1
  1435. CxxIgnoreHeader["vector"] = 1
  1436. CxxIgnoreHeader["set"] = 1
  1437. CxxIgnoreHeader["algorithm"] = 1
  1438. ##########################################################################################
  1439. #
  1440. # Create the directory tree
  1441. #
  1442. ##########################################################################################
  1443. MakeDirectory("built")
  1444. MakeDirectory("built/bin")
  1445. MakeDirectory("built/lib")
  1446. MakeDirectory("built/etc")
  1447. MakeDirectory("built/plugins")
  1448. MakeDirectory("built/modelcache")
  1449. MakeDirectory("built/include")
  1450. MakeDirectory("built/include/parser-inc")
  1451. MakeDirectory("built/include/parser-inc/openssl")
  1452. MakeDirectory("built/include/parser-inc/netinet")
  1453. MakeDirectory("built/include/parser-inc/Cg")
  1454. MakeDirectory("built/include/openssl")
  1455. MakeDirectory("built/tmp")
  1456. MakeDirectory("built/models")
  1457. MakeDirectory("built/models/audio")
  1458. MakeDirectory("built/models/audio/sfx")
  1459. MakeDirectory("built/models/icons")
  1460. MakeDirectory("built/models/maps")
  1461. MakeDirectory("built/models/misc")
  1462. MakeDirectory("built/models/gui")
  1463. MakeDirectory("built/direct")
  1464. MakeDirectory("built/pandac")
  1465. MakeDirectory("built/pandac/input")
  1466. ##########################################################################################
  1467. #
  1468. # Generate dtool_config.h, prc_parameters.h, and dtool_have_xxx.dat
  1469. #
  1470. ##########################################################################################
  1471. DTOOL_CONFIG=[
  1472. #_Variable_________________________Windows___________________Unix__________
  1473. ("HAVE_PYTHON", '1', '1'),
  1474. ("PYTHON_FRAMEWORK", 'UNDEF', 'UNDEF'),
  1475. ("COMPILE_IN_DEFAULT_FONT", '1', '1'),
  1476. ("HAVE_MAYA", '1', '1'),
  1477. ("MAYA_PRE_5_0", 'UNDEF', 'UNDEF'),
  1478. ("HAVE_SOFTIMAGE", 'UNDEF', 'UNDEF'),
  1479. ("SSL_097", 'UNDEF', 'UNDEF'),
  1480. ("REPORT_OPENSSL_ERRORS", '1', '1'),
  1481. ("HAVE_GL", '1', '1'),
  1482. ("HAVE_MESA", 'UNDEF', 'UNDEF'),
  1483. ("MESA_MGL", 'UNDEF', 'UNDEF'),
  1484. ("HAVE_SGIGL", 'UNDEF', 'UNDEF'),
  1485. ("HAVE_GLX", 'UNDEF', '1'),
  1486. ("HAVE_WGL", '1', 'UNDEF'),
  1487. ("HAVE_DX8", 'UNDEF', 'UNDEF'),
  1488. ("HAVE_DX9", 'UNDEF', 'UNDEF'),
  1489. ("HAVE_CHROMIUM", 'UNDEF', 'UNDEF'),
  1490. ("HAVE_THREADS", 'UNDEF', 'UNDEF'),
  1491. ("HAVE_AUDIO", '1', '1'),
  1492. ("NOTIFY_DEBUG", 'UNDEF', 'UNDEF'),
  1493. ("DO_PSTATS", 'UNDEF', 'UNDEF'),
  1494. ("DO_COLLISION_RECORDING", 'UNDEF', 'UNDEF'),
  1495. ("SUPPORT_IMMEDIATE_MODE", '1', '1'),
  1496. ("TRACK_IN_INTERPRETER", 'UNDEF', 'UNDEF'),
  1497. ("DO_MEMORY_USAGE", 'UNDEF', 'UNDEF'),
  1498. ("DO_PIPELINING", 'UNDEF', 'UNDEF'),
  1499. ("EXPORT_TEMPLATES", 'yes', 'yes'),
  1500. ("LINK_IN_GL", 'UNDEF', 'UNDEF'),
  1501. ("LINK_IN_PHYSICS", 'UNDEF', 'UNDEF'),
  1502. ("DEFAULT_PATHSEP", '";"', '":"'),
  1503. ("WORDS_BIGENDIAN", 'UNDEF', 'UNDEF'),
  1504. ("HAVE_NAMESPACE", '1', '1'),
  1505. ("HAVE_OPEN_MASK", 'UNDEF', 'UNDEF'),
  1506. ("HAVE_WCHAR_T", '1', '1'),
  1507. ("HAVE_WSTRING", '1', '1'),
  1508. ("HAVE_TYPENAME", '1', '1'),
  1509. ("SIMPLE_STRUCT_POINTERS", '1', 'UNDEF'),
  1510. ("HAVE_DINKUM", 'UNDEF', 'UNDEF'),
  1511. ("HAVE_STL_HASH", 'UNDEF', 'UNDEF'),
  1512. ("HAVE_GETTIMEOFDAY", 'UNDEF', '1'),
  1513. ("GETTIMEOFDAY_ONE_PARAM", 'UNDEF', 'UNDEF'),
  1514. ("HAVE_GETOPT", 'UNDEF', '1'),
  1515. ("HAVE_GETOPT_LONG_ONLY", 'UNDEF', '1'),
  1516. ("HAVE_GETOPT_H", 'UNDEF', '1'),
  1517. ("HAVE_LINUX_INPUT_H", 'UNDEF', '1'),
  1518. ("IOCTL_TERMINAL_WIDTH", 'UNDEF', '1'),
  1519. ("HAVE_STREAMSIZE", '1', '1'),
  1520. ("HAVE_IOS_TYPEDEFS", '1', '1'),
  1521. ("HAVE_IOS_BINARY", '1', '1'),
  1522. ("STATIC_INIT_GETENV", '1', 'UNDEF'),
  1523. ("HAVE_PROC_SELF_EXE", 'UNDEF', '1'),
  1524. ("HAVE_PROC_SELF_MAPS", 'UNDEF', '1'),
  1525. ("HAVE_PROC_SELF_ENVIRON", 'UNDEF', '1'),
  1526. ("HAVE_PROC_SELF_CMDLINE", 'UNDEF', '1'),
  1527. ("HAVE_GLOBAL_ARGV", '1', 'UNDEF'),
  1528. ("PROTOTYPE_GLOBAL_ARGV", 'UNDEF', 'UNDEF'),
  1529. ("GLOBAL_ARGV", '__argv', 'UNDEF'),
  1530. ("GLOBAL_ARGC", '__argc', 'UNDEF'),
  1531. ("HAVE_IO_H", '1', 'UNDEF'),
  1532. ("HAVE_IOSTREAM", '1', '1'),
  1533. ("HAVE_MALLOC_H", '1', '1'),
  1534. ("HAVE_SYS_MALLOC_H", 'UNDEF', 'UNDEF'),
  1535. ("HAVE_ALLOCA_H", 'UNDEF', '1'),
  1536. ("HAVE_LOCALE_H", 'UNDEF', '1'),
  1537. ("HAVE_MINMAX_H", '1', 'UNDEF'),
  1538. ("HAVE_SSTREAM", '1', '1'),
  1539. ("HAVE_NEW", '1', '1'),
  1540. ("HAVE_SYS_TYPES_H", '1', '1'),
  1541. ("HAVE_SYS_TIME_H", 'UNDEF', '1'),
  1542. ("HAVE_UNISTD_H", 'UNDEF', '1'),
  1543. ("HAVE_UTIME_H", 'UNDEF', '1'),
  1544. ("HAVE_GLOB_H", 'UNDEF', '1'),
  1545. ("HAVE_DIRENT_H", 'UNDEF', '1'),
  1546. ("HAVE_SYS_SOUNDCARD_H", 'UNDEF', '1'),
  1547. ("HAVE_RTTI", '1', '1'),
  1548. ("IS_LINUX", 'UNDEF', '1'),
  1549. ("GLOBAL_OPERATOR_NEW_EXCEPTIONS", 'UNDEF', '1'),
  1550. ("USE_STL_ALLOCATOR", '1', '1'),
  1551. ("USE_MEMORY_DLMALLOC", '1', 'UNDEF'),
  1552. ("USE_MEMORY_PTMALLOC", 'UNDEF', 'UNDEF'),
  1553. ("USE_MEMORY_MALLOC", 'UNDEF', '1'),
  1554. ("HAVE_ZLIB", 'UNDEF', 'UNDEF'),
  1555. ("HAVE_PNG", 'UNDEF', 'UNDEF'),
  1556. ("HAVE_JPEG", 'UNDEF', 'UNDEF'),
  1557. ("HAVE_TIFF", 'UNDEF', 'UNDEF'),
  1558. ("HAVE_VRPN", 'UNDEF', 'UNDEF'),
  1559. ("HAVE_FMOD", 'UNDEF', 'UNDEF'),
  1560. ("HAVE_FMODEX", 'UNDEF', 'UNDEF'),
  1561. ("HAVE_OPENAL", 'UNDEF', 'UNDEF'),
  1562. ("HAVE_NVIDIACG", 'UNDEF', 'UNDEF'),
  1563. ("HAVE_FREETYPE", 'UNDEF', 'UNDEF'),
  1564. ("HAVE_FFTW", 'UNDEF', 'UNDEF'),
  1565. ("HAVE_OPENSSL", 'UNDEF', 'UNDEF'),
  1566. ("HAVE_NET", 'UNDEF', 'UNDEF'),
  1567. ("HAVE_CG", 'UNDEF', 'UNDEF'),
  1568. ("HAVE_CGGL", 'UNDEF', 'UNDEF'),
  1569. ("HAVE_CGDX9", 'UNDEF', 'UNDEF'),
  1570. ("HAVE_FFMPEG", 'UNDEF', 'UNDEF'),
  1571. ("HAVE_ARTOOLKIT", 'UNDEF', 'UNDEF'),
  1572. ("HAVE_DIRECTCAM", 'UNDEF', 'UNDEF'),
  1573. ("PRC_SAVE_DESCRIPTIONS", '1', '1'),
  1574. ]
  1575. PRC_PARAMETERS=[
  1576. ("DEFAULT_PRC_DIR", '"<auto>etc"', '"<auto>etc"'),
  1577. ("PRC_DIR_ENVVARS", '"PANDA_PRC_DIR"', '"PANDA_PRC_DIR"'),
  1578. ("PRC_PATH_ENVVARS", '"PANDA_PRC_PATH"', '"PANDA_PRC_PATH"'),
  1579. ("PRC_PATTERNS", '"*.prc"', '"*.prc"'),
  1580. ("PRC_ENCRYPTED_PATTERNS", '"*.prc.pe"', '"*.prc.pe"'),
  1581. ("PRC_ENCRYPTION_KEY", '""', '""'),
  1582. ("PRC_EXECUTABLE_PATTERNS", '""', '""'),
  1583. ("PRC_EXECUTABLE_ARGS_ENVVAR", '"PANDA_PRC_XARGS"', '"PANDA_PRC_XARGS"'),
  1584. ("PRC_PUBLIC_KEYS_FILENAME", '""', '""'),
  1585. ("PRC_RESPECT_TRUST_LEVEL", 'UNDEF', 'UNDEF'),
  1586. ("PRC_DCONFIG_TRUST_LEVEL", '0', '0'),
  1587. ("PRC_INC_TRUST_LEVEL", '0', '0'),
  1588. ]
  1589. def WriteConfigSettings():
  1590. dtool_config={}
  1591. prc_parameters={}
  1592. if (sys.platform == "win32"):
  1593. for key,win,unix in DTOOL_CONFIG:
  1594. dtool_config[key] = win
  1595. for key,win,unix in PRC_PARAMETERS:
  1596. prc_parameters[key] = win
  1597. else:
  1598. for key,win,unix in DTOOL_CONFIG:
  1599. dtool_config[key] = unix
  1600. for key,win,unix in PRC_PARAMETERS:
  1601. prc_parameters[key] = unix
  1602. for x in PACKAGES:
  1603. if (OMIT.count(x)==0):
  1604. if (dtool_config.has_key("HAVE_"+x)):
  1605. dtool_config["HAVE_"+x] = '1'
  1606. dtool_config["HAVE_NET"] = '1'
  1607. if (OMIT.count("NVIDIACG")==0):
  1608. dtool_config["HAVE_CG"] = '1'
  1609. dtool_config["HAVE_CGGL"] = '1'
  1610. dtool_config["HAVE_CGDX9"] = '1'
  1611. if (OPTIMIZE <= 3):
  1612. if (dtool_config["HAVE_NET"] != 'UNDEF'):
  1613. dtool_config["DO_PSTATS"] = '1'
  1614. if (OPTIMIZE <= 3):
  1615. dtool_config["DO_COLLISION_RECORDING"] = '1'
  1616. #if (OPTIMIZE <= 2):
  1617. # dtool_config["TRACK_IN_INTERPRETER"] = '1'
  1618. if (OPTIMIZE <= 3):
  1619. dtool_config["DO_MEMORY_USAGE"] = '1'
  1620. #if (OPTIMIZE <= 1):
  1621. # dtool_config["DO_PIPELINING"] = '1'
  1622. if (OPTIMIZE <= 3):
  1623. dtool_config["NOTIFY_DEBUG"] = '1'
  1624. conf = "/* prc_parameters.h. Generated automatically by makepanda.py */\n"
  1625. for key in prc_parameters.keys():
  1626. if ((key == "DEFAULT_PRC_DIR") or (key[:4]=="PRC_")):
  1627. val = prc_parameters[key]
  1628. if (val == 'UNDEF'): conf = conf + "#undef " + key + "\n"
  1629. else: conf = conf + "#define " + key + " " + val + "\n"
  1630. del prc_parameters[key]
  1631. ConditionalWriteFile('built/include/prc_parameters.h', conf)
  1632. conf = "/* dtool_config.h. Generated automatically by makepanda.py */\n"
  1633. for key in dtool_config.keys():
  1634. val = dtool_config[key]
  1635. if (val == 'UNDEF'): conf = conf + "#undef " + key + "\n"
  1636. else: conf = conf + "#define " + key + " " + val + "\n"
  1637. del dtool_config[key]
  1638. ConditionalWriteFile('built/include/dtool_config.h', conf)
  1639. for x in PACKAGES:
  1640. if (OMIT.count(x)): ConditionalWriteFile('built/tmp/dtool_have_'+x.lower()+'.dat',"0\n")
  1641. else: ConditionalWriteFile('built/tmp/dtool_have_'+x.lower()+'.dat',"1\n")
  1642. WriteConfigSettings()
  1643. ##########################################################################################
  1644. #
  1645. # Generate pandaVersion.h, pythonversion, null.cxx
  1646. #
  1647. ##########################################################################################
  1648. PANDAVERSION_H="""
  1649. #define PANDA_MAJOR_VERSION VERSION1
  1650. #define PANDA_MINOR_VERSION VERSION2
  1651. #define PANDA_SEQUENCE_VERSION VERSION2
  1652. #undef PANDA_OFFICIAL_VERSION
  1653. #define PANDA_VERSION NVERSION
  1654. #define PANDA_VERSION_STR "VERSION1.VERSION2.VERSION3"
  1655. #define PANDA_DISTRIBUTOR "makepanda"
  1656. """
  1657. CHECKPANDAVERSION_CXX="""
  1658. # include "dtoolbase.h"
  1659. EXPCL_DTOOL int panda_version_VERSION1_VERSION2_VERSION3 = 0;
  1660. """
  1661. CHECKPANDAVERSION_H="""
  1662. # include "dtoolbase.h"
  1663. extern EXPCL_DTOOL int panda_version_VERSION1_VERSION2_VERSION3;
  1664. # ifndef WIN32
  1665. /* For Windows, exporting the symbol from the DLL is sufficient; the
  1666. DLL will not load unless all expected public symbols are defined.
  1667. Other systems may not mind if the symbol is absent unless we
  1668. explictly write code that references it. */
  1669. static int check_panda_version = panda_version_VERSION1_VERSION2_VERSION3;
  1670. # endif
  1671. """
  1672. def CreatePandaVersionFiles():
  1673. version1=int(VERSION.split(".")[0])
  1674. version2=int(VERSION.split(".")[1])
  1675. version3=int(VERSION.split(".")[2])
  1676. nversion=version1*1000000+version2*1000+version3
  1677. pandaversion_h = PANDAVERSION_H.replace("VERSION1",str(version1))
  1678. pandaversion_h = pandaversion_h.replace("VERSION2",str(version2))
  1679. pandaversion_h = pandaversion_h.replace("VERSION3",str(version3))
  1680. pandaversion_h = pandaversion_h.replace("NVERSION",str(nversion))
  1681. checkpandaversion_cxx = CHECKPANDAVERSION_CXX.replace("VERSION1",str(version1))
  1682. checkpandaversion_cxx = checkpandaversion_cxx.replace("VERSION2",str(version2))
  1683. checkpandaversion_cxx = checkpandaversion_cxx.replace("VERSION3",str(version3))
  1684. checkpandaversion_cxx = checkpandaversion_cxx.replace("NVERSION",str(nversion))
  1685. checkpandaversion_h = CHECKPANDAVERSION_H.replace("VERSION1",str(version1))
  1686. checkpandaversion_h = checkpandaversion_h.replace("VERSION2",str(version2))
  1687. checkpandaversion_h = checkpandaversion_h.replace("VERSION3",str(version3))
  1688. checkpandaversion_h = checkpandaversion_h.replace("NVERSION",str(nversion))
  1689. ConditionalWriteFile('built/include/pandaVersion.h', pandaversion_h)
  1690. ConditionalWriteFile('built/include/checkPandaVersion.cxx', checkpandaversion_cxx)
  1691. ConditionalWriteFile('built/include/checkPandaVersion.h', checkpandaversion_h)
  1692. if (OMIT.count("PYTHON")==0):
  1693. ConditionalWriteFile("built/tmp/pythonversion", os.path.basename(PYTHONSDK))
  1694. ConditionalWriteFile("built/tmp/null.cxx","")
  1695. CreatePandaVersionFiles()
  1696. ##########################################################################################
  1697. #
  1698. # Generate direct/__init__.py
  1699. #
  1700. ##########################################################################################
  1701. DIRECTINIT="""
  1702. import os,sys
  1703. srcdir1 = os.path.join(__path__[0], 'src')
  1704. srcdir2 = os.path.join(__path__[0], '..', '..', 'direct', 'src')
  1705. if (os.path.isdir(srcdir1)): __path__[0] = srcdir1
  1706. elif (os.path.isdir(srcdir2)): __path__[0] = srcdir2
  1707. else: exit("Cannot find the 'direct' tree")
  1708. """
  1709. if (OMIT.count("PYTHON")==0):
  1710. ConditionalWriteFile('built/direct/__init__.py', DIRECTINIT)
  1711. ##########################################################################################
  1712. #
  1713. # Generate the PRC files into the ETC directory.
  1714. #
  1715. ##########################################################################################
  1716. confautoprc=ReadFile("makepanda/confauto.in")
  1717. if (os.path.isfile("makepanda/myconfig.in")):
  1718. configprc=ReadFile("makepanda/myconfig.in")
  1719. else:
  1720. configprc=ReadFile("makepanda/config.in")
  1721. if (sys.platform != "win32"):
  1722. confautoprc = confautoprc.replace("aux-display pandadx9","")
  1723. confautoprc = confautoprc.replace("aux-display pandadx8","")
  1724. confautoprc = confautoprc.replace("aux-display pandadx7","")
  1725. ConditionalWriteFile("built/etc/Config.prc", configprc)
  1726. ConditionalWriteFile("built/etc/Confauto.prc", confautoprc)
  1727. ##########################################################################################
  1728. #
  1729. # Copy the precompiled binaries and DLLs into the build.
  1730. #
  1731. ##########################################################################################
  1732. for pkg in (PACKAGES + ["extras"]):
  1733. if (OMIT.count(pkg)==0):
  1734. if (COMPILER == "MSVC"):
  1735. if (os.path.exists(THIRDPARTYLIBS+pkg.lower()+"/bin")):
  1736. CopyAllFiles("built/bin/",THIRDPARTYLIBS+pkg.lower()+"/bin/")
  1737. if (COMPILER == "LINUX"):
  1738. if (os.path.exists(THIRDPARTYLIBS+pkg.lower()+"/lib")):
  1739. CopyAllFiles("built/lib/",THIRDPARTYLIBS+pkg.lower()+"/lib/")
  1740. if (sys.platform == "win32"):
  1741. if (OMIT.count("PYTHON")==0):
  1742. CopyFile('built/bin/python24.dll', 'thirdparty/win-python/python24.dll')
  1743. CopyTree('built/python', 'thirdparty/win-python')
  1744. ConditionalWriteFile('built/python/panda.pth',"..\n../bin\n")
  1745. ########################################################################
  1746. ##
  1747. ## Copy various stuff into the build.
  1748. ##
  1749. ########################################################################
  1750. CopyFile("built/", "doc/LICENSE")
  1751. CopyFile("built/", "doc/ReleaseNotes")
  1752. CopyAllFiles("built/plugins/", "pandatool/src/scripts/", ".mel")
  1753. CopyAllFiles("built/plugins/", "pandatool/src/scripts/", ".ms")
  1754. if (OMIT.count("PYTHON")==0):
  1755. CopyTree('built/Pmw', 'thirdparty/Pmw')
  1756. ConditionalWriteFile('built/include/ctl3d.h', '/* dummy file to make MAX happy */')
  1757. ########################################################################
  1758. #
  1759. # Copy header files to the built/include/parser-inc directory.
  1760. #
  1761. ########################################################################
  1762. CopyAllFiles('built/include/parser-inc/','dtool/src/parser-inc/')
  1763. CopyAllFiles('built/include/parser-inc/openssl/','dtool/src/parser-inc/')
  1764. CopyAllFiles('built/include/parser-inc/netinet/','dtool/src/parser-inc/')
  1765. CopyFile('built/include/parser-inc/Cg/','dtool/src/parser-inc/cg.h')
  1766. CopyFile('built/include/parser-inc/Cg/','dtool/src/parser-inc/cgGL.h')
  1767. ########################################################################
  1768. #
  1769. # Transfer all header files to the built/include directory.
  1770. #
  1771. ########################################################################
  1772. CopyAllHeaders('dtool/src/dtoolbase')
  1773. CopyAllHeaders('dtool/src/dtoolutil', skip=["pandaVersion.h", "checkPandaVersion.h"])
  1774. CopyAllHeaders('dtool/metalibs/dtool')
  1775. CopyAllHeaders('dtool/src/cppparser')
  1776. CopyAllHeaders('dtool/src/prc')
  1777. CopyAllHeaders('dtool/src/dconfig')
  1778. CopyAllHeaders('dtool/src/interrogatedb')
  1779. CopyAllHeaders('dtool/metalibs/dtoolconfig')
  1780. CopyAllHeaders('dtool/src/pystub')
  1781. CopyAllHeaders('dtool/src/interrogate')
  1782. CopyAllHeaders('dtool/src/test_interrogate')
  1783. CopyAllHeaders('panda/src/putil')
  1784. CopyAllHeaders('panda/src/pandabase')
  1785. CopyAllHeaders('panda/src/express')
  1786. CopyAllHeaders('panda/src/downloader')
  1787. CopyAllHeaders('panda/metalibs/pandaexpress')
  1788. CopyAllHeaders('panda/src/pipeline')
  1789. CopyAllHeaders('panda/src/putil')
  1790. CopyAllHeaders('dtool/src/prckeys')
  1791. CopyAllHeaders('panda/src/audio')
  1792. CopyAllHeaders('panda/src/event')
  1793. CopyAllHeaders('panda/src/linmath')
  1794. CopyAllHeaders('panda/src/mathutil')
  1795. CopyAllHeaders('panda/src/gsgbase')
  1796. CopyAllHeaders('panda/src/pnmimage')
  1797. CopyAllHeaders('panda/src/nativenet')
  1798. CopyAllHeaders('panda/src/net')
  1799. CopyAllHeaders('panda/src/pstatclient')
  1800. CopyAllHeaders('panda/src/gobj')
  1801. CopyAllHeaders('panda/src/movies')
  1802. CopyAllHeaders('panda/src/lerp')
  1803. CopyAllHeaders('panda/src/pgraph')
  1804. CopyAllHeaders('panda/src/cull')
  1805. CopyAllHeaders('panda/src/effects')
  1806. CopyAllHeaders('panda/src/chan')
  1807. CopyAllHeaders('panda/src/char')
  1808. CopyAllHeaders('panda/src/dgraph')
  1809. CopyAllHeaders('panda/src/display')
  1810. CopyAllHeaders('panda/src/device')
  1811. CopyAllHeaders('panda/src/pnmtext')
  1812. CopyAllHeaders('panda/src/text')
  1813. CopyAllHeaders('panda/src/grutil')
  1814. CopyAllHeaders('panda/src/tform')
  1815. CopyAllHeaders('panda/src/collide')
  1816. CopyAllHeaders('panda/src/parametrics')
  1817. CopyAllHeaders('panda/src/pgui')
  1818. CopyAllHeaders('panda/src/pnmimagetypes')
  1819. CopyAllHeaders('panda/src/recorder')
  1820. CopyAllHeaders('panda/src/vrpn')
  1821. CopyAllHeaders('panda/src/glgsg')
  1822. CopyAllHeaders('panda/src/wgldisplay')
  1823. CopyAllHeaders('panda/src/physics')
  1824. CopyAllHeaders('panda/src/particlesystem')
  1825. CopyAllHeaders('panda/metalibs/panda')
  1826. CopyAllHeaders('panda/src/audiotraits')
  1827. CopyAllHeaders('panda/src/audiotraits')
  1828. CopyAllHeaders('panda/src/distort')
  1829. CopyAllHeaders('panda/src/downloadertools')
  1830. CopyAllHeaders('panda/src/windisplay')
  1831. # CopyAllHeaders('panda/src/dxgsg7')
  1832. # CopyAllHeaders('panda/metalibs/pandadx7')
  1833. CopyAllHeaders('panda/src/dxgsg8')
  1834. CopyAllHeaders('panda/metalibs/pandadx8')
  1835. CopyAllHeaders('panda/src/dxgsg9')
  1836. CopyAllHeaders('panda/metalibs/pandadx9')
  1837. CopyAllHeaders('panda/src/egg')
  1838. CopyAllHeaders('panda/src/egg2pg')
  1839. CopyAllHeaders('panda/src/framework')
  1840. CopyAllHeaders('panda/metalibs/pandafx')
  1841. CopyAllHeaders('panda/src/glstuff')
  1842. CopyAllHeaders('panda/src/glgsg')
  1843. CopyAllHeaders('panda/metalibs/pandaegg')
  1844. if (sys.platform != "win32"):
  1845. CopyAllHeaders('panda/src/glxdisplay')
  1846. else:
  1847. CopyAllHeaders('panda/src/wgldisplay')
  1848. CopyAllHeaders('panda/metalibs/pandagl')
  1849. CopyAllHeaders('panda/src/physics')
  1850. CopyAllHeaders('panda/src/particlesystem')
  1851. CopyAllHeaders('panda/metalibs/pandaphysics')
  1852. CopyAllHeaders('panda/src/testbed')
  1853. CopyAllHeaders('direct/src/directbase')
  1854. CopyAllHeaders('direct/src/dcparser')
  1855. CopyAllHeaders('direct/src/deadrec')
  1856. CopyAllHeaders('direct/src/distributed')
  1857. CopyAllHeaders('direct/src/interval')
  1858. CopyAllHeaders('direct/src/showbase')
  1859. CopyAllHeaders('direct/metalibs/direct')
  1860. CopyAllHeaders('direct/src/dcparse')
  1861. CopyAllHeaders('direct/src/heapq')
  1862. CopyAllHeaders('pandatool/src/pandatoolbase')
  1863. CopyAllHeaders('pandatool/src/converter')
  1864. CopyAllHeaders('pandatool/src/progbase')
  1865. CopyAllHeaders('pandatool/src/eggbase')
  1866. CopyAllHeaders('pandatool/src/bam')
  1867. CopyAllHeaders('pandatool/src/cvscopy')
  1868. CopyAllHeaders('pandatool/src/dxf')
  1869. CopyAllHeaders('pandatool/src/dxfegg')
  1870. CopyAllHeaders('pandatool/src/dxfprogs')
  1871. CopyAllHeaders('pandatool/src/palettizer')
  1872. CopyAllHeaders('pandatool/src/egg-mkfont')
  1873. CopyAllHeaders('pandatool/src/eggcharbase')
  1874. CopyAllHeaders('pandatool/src/egg-optchar')
  1875. CopyAllHeaders('pandatool/src/egg-palettize')
  1876. CopyAllHeaders('pandatool/src/egg-qtess')
  1877. CopyAllHeaders('pandatool/src/eggprogs')
  1878. CopyAllHeaders('pandatool/src/flt')
  1879. CopyAllHeaders('pandatool/src/fltegg')
  1880. CopyAllHeaders('pandatool/src/fltprogs')
  1881. CopyAllHeaders('pandatool/src/imagebase')
  1882. CopyAllHeaders('pandatool/src/imageprogs')
  1883. CopyAllHeaders('pandatool/src/lwo')
  1884. CopyAllHeaders('pandatool/src/lwoegg')
  1885. CopyAllHeaders('pandatool/src/lwoprogs')
  1886. CopyAllHeaders('pandatool/src/maya')
  1887. CopyAllHeaders('pandatool/src/mayaegg')
  1888. CopyAllHeaders('pandatool/src/maxegg')
  1889. CopyAllHeaders('pandatool/src/maxprogs')
  1890. CopyAllHeaders('pandatool/src/vrml')
  1891. CopyAllHeaders('pandatool/src/vrmlegg')
  1892. CopyAllHeaders('pandatool/src/xfile')
  1893. CopyAllHeaders('pandatool/src/xfileegg')
  1894. CopyAllHeaders('pandatool/src/ptloader')
  1895. CopyAllHeaders('pandatool/src/miscprogs')
  1896. CopyAllHeaders('pandatool/src/pstatserver')
  1897. CopyAllHeaders('pandatool/src/softprogs')
  1898. CopyAllHeaders('pandatool/src/text-stats')
  1899. CopyAllHeaders('pandatool/src/vrmlprogs')
  1900. CopyAllHeaders('pandatool/src/win-stats')
  1901. CopyAllHeaders('pandatool/src/xfileprogs')
  1902. ########################################################################
  1903. #
  1904. # This section contains a list of all the files that need to be compiled.
  1905. #
  1906. ########################################################################
  1907. print "Generating dependencies..."
  1908. sys.stdout.flush()
  1909. #
  1910. # DIRECTORY: dtool/src/dtoolbase/
  1911. #
  1912. IPATH=['dtool/src/dtoolbase']
  1913. OPTS=['BUILDING_DTOOL']
  1914. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dtoolbase_composite1.cxx', obj='dtoolbase_composite1.obj')
  1915. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dtoolbase_composite2.cxx', obj='dtoolbase_composite2.obj')
  1916. EnqueueCxx(ipath=IPATH, opts=OPTS, src='lookup3.c', obj='dtoolbase_lookup3.obj')
  1917. EnqueueCxx(ipath=IPATH, opts=OPTS, src='indent.cxx', obj='dtoolbase_indent.obj')
  1918. #
  1919. # DIRECTORY: dtool/src/dtoolutil/
  1920. #
  1921. IPATH=['dtool/src/dtoolutil']
  1922. OPTS=['BUILDING_DTOOL']
  1923. CopyFile('built/include/','dtool/src/dtoolutil/vector_src.cxx')
  1924. EnqueueCxx(ipath=IPATH, opts=OPTS, src='gnu_getopt.c', obj='dtoolutil_gnu_getopt.obj')
  1925. EnqueueCxx(ipath=IPATH, opts=OPTS, src='gnu_getopt1.c', obj='dtoolutil_gnu_getopt1.obj')
  1926. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dtoolutil_composite.cxx', obj='dtoolutil_composite.obj')
  1927. #
  1928. # DIRECTORY: dtool/metalibs/dtool/
  1929. #
  1930. IPATH=['dtool/metalibs/dtool']
  1931. OPTS=['BUILDING_DTOOL']
  1932. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dtool.cxx', obj='dtool_dtool.obj')
  1933. EnqueueLink(opts=['ADVAPI','WINSHELL'], dll='libp3dtool.dll', obj=[
  1934. 'dtool_dtool.obj',
  1935. 'dtoolutil_gnu_getopt.obj',
  1936. 'dtoolutil_gnu_getopt1.obj',
  1937. 'dtoolutil_composite.obj',
  1938. 'dtoolbase_composite1.obj',
  1939. 'dtoolbase_composite2.obj',
  1940. 'dtoolbase_indent.obj',
  1941. 'dtoolbase_lookup3.obj'
  1942. ])
  1943. #
  1944. # DIRECTORY: dtool/src/cppparser/
  1945. #
  1946. IPATH=['dtool/src/cppparser']
  1947. OPTS=[]
  1948. CreateStubHeader("built/include/cppBison.h")
  1949. EnqueueBison(ipath=IPATH, opts=OPTS, pre='cppyy', src='cppBison.yxx', dsth='cppBison.h', obj='cppParser_cppBison.obj')
  1950. EnqueueCxx(ipath=IPATH, opts=OPTS, src='cppParser_composite.cxx', obj='cppParser_composite.obj')
  1951. EnqueueLib(lib='libcppParser.ilb', obj=[
  1952. 'cppParser_composite.obj',
  1953. 'cppParser_cppBison.obj',
  1954. ])
  1955. #
  1956. # DIRECTORY: dtool/src/prc/
  1957. #
  1958. IPATH=['dtool/src/prc']
  1959. OPTS=['BUILDING_DTOOLCONFIG', 'OPENSSL']
  1960. EnqueueCxx(ipath=IPATH, opts=OPTS, src='prc_composite.cxx', obj='prc_composite.obj')
  1961. #
  1962. # DIRECTORY: dtool/src/dconfig/
  1963. #
  1964. IPATH=['dtool/src/dconfig']
  1965. OPTS=['BUILDING_DTOOLCONFIG']
  1966. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dconfig_composite.cxx', obj='dconfig_composite.obj')
  1967. #
  1968. # DIRECTORY: dtool/src/interrogatedb/
  1969. #
  1970. IPATH=['dtool/src/interrogatedb']
  1971. OPTS=['BUILDING_DTOOLCONFIG']
  1972. EnqueueCxx(ipath=IPATH, opts=OPTS, src='interrogatedb_composite.cxx', obj='interrogatedb_composite.obj')
  1973. #
  1974. # DIRECTORY: dtool/metalibs/dtoolconfig/
  1975. #
  1976. IPATH=['dtool/metalibs/dtoolconfig']
  1977. OPTS=['BUILDING_DTOOLCONFIG']
  1978. SRCFILE="pydtool.cxx"
  1979. if (OMIT.count("PYTHON")): SRCFILE="null.cxx"
  1980. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dtoolconfig.cxx', obj='dtoolconfig_dtoolconfig.obj')
  1981. EnqueueCxx(ipath=IPATH, opts=OPTS, src=SRCFILE, obj='dtoolconfig_pydtool.obj', xdep=["dtool_have_python.dat"])
  1982. EnqueueLink(opts=['ADVAPI', 'OPENSSL'], dll='libp3dtoolconfig.dll', obj=[
  1983. 'dtoolconfig_dtoolconfig.obj',
  1984. 'dtoolconfig_pydtool.obj',
  1985. 'interrogatedb_composite.obj',
  1986. 'dconfig_composite.obj',
  1987. 'prc_composite.obj',
  1988. 'libp3dtool.dll',
  1989. ])
  1990. #
  1991. # DIRECTORY: dtool/src/pystub/
  1992. #
  1993. IPATH=['dtool/src/pystub']
  1994. OPTS=['BUILDING_DTOOLCONFIG']
  1995. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pystub.cxx', obj='pystub_pystub.obj')
  1996. EnqueueLink(opts=['ADVAPI'], dll='libp3pystub.dll', obj=[
  1997. 'pystub_pystub.obj',
  1998. 'libp3dtool.dll',
  1999. ])
  2000. #
  2001. # DIRECTORY: dtool/src/interrogate/
  2002. #
  2003. IPATH=['dtool/src/interrogate', 'dtool/src/cppparser', 'dtool/src/interrogatedb']
  2004. OPTS=[]
  2005. EnqueueCxx(ipath=IPATH, opts=OPTS, src='interrogate_composite.cxx', obj='interrogate_composite.obj')
  2006. EnqueueLink(opts=['ADVAPI', 'OPENSSL'], dll='interrogate.exe', obj=[
  2007. 'interrogate_composite.obj',
  2008. 'libcppParser.ilb',
  2009. 'libp3pystub.dll',
  2010. 'libp3dtoolconfig.dll',
  2011. 'libp3dtool.dll',
  2012. ])
  2013. EnqueueCxx(ipath=IPATH, opts=OPTS, src='interrogate_module.cxx', obj='interrogate_module_interrogate_module.obj')
  2014. EnqueueLink(opts=['ADVAPI', 'OPENSSL'], dll='interrogate_module.exe', obj=[
  2015. 'interrogate_module_interrogate_module.obj',
  2016. 'libcppParser.ilb',
  2017. 'libp3pystub.dll',
  2018. 'libp3dtoolconfig.dll',
  2019. 'libp3dtool.dll',
  2020. ])
  2021. EnqueueCxx(ipath=IPATH, opts=OPTS, src='parse_file.cxx', obj='parse_file_parse_file.obj')
  2022. EnqueueLink(opts=['ADVAPI', 'OPENSSL'], dll='parse_file.exe', obj=[
  2023. 'parse_file_parse_file.obj',
  2024. 'libcppParser.ilb',
  2025. 'libp3pystub.dll',
  2026. 'libp3dtoolconfig.dll',
  2027. 'libp3dtool.dll',
  2028. ])
  2029. #
  2030. # DIRECTORY: dtool/src/prckeys/
  2031. #
  2032. if (OMIT.count("OPENSSL")==0):
  2033. IPATH=['dtool/src/prckeys']
  2034. OPTS=['OPENSSL']
  2035. EnqueueCxx(ipath=IPATH, opts=OPTS, src='makePrcKey.cxx', obj='make-prc-key_makePrcKey.obj')
  2036. EnqueueLink(opts=['ADVAPI', 'OPENSSL'], dll='make-prc-key.exe', obj=[
  2037. 'make-prc-key_makePrcKey.obj',
  2038. 'libp3pystub.dll',
  2039. 'libp3dtool.dll',
  2040. 'libp3dtoolconfig.dll',
  2041. ])
  2042. #
  2043. # DIRECTORY: dtool/src/test_interrogate/
  2044. #
  2045. IPATH=['dtool/src/test_interrogate']
  2046. OPTS=[]
  2047. EnqueueCxx(ipath=IPATH, opts=OPTS, src='test_interrogate.cxx', obj='test_interrogate_test_interrogate.obj')
  2048. EnqueueLink(opts=['ADVAPI', 'OPENSSL'], dll='test_interrogate.exe', obj=[
  2049. 'test_interrogate_test_interrogate.obj',
  2050. 'libp3pystub.dll',
  2051. 'libp3dtoolconfig.dll',
  2052. 'libp3dtool.dll',
  2053. ])
  2054. #
  2055. # DIRECTORY: panda/src/pandabase/
  2056. #
  2057. IPATH=['panda/src/pandabase']
  2058. OPTS=['BUILDING_PANDAEXPRESS']
  2059. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandabase.cxx', obj='pandabase_pandabase.obj')
  2060. #
  2061. # DIRECTORY: panda/src/express/
  2062. #
  2063. IPATH=['panda/src/express']
  2064. OPTS=['BUILDING_PANDAEXPRESS', 'OPENSSL', 'ZLIB']
  2065. EnqueueCxx(ipath=IPATH, opts=OPTS, src='express_composite1.cxx', obj='express_composite1.obj')
  2066. EnqueueCxx(ipath=IPATH, opts=OPTS, src='express_composite2.cxx', obj='express_composite2.obj')
  2067. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libexpress.in', obj='libexpress_igate.obj',
  2068. src='panda/src/express', module='pandaexpress', library='libexpress',
  2069. skip=[], also=["express_composite.cxx"])
  2070. #
  2071. # DIRECTORY: panda/src/downloader/
  2072. #
  2073. IPATH=['panda/src/downloader']
  2074. OPTS=['BUILDING_PANDAEXPRESS', 'OPENSSL', 'ZLIB']
  2075. EnqueueCxx(ipath=IPATH, opts=OPTS, src='downloader_composite.cxx', obj='downloader_composite.obj')
  2076. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libdownloader.in', obj='libdownloader_igate.obj',
  2077. src='panda/src/downloader', module='pandaexpress', library='libdownloader',
  2078. skip=[], also=["downloader_composite.cxx"])
  2079. #
  2080. # DIRECTORY: panda/metalibs/pandaexpress/
  2081. #
  2082. IPATH=['panda/metalibs/pandaexpress']
  2083. OPTS=['BUILDING_PANDAEXPRESS', 'ZLIB']
  2084. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandaexpress.cxx', obj='pandaexpress_pandaexpress.obj')
  2085. EnqueueImod(ipath=IPATH, opts=OPTS, obj='libpandaexpress_module.obj',
  2086. module='pandaexpress', library='libpandaexpress',
  2087. files=['libdownloader.in', 'libexpress.in'])
  2088. EnqueueLink(opts=['ADVAPI', 'WINSOCK2', 'OPENSSL', 'ZLIB'], dll='libpandaexpress.dll', obj=[
  2089. 'pandaexpress_pandaexpress.obj',
  2090. 'libpandaexpress_module.obj',
  2091. 'downloader_composite.obj',
  2092. 'libdownloader_igate.obj',
  2093. 'express_composite1.obj',
  2094. 'express_composite2.obj',
  2095. 'libexpress_igate.obj',
  2096. 'pandabase_pandabase.obj',
  2097. 'libp3dtoolconfig.dll',
  2098. 'libp3dtool.dll',
  2099. ])
  2100. #
  2101. # DIRECTORY: panda/src/pipeline/
  2102. #
  2103. IPATH=['panda/src/pipeline']
  2104. OPTS=['BUILDING_PANDA']
  2105. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pipeline_composite.cxx', obj='pipeline_composite.obj')
  2106. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libpipeline.in', obj='libpipeline_igate.obj',
  2107. src='panda/src/pipeline', module='panda', library='libpipeline',
  2108. skip=[], also=["pipeline_composite.cxx"])
  2109. #
  2110. # DIRECTORY: panda/src/putil/
  2111. #
  2112. IPATH=['panda/src/putil']
  2113. OPTS=['BUILDING_PANDA', 'ZLIB']
  2114. EnqueueCxx(ipath=IPATH, opts=OPTS, src='putil_composite1.cxx', obj='putil_composite1.obj')
  2115. EnqueueCxx(ipath=IPATH, opts=OPTS, src='putil_composite2.cxx', obj='putil_composite2.obj')
  2116. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libputil.in', obj='libputil_igate.obj',
  2117. src='panda/src/putil', module='panda', library='libputil',
  2118. skip=["test_bam.h"], also=["putil_composite.cxx"])
  2119. #
  2120. # DIRECTORY: panda/src/audio/
  2121. #
  2122. IPATH=['panda/src/audio']
  2123. OPTS=['BUILDING_PANDA']
  2124. EnqueueCxx(ipath=IPATH, opts=OPTS, src='audio_composite.cxx', obj='audio_composite.obj')
  2125. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libaudio.in', obj='libaudio_igate.obj',
  2126. src='panda/src/audio', module='panda', library='libaudio',
  2127. skip="ALL", also=["audio.h"])
  2128. #
  2129. # DIRECTORY: panda/src/event/
  2130. #
  2131. IPATH=['panda/src/event']
  2132. OPTS=['BUILDING_PANDA']
  2133. EnqueueCxx(ipath=IPATH, opts=OPTS, src='event_composite.cxx', obj='event_composite.obj')
  2134. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libevent.in', obj='libevent_igate.obj',
  2135. src='panda/src/event', module='panda', library='libevent',
  2136. skip=[], also=["event_composite.cxx"])
  2137. #
  2138. # DIRECTORY: panda/src/linmath/
  2139. #
  2140. IPATH=['panda/src/linmath']
  2141. OPTS=['BUILDING_PANDA']
  2142. EnqueueCxx(ipath=IPATH, opts=OPTS, src='linmath_composite.cxx', obj='linmath_composite.obj')
  2143. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='liblinmath.in', obj='liblinmath_igate.obj',
  2144. src='panda/src/linmath', module='panda', library='liblinmath',
  2145. skip=['lmat_ops_src.h', 'cast_to_double.h', 'lmat_ops.h', 'cast_to_float.h'],
  2146. also=["linmath_composite.cxx"])
  2147. #
  2148. # DIRECTORY: panda/src/mathutil/
  2149. #
  2150. IPATH=['panda/src/mathutil']
  2151. OPTS=['BUILDING_PANDA', 'FFTW']
  2152. EnqueueCxx(ipath=IPATH, opts=OPTS, src='mathutil_composite.cxx', obj='mathutil_composite.obj')
  2153. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libmathutil.in', obj='libmathutil_igate.obj',
  2154. src='panda/src/mathutil', module='panda', library='libmathutil',
  2155. skip=['mathHelpers.h'], also=["mathutil_composite.cxx"])
  2156. #
  2157. # DIRECTORY: panda/src/gsgbase/
  2158. #
  2159. IPATH=['panda/src/gsgbase']
  2160. OPTS=['BUILDING_PANDA']
  2161. EnqueueCxx(ipath=IPATH, opts=OPTS, src='gsgbase_composite.cxx', obj='gsgbase_composite.obj')
  2162. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libgsgbase.in', obj='libgsgbase_igate.obj',
  2163. src='panda/src/gsgbase', module='panda', library='libgsgbase',
  2164. skip=[], also=["gsgbase_composite.cxx"])
  2165. #
  2166. # DIRECTORY: panda/src/pnmimage/
  2167. #
  2168. IPATH=['panda/src/pnmimage']
  2169. OPTS=['BUILDING_PANDA', 'ZLIB']
  2170. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pnmimage_composite.cxx', obj='pnmimage_composite.obj')
  2171. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libpnmimage.in', obj='libpnmimage_igate.obj',
  2172. src='panda/src/pnmimage', module='panda', library='libpnmimage',
  2173. skip=[], also=["pnmimage_composite.cxx"])
  2174. #
  2175. # DIRECTORY: panda/src/nativenet/
  2176. #
  2177. IPATH=['panda/src/nativenet']
  2178. OPTS=['OPENSSL', 'BUILDING_PANDA']
  2179. EnqueueCxx(ipath=IPATH, opts=OPTS, src='nativenet_composite1.cxx', obj='nativenet_composite.obj')
  2180. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libnativenet.in', obj='libnativenet_igate.obj',
  2181. src='panda/src/nativenet', module='panda', library='libnativenet',
  2182. skip=[], also=["nativenet_composite1.cxx"])
  2183. #
  2184. # DIRECTORY: panda/src/net/
  2185. #
  2186. IPATH=['panda/src/net']
  2187. OPTS=['BUILDING_PANDA']
  2188. EnqueueCxx(ipath=IPATH, opts=OPTS, src='net_composite.cxx', obj='net_composite.obj')
  2189. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libnet.in', obj='libnet_igate.obj',
  2190. src='panda/src/net', module='panda', library='libnet',
  2191. skip=["datagram_ui.h"], also=["net_composite.cxx"])
  2192. #
  2193. # DIRECTORY: panda/src/pstatclient/
  2194. #
  2195. IPATH=['panda/src/pstatclient']
  2196. OPTS=['BUILDING_PANDA']
  2197. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pstatclient_composite.cxx', obj='pstatclient_composite.obj')
  2198. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libpstatclient.in', obj='libpstatclient_igate.obj',
  2199. src='panda/src/pstatclient', module='panda', library='libpstatclient',
  2200. skip=[], also=["pstatclient_composite.cxx"])
  2201. #
  2202. # DIRECTORY: panda/src/gobj/
  2203. #
  2204. IPATH=['panda/src/gobj']
  2205. OPTS=['BUILDING_PANDA', 'NVIDIACG', 'ZLIB']
  2206. EnqueueCxx(ipath=IPATH, opts=OPTS, src='gobj_composite1.cxx', obj='gobj_composite1.obj')
  2207. EnqueueCxx(ipath=IPATH, opts=OPTS, src='gobj_composite2.cxx', obj='gobj_composite2.obj')
  2208. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libgobj.in', obj='libgobj_igate.obj',
  2209. src='panda/src/gobj', module='panda', library='libgobj',
  2210. skip=[], also=["gobj_composite.cxx"])
  2211. #
  2212. # DIRECTORY: panda/src/lerp/
  2213. #
  2214. IPATH=['panda/src/lerp']
  2215. OPTS=['BUILDING_PANDA']
  2216. EnqueueCxx(ipath=IPATH, opts=OPTS, src='lerp_composite.cxx', obj='lerp_composite.obj')
  2217. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='liblerp.in', obj='liblerp_igate.obj',
  2218. src='panda/src/lerp', module='panda', library='liblerp',
  2219. skip=["lerp_headers.h","lerpchans.h"], also=["lerp_composite.cxx"])
  2220. #
  2221. # DIRECTORY: panda/src/pgraph/
  2222. #
  2223. IPATH=['panda/src/pgraph']
  2224. OPTS=['BUILDING_PANDA']
  2225. EnqueueCxx(ipath=IPATH, opts=OPTS, src='nodePath.cxx', obj='pgraph_nodePath.obj')
  2226. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pgraph_composite1.cxx', obj='pgraph_composite1.obj')
  2227. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pgraph_composite2.cxx', obj='pgraph_composite2.obj')
  2228. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pgraph_composite3.cxx', obj='pgraph_composite3.obj')
  2229. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pgraph_composite4.cxx', obj='pgraph_composite4.obj')
  2230. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libpgraph.in', obj='libpgraph_igate.obj',
  2231. src='panda/src/pgraph', module='panda', library='libpgraph',
  2232. skip=["antialiasAttrib.h"],
  2233. also=["nodePath.cxx", "pgraph_composite.cxx"])
  2234. #
  2235. # DIRECTORY: panda/src/cull/
  2236. #
  2237. IPATH=['panda/src/cull']
  2238. OPTS=['BUILDING_PANDA']
  2239. EnqueueCxx(ipath=IPATH, opts=OPTS, src='cull_composite.cxx', obj='cull_composite.obj')
  2240. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libcull.in', obj='libcull_igate.obj',
  2241. src='panda/src/cull', module='panda', library='libcull',
  2242. skip=[], also=["cull_composite.cxx"])
  2243. #
  2244. # DIRECTORY: panda/src/effects/
  2245. #
  2246. IPATH=['panda/src/effects']
  2247. OPTS=['BUILDING_PANDAFX', 'NVIDIACG']
  2248. EnqueueCxx(ipath=IPATH, opts=OPTS, src='effects_composite.cxx', obj='effects_composite.obj')
  2249. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libeffects.in', obj='libeffects_igate.obj',
  2250. src='panda/src/effects', module='pandafx', library='libeffects',
  2251. skip=["cgShader.h", "cgShaderAttrib.h", "cgShaderContext.h"],
  2252. also=["effects_composite.cxx"])
  2253. #
  2254. # DIRECTORY: panda/src/chan/
  2255. #
  2256. IPATH=['panda/src/chan']
  2257. OPTS=['BUILDING_PANDA']
  2258. EnqueueCxx(ipath=IPATH, opts=OPTS, src='chan_composite.cxx', obj='chan_composite.obj')
  2259. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libchan.in', obj='libchan_igate.obj',
  2260. src='panda/src/chan', module='panda', library='libchan',
  2261. skip=['movingPart.h', 'chan_headers.h', 'animChannelFixed.h'],
  2262. also=["chan_composite.cxx"])
  2263. #
  2264. # DIRECTORY: panda/src/char/
  2265. #
  2266. IPATH=['panda/src/char']
  2267. OPTS=['BUILDING_PANDA']
  2268. EnqueueCxx(ipath=IPATH, opts=OPTS, src='char_composite.cxx', obj='char_composite.obj')
  2269. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libchar.in', obj='libchar_igate.obj',
  2270. src='panda/src/char', module='panda', library='libchar',
  2271. skip=[], also=["char_composite.cxx"])
  2272. #
  2273. # DIRECTORY: panda/src/dgraph/
  2274. #
  2275. IPATH=['panda/src/dgraph']
  2276. OPTS=['BUILDING_PANDA']
  2277. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dgraph_composite.cxx', obj='dgraph_composite.obj')
  2278. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libdgraph.in', obj='libdgraph_igate.obj',
  2279. src='panda/src/dgraph', module='panda', library='libdgraph',
  2280. skip=[], also=["dgraph_composite.cxx"])
  2281. #
  2282. # DIRECTORY: panda/src/display/
  2283. #
  2284. IPATH=['panda/src/display']
  2285. OPTS=['BUILDING_PANDA']
  2286. EnqueueCxx(ipath=IPATH, opts=OPTS, src='display_composite.cxx', obj='display_composite.obj')
  2287. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libdisplay.in', obj='libdisplay_igate.obj',
  2288. src='panda/src/display', module='panda', library='libdisplay',
  2289. skip=['renderBuffer.h'], also=["display_composite.cxx"])
  2290. #
  2291. # DIRECTORY: panda/src/device/
  2292. #
  2293. IPATH=['panda/src/device']
  2294. OPTS=['BUILDING_PANDA']
  2295. EnqueueCxx(ipath=IPATH, opts=OPTS, src='device_composite.cxx', obj='device_composite.obj')
  2296. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libdevice.in', obj='libdevice_igate.obj',
  2297. src='panda/src/device', module='panda', library='libdevice',
  2298. skip=[], also=["device_composite.cxx"])
  2299. #
  2300. # DIRECTORY: panda/src/pnmtext/
  2301. #
  2302. if (OMIT.count("FREETYPE")==0):
  2303. IPATH=['panda/src/pnmtext']
  2304. OPTS=['BUILDING_PANDA', 'FREETYPE']
  2305. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pnmtext_composite.cxx', obj='pnmtext_composite.obj')
  2306. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libpnmtext.in', obj='libpnmtext_igate.obj',
  2307. src='panda/src/pnmtext', module='panda', library='libpnmtext',
  2308. skip=[], also=["pnmtext_composite.cxx"])
  2309. #
  2310. # DIRECTORY: panda/src/text/
  2311. #
  2312. IPATH=['panda/src/text']
  2313. OPTS=['BUILDING_PANDA', 'ZLIB', 'FREETYPE']
  2314. EnqueueCxx(ipath=IPATH, opts=OPTS, src='text_composite.cxx', obj='text_composite.obj')
  2315. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libtext.in', obj='libtext_igate.obj',
  2316. src='panda/src/text', module='panda', library='libtext',
  2317. skip=[], also=["text_composite.cxx"])
  2318. #
  2319. # DIRECTORY: panda/src/movies/
  2320. #
  2321. IPATH=['panda/src/movies']
  2322. OPTS=['BUILDING_PANDA', 'FFMPEG', 'DX9', 'DIRECTCAM']
  2323. EnqueueCxx(ipath=IPATH, opts=OPTS, src='movies_composite1.cxx', obj='movies_composite1.obj')
  2324. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libmovies.in', obj='libmovies_igate.obj',
  2325. src='panda/src/movies', module='panda', library='libmovies',
  2326. skip=[], also=["movies_composite.cxx"])
  2327. #
  2328. # DIRECTORY: panda/src/grutil/
  2329. #
  2330. IPATH=['panda/src/grutil']
  2331. OPTS=['BUILDING_PANDA', 'FFMPEG', 'ARTOOLKIT']
  2332. EnqueueCxx(ipath=IPATH, opts=OPTS, src='multitexReducer.cxx', obj='grutil_multitexReducer.obj')
  2333. EnqueueCxx(ipath=IPATH, opts=OPTS, src='grutil_composite1.cxx', obj='grutil_composite1.obj')
  2334. EnqueueCxx(ipath=IPATH, opts=OPTS, src='grutil_composite2.cxx', obj='grutil_composite2.obj')
  2335. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libgrutil.in', obj='libgrutil_igate.obj',
  2336. src='panda/src/grutil', module='panda', library='libgrutil',
  2337. skip=[], also=["multitexReducer.cxx","grutil_composite.cxx"])
  2338. #
  2339. # DIRECTORY: panda/src/tform/
  2340. #
  2341. IPATH=['panda/src/tform']
  2342. OPTS=['BUILDING_PANDA']
  2343. EnqueueCxx(ipath=IPATH, opts=OPTS, src='tform_composite.cxx', obj='tform_composite.obj')
  2344. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libtform.in', obj='libtform_igate.obj',
  2345. src='panda/src/tform', module='panda', library='libtform',
  2346. skip=[], also=["tform_composite.cxx"])
  2347. #
  2348. # DIRECTORY: panda/src/collide/
  2349. #
  2350. IPATH=['panda/src/collide']
  2351. OPTS=['BUILDING_PANDA']
  2352. EnqueueCxx(ipath=IPATH, opts=OPTS, src='collide_composite.cxx', obj='collide_composite.obj')
  2353. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libcollide.in', obj='libcollide_igate.obj',
  2354. src='panda/src/collide', module='panda', library='libcollide',
  2355. skip=["collide_headers.h"], also=["collide_composite.cxx"])
  2356. #
  2357. # DIRECTORY: panda/src/parametrics/
  2358. #
  2359. IPATH=['panda/src/parametrics']
  2360. OPTS=['BUILDING_PANDA']
  2361. EnqueueCxx(ipath=IPATH, opts=OPTS, src='parametrics_composite.cxx', obj='parametrics_composite.obj')
  2362. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libparametrics.in', obj='libparametrics_igate.obj',
  2363. src='panda/src/parametrics', module='panda', library='libparametrics',
  2364. skip=['nurbsPPCurve.h'], also=["parametrics_composite.cxx"])
  2365. #
  2366. # DIRECTORY: panda/src/pgui/
  2367. #
  2368. IPATH=['panda/src/pgui']
  2369. OPTS=['BUILDING_PANDA']
  2370. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pgui_composite.cxx', obj='pgui_composite.obj')
  2371. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libpgui.in', obj='libpgui_igate.obj',
  2372. src='panda/src/pgui', module='panda', library='libpgui',
  2373. skip=[], also=["pgui_composite.cxx"])
  2374. #
  2375. # DIRECTORY: panda/src/pnmimagetypes/
  2376. #
  2377. IPATH=['panda/src/pnmimagetypes', 'panda/src/pnmimage']
  2378. OPTS=['BUILDING_PANDA', 'PNG', 'ZLIB', 'JPEG', 'ZLIB', 'JPEG', 'TIFF']
  2379. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pnmimagetypes_composite.cxx', obj='pnmimagetypes_composite.obj')
  2380. #
  2381. # DIRECTORY: panda/src/recorder/
  2382. #
  2383. IPATH=['panda/src/recorder']
  2384. OPTS=['BUILDING_PANDA']
  2385. EnqueueCxx(ipath=IPATH, opts=OPTS, src='recorder_composite.cxx', obj='recorder_composite.obj')
  2386. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='librecorder.in', obj='librecorder_igate.obj',
  2387. src='panda/src/recorder', module='panda', library='librecorder',
  2388. skip=[], also=["recorder_composite.cxx"])
  2389. #
  2390. # DIRECTORY: panda/src/vrpn/
  2391. #
  2392. if (OMIT.count("VRPN")==0):
  2393. IPATH=['panda/src/vrpn']
  2394. OPTS=['BUILDING_PANDA', 'VRPN']
  2395. EnqueueCxx(ipath=IPATH, opts=OPTS, src='vrpn_composite.cxx', obj='pvrpn_composite.obj')
  2396. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libpvrpn.in', obj='libpvrpn_igate.obj',
  2397. src='panda/src/vrpn', module='panda', library='libpvrpn',
  2398. skip=[], also=["vrpn_composite.cxx"])
  2399. #
  2400. # DIRECTORY: panda/metalibs/panda/
  2401. #
  2402. IPATH=['panda/metalibs/panda']
  2403. OPTS=['BUILDING_PANDA', 'ZLIB', 'VRPN', 'JPEG', 'PNG', 'TIFF', 'ZLIB', 'NVIDIACG', 'OPENSSL', 'FREETYPE', 'FFTW', 'ADVAPI', 'WINSOCK2', 'WINUSER', 'WINMM', 'FFMPEG', 'DIRECTCAM', 'ARTOOLKIT']
  2404. INFILES=['librecorder.in', 'libpgraph.in', 'libcull.in', 'libgrutil.in', 'libchan.in', 'libpstatclient.in',
  2405. 'libchar.in', 'libcollide.in', 'libdevice.in', 'libdgraph.in', 'libdisplay.in', 'libpipeline.in', 'libevent.in',
  2406. 'libgobj.in', 'libgsgbase.in', 'liblinmath.in', 'libmathutil.in', 'libparametrics.in',
  2407. 'libpnmimage.in', 'libtext.in', 'libtform.in', 'liblerp.in', 'libputil.in', 'libaudio.in',
  2408. 'libnativenet.in', 'libnet.in', 'libpgui.in', 'libmovies.in']
  2409. OBJFILES=['panda_panda.obj', 'libpanda_module.obj',
  2410. 'recorder_composite.obj', 'librecorder_igate.obj',
  2411. 'pgraph_nodePath.obj',
  2412. 'pgraph_composite1.obj', 'pgraph_composite2.obj', 'pgraph_composite3.obj', 'pgraph_composite4.obj', 'libpgraph_igate.obj',
  2413. 'cull_composite.obj',
  2414. 'movies_composite1.obj', 'libmovies_igate.obj',
  2415. 'grutil_multitexReducer.obj', 'grutil_composite1.obj', 'grutil_composite2.obj', 'libgrutil_igate.obj',
  2416. 'chan_composite.obj', 'libchan_igate.obj',
  2417. 'pstatclient_composite.obj', 'libpstatclient_igate.obj',
  2418. 'char_composite.obj', 'libchar_igate.obj',
  2419. 'collide_composite.obj', 'libcollide_igate.obj',
  2420. 'device_composite.obj', 'libdevice_igate.obj',
  2421. 'dgraph_composite.obj', 'libdgraph_igate.obj',
  2422. 'display_composite.obj', 'libdisplay_igate.obj',
  2423. 'pipeline_composite.obj', 'libpipeline_igate.obj',
  2424. 'event_composite.obj', 'libevent_igate.obj',
  2425. 'gobj_composite1.obj', 'gobj_composite2.obj', 'libgobj_igate.obj',
  2426. 'gsgbase_composite.obj', 'libgsgbase_igate.obj',
  2427. 'linmath_composite.obj', 'liblinmath_igate.obj',
  2428. 'mathutil_composite.obj', 'libmathutil_igate.obj',
  2429. 'parametrics_composite.obj', 'libparametrics_igate.obj',
  2430. 'pnmimagetypes_composite.obj',
  2431. 'pnmimage_composite.obj', 'libpnmimage_igate.obj',
  2432. 'text_composite.obj', 'libtext_igate.obj',
  2433. 'tform_composite.obj', 'libtform_igate.obj',
  2434. 'lerp_composite.obj', 'liblerp_igate.obj',
  2435. 'putil_composite1.obj', 'putil_composite2.obj', 'libputil_igate.obj',
  2436. 'audio_composite.obj', 'libaudio_igate.obj',
  2437. 'pgui_composite.obj', 'libpgui_igate.obj',
  2438. 'net_composite.obj', 'libnet_igate.obj',
  2439. 'nativenet_composite.obj', 'libnativenet_igate.obj',
  2440. 'pandabase_pandabase.obj', 'libpandaexpress.dll', 'libp3dtoolconfig.dll', 'libp3dtool.dll']
  2441. if OMIT.count("VRPN")==0:
  2442. OBJFILES.append("pvrpn_composite.obj")
  2443. OBJFILES.append("libpvrpn_igate.obj")
  2444. INFILES.append("libpvrpn.in")
  2445. if OMIT.count("FREETYPE")==0:
  2446. OBJFILES.append("pnmtext_composite.obj")
  2447. OBJFILES.append("libpnmtext_igate.obj")
  2448. EnqueueImod(ipath=IPATH, opts=OPTS, obj='libpanda_module.obj',
  2449. module='panda', library='libpanda', files=INFILES)
  2450. EnqueueCxx(ipath=IPATH, opts=OPTS, src='panda.cxx', obj='panda_panda.obj')
  2451. EnqueueLink(opts=OPTS, dll='libpanda.dll', obj=OBJFILES, xdep=[
  2452. 'dtool_have_vrpn.dat',
  2453. 'dtool_have_nspr.dat',
  2454. 'dtool_have_freetype.dat',
  2455. ])
  2456. #
  2457. # DIRECTORY: panda/src/skel
  2458. #
  2459. IPATH=['panda/src/skel']
  2460. OPTS=['BUILDING_PANDASKEL', 'ADVAPI']
  2461. EnqueueCxx(ipath=IPATH, opts=OPTS, src='skel_composite.cxx', obj='skel_composite.obj')
  2462. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libskel.in', obj='libskel_igate.obj',
  2463. src='panda/src/skel', module='pandaskel', library='libskel',
  2464. skip=[], also=["skel_composite.cxx"])
  2465. #
  2466. # DIRECTORY: panda/src/skel
  2467. #
  2468. OPTS=['BUILDING_PANDASKEL', 'ADVAPI']
  2469. EnqueueImod(ipath=IPATH, opts=OPTS, obj='libpandaskel_module.obj',
  2470. module='pandaskel', library='libpandaskel', files=["libskel.in","libmovies.in"])
  2471. EnqueueLink(dll='libpandaskel.dll', opts=OPTS, obj=[
  2472. 'skel_composite.obj',
  2473. 'libskel_igate.obj',
  2474. 'libpandaskel_module.obj',
  2475. 'libpanda.dll',
  2476. 'libpandaexpress.dll',
  2477. 'libp3dtoolconfig.dll',
  2478. 'libp3dtool.dll',
  2479. ])
  2480. #
  2481. # DIRECTORY: panda/src/audiotraits/
  2482. #
  2483. if OMIT.count("FMODEX") == 0:
  2484. IPATH=['panda/src/audiotraits']
  2485. OPTS=['BUILDING_FMOD_AUDIO', 'FMODEX']
  2486. EnqueueCxx(ipath=IPATH, opts=OPTS, src='fmod_audio_composite.cxx', obj='fmod_audio_fmod_audio_composite.obj')
  2487. EnqueueLink(opts=['ADVAPI', 'WINUSER', 'WINMM', 'FMODEX'], dll='libp3fmod_audio.dll', obj=[
  2488. 'fmod_audio_fmod_audio_composite.obj',
  2489. 'libpanda.dll',
  2490. 'libpandaexpress.dll',
  2491. 'libp3dtoolconfig.dll',
  2492. 'libp3dtool.dll',
  2493. ])
  2494. if OMIT.count("OPENAL") == 0:
  2495. IPATH=['panda/src/audiotraits']
  2496. OPTS=['BUILDING_OPENAL_AUDIO', 'OPENAL']
  2497. EnqueueCxx(ipath=IPATH, opts=OPTS, src='openal_audio_composite.cxx', obj='openal_audio_openal_audio_composite.obj')
  2498. EnqueueLink(opts=['ADVAPI', 'WINUSER', 'WINMM', 'OPENAL'], dll='libp3openal_audio.dll', obj=[
  2499. 'openal_audio_openal_audio_composite.obj',
  2500. 'libpanda.dll',
  2501. 'libpandaexpress.dll',
  2502. 'libp3dtoolconfig.dll',
  2503. 'libp3dtool.dll',
  2504. ])
  2505. if OMIT.count("MILES") == 0:
  2506. IPATH=['panda/src/audiotraits']
  2507. OPTS=['BUILDING_MILES_AUDIO', 'MILES']
  2508. EnqueueCxx(ipath=IPATH, opts=OPTS, src='miles_audio_composite.cxx', obj='miles_audio_miles_audio_composite.obj')
  2509. EnqueueLink(opts=['ADVAPI', 'WINUSER', 'WINMM', 'MILES'], dll='libp3miles_audio.dll', obj=[
  2510. 'miles_audio_miles_audio_composite.obj',
  2511. 'libpanda.dll',
  2512. 'libpandaexpress.dll',
  2513. 'libp3dtoolconfig.dll',
  2514. 'libp3dtool.dll',
  2515. ])
  2516. #
  2517. # DIRECTORY: panda/src/distort/
  2518. #
  2519. IPATH=['panda/src/distort']
  2520. OPTS=['BUILDING_PANDAFX']
  2521. EnqueueCxx(ipath=IPATH, opts=OPTS, src='distort_composite.cxx', obj='distort_composite.obj')
  2522. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libdistort.in', obj='libdistort_igate.obj',
  2523. src='panda/src/distort', module='pandafx', library='libdistort',
  2524. skip=[], also=["distort_composite.cxx"])
  2525. #
  2526. # DIRECTORY: panda/src/downloadertools/
  2527. #
  2528. if OMIT.count("OPENSSL")==0:
  2529. IPATH=['panda/src/downloadertools']
  2530. OPTS=['OPENSSL', 'ZLIB', 'ADVAPI']
  2531. LIBS=['libpandaexpress.dll', 'libpanda.dll', 'libp3dtoolconfig.dll', 'libp3dtool.dll', 'libp3pystub.dll']
  2532. EnqueueCxx(ipath=IPATH, opts=OPTS, src='apply_patch.cxx', obj='apply_patch_apply_patch.obj')
  2533. EnqueueLink(dll='apply_patch.exe', opts=OPTS, obj=['apply_patch_apply_patch.obj']+LIBS)
  2534. EnqueueCxx(ipath=IPATH, opts=OPTS, src='build_patch.cxx', obj='build_patch_build_patch.obj')
  2535. EnqueueLink(dll='build_patch.exe', opts=OPTS, obj=['build_patch_build_patch.obj']+LIBS)
  2536. EnqueueCxx(ipath=IPATH, opts=OPTS, src='check_adler.cxx', obj='check_adler_check_adler.obj')
  2537. EnqueueLink(dll='check_adler.exe', opts=OPTS, obj=['check_adler_check_adler.obj']+LIBS)
  2538. EnqueueCxx(ipath=IPATH, opts=OPTS, src='check_crc.cxx', obj='check_crc_check_crc.obj')
  2539. EnqueueLink(dll='check_crc.exe', opts=OPTS, obj=['check_crc_check_crc.obj']+LIBS)
  2540. EnqueueCxx(ipath=IPATH, opts=OPTS, src='check_md5.cxx', obj='check_md5_check_md5.obj')
  2541. EnqueueLink(dll='check_md5.exe', opts=OPTS, obj=['check_md5_check_md5.obj']+LIBS)
  2542. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pdecrypt.cxx', obj='pdecrypt_pdecrypt.obj')
  2543. EnqueueLink(dll='pdecrypt.exe', opts=OPTS, obj=['pdecrypt_pdecrypt.obj']+LIBS)
  2544. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pencrypt.cxx', obj='pencrypt_pencrypt.obj')
  2545. EnqueueLink(dll='pencrypt.exe', opts=OPTS, obj=['pencrypt_pencrypt.obj']+LIBS)
  2546. EnqueueCxx(ipath=IPATH, opts=OPTS, src='show_ddb.cxx', obj='show_ddb_show_ddb.obj')
  2547. EnqueueLink(dll='show_ddb.exe', opts=OPTS, obj=['show_ddb_show_ddb.obj']+LIBS)
  2548. #
  2549. # DIRECTORY: panda/src/downloadertools/
  2550. #
  2551. IPATH=['panda/src/downloadertools']
  2552. OPTS=['ZLIB', 'ADVAPI']
  2553. LIBS=['libpandaexpress.dll', 'libpanda.dll', 'libp3dtoolconfig.dll', 'libp3dtool.dll', 'libp3pystub.dll']
  2554. EnqueueCxx(ipath=IPATH, opts=OPTS, src='multify.cxx', obj='multify_multify.obj')
  2555. EnqueueLink(dll='multify.exe', opts=OPTS, obj=['multify_multify.obj']+LIBS)
  2556. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pzip.cxx', obj='pzip_pzip.obj')
  2557. EnqueueLink(dll='pzip.exe', opts=OPTS, obj=['pzip_pzip.obj']+LIBS)
  2558. EnqueueCxx(ipath=IPATH, opts=OPTS, src='punzip.cxx', obj='punzip_punzip.obj')
  2559. EnqueueLink(dll='punzip.exe', opts=OPTS, obj=['punzip_punzip.obj']+LIBS)
  2560. #
  2561. # DIRECTORY: panda/src/windisplay/
  2562. #
  2563. if (sys.platform == "win32"):
  2564. IPATH=['panda/src/windisplay']
  2565. OPTS=['BUILDING_PANDAWIN']
  2566. EnqueueCxx(ipath=IPATH, opts=OPTS, src='windisplay_composite.cxx', obj='windisplay_composite.obj')
  2567. EnqueueCxx(ipath=IPATH, opts=OPTS + ["DX8"], src='winDetectDx8.cxx', obj='windisplay_windetectdx8.obj')
  2568. EnqueueCxx(ipath=IPATH, opts=OPTS + ["DX9"], src='winDetectDx9.cxx', obj='windisplay_windetectdx9.obj')
  2569. EnqueueLink(opts=['WINIMM', 'WINGDI', 'WINKERNEL', 'WINOLDNAMES', 'WINUSER', 'WINMM'],
  2570. dll='libp3windisplay.dll', obj=[
  2571. 'windisplay_composite.obj',
  2572. 'windisplay_windetectdx8.obj',
  2573. 'windisplay_windetectdx9.obj',
  2574. 'libpanda.dll',
  2575. 'libpandaexpress.dll',
  2576. 'libp3dtoolconfig.dll',
  2577. 'libp3dtool.dll',
  2578. ])
  2579. #
  2580. # DIRECTORY: panda/metalibs/pandadx8/
  2581. #
  2582. if OMIT.count("DX8")==0:
  2583. IPATH=['panda/src/dxgsg8', 'panda/metalibs/pandadx8']
  2584. OPTS=['BUILDING_PANDADX', 'DX8']
  2585. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxGraphicsStateGuardian8.cxx', obj='dxgsg8_dxGraphicsStateGuardian8.obj')
  2586. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxgsg8_composite.cxx', obj='dxgsg8_composite.obj')
  2587. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandadx8.cxx', obj='pandadx8_pandadx8.obj')
  2588. EnqueueLink(dll='libpandadx8.dll',
  2589. opts=['ADVAPI', 'WINGDI', 'WINKERNEL', 'WINUSER', 'WINMM', 'DX8'], obj=[
  2590. 'pandadx8_pandadx8.obj',
  2591. 'dxgsg8_dxGraphicsStateGuardian8.obj',
  2592. 'dxgsg8_composite.obj',
  2593. 'libpanda.dll',
  2594. 'libpandaexpress.dll',
  2595. 'libp3windisplay.dll',
  2596. 'libp3dtoolconfig.dll',
  2597. 'libp3dtool.dll',
  2598. ])
  2599. #
  2600. # DIRECTORY: panda/metalibs/pandadx9/
  2601. #
  2602. if OMIT.count("DX9")==0:
  2603. IPATH=['panda/src/dxgsg9']
  2604. OPTS=['BUILDING_PANDADX', 'DX9', 'NVIDIACG', 'CGDX9']
  2605. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxGraphicsStateGuardian9.cxx', obj='dxgsg9_dxGraphicsStateGuardian9.obj')
  2606. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxgsg9_composite.cxx', obj='dxgsg9_composite.obj')
  2607. IPATH=['panda/metalibs/pandadx9']
  2608. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandadx9.cxx', obj='pandadx9_pandadx9.obj')
  2609. EnqueueLink(dll='libpandadx9.dll',
  2610. opts=['ADVAPI', 'WINGDI', 'WINKERNEL', 'WINUSER', 'WINMM', 'DX9', 'NVIDIACG', 'CGDX9'], obj=[
  2611. 'pandadx9_pandadx9.obj',
  2612. 'dxgsg9_dxGraphicsStateGuardian9.obj',
  2613. 'dxgsg9_composite.obj',
  2614. 'libpanda.dll',
  2615. 'libpandaexpress.dll',
  2616. 'libp3windisplay.dll',
  2617. 'libp3dtoolconfig.dll',
  2618. 'libp3dtool.dll',
  2619. ])
  2620. #
  2621. # DIRECTORY: panda/src/egg/
  2622. #
  2623. IPATH=['panda/src/egg']
  2624. OPTS=['BUILDING_PANDAEGG', 'ZLIB']
  2625. CreateStubHeader("built/include/parser.h")
  2626. EnqueueBison(ipath=IPATH, opts=OPTS, pre='eggyy', src='parser.yxx', dsth='parser.h', obj='egg_parser.obj')
  2627. EnqueueFlex(ipath=IPATH, opts=OPTS, pre='eggyy', src='lexer.lxx', obj='egg_lexer.obj', dashi=1)
  2628. EnqueueCxx(ipath=IPATH, opts=OPTS, src='egg_composite1.cxx', obj='egg_composite1.obj')
  2629. EnqueueCxx(ipath=IPATH, opts=OPTS, src='egg_composite2.cxx', obj='egg_composite2.obj')
  2630. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libegg.in', obj='libegg_igate.obj',
  2631. src='panda/src/egg', module='pandaegg', library='libegg',
  2632. skip=["parser.h"], also=["egg_composite.cxx"])
  2633. #
  2634. # DIRECTORY: panda/src/egg2pg/
  2635. #
  2636. IPATH=['panda/src/egg2pg']
  2637. OPTS=['BUILDING_PANDAEGG']
  2638. EnqueueCxx(ipath=IPATH, opts=OPTS, src='egg2pg_composite.cxx', obj='egg2pg_composite.obj')
  2639. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libegg2pg.in', obj='libegg2pg_igate.obj',
  2640. src='panda/src/egg2pg', module='pandaegg', library='libegg2pg',
  2641. skip="ALL", also=['load_egg_file.h'])
  2642. #
  2643. # DIRECTORY: panda/src/framework/
  2644. #
  2645. IPATH=['panda/src/framework']
  2646. OPTS=['BUILDING_FRAMEWORK']
  2647. EnqueueCxx(ipath=IPATH, opts=OPTS, src='framework_composite.cxx', obj='framework_composite.obj')
  2648. EnqueueLink(dll='libp3framework.dll', opts=['ADVAPI'], obj=[
  2649. 'framework_composite.obj',
  2650. 'libpanda.dll',
  2651. 'libpandaexpress.dll',
  2652. 'libp3dtoolconfig.dll',
  2653. 'libp3dtool.dll',
  2654. ])
  2655. #
  2656. # DIRECTORY: panda/metalibs/pandafx/
  2657. #
  2658. IPATH=['panda/metalibs/pandafx', 'panda/src/distort']
  2659. OPTS=['BUILDING_PANDAFX', 'NVIDIACG']
  2660. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandafx.cxx', obj='pandafx_pandafx.obj')
  2661. EnqueueImod(ipath=IPATH, opts=OPTS, obj='libpandafx_module.obj',
  2662. module='pandafx', library='libpandafx',
  2663. files=['libdistort.in', 'libeffects.in'])
  2664. EnqueueLink(dll='libpandafx.dll', opts=['ADVAPI', 'NVIDIACG'], obj=[
  2665. 'pandafx_pandafx.obj',
  2666. 'libpandafx_module.obj',
  2667. 'distort_composite.obj',
  2668. 'libdistort_igate.obj',
  2669. 'effects_composite.obj',
  2670. 'libeffects_igate.obj',
  2671. 'libpanda.dll',
  2672. 'libpandaexpress.dll',
  2673. 'libp3dtoolconfig.dll',
  2674. 'libp3dtool.dll',
  2675. ])
  2676. #
  2677. # DIRECTORY: panda/src/glstuff/
  2678. #
  2679. IPATH=['panda/src/glstuff']
  2680. OPTS=[ 'NVIDIACG', 'CGGL']
  2681. EnqueueCxx(ipath=IPATH, opts=OPTS, src='glpure.cxx', obj='glstuff_glpure.obj')
  2682. EnqueueLink(dll='libp3glstuff.dll', opts=['ADVAPI', 'GLUT', 'NVIDIACG', 'CGGL'], obj=[
  2683. 'glstuff_glpure.obj',
  2684. 'libpanda.dll',
  2685. 'libpandafx.dll',
  2686. 'libpandaexpress.dll',
  2687. 'libp3dtoolconfig.dll',
  2688. 'libp3dtool.dll',
  2689. ])
  2690. #
  2691. # DIRECTORY: panda/src/glgsg/
  2692. #
  2693. IPATH=['panda/src/glgsg', 'panda/src/glstuff', 'panda/src/gobj']
  2694. OPTS=['BUILDING_PANDAGL', 'NVIDIACG']
  2695. EnqueueCxx(ipath=IPATH, opts=OPTS, src='config_glgsg.cxx', obj='glgsg_config_glgsg.obj')
  2696. EnqueueCxx(ipath=IPATH, opts=OPTS, src='glgsg.cxx', obj='glgsg_glgsg.obj')
  2697. #
  2698. # DIRECTORY: panda/metalibs/pandaegg/
  2699. #
  2700. IPATH=['panda/metalibs/pandaegg', 'panda/src/egg']
  2701. OPTS=['BUILDING_PANDAEGG']
  2702. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandaegg.cxx', obj='pandaegg_pandaegg.obj')
  2703. EnqueueImod(ipath=IPATH, opts=OPTS, obj='libpandaegg_module.obj',
  2704. module='pandaegg', library='libpandaegg',
  2705. files=['libegg2pg.in', 'libegg.in'])
  2706. EnqueueLink(dll='libpandaegg.dll', opts=['ADVAPI'], obj=[
  2707. 'pandaegg_pandaegg.obj',
  2708. 'libpandaegg_module.obj',
  2709. 'egg2pg_composite.obj',
  2710. 'libegg2pg_igate.obj',
  2711. 'egg_composite1.obj',
  2712. 'egg_composite2.obj',
  2713. 'egg_parser.obj',
  2714. 'egg_lexer.obj',
  2715. 'libegg_igate.obj',
  2716. 'libpanda.dll',
  2717. 'libpandaexpress.dll',
  2718. 'libp3dtoolconfig.dll',
  2719. 'libp3dtool.dll',
  2720. ])
  2721. #
  2722. # DIRECTORY: panda/metalibs/panda/
  2723. #
  2724. IPATH=['panda/metalibs/panda']
  2725. OPTS=['BUILDING_PANDA', 'FFTW', 'PNG', 'JPEG', 'TIFF', 'ZLIB', 'OPENSSL', 'ADVAPI', 'WINSOCK2', 'WINUSER', 'WINMM']
  2726. OBJFILES=[
  2727. 'pipeline_composite.obj',
  2728. 'event_composite.obj',
  2729. 'net_composite.obj',
  2730. 'nativenet_composite.obj',
  2731. 'pstatclient_composite.obj',
  2732. 'linmath_composite.obj',
  2733. 'mathutil_composite.obj',
  2734. 'putil_composite1.obj', 'putil_composite2.obj',
  2735. 'pnmimagetypes_composite.obj',
  2736. 'pnmimage_composite.obj',
  2737. 'pandabase_pandabase.obj', 'libpandaexpress.dll', 'libp3dtoolconfig.dll', 'libp3dtool.dll']
  2738. EnqueueLink(opts=OPTS, dll='libpandastripped.dll', obj=OBJFILES, xdep=[
  2739. 'dtool_have_vrpn.dat',
  2740. 'dtool_have_freetype.dat',
  2741. ])
  2742. #
  2743. # DIRECTORY: panda/metalibs/pandaegg/
  2744. #
  2745. IPATH=['panda/metalibs/pandaegg', 'panda/src/egg']
  2746. OPTS=['BUILDING_PANDAEGG']
  2747. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandaeggnopg.cxx', obj='pandaegg_pandaeggnopg.obj')
  2748. EnqueueLink(dll='libpandaeggstripped.dll', opts=['ADVAPI'], obj=[
  2749. 'pandaegg_pandaeggnopg.obj',
  2750. # 'egg2pg_composite.obj',
  2751. 'egg_composite1.obj',
  2752. 'egg_composite2.obj',
  2753. 'egg_parser.obj',
  2754. 'egg_lexer.obj',
  2755. 'libpandastripped.dll',
  2756. 'libpandaexpress.dll',
  2757. 'libp3dtoolconfig.dll',
  2758. 'libp3dtool.dll',
  2759. ])
  2760. #
  2761. # DIRECTORY: panda/src/mesadisplay/
  2762. #
  2763. if (sys.platform != "win32"):
  2764. IPATH=['panda/src/mesadisplay', 'panda/src/glstuff']
  2765. OPTS=['BUILDING_PANDAGLUT', 'NVIDIACG', 'GLUT']
  2766. EnqueueCxx(ipath=IPATH, opts=OPTS, src='mesadisplay_composite.cxx', obj='mesadisplay_composite.obj')
  2767. IPATH=['panda/metalibs/pandagl']
  2768. EnqueueLink(opts=['GLUT'], dll='libpandamesa.dll', obj=[
  2769. 'mesadisplay_composite.obj',
  2770. 'libpanda.dll',
  2771. 'libpandaexpress.dll',
  2772. 'libp3glstuff.dll',
  2773. 'libpandafx.dll',
  2774. 'libp3dtoolconfig.dll',
  2775. 'libp3dtool.dll',
  2776. ])
  2777. #
  2778. # DIRECTORY: panda/src/glxdisplay/
  2779. #
  2780. if (sys.platform != "win32"):
  2781. IPATH=['panda/src/glxdisplay']
  2782. OPTS=['BUILDING_PANDAGLUT', 'GLUT', 'NVIDIACG', 'CGGL']
  2783. EnqueueCxx(ipath=IPATH, opts=OPTS, src='glxdisplay_composite.cxx', obj='glxdisplay_composite.obj')
  2784. IPATH=['panda/metalibs/pandagl']
  2785. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandagl.cxx', obj='pandagl_pandagl.obj')
  2786. EnqueueLink(opts=['GLUT', 'NVIDIACG', 'CGGL'], dll='libpandagl.dll', obj=[
  2787. 'pandagl_pandagl.obj',
  2788. 'glgsg_config_glgsg.obj',
  2789. 'glgsg_glgsg.obj',
  2790. 'glxdisplay_composite.obj',
  2791. 'libpanda.dll',
  2792. 'libpandaexpress.dll',
  2793. 'libp3glstuff.dll',
  2794. 'libpandafx.dll',
  2795. 'libp3dtoolconfig.dll',
  2796. 'libp3dtool.dll',
  2797. ])
  2798. #
  2799. # DIRECTORY: panda/src/wgldisplay/
  2800. #
  2801. if (sys.platform == "win32"):
  2802. IPATH=['panda/src/wgldisplay', 'panda/src/glstuff']
  2803. OPTS=['BUILDING_PANDAGL', 'NVIDIACG', 'CGGL']
  2804. EnqueueCxx(ipath=IPATH, opts=OPTS, src='wgldisplay_composite.cxx', obj='wgldisplay_composite.obj')
  2805. IPATH=['panda/metalibs/pandagl']
  2806. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandagl.cxx', obj='pandagl_pandagl.obj')
  2807. EnqueueLink(opts=['WINGDI', 'GLUT', 'WINKERNEL', 'WINOLDNAMES', 'WINUSER', 'WINMM', 'NVIDIACG', 'CGGL'],
  2808. dll='libpandagl.dll', obj=[
  2809. 'pandagl_pandagl.obj',
  2810. 'glgsg_config_glgsg.obj',
  2811. 'glgsg_glgsg.obj',
  2812. 'wgldisplay_composite.obj',
  2813. 'libp3windisplay.dll',
  2814. 'libpanda.dll',
  2815. 'libpandaexpress.dll',
  2816. 'libp3glstuff.dll',
  2817. 'libpandafx.dll',
  2818. 'libp3dtoolconfig.dll',
  2819. 'libp3dtool.dll',
  2820. ])
  2821. #
  2822. # DIRECTORY: panda/src/physics/
  2823. #
  2824. IPATH=['panda/src/physics']
  2825. OPTS=['BUILDING_PANDAPHYSICS']
  2826. EnqueueCxx(ipath=IPATH, opts=OPTS, src='physics_composite.cxx', obj='physics_composite.obj')
  2827. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libphysics.in', obj='libphysics_igate.obj',
  2828. src='panda/src/physics', module='pandaphysics', library='libphysics',
  2829. skip=["forces.h"], also=["physics_composite.cxx"])
  2830. #
  2831. # DIRECTORY: panda/src/particlesystem/
  2832. #
  2833. IPATH=['panda/src/particlesystem']
  2834. OPTS=['BUILDING_PANDAPHYSICS']
  2835. EnqueueCxx(ipath=IPATH, opts=OPTS, src='particlesystem_composite.cxx', obj='particlesystem_composite.obj')
  2836. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libparticlesystem.in', obj='libparticlesystem_igate.obj',
  2837. src='panda/src/particlesystem', module='pandaphysics', library='libparticlesystem',
  2838. skip=['orientedParticle.h', 'orientedParticleFactory.h', 'particlefactories.h', 'emitters.h', 'particles.h'],
  2839. also=["particlesystem_composite.cxx"])
  2840. #
  2841. # DIRECTORY: panda/metalibs/pandaphysics/
  2842. #
  2843. IPATH=['panda/metalibs/pandaphysics']
  2844. OPTS=['BUILDING_PANDAPHYSICS']
  2845. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandaphysics.cxx', obj='pandaphysics_pandaphysics.obj')
  2846. EnqueueImod(ipath=IPATH, opts=OPTS, obj='libpandaphysics_module.obj',
  2847. module='pandaphysics', library='libpandaphysics',
  2848. files=['libphysics.in', 'libparticlesystem.in'])
  2849. EnqueueLink(dll='libpandaphysics.dll', opts=['ADVAPI'], obj=[
  2850. 'pandaphysics_pandaphysics.obj',
  2851. 'libpandaphysics_module.obj',
  2852. 'physics_composite.obj',
  2853. 'libphysics_igate.obj',
  2854. 'particlesystem_composite.obj',
  2855. 'libparticlesystem_igate.obj',
  2856. 'libpanda.dll',
  2857. 'libpandaexpress.dll',
  2858. 'libp3dtoolconfig.dll',
  2859. 'libp3dtool.dll',
  2860. ])
  2861. #
  2862. # DIRECTORY: panda/src/testbed/
  2863. #
  2864. IPATH=['panda/src/testbed']
  2865. OPTS=[]
  2866. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pview.cxx', obj='pview_pview.obj')
  2867. EnqueueLink(dll='pview.exe', opts=['ADVAPI'], obj=[
  2868. 'pview_pview.obj',
  2869. 'libp3framework.dll',
  2870. 'libpanda.dll',
  2871. 'libpandafx.dll',
  2872. 'libpandaexpress.dll',
  2873. 'libp3dtoolconfig.dll',
  2874. 'libp3dtool.dll',
  2875. 'libp3pystub.dll',
  2876. ])
  2877. #
  2878. # DIRECTORY: direct/src/directbase/
  2879. #
  2880. if (OMIT.count("PYTHON")==0):
  2881. IPATH=['direct/src/directbase']
  2882. OPTS=['BUILDING_DIRECT']
  2883. EnqueueCxx(ipath=IPATH, opts=OPTS, src='directbase.cxx', obj='directbase_directbase.obj')
  2884. EnqueueCxx(ipath=IPATH, opts=['BUILDING_GENPYCODE'], src='ppython.cxx', obj='genpycode.obj')
  2885. EnqueueLink(opts=['WINUSER'], dll='genpycode.exe', obj=['genpycode.obj'])
  2886. EnqueueCxx(ipath=IPATH, opts=['BUILDING_PACKPANDA'], src='ppython.cxx', obj='packpanda.obj')
  2887. EnqueueLink(opts=['WINUSER'], dll='packpanda.exe', obj=['packpanda.obj'])
  2888. EnqueueCxx(ipath=IPATH, opts=['BUILDING_EGGCACHER'], src='ppython.cxx', obj='eggcacher.obj')
  2889. EnqueueLink(opts=['WINUSER'], dll='eggcacher.exe', obj=['eggcacher.obj'])
  2890. #
  2891. # DIRECTORY: direct/src/dcparser/
  2892. #
  2893. if (OMIT.count("PYTHON")==0):
  2894. IPATH=['direct/src/dcparser']
  2895. OPTS=['WITHINPANDA', 'BUILDING_DIRECT']
  2896. CreateStubHeader("built/include/dcParser.h")
  2897. EnqueueBison(ipath=IPATH, opts=OPTS, pre='dcyy', src='dcParser.yxx', dsth='dcParser.h', obj='dcparser_dcParser.obj')
  2898. EnqueueFlex(ipath=IPATH, opts=OPTS, pre='dcyy', src='dcLexer.lxx', obj='dcparser_dcLexer.obj', dashi=0)
  2899. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dcparser_composite.cxx', obj='dcparser_composite.obj')
  2900. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libdcparser.in', obj='libdcparser_igate.obj',
  2901. src='direct/src/dcparser', module='p3direct', library='libdcparser',
  2902. skip=['dcmsgtypes.h'],
  2903. also=["dcparser_composite.cxx"])
  2904. #
  2905. # DIRECTORY: direct/src/deadrec/
  2906. #
  2907. if (OMIT.count("PYTHON")==0):
  2908. IPATH=['direct/src/deadrec']
  2909. OPTS=['BUILDING_DIRECT']
  2910. EnqueueCxx(ipath=IPATH, opts=OPTS, src='deadrec_composite.cxx', obj='deadrec_composite.obj')
  2911. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libdeadrec.in', obj='libdeadrec_igate.obj',
  2912. src='direct/src/deadrec', module='p3direct', library='libdeadrec',
  2913. skip=[], also=["deadrec_composite.cxx"])
  2914. #
  2915. # DIRECTORY: direct/src/distributed/
  2916. #
  2917. if (OMIT.count("PYTHON")==0):
  2918. IPATH=['direct/src/distributed', 'direct/src/dcparser']
  2919. OPTS=['WITHINPANDA', 'BUILDING_DIRECT', 'OPENSSL']
  2920. EnqueueCxx(ipath=IPATH, opts=OPTS, src='config_distributed.cxx', obj='distributed_config_distributed.obj')
  2921. EnqueueCxx(ipath=IPATH, opts=OPTS, src='cConnectionRepository.cxx', obj='distributed_cConnectionRepository.obj')
  2922. EnqueueCxx(ipath=IPATH, opts=OPTS, src='cDistributedSmoothNodeBase.cxx', obj='distributed_cDistributedSmoothNodeBase.obj')
  2923. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libdistributed.in', obj='libdistributed_igate.obj',
  2924. src='direct/src/distributed', module='p3direct', library='libdistributed',
  2925. skip=[], also=['config_distributed.cxx', 'cConnectionRepository.cxx', 'cDistributedSmoothNodeBase.cxx'])
  2926. #
  2927. # DIRECTORY: direct/src/interval/
  2928. #
  2929. if (OMIT.count("PYTHON")==0):
  2930. IPATH=['direct/src/interval']
  2931. OPTS=['BUILDING_DIRECT']
  2932. EnqueueCxx(ipath=IPATH, opts=OPTS, src='interval_composite.cxx', obj='interval_composite.obj')
  2933. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libinterval.in', obj='libinterval_igate.obj',
  2934. src='direct/src/interval', module='p3direct', library='libinterval',
  2935. skip=[], also=["interval_composite.cxx"])
  2936. #
  2937. # DIRECTORY: direct/src/showbase/
  2938. #
  2939. if (OMIT.count("PYTHON")==0):
  2940. IPATH=['direct/src/showbase']
  2941. OPTS=['BUILDING_DIRECT']
  2942. EnqueueCxx(ipath=IPATH, opts=OPTS, src='showBase.cxx', obj='showbase_showBase.obj')
  2943. EnqueueIgate(ipath=IPATH, opts=OPTS, outd='libshowbase.in', obj='libshowbase_igate.obj',
  2944. src='direct/src/showbase', module='p3direct', library='libshowbase',
  2945. skip=[], also=["showBase.cxx"])
  2946. #
  2947. # DIRECTORY: direct/metalibs/direct/
  2948. #
  2949. if (OMIT.count("PYTHON")==0):
  2950. IPATH=['direct/metalibs/direct']
  2951. OPTS=['BUILDING_DIRECT']
  2952. EnqueueCxx(ipath=IPATH, opts=OPTS, src='direct.cxx', obj='direct_direct.obj')
  2953. EnqueueImod(ipath=IPATH, opts=OPTS, obj='libp3direct_module.obj',
  2954. module='p3direct', library='libp3direct',
  2955. files=['libdcparser.in', 'libshowbase.in', 'libdeadrec.in', 'libinterval.in', 'libdistributed.in'])
  2956. EnqueueLink(dll='libp3direct.dll', opts=['ADVAPI', 'OPENSSL'], obj=[
  2957. 'direct_direct.obj',
  2958. 'libp3direct_module.obj',
  2959. 'directbase_directbase.obj',
  2960. 'dcparser_composite.obj',
  2961. 'dcparser_dcParser.obj',
  2962. 'dcparser_dcLexer.obj',
  2963. 'libdcparser_igate.obj',
  2964. 'showbase_showBase.obj',
  2965. 'libshowbase_igate.obj',
  2966. 'deadrec_composite.obj',
  2967. 'libdeadrec_igate.obj',
  2968. 'interval_composite.obj',
  2969. 'libinterval_igate.obj',
  2970. 'distributed_config_distributed.obj',
  2971. 'distributed_cConnectionRepository.obj',
  2972. 'distributed_cDistributedSmoothNodeBase.obj',
  2973. 'libdistributed_igate.obj',
  2974. 'libpanda.dll',
  2975. 'libpandaexpress.dll',
  2976. 'libp3dtoolconfig.dll',
  2977. 'libp3dtool.dll',
  2978. ])
  2979. #
  2980. # DIRECTORY: direct/src/dcparse/
  2981. #
  2982. if (OMIT.count("PYTHON")==0):
  2983. IPATH=['direct/src/dcparse', 'direct/src/dcparser']
  2984. OPTS=['WITHINPANDA', 'ADVAPI']
  2985. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dcparse.cxx', obj='dcparse_dcparse.obj')
  2986. EnqueueLink(dll='p3dcparse.exe', opts=OPTS, obj=[
  2987. 'dcparse_dcparse.obj',
  2988. 'libp3direct.dll',
  2989. 'libpandaexpress.dll',
  2990. 'libp3dtoolconfig.dll',
  2991. 'libp3dtool.dll',
  2992. 'libp3pystub.dll',
  2993. ])
  2994. #
  2995. # DIRECTORY: direct/src/heapq/
  2996. #
  2997. if (OMIT.count("PYTHON")==0):
  2998. IPATH=['direct/src/heapq']
  2999. OPTS=[]
  3000. EnqueueCxx(ipath=IPATH, opts=OPTS, src='heapq.cxx', obj='heapq_heapq.obj')
  3001. EnqueueLink(dll='libp3heapq.dll', opts=['ADVAPI'], obj=[
  3002. 'heapq_heapq.obj',
  3003. 'libpandaexpress.dll',
  3004. 'libp3dtoolconfig.dll',
  3005. 'libp3dtool.dll',
  3006. ])
  3007. #
  3008. # DIRECTORY: pandatool/src/pandatoolbase/
  3009. #
  3010. if (OMIT.count("PANDATOOL")==0):
  3011. IPATH=['pandatool/src/pandatoolbase']
  3012. OPTS=[]
  3013. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandatoolbase_composite1.cxx', obj='pandatoolbase_composite1.obj')
  3014. EnqueueLib(lib='libpandatoolbase.lib', obj=['pandatoolbase_composite1.obj'])
  3015. #
  3016. # DIRECTORY: pandatool/src/converter/
  3017. #
  3018. if (OMIT.count("PANDATOOL")==0):
  3019. IPATH=['pandatool/src/converter']
  3020. OPTS=[]
  3021. EnqueueCxx(ipath=IPATH, opts=OPTS, src='somethingToEggConverter.cxx', obj='converter_somethingToEggConverter.obj')
  3022. EnqueueLib(lib='libconverter.lib', obj=['converter_somethingToEggConverter.obj'])
  3023. #
  3024. # DIRECTORY: pandatool/src/progbase/
  3025. #
  3026. if (OMIT.count("PANDATOOL")==0):
  3027. IPATH=['pandatool/src/progbase']
  3028. OPTS=[ 'ZLIB']
  3029. EnqueueCxx(ipath=IPATH, opts=OPTS, src='progbase_composite1.cxx', obj='progbase_composite1.obj')
  3030. EnqueueLib(lib='libprogbase.lib', obj=['progbase_composite1.obj'])
  3031. #
  3032. # DIRECTORY: pandatool/src/eggbase/
  3033. #
  3034. if (OMIT.count("PANDATOOL")==0):
  3035. IPATH=['pandatool/src/eggbase']
  3036. OPTS=[]
  3037. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggbase_composite1.cxx', obj='eggbase_composite1.obj')
  3038. EnqueueLib(lib='libeggbase.lib', obj=['eggbase_composite1.obj'])
  3039. #
  3040. # DIRECTORY: pandatool/src/bam/
  3041. #
  3042. if (OMIT.count("PANDATOOL")==0):
  3043. IPATH=['pandatool/src/bam']
  3044. OPTS=[]
  3045. EnqueueCxx(ipath=IPATH, opts=OPTS, src='bamInfo.cxx', obj='bam-info_bamInfo.obj')
  3046. EnqueueLink(dll='bam-info.exe', opts=['ADVAPI', 'FFTW'], obj=[
  3047. 'bam-info_bamInfo.obj',
  3048. 'libprogbase.lib',
  3049. 'libpandatoolbase.lib',
  3050. 'libpandaegg.dll',
  3051. 'libpanda.dll',
  3052. 'libpandaexpress.dll',
  3053. 'libp3dtoolconfig.dll',
  3054. 'libp3dtool.dll',
  3055. 'libp3pystub.dll',
  3056. ])
  3057. EnqueueCxx(ipath=IPATH, opts=OPTS, src='bamToEgg.cxx', obj='bam2egg_bamToEgg.obj')
  3058. EnqueueLink(dll='bam2egg.exe', opts=['ADVAPI', 'FFTW'], obj=[
  3059. 'bam2egg_bamToEgg.obj',
  3060. 'libconverter.lib',
  3061. 'libeggbase.lib',
  3062. 'libprogbase.lib',
  3063. 'libpandatoolbase.lib',
  3064. 'libpandaegg.dll',
  3065. 'libpanda.dll',
  3066. 'libpandaexpress.dll',
  3067. 'libp3dtoolconfig.dll',
  3068. 'libp3dtool.dll',
  3069. 'libp3pystub.dll',
  3070. ])
  3071. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggToBam.cxx', obj='egg2bam_eggToBam.obj')
  3072. EnqueueLink(dll='egg2bam.exe', opts=['ADVAPI', 'FFTW'], obj=[
  3073. 'egg2bam_eggToBam.obj',
  3074. 'libeggbase.lib',
  3075. 'libprogbase.lib',
  3076. 'libconverter.lib',
  3077. 'libpandatoolbase.lib',
  3078. 'libpandaegg.dll',
  3079. 'libpanda.dll',
  3080. 'libpandaexpress.dll',
  3081. 'libp3dtoolconfig.dll',
  3082. 'libp3dtool.dll',
  3083. 'libp3pystub.dll',
  3084. ])
  3085. #
  3086. # DIRECTORY: pandatool/src/cvscopy/
  3087. #
  3088. if (OMIT.count("PANDATOOL")==0):
  3089. IPATH=['pandatool/src/cvscopy']
  3090. OPTS=[]
  3091. EnqueueCxx(ipath=IPATH, opts=OPTS, src='cvscopy_composite1.cxx', obj='cvscopy_composite1.obj')
  3092. EnqueueLib(lib='libcvscopy.lib', obj=['cvscopy_composite1.obj'])
  3093. #
  3094. # DIRECTORY: pandatool/src/dxf/
  3095. #
  3096. if (OMIT.count("PANDATOOL")==0):
  3097. IPATH=['pandatool/src/dxf']
  3098. OPTS=[]
  3099. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxf_composite1.cxx', obj='dxf_composite1.obj')
  3100. EnqueueLib(lib='libdxf.lib', obj=['dxf_composite1.obj'])
  3101. #
  3102. # DIRECTORY: pandatool/src/dxfegg/
  3103. #
  3104. if (OMIT.count("PANDATOOL")==0):
  3105. IPATH=['pandatool/src/dxfegg']
  3106. OPTS=[]
  3107. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxfToEggConverter.cxx', obj='dxfegg_dxfToEggConverter.obj')
  3108. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxfToEggLayer.cxx', obj='dxfegg_dxfToEggLayer.obj')
  3109. EnqueueLib(lib='libdxfegg.lib', obj=[
  3110. 'dxfegg_dxfToEggConverter.obj',
  3111. 'dxfegg_dxfToEggLayer.obj',
  3112. ])
  3113. #
  3114. # DIRECTORY: pandatool/src/dxfprogs/
  3115. #
  3116. if (OMIT.count("PANDATOOL")==0):
  3117. IPATH=['pandatool/src/dxfprogs']
  3118. OPTS=[]
  3119. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxfPoints.cxx', obj='dxf-points_dxfPoints.obj')
  3120. EnqueueLink(dll='dxf-points.exe', opts=['ADVAPI', 'FFTW'], obj=[
  3121. 'dxf-points_dxfPoints.obj',
  3122. 'libprogbase.lib',
  3123. 'libdxf.lib',
  3124. 'libpandatoolbase.lib',
  3125. 'libpanda.dll',
  3126. 'libpandaexpress.dll',
  3127. 'libp3dtoolconfig.dll',
  3128. 'libp3dtool.dll',
  3129. 'libp3pystub.dll',
  3130. ])
  3131. EnqueueCxx(ipath=IPATH, opts=OPTS, src='dxfToEgg.cxx', obj='dxf2egg_dxfToEgg.obj')
  3132. EnqueueLink(dll='dxf2egg.exe', opts=['ADVAPI', 'FFTW'], obj=[
  3133. 'dxf2egg_dxfToEgg.obj',
  3134. 'libdxfegg.lib',
  3135. 'libdxf.lib',
  3136. 'libeggbase.lib',
  3137. 'libprogbase.lib',
  3138. 'libpandatoolbase.lib',
  3139. 'libconverter.lib',
  3140. 'libpandaegg.dll',
  3141. 'libpanda.dll',
  3142. 'libpandaexpress.dll',
  3143. 'libp3dtoolconfig.dll',
  3144. 'libp3dtool.dll',
  3145. 'libp3pystub.dll',
  3146. ])
  3147. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggToDXF.cxx', obj='egg2dxf_eggToDXF.obj')
  3148. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggToDXFLayer.cxx', obj='egg2dxf_eggToDXFLayer.obj')
  3149. EnqueueLink(dll='egg2dxf.exe', opts=['ADVAPI', 'FFTW'], obj=[
  3150. 'egg2dxf_eggToDXF.obj',
  3151. 'egg2dxf_eggToDXFLayer.obj',
  3152. 'libdxf.lib',
  3153. 'libeggbase.lib',
  3154. 'libprogbase.lib',
  3155. 'libpandatoolbase.lib',
  3156. 'libconverter.lib',
  3157. 'libpandaegg.dll',
  3158. 'libpanda.dll',
  3159. 'libpandaexpress.dll',
  3160. 'libp3dtoolconfig.dll',
  3161. 'libp3dtool.dll',
  3162. 'libp3pystub.dll',
  3163. ])
  3164. #
  3165. # DIRECTORY: pandatool/src/palettizer/
  3166. #
  3167. if (OMIT.count("PANDATOOL")==0):
  3168. IPATH=['pandatool/src/palettizer']
  3169. OPTS=[]
  3170. EnqueueCxx(ipath=IPATH, opts=OPTS, src='palettizer_composite1.cxx', obj='palettizer_composite1.obj')
  3171. EnqueueLib(lib='libpalettizer.lib', obj=['palettizer_composite1.obj'])
  3172. #
  3173. # DIRECTORY: pandatool/src/egg-mkfont/
  3174. #
  3175. if (OMIT.count("FREETYPE")==0) and (OMIT.count("PANDATOOL")==0):
  3176. IPATH=['pandatool/src/egg-mkfont', 'pandatool/src/palettizer']
  3177. OPTS=[ 'FREETYPE']
  3178. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggMakeFont.cxx', obj='egg-mkfont_eggMakeFont.obj')
  3179. EnqueueCxx(ipath=IPATH, opts=OPTS, src='rangeDescription.cxx', obj='egg-mkfont_rangeDescription.obj')
  3180. EnqueueCxx(ipath=IPATH, opts=OPTS, src='rangeIterator.cxx', obj='egg-mkfont_rangeIterator.obj')
  3181. EnqueueLink(dll='egg-mkfont.exe', opts=['ADVAPI', 'FREETYPE'], obj=[
  3182. 'egg-mkfont_eggMakeFont.obj',
  3183. 'egg-mkfont_rangeDescription.obj',
  3184. 'egg-mkfont_rangeIterator.obj',
  3185. 'libpalettizer.lib',
  3186. 'libeggbase.lib',
  3187. 'libprogbase.lib',
  3188. 'libpandatoolbase.lib',
  3189. 'libconverter.lib',
  3190. 'libpandaegg.dll',
  3191. 'libpanda.dll',
  3192. 'libpandaexpress.dll',
  3193. 'libp3dtoolconfig.dll',
  3194. 'libp3dtool.dll',
  3195. 'libp3pystub.dll',
  3196. ])
  3197. #
  3198. # DIRECTORY: pandatool/src/eggcharbase/
  3199. #
  3200. if (OMIT.count("PANDATOOL")==0):
  3201. IPATH=['pandatool/src/eggcharbase']
  3202. OPTS=['ZLIB']
  3203. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggcharbase_composite1.cxx', obj='eggcharbase_composite1.obj')
  3204. EnqueueLib(lib='libeggcharbase.lib', obj=['eggcharbase_composite1.obj'])
  3205. #
  3206. # DIRECTORY: pandatool/src/egg-optchar/
  3207. #
  3208. if (OMIT.count("PANDATOOL")==0):
  3209. IPATH=['pandatool/src/egg-optchar']
  3210. OPTS=[]
  3211. EnqueueCxx(ipath=IPATH, opts=OPTS, src='config_egg_optchar.cxx', obj='egg-optchar_config_egg_optchar.obj')
  3212. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggOptchar.cxx', obj='egg-optchar_eggOptchar.obj')
  3213. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggOptcharUserData.cxx', obj='egg-optchar_eggOptcharUserData.obj')
  3214. EnqueueCxx(ipath=IPATH, opts=OPTS, src='vertexMembership.cxx', obj='egg-optchar_vertexMembership.obj')
  3215. EnqueueLink(dll='egg-optchar.exe', opts=['ADVAPI'], obj=[
  3216. 'egg-optchar_config_egg_optchar.obj',
  3217. 'egg-optchar_eggOptchar.obj',
  3218. 'egg-optchar_eggOptcharUserData.obj',
  3219. 'egg-optchar_vertexMembership.obj',
  3220. 'libeggcharbase.lib',
  3221. 'libconverter.lib',
  3222. 'libeggbase.lib',
  3223. 'libprogbase.lib',
  3224. 'libpandatoolbase.lib',
  3225. 'libpandaegg.dll',
  3226. 'libpanda.dll',
  3227. 'libpandaexpress.dll',
  3228. 'libp3dtoolconfig.dll',
  3229. 'libp3dtool.dll',
  3230. 'libp3pystub.dll',
  3231. ])
  3232. #
  3233. # DIRECTORY: pandatool/src/egg-palettize/
  3234. #
  3235. if (OMIT.count("PANDATOOL")==0):
  3236. IPATH=['pandatool/src/egg-palettize', 'pandatool/src/palettizer']
  3237. OPTS=[]
  3238. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggPalettize.cxx', obj='egg-palettize_eggPalettize.obj')
  3239. EnqueueLink(dll='egg-palettize.exe', opts=['ADVAPI'], obj=[
  3240. 'egg-palettize_eggPalettize.obj',
  3241. 'libpalettizer.lib',
  3242. 'libeggbase.lib',
  3243. 'libprogbase.lib',
  3244. 'libpandatoolbase.lib',
  3245. 'libconverter.lib',
  3246. 'libpandaegg.dll',
  3247. 'libpanda.dll',
  3248. 'libpandaexpress.dll',
  3249. 'libp3dtoolconfig.dll',
  3250. 'libp3dtool.dll',
  3251. 'libp3pystub.dll',
  3252. ])
  3253. #
  3254. # DIRECTORY: pandatool/src/egg-qtess/
  3255. #
  3256. if (OMIT.count("PANDATOOL")==0):
  3257. IPATH=['pandatool/src/egg-qtess']
  3258. OPTS=[]
  3259. EnqueueCxx(ipath=IPATH, opts=OPTS, src='egg-qtess_composite1.cxx', obj='egg-qtess_composite1.obj')
  3260. EnqueueLink(dll='egg-qtess.exe', opts=['ADVAPI'], obj=[
  3261. 'egg-qtess_composite1.obj',
  3262. 'libeggbase.lib',
  3263. 'libprogbase.lib',
  3264. 'libconverter.lib',
  3265. 'libpandatoolbase.lib',
  3266. 'libpandaegg.dll',
  3267. 'libpanda.dll',
  3268. 'libpandaexpress.dll',
  3269. 'libp3dtoolconfig.dll',
  3270. 'libp3dtool.dll',
  3271. 'libp3pystub.dll',
  3272. ])
  3273. #
  3274. # DIRECTORY: pandatool/src/eggprogs/
  3275. #
  3276. if (OMIT.count("PANDATOOL")==0):
  3277. IPATH=['pandatool/src/eggprogs']
  3278. OPTS=[]
  3279. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggCrop.cxx', obj='egg-crop_eggCrop.obj')
  3280. EnqueueLink(dll='egg-crop.exe', opts=['ADVAPI'], obj=[
  3281. 'egg-crop_eggCrop.obj',
  3282. 'libconverter.lib',
  3283. 'libeggbase.lib',
  3284. 'libprogbase.lib',
  3285. 'libpandatoolbase.lib',
  3286. 'libpandaegg.dll',
  3287. 'libpanda.dll',
  3288. 'libpandaexpress.dll',
  3289. 'libp3dtoolconfig.dll',
  3290. 'libp3dtool.dll',
  3291. 'libp3pystub.dll',
  3292. ])
  3293. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggMakeTube.cxx', obj='egg-make-tube_eggMakeTube.obj')
  3294. EnqueueLink(dll='egg-make-tube.exe', opts=['ADVAPI'], obj=[
  3295. 'egg-make-tube_eggMakeTube.obj',
  3296. 'libconverter.lib',
  3297. 'libeggbase.lib',
  3298. 'libprogbase.lib',
  3299. 'libpandatoolbase.lib',
  3300. 'libpandaegg.dll',
  3301. 'libpanda.dll',
  3302. 'libpandaexpress.dll',
  3303. 'libp3dtoolconfig.dll',
  3304. 'libp3dtool.dll',
  3305. 'libp3pystub.dll',
  3306. ])
  3307. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggTextureCards.cxx', obj='egg-texture-cards_eggTextureCards.obj')
  3308. EnqueueLink(dll='egg-texture-cards.exe', opts=['ADVAPI'], obj=[
  3309. 'egg-texture-cards_eggTextureCards.obj',
  3310. 'libconverter.lib',
  3311. 'libeggbase.lib',
  3312. 'libprogbase.lib',
  3313. 'libpandatoolbase.lib',
  3314. 'libpandaegg.dll',
  3315. 'libpanda.dll',
  3316. 'libpandaexpress.dll',
  3317. 'libp3dtoolconfig.dll',
  3318. 'libp3dtool.dll',
  3319. 'libp3pystub.dll',
  3320. ])
  3321. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggTopstrip.cxx', obj='egg-topstrip_eggTopstrip.obj')
  3322. EnqueueLink(dll='egg-topstrip.exe', opts=['ADVAPI'], obj=[
  3323. 'egg-topstrip_eggTopstrip.obj',
  3324. 'libeggcharbase.lib',
  3325. 'libconverter.lib',
  3326. 'libeggbase.lib',
  3327. 'libprogbase.lib',
  3328. 'libpandatoolbase.lib',
  3329. 'libpandaegg.dll',
  3330. 'libpanda.dll',
  3331. 'libpandaexpress.dll',
  3332. 'libp3dtoolconfig.dll',
  3333. 'libp3dtool.dll',
  3334. 'libp3pystub.dll',
  3335. ])
  3336. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggTrans.cxx', obj='egg-trans_eggTrans.obj')
  3337. EnqueueLink(dll='egg-trans.exe', opts=['ADVAPI'], obj=[
  3338. 'egg-trans_eggTrans.obj',
  3339. 'libconverter.lib',
  3340. 'libeggbase.lib',
  3341. 'libprogbase.lib',
  3342. 'libpandatoolbase.lib',
  3343. 'libpandaegg.dll',
  3344. 'libpanda.dll',
  3345. 'libpandaexpress.dll',
  3346. 'libp3dtoolconfig.dll',
  3347. 'libp3dtool.dll',
  3348. 'libp3pystub.dll',
  3349. ])
  3350. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggToC.cxx', obj='egg2c_eggToC.obj')
  3351. EnqueueLink(dll='egg2c.exe', opts=['ADVAPI'], obj=[
  3352. 'egg2c_eggToC.obj',
  3353. 'libconverter.lib',
  3354. 'libeggbase.lib',
  3355. 'libprogbase.lib',
  3356. 'libpandatoolbase.lib',
  3357. 'libpandaegg.dll',
  3358. 'libpanda.dll',
  3359. 'libpandaexpress.dll',
  3360. 'libp3dtoolconfig.dll',
  3361. 'libp3dtool.dll',
  3362. 'libp3pystub.dll',
  3363. ])
  3364. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggRename.cxx', obj='egg-rename_eggRename.obj')
  3365. EnqueueLink(dll='egg-rename.exe', opts=['ADVAPI'], obj=[
  3366. 'egg-rename_eggRename.obj',
  3367. 'libconverter.lib',
  3368. 'libeggbase.lib',
  3369. 'libprogbase.lib',
  3370. 'libpandatoolbase.lib',
  3371. 'libpandaegg.dll',
  3372. 'libpanda.dll',
  3373. 'libpandaexpress.dll',
  3374. 'libp3dtoolconfig.dll',
  3375. 'libp3dtool.dll',
  3376. 'libp3pystub.dll',
  3377. ])
  3378. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggRetargetAnim.cxx', obj='egg-retarget-anim_eggRetargetAnim.obj')
  3379. EnqueueLink(dll='egg-retarget-anim.exe', opts=['ADVAPI'], obj=[
  3380. 'egg-retarget-anim_eggRetargetAnim.obj',
  3381. 'libeggcharbase.lib',
  3382. 'libconverter.lib',
  3383. 'libeggbase.lib',
  3384. 'libprogbase.lib',
  3385. 'libpandatoolbase.lib',
  3386. 'libpandaegg.dll',
  3387. 'libpanda.dll',
  3388. 'libpandaexpress.dll',
  3389. 'libp3dtoolconfig.dll',
  3390. 'libp3dtool.dll',
  3391. 'libp3pystub.dll',
  3392. ])
  3393. #
  3394. # DIRECTORY: pandatool/src/flt/
  3395. #
  3396. if (OMIT.count("PANDATOOL")==0):
  3397. IPATH=['pandatool/src/flt']
  3398. OPTS=[ 'ZLIB']
  3399. EnqueueCxx(ipath=IPATH, opts=OPTS, src='fltVectorRecord.cxx', obj='flt_fltVectorRecord.obj')
  3400. EnqueueCxx(ipath=IPATH, opts=OPTS, src='flt_composite1.cxx', obj='flt_composite1.obj')
  3401. EnqueueLib(lib='libflt.lib', obj=['flt_fltVectorRecord.obj', 'flt_composite1.obj'])
  3402. #
  3403. # DIRECTORY: pandatool/src/fltegg/
  3404. #
  3405. if (OMIT.count("PANDATOOL")==0):
  3406. IPATH=['pandatool/src/fltegg']
  3407. OPTS=[]
  3408. EnqueueCxx(ipath=IPATH, opts=OPTS, src='fltToEggConverter.cxx', obj='fltegg_fltToEggConverter.obj')
  3409. EnqueueCxx(ipath=IPATH, opts=OPTS, src='fltToEggLevelState.cxx', obj='fltegg_fltToEggLevelState.obj')
  3410. EnqueueLib(lib='libfltegg.lib', obj=['fltegg_fltToEggConverter.obj', 'fltegg_fltToEggLevelState.obj'])
  3411. #
  3412. # DIRECTORY: pandatool/src/fltprogs/
  3413. #
  3414. if (OMIT.count("PANDATOOL")==0):
  3415. IPATH=['pandatool/src/fltprogs', 'pandatool/src/flt', 'pandatool/src/cvscopy']
  3416. OPTS=[]
  3417. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggToFlt.cxx', obj='egg2flt_eggToFlt.obj')
  3418. EnqueueLink(dll='egg2flt.exe', opts=['ADVAPI'], obj=[
  3419. 'egg2flt_eggToFlt.obj',
  3420. 'libflt.lib',
  3421. 'libeggbase.lib',
  3422. 'libprogbase.lib',
  3423. 'libconverter.lib',
  3424. 'libpandatoolbase.lib',
  3425. 'libpandaegg.dll',
  3426. 'libpanda.dll',
  3427. 'libpandaexpress.dll',
  3428. 'libp3dtoolconfig.dll',
  3429. 'libp3dtool.dll',
  3430. 'libp3pystub.dll',
  3431. ])
  3432. EnqueueCxx(ipath=IPATH, opts=OPTS, src='fltInfo.cxx', obj='flt-info_fltInfo.obj')
  3433. EnqueueLink(dll='flt-info.exe', opts=['ADVAPI'], obj=[
  3434. 'flt-info_fltInfo.obj',
  3435. 'libprogbase.lib',
  3436. 'libflt.lib',
  3437. 'libpandatoolbase.lib',
  3438. 'libconverter.lib',
  3439. 'libpandaegg.dll',
  3440. 'libpanda.dll',
  3441. 'libpandaexpress.dll',
  3442. 'libp3dtoolconfig.dll',
  3443. 'libp3dtool.dll',
  3444. 'libp3pystub.dll',
  3445. ])
  3446. EnqueueCxx(ipath=IPATH, opts=OPTS, src='fltTrans.cxx', obj='flt-trans_fltTrans.obj')
  3447. EnqueueLink(dll='flt-trans.exe', opts=['ADVAPI'], obj=[
  3448. 'flt-trans_fltTrans.obj',
  3449. 'libprogbase.lib',
  3450. 'libflt.lib',
  3451. 'libpandatoolbase.lib',
  3452. 'libconverter.lib',
  3453. 'libpandaegg.dll',
  3454. 'libpanda.dll',
  3455. 'libpandaexpress.dll',
  3456. 'libp3dtoolconfig.dll',
  3457. 'libp3dtool.dll',
  3458. 'libp3pystub.dll',
  3459. ])
  3460. EnqueueCxx(ipath=IPATH, opts=OPTS, src='fltToEgg.cxx', obj='flt2egg_fltToEgg.obj')
  3461. EnqueueLink(dll='flt2egg.exe', opts=['ADVAPI'], obj=[
  3462. 'flt2egg_fltToEgg.obj',
  3463. 'libflt.lib',
  3464. 'libfltegg.lib',
  3465. 'libeggbase.lib',
  3466. 'libprogbase.lib',
  3467. 'libconverter.lib',
  3468. 'libpandatoolbase.lib',
  3469. 'libpandaegg.dll',
  3470. 'libpanda.dll',
  3471. 'libpandaexpress.dll',
  3472. 'libp3dtoolconfig.dll',
  3473. 'libp3dtool.dll',
  3474. 'libp3pystub.dll',
  3475. ])
  3476. EnqueueCxx(ipath=IPATH, opts=OPTS, src='fltCopy.cxx', obj='fltcopy_fltCopy.obj')
  3477. EnqueueLink(dll='fltcopy.exe', opts=['ADVAPI'], obj=[
  3478. 'fltcopy_fltCopy.obj',
  3479. 'libcvscopy.lib',
  3480. 'libflt.lib',
  3481. 'libprogbase.lib',
  3482. 'libpandatoolbase.lib',
  3483. 'libconverter.lib',
  3484. 'libpandaegg.dll',
  3485. 'libpanda.dll',
  3486. 'libpandaexpress.dll',
  3487. 'libp3dtoolconfig.dll',
  3488. 'libp3dtool.dll',
  3489. 'libp3pystub.dll',
  3490. ])
  3491. #
  3492. # DIRECTORY: pandatool/src/imagebase/
  3493. #
  3494. if (OMIT.count("PANDATOOL")==0):
  3495. IPATH=['pandatool/src/imagebase']
  3496. OPTS=[]
  3497. EnqueueCxx(ipath=IPATH, opts=OPTS, src='imagebase_composite1.cxx', obj='imagebase_composite1.obj')
  3498. EnqueueLib(lib='libimagebase.lib', obj=['imagebase_composite1.obj'])
  3499. #
  3500. # DIRECTORY: pandatool/src/imageprogs/
  3501. #
  3502. if (OMIT.count("PANDATOOL")==0):
  3503. IPATH=['pandatool/src/imageprogs']
  3504. OPTS=[]
  3505. EnqueueCxx(ipath=IPATH, opts=OPTS, src='imageInfo.cxx', obj='image-info_imageInfo.obj')
  3506. EnqueueLink(dll='image-info.exe', opts=['ADVAPI'], obj=[
  3507. 'image-info_imageInfo.obj',
  3508. 'libimagebase.lib',
  3509. 'libprogbase.lib',
  3510. 'libpandatoolbase.lib',
  3511. 'libpandaegg.dll',
  3512. 'libpanda.dll',
  3513. 'libpandaexpress.dll',
  3514. 'libp3dtoolconfig.dll',
  3515. 'libp3dtool.dll',
  3516. 'libp3pystub.dll',
  3517. ])
  3518. EnqueueCxx(ipath=IPATH, opts=OPTS, src='imageResize.cxx', obj='image-resize_imageResize.obj')
  3519. EnqueueLink(dll='image-resize.exe', opts=['ADVAPI'], obj=[
  3520. 'image-resize_imageResize.obj',
  3521. 'libimagebase.lib',
  3522. 'libprogbase.lib',
  3523. 'libpandatoolbase.lib',
  3524. 'libpandaegg.dll',
  3525. 'libpanda.dll',
  3526. 'libpandaexpress.dll',
  3527. 'libp3dtoolconfig.dll',
  3528. 'libp3dtool.dll',
  3529. 'libp3pystub.dll',
  3530. ])
  3531. EnqueueCxx(ipath=IPATH, opts=OPTS, src='imageTrans.cxx', obj='image-trans_imageTrans.obj')
  3532. EnqueueLink(dll='image-trans.exe', opts=['ADVAPI'], obj=[
  3533. 'image-trans_imageTrans.obj',
  3534. 'libimagebase.lib',
  3535. 'libprogbase.lib',
  3536. 'libpandatoolbase.lib',
  3537. 'libpandaegg.dll',
  3538. 'libpanda.dll',
  3539. 'libpandaexpress.dll',
  3540. 'libp3dtoolconfig.dll',
  3541. 'libp3dtool.dll',
  3542. 'libp3pystub.dll',
  3543. ])
  3544. #
  3545. # DIRECTORY: pandatool/src/lwo/
  3546. #
  3547. if (OMIT.count("PANDATOOL")==0):
  3548. IPATH=['pandatool/src/lwo']
  3549. OPTS=[]
  3550. EnqueueCxx(ipath=IPATH, opts=OPTS, src='lwo_composite1.cxx', obj='lwo_composite1.obj')
  3551. EnqueueLib(lib='liblwo.lib', obj=['lwo_composite1.obj'])
  3552. #
  3553. # DIRECTORY: pandatool/src/lwoegg/
  3554. #
  3555. if (OMIT.count("PANDATOOL")==0):
  3556. IPATH=['pandatool/src/lwoegg']
  3557. OPTS=[]
  3558. EnqueueCxx(ipath=IPATH, opts=OPTS, src='lwoegg_composite1.cxx', obj='lwoegg_composite1.obj')
  3559. EnqueueLib(lib='liblwoegg.lib', obj=['lwoegg_composite1.obj'])
  3560. #
  3561. # DIRECTORY: pandatool/src/lwoprogs/
  3562. #
  3563. if (OMIT.count("PANDATOOL")==0):
  3564. IPATH=['pandatool/src/lwoprogs', 'pandatool/src/lwo']
  3565. OPTS=[]
  3566. EnqueueCxx(ipath=IPATH, opts=OPTS, src='lwoScan.cxx', obj='lwo-scan_lwoScan.obj')
  3567. EnqueueLink(dll='lwo-scan.exe', opts=['ADVAPI'], obj=[
  3568. 'lwo-scan_lwoScan.obj',
  3569. 'liblwo.lib',
  3570. 'libprogbase.lib',
  3571. 'libpandatoolbase.lib',
  3572. 'libpandaegg.dll',
  3573. 'libpanda.dll',
  3574. 'libpandaexpress.dll',
  3575. 'libp3dtoolconfig.dll',
  3576. 'libp3dtool.dll',
  3577. 'libp3pystub.dll',
  3578. ])
  3579. EnqueueCxx(ipath=IPATH, opts=OPTS, src='lwoToEgg.cxx', obj='lwo2egg_lwoToEgg.obj')
  3580. EnqueueLink(dll='lwo2egg.exe', opts=['ADVAPI'], obj=[
  3581. 'lwo2egg_lwoToEgg.obj',
  3582. 'liblwo.lib',
  3583. 'liblwoegg.lib',
  3584. 'libeggbase.lib',
  3585. 'libprogbase.lib',
  3586. 'libpandatoolbase.lib',
  3587. 'libconverter.lib',
  3588. 'libpandaegg.dll',
  3589. 'libpanda.dll',
  3590. 'libpandaexpress.dll',
  3591. 'libp3dtoolconfig.dll',
  3592. 'libp3dtool.dll',
  3593. 'libp3pystub.dll',
  3594. ])
  3595. #
  3596. # DIRECTORY: pandatool/src/maya/
  3597. #
  3598. for VER in MAYAVERSIONS:
  3599. if (OMIT.count("MAYA"+VER)==0) and (OMIT.count("PANDATOOL")==0):
  3600. IPATH=['pandatool/src/maya']
  3601. OPTS=['MAYA'+VER]
  3602. EnqueueCxx(ipath=IPATH, opts=OPTS, src='maya_composite1.cxx', obj='maya'+VER+'_composite1.obj')
  3603. EnqueueLib(lib='libmaya'+VER+'.lib', obj=[ 'maya'+VER+'_composite1.obj' ])
  3604. #
  3605. # DIRECTORY: pandatool/src/mayaegg/
  3606. #
  3607. for VER in MAYAVERSIONS:
  3608. if (OMIT.count("MAYA"+VER)==0) and (OMIT.count("PANDATOOL")==0):
  3609. IPATH=['pandatool/src/mayaegg', 'pandatool/src/maya']
  3610. OPTS=['MAYA'+VER]
  3611. EnqueueCxx(ipath=IPATH, opts=OPTS, src='mayaEggLoader.cxx', obj='mayaegg'+VER+'_loader.obj')
  3612. EnqueueCxx(ipath=IPATH, opts=OPTS, src='mayaegg_composite1.cxx', obj='mayaegg'+VER+'_composite1.obj')
  3613. EnqueueLib(lib='libmayaegg'+VER+'.lib', obj=[ 'mayaegg'+VER+'_composite1.obj' ])
  3614. #
  3615. # DIRECTORY: pandatool/src/maxegg/
  3616. #
  3617. for VER in MAXVERSIONS:
  3618. if (OMIT.count("MAX"+VER)==0) and (OMIT.count("PANDATOOL")==0):
  3619. IPATH=['pandatool/src/maxegg']
  3620. OPTS=['MAX'+VER, "WINCOMCTL", "WINCOMDLG", "WINUSER", "MSFORSCOPE"]
  3621. CopyFile("built/tmp/maxEgg.obj", "pandatool/src/maxegg/maxEgg.obj")
  3622. EnqueueCxx(ipath=IPATH, opts=OPTS, src='maxEggLoader.cxx',obj='maxegg'+VER+'_loader.obj')
  3623. EnqueueCxx(ipath=IPATH, opts=OPTS, src='maxegg_composite1.cxx',obj='maxegg'+VER+'_composite1.obj')
  3624. EnqueueLink(opts=OPTS, dll='maxegg'+VER+'.dlo', ldef="pandatool/src/maxegg/maxEgg.def", obj=[
  3625. 'maxegg'+VER+'_composite1.obj',
  3626. 'maxEgg.obj',
  3627. 'libeggbase.lib',
  3628. 'libprogbase.lib',
  3629. 'libpandatoolbase.lib',
  3630. 'libconverter.lib',
  3631. 'libpandaeggstripped.dll',
  3632. 'libpandastripped.dll',
  3633. 'libpandaexpress.dll',
  3634. 'libp3dtoolconfig.dll',
  3635. 'libp3dtool.dll',
  3636. 'libp3pystub.dll'
  3637. ])
  3638. #
  3639. # DIRECTORY: pandatool/src/maxprogs/
  3640. #
  3641. for VER in MAXVERSIONS:
  3642. if (OMIT.count("MAX"+VER)==0) and (OMIT.count("PANDATOOL")==0):
  3643. IPATH=['pandatool/src/maxprogs']
  3644. OPTS=['MAX'+VER, "WINCOMCTL", "WINCOMDLG", "WINUSER", "MSFORSCOPE"]
  3645. CopyFile("built/tmp/maxImportRes.obj", "pandatool/src/maxprogs/maxImportRes.obj")
  3646. EnqueueCxx(ipath=IPATH, opts=OPTS, src='maxEggImport.cxx',obj='maxprogs'+VER+'_maxeggimport.obj')
  3647. EnqueueLink(opts=OPTS, dll='maxeggimport'+VER+'.dle', ldef="pandatool/src/maxprogs/maxEggImport.def", obj=[
  3648. 'maxegg'+VER+'_loader.obj',
  3649. 'maxprogs'+VER+'_maxeggimport.obj',
  3650. 'maxImportRes.obj',
  3651. 'libpandaeggstripped.dll',
  3652. 'libpandastripped.dll',
  3653. 'libpandaexpress.dll',
  3654. 'libp3dtoolconfig.dll',
  3655. 'libp3dtool.dll',
  3656. 'libp3pystub.dll'
  3657. ])
  3658. #
  3659. # DIRECTORY: pandatool/src/vrml/
  3660. #
  3661. if (OMIT.count("PANDATOOL")==0):
  3662. IPATH=['pandatool/src/vrml']
  3663. OPTS=['ZLIB']
  3664. CreateStubHeader("built/include/vrmlParser.h")
  3665. EnqueueBison(ipath=IPATH, opts=OPTS, pre='vrmlyy', src='vrmlParser.yxx', dsth='vrmlParser.h', obj='pvrml_vrmlParser.obj')
  3666. EnqueueFlex(ipath=IPATH, opts=OPTS, pre='vrmlyy', src='vrmlLexer.lxx', obj='pvrml_vrmlLexer.obj', dashi=0)
  3667. EnqueueCxx(ipath=IPATH, opts=OPTS, src='parse_vrml.cxx', obj='pvrml_parse_vrml.obj')
  3668. EnqueueCxx(ipath=IPATH, opts=OPTS, src='standard_nodes.cxx', obj='pvrml_standard_nodes.obj')
  3669. EnqueueCxx(ipath=IPATH, opts=OPTS, src='vrmlNode.cxx', obj='pvrml_vrmlNode.obj')
  3670. EnqueueCxx(ipath=IPATH, opts=OPTS, src='vrmlNodeType.cxx', obj='pvrml_vrmlNodeType.obj')
  3671. EnqueueLib(lib='libpvrml.lib', obj=[
  3672. 'pvrml_parse_vrml.obj',
  3673. 'pvrml_standard_nodes.obj',
  3674. 'pvrml_vrmlNode.obj',
  3675. 'pvrml_vrmlNodeType.obj',
  3676. 'pvrml_vrmlParser.obj',
  3677. 'pvrml_vrmlLexer.obj',
  3678. ])
  3679. #
  3680. # DIRECTORY: pandatool/src/vrmlegg/
  3681. #
  3682. if (OMIT.count("PANDATOOL")==0):
  3683. IPATH=['pandatool/src/vrmlegg', 'pandatool/src/vrml']
  3684. OPTS=[]
  3685. EnqueueCxx(ipath=IPATH, opts=OPTS, src='indexedFaceSet.cxx', obj='vrmlegg_indexedFaceSet.obj')
  3686. EnqueueCxx(ipath=IPATH, opts=OPTS, src='vrmlAppearance.cxx', obj='vrmlegg_vrmlAppearance.obj')
  3687. EnqueueCxx(ipath=IPATH, opts=OPTS, src='vrmlToEggConverter.cxx', obj='vrmlegg_vrmlToEggConverter.obj')
  3688. EnqueueLib(lib='libvrmlegg.lib', obj=[
  3689. 'vrmlegg_indexedFaceSet.obj',
  3690. 'vrmlegg_vrmlAppearance.obj',
  3691. 'vrmlegg_vrmlToEggConverter.obj',
  3692. ])
  3693. #
  3694. # DIRECTORY: pandatool/src/xfile/
  3695. #
  3696. if (OMIT.count("PANDATOOL")==0):
  3697. IPATH=['pandatool/src/xfile']
  3698. OPTS=['ZLIB']
  3699. CreateStubHeader("built/include/xParser.h")
  3700. EnqueueBison(ipath=IPATH, opts=OPTS, pre='xyy', src='xParser.yxx', dsth='xParser.h', obj='xfile_xParser.obj')
  3701. EnqueueFlex(ipath=IPATH, opts=OPTS, pre='xyy', src='xLexer.lxx', obj='xfile_xLexer.obj', dashi=1)
  3702. EnqueueCxx(ipath=IPATH, opts=OPTS, src='xfile_composite1.cxx', obj='xfile_composite1.obj')
  3703. EnqueueLib(lib='libxfile.lib', obj=[
  3704. 'xfile_composite1.obj',
  3705. 'xfile_xParser.obj',
  3706. 'xfile_xLexer.obj',
  3707. ])
  3708. #
  3709. # DIRECTORY: pandatool/src/xfileegg/
  3710. #
  3711. if (OMIT.count("PANDATOOL")==0):
  3712. IPATH=['pandatool/src/xfileegg', 'pandatool/src/xfile']
  3713. OPTS=[]
  3714. EnqueueCxx(ipath=IPATH, opts=OPTS, src='xfileegg_composite1.cxx', obj='xfileegg_composite1.obj')
  3715. EnqueueLib(lib='libxfileegg.lib', obj=[
  3716. 'xfileegg_composite1.obj',
  3717. ])
  3718. #
  3719. # DIRECTORY: pandatool/src/ptloader/
  3720. #
  3721. if (OMIT.count("PANDATOOL")==0):
  3722. IPATH=['pandatool/src/ptloader', 'pandatool/src/flt', 'pandatool/src/lwo', 'pandatool/src/xfile', 'pandatool/src/xfileegg']
  3723. OPTS=['BUILDING_PTLOADER']
  3724. EnqueueCxx(ipath=IPATH, opts=OPTS, src='config_ptloader.cxx', obj='ptloader_config_ptloader.obj')
  3725. EnqueueCxx(ipath=IPATH, opts=OPTS, src='loaderFileTypePandatool.cxx', obj='ptloader_loaderFileTypePandatool.obj')
  3726. EnqueueLink(dll='libp3ptloader.dll', opts=['ADVAPI'], obj=[
  3727. 'ptloader_config_ptloader.obj',
  3728. 'ptloader_loaderFileTypePandatool.obj',
  3729. 'libfltegg.lib',
  3730. 'libflt.lib',
  3731. 'liblwoegg.lib',
  3732. 'liblwo.lib',
  3733. 'libdxfegg.lib',
  3734. 'libdxf.lib',
  3735. 'libvrmlegg.lib',
  3736. 'libpvrml.lib',
  3737. 'libxfileegg.lib',
  3738. 'libxfile.lib',
  3739. 'libconverter.lib',
  3740. 'libpandatoolbase.lib',
  3741. 'libeggbase.lib',
  3742. 'libprogbase.lib',
  3743. 'libpandaegg.dll',
  3744. 'libpanda.dll',
  3745. 'libpandaexpress.dll',
  3746. 'libp3dtoolconfig.dll',
  3747. 'libp3dtool.dll',
  3748. ])
  3749. #
  3750. # DIRECTORY: pandatool/src/mayaprogs/
  3751. #
  3752. for VER in MAYAVERSIONS:
  3753. if (OMIT.count('MAYA'+VER)==0) and (OMIT.count("PANDATOOL")==0):
  3754. IPATH=['pandatool/src/mayaprogs', 'pandatool/src/maya', 'pandatool/src/mayaegg',
  3755. 'pandatool/src/cvscopy']
  3756. OPTS=['BUILDING_MISC', 'MAYA'+VER]
  3757. EnqueueCxx(ipath=IPATH, opts=OPTS, src='mayaEggImport.cxx', obj='mayaeggimport'+VER+'_mayaeggimport.obj')
  3758. EnqueueLink(opts=OPTS, dll='mayaeggimport'+VER+'.mll', obj=[
  3759. 'mayaegg'+VER+'_loader.obj',
  3760. 'mayaeggimport'+VER+'_mayaeggimport.obj',
  3761. 'libpandaegg.dll',
  3762. 'libpanda.dll',
  3763. 'libpandaexpress.dll',
  3764. 'libp3dtoolconfig.dll',
  3765. 'libp3dtool.dll',
  3766. 'libp3pystub.dll'
  3767. ])
  3768. EnqueueCxx(ipath=IPATH, opts=OPTS, src='config_mayaloader.cxx', obj='mayaloader'+VER+'_config_mayaloader.obj')
  3769. EnqueueLink(dll='libp3mayaloader'+VER+'.dll', opts=['ADVAPI', 'MAYA'+VER], obj=[
  3770. 'mayaloader'+VER+'_config_mayaloader.obj',
  3771. 'libmayaegg'+VER+'.lib',
  3772. 'libp3ptloader.dll',
  3773. 'libconverter.lib',
  3774. 'libpandatoolbase.lib',
  3775. 'libmaya'+VER+'.lib',
  3776. 'libfltegg.lib',
  3777. 'libflt.lib',
  3778. 'liblwoegg.lib',
  3779. 'liblwo.lib',
  3780. 'libdxfegg.lib',
  3781. 'libdxf.lib',
  3782. 'libvrmlegg.lib',
  3783. 'libpvrml.lib',
  3784. 'libxfileegg.lib',
  3785. 'libxfile.lib',
  3786. 'libeggbase.lib',
  3787. 'libprogbase.lib',
  3788. 'libpandaegg.dll',
  3789. 'libpanda.dll',
  3790. 'libpandaexpress.dll',
  3791. 'libp3dtoolconfig.dll',
  3792. 'libp3dtool.dll',
  3793. ])
  3794. EnqueueCxx(ipath=IPATH, opts=OPTS, src='mayaPview.cxx', obj='mayapview'+VER+'_mayaPview.obj')
  3795. EnqueueLink(dll='libmayapview'+VER+'.mll', opts=['ADVAPI', 'MAYA'+VER], obj=[
  3796. 'mayapview'+VER+'_mayaPview.obj',
  3797. 'libmayaegg'+VER+'.lib',
  3798. 'libmaya'+VER+'.lib',
  3799. 'libconverter.lib',
  3800. 'libpandatoolbase.lib',
  3801. 'libpandaegg.dll',
  3802. 'libp3framework.dll',
  3803. 'libpanda.dll',
  3804. 'libpandaexpress.dll',
  3805. 'libp3dtoolconfig.dll',
  3806. 'libp3dtool.dll',
  3807. 'libp3pystub.dll',
  3808. ])
  3809. EnqueueCxx(ipath=IPATH, opts=OPTS, src='mayaToEgg.cxx', obj='maya2egg'+VER+'_mayaToEgg.obj')
  3810. EnqueueLink(dll='maya2egg'+VER+'-wrapped.exe', opts=['ADVAPI', 'MAYA'+VER], obj=[
  3811. 'maya2egg'+VER+'_mayaToEgg.obj',
  3812. 'libmayaegg'+VER+'.lib',
  3813. 'libmaya'+VER+'.lib',
  3814. 'libeggbase.lib',
  3815. 'libprogbase.lib',
  3816. 'libconverter.lib',
  3817. 'libpandatoolbase.lib',
  3818. 'libpandaegg.dll',
  3819. 'libpanda.dll',
  3820. 'libpandaexpress.dll',
  3821. 'libp3dtoolconfig.dll',
  3822. 'libp3dtool.dll',
  3823. 'libp3pystub.dll',
  3824. ])
  3825. EnqueueCxx(ipath=IPATH, opts=OPTS, src='mayaCopy.cxx', obj='mayacopy'+VER+'_mayaCopy.obj')
  3826. EnqueueLink(dll='mayacopy'+VER+'-wrapped.exe', opts=['ADVAPI', 'MAYA'+VER], obj=[
  3827. 'mayacopy'+VER+'_mayaCopy.obj',
  3828. 'libcvscopy.lib',
  3829. 'libmaya'+VER+'.lib',
  3830. 'libprogbase.lib',
  3831. 'libpandatoolbase.lib',
  3832. 'libconverter.lib',
  3833. 'libpandaegg.dll',
  3834. 'libpanda.dll',
  3835. 'libpandaexpress.dll',
  3836. 'libp3dtoolconfig.dll',
  3837. 'libp3dtool.dll',
  3838. 'libp3pystub.dll',
  3839. ])
  3840. EnqueueCxx(ipath=IPATH, opts=OPTS, src='mayaWrapper.cxx', obj='mayaWrapper'+VER+'.obj')
  3841. EnqueueLink(dll='maya2egg'+VER+'.exe', opts=['ADVAPI'], obj=['mayaWrapper'+VER+'.obj'])
  3842. EnqueueLink(dll='mayacopy'+VER+'.exe', opts=['ADVAPI'], obj=['mayaWrapper'+VER+'.obj'])
  3843. EnqueueCxx(ipath=IPATH, opts=OPTS, src='mayaSavePview.cxx', obj='mayasavepview'+VER+'_mayaSavePview.obj')
  3844. EnqueueLink(dll='libmayasavepview'+VER+'.mll', opts=['ADVAPI', 'MAYA'+VER], obj=[
  3845. 'mayasavepview'+VER+'_mayaSavePview.obj',
  3846. ])
  3847. #
  3848. # DIRECTORY: pandatool/src/miscprogs/
  3849. #
  3850. if (OMIT.count("PANDATOOL")==0):
  3851. IPATH=['pandatool/src/miscprogs']
  3852. OPTS=[]
  3853. EnqueueCxx(ipath=IPATH, opts=OPTS, src='binToC.cxx', obj='bin2c_binToC.obj')
  3854. EnqueueLink(dll='bin2c.exe', opts=['ADVAPI'], obj=[
  3855. 'bin2c_binToC.obj',
  3856. 'libprogbase.lib',
  3857. 'libpandatoolbase.lib',
  3858. 'libpanda.dll',
  3859. 'libpandaexpress.dll',
  3860. 'libp3dtoolconfig.dll',
  3861. 'libp3dtool.dll',
  3862. 'libp3pystub.dll',
  3863. ])
  3864. #
  3865. # DIRECTORY: pandatool/src/pstatserver/
  3866. #
  3867. if (OMIT.count("PANDATOOL")==0):
  3868. IPATH=['pandatool/src/pstatserver']
  3869. OPTS=[]
  3870. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pstatserver_composite1.cxx', obj='pstatserver_composite1.obj')
  3871. EnqueueLib(lib='libpstatserver.lib', obj=[ 'pstatserver_composite1.obj' ])
  3872. #
  3873. # DIRECTORY: pandatool/src/softprogs/
  3874. #
  3875. if (OMIT.count("PANDATOOL")==0):
  3876. IPATH=['pandatool/src/softprogs']
  3877. OPTS=[]
  3878. EnqueueCxx(ipath=IPATH, opts=OPTS, src='softCVS.cxx', obj='softcvs_softCVS.obj')
  3879. EnqueueCxx(ipath=IPATH, opts=OPTS, src='softFilename.cxx', obj='softcvs_softFilename.obj')
  3880. EnqueueLink(opts=['ADVAPI'], dll='softcvs.exe', obj=[
  3881. 'softcvs_softCVS.obj',
  3882. 'softcvs_softFilename.obj',
  3883. 'libprogbase.lib',
  3884. 'libpandatoolbase.lib',
  3885. 'libpandaegg.dll',
  3886. 'libpanda.dll',
  3887. 'libpandaexpress.dll',
  3888. 'libp3dtoolconfig.dll',
  3889. 'libp3dtool.dll',
  3890. 'libp3pystub.dll',
  3891. ])
  3892. #
  3893. # DIRECTORY: pandatool/src/text-stats/
  3894. #
  3895. if (OMIT.count("PANDATOOL")==0):
  3896. IPATH=['pandatool/src/text-stats']
  3897. OPTS=[]
  3898. EnqueueCxx(ipath=IPATH, opts=OPTS, src='textMonitor.cxx', obj='text-stats_textMonitor.obj')
  3899. EnqueueCxx(ipath=IPATH, opts=OPTS, src='textStats.cxx', obj='text-stats_textStats.obj')
  3900. EnqueueLink(opts=['ADVAPI'], dll='text-stats.exe', obj=[
  3901. 'text-stats_textMonitor.obj',
  3902. 'text-stats_textStats.obj',
  3903. 'libprogbase.lib',
  3904. 'libpstatserver.lib',
  3905. 'libpandatoolbase.lib',
  3906. 'libpandaegg.dll',
  3907. 'libpanda.dll',
  3908. 'libpandaexpress.dll',
  3909. 'libp3dtoolconfig.dll',
  3910. 'libp3dtool.dll',
  3911. 'libp3pystub.dll',
  3912. ])
  3913. #
  3914. # DIRECTORY: pandatool/src/vrmlprogs/
  3915. #
  3916. if (OMIT.count("PANDATOOL")==0):
  3917. IPATH=['pandatool/src/vrmlprogs', 'pandatool/src/vrml', 'pandatool/src/vrmlegg']
  3918. OPTS=[]
  3919. EnqueueCxx(ipath=IPATH, opts=OPTS, src='vrmlTrans.cxx', obj='vrml-trans_vrmlTrans.obj')
  3920. EnqueueLink(opts=['ADVAPI'], dll='vrml-trans.exe', obj=[
  3921. 'vrml-trans_vrmlTrans.obj',
  3922. 'libprogbase.lib',
  3923. 'libpvrml.lib',
  3924. 'libpandatoolbase.lib',
  3925. 'libpanda.dll',
  3926. 'libpandaexpress.dll',
  3927. 'libp3dtoolconfig.dll',
  3928. 'libp3dtool.dll',
  3929. 'libp3pystub.dll',
  3930. ])
  3931. EnqueueCxx(ipath=IPATH, opts=OPTS, src='vrmlToEgg.cxx', obj='vrml2egg_vrmlToEgg.obj')
  3932. EnqueueLink(opts=['ADVAPI'], dll='vrml2egg.exe', obj=[
  3933. 'vrml2egg_vrmlToEgg.obj',
  3934. 'libvrmlegg.lib',
  3935. 'libpvrml.lib',
  3936. 'libeggbase.lib',
  3937. 'libprogbase.lib',
  3938. 'libpandatoolbase.lib',
  3939. 'libconverter.lib',
  3940. 'libpandaegg.dll',
  3941. 'libpanda.dll',
  3942. 'libpandaexpress.dll',
  3943. 'libp3dtoolconfig.dll',
  3944. 'libp3dtool.dll',
  3945. 'libp3pystub.dll',
  3946. ])
  3947. #
  3948. # DIRECTORY: pandatool/src/win-stats/
  3949. #
  3950. if (OMIT.count("PANDATOOL")==0) and (sys.platform == "win32"):
  3951. IPATH=['pandatool/src/win-stats']
  3952. OPTS=[]
  3953. EnqueueCxx(ipath=IPATH, opts=OPTS, src='winstats_composite1.cxx', obj='pstats_composite1.obj')
  3954. EnqueueLink(opts=['WINSOCK', 'WINIMM', 'WINGDI', 'WINKERNEL', 'WINOLDNAMES', 'WINUSER', 'WINMM'],
  3955. dll='pstats.exe', obj=[
  3956. 'pstats_composite1.obj',
  3957. 'libprogbase.lib',
  3958. 'libpstatserver.lib',
  3959. 'libpandatoolbase.lib',
  3960. 'libpandaexpress.dll',
  3961. 'libpanda.dll',
  3962. 'libp3dtoolconfig.dll',
  3963. 'libp3dtool.dll',
  3964. 'libp3pystub.dll',
  3965. ])
  3966. #
  3967. # DIRECTORY: pandatool/src/xfileprogs/
  3968. #
  3969. if (OMIT.count("PANDATOOL")==0):
  3970. IPATH=['pandatool/src/xfileprogs', 'pandatool/src/xfile', 'pandatool/src/xfileegg']
  3971. OPTS=[]
  3972. EnqueueCxx(ipath=IPATH, opts=OPTS, src='eggToX.cxx', obj='egg2x_eggToX.obj')
  3973. EnqueueLink(dll='egg2x.exe', opts=['ADVAPI'], obj=[
  3974. 'egg2x_eggToX.obj',
  3975. 'libxfileegg.lib',
  3976. 'libxfile.lib',
  3977. 'libeggbase.lib',
  3978. 'libprogbase.lib',
  3979. 'libpandatoolbase.lib',
  3980. 'libconverter.lib',
  3981. 'libpandaegg.dll',
  3982. 'libpanda.dll',
  3983. 'libpandaexpress.dll',
  3984. 'libp3dtoolconfig.dll',
  3985. 'libp3dtool.dll',
  3986. 'libp3pystub.dll',
  3987. ])
  3988. EnqueueCxx(ipath=IPATH, opts=OPTS, src='xFileTrans.cxx', obj='x-trans_xFileTrans.obj')
  3989. EnqueueLink(dll='x-trans.exe', opts=['ADVAPI'], obj=[
  3990. 'x-trans_xFileTrans.obj',
  3991. 'libprogbase.lib',
  3992. 'libxfile.lib',
  3993. 'libpandatoolbase.lib',
  3994. 'libpanda.dll',
  3995. 'libpandaexpress.dll',
  3996. 'libp3dtoolconfig.dll',
  3997. 'libp3dtool.dll',
  3998. 'libp3pystub.dll',
  3999. ])
  4000. EnqueueCxx(ipath=IPATH, opts=OPTS, src='xFileToEgg.cxx', obj='x2egg_xFileToEgg.obj')
  4001. EnqueueLink(opts=['ADVAPI'], dll='x2egg.exe', obj=[
  4002. 'x2egg_xFileToEgg.obj',
  4003. 'libxfileegg.lib',
  4004. 'libxfile.lib',
  4005. 'libconverter.lib',
  4006. 'libeggbase.lib',
  4007. 'libprogbase.lib',
  4008. 'libpandatoolbase.lib',
  4009. 'libpandaegg.dll',
  4010. 'libpanda.dll',
  4011. 'libpandaexpress.dll',
  4012. 'libp3dtoolconfig.dll',
  4013. 'libp3dtool.dll',
  4014. 'libp3pystub.dll',
  4015. ])
  4016. #
  4017. # DIRECTORY: pandaapp/src/pandaappbase/
  4018. #
  4019. if (OMIT.count("PANDAAPP")==0):
  4020. IPATH=['pandaapp/src/pandaappbase']
  4021. OPTS=[]
  4022. EnqueueCxx(ipath=IPATH, opts=OPTS, src='pandaappbase.cxx', obj='pandaappbase_pandaappbase.obj')
  4023. EnqueueLib(lib='libpandaappbase.lib', obj=['pandaappbase_pandaappbase.obj'])
  4024. #
  4025. # DIRECTORY: pandaapp/src/httpbackup/
  4026. #
  4027. if (OMIT.count("OPENSSL")==0) and (OMIT.count("PANDAAPP")==0):
  4028. IPATH=['pandaapp/src/httpbackup', 'pandaapp/src/pandaappbase']
  4029. OPTS=['OPENSSL']
  4030. EnqueueCxx(ipath=IPATH, opts=OPTS, src='backupCatalog.cxx', obj='httpbackup_backupCatalog.obj')
  4031. EnqueueCxx(ipath=IPATH, opts=OPTS, src='httpBackup.cxx', obj='httpbackup_httpBackup.obj')
  4032. EnqueueLink(opts=['ADVAPI', 'OPENSSL'], dll='httpbackup.exe', obj=[
  4033. 'httpbackup_backupCatalog.obj',
  4034. 'httpbackup_httpBackup.obj',
  4035. 'libpandaappbase.lib',
  4036. 'libpandaexpress.dll',
  4037. 'libpanda.dll',
  4038. 'libp3dtool.dll',
  4039. 'libp3dtoolconfig.dll',
  4040. 'libprogbase.lib',
  4041. 'libpandatoolbase.lib',
  4042. 'libp3pystub.dll',
  4043. ])
  4044. #
  4045. # DIRECTORY: pandaapp/src/indexify/
  4046. #
  4047. if (OMIT.count("FREETYPE")==0) and (OMIT.count("PANDAAPP")==0):
  4048. IPATH=['pandaapp/src/indexify']
  4049. OPTS=[ 'FREETYPE']
  4050. EnqueueCxx(ipath=IPATH, opts=OPTS, src='default_font.cxx', obj='font-samples_default_font.obj')
  4051. EnqueueCxx(ipath=IPATH, opts=OPTS, src='fontSamples.cxx', obj='font-samples_fontSamples.obj')
  4052. EnqueueLink(opts=['ADVAPI', 'FREETYPE'], dll='font-samples.exe', obj=[
  4053. 'font-samples_default_font.obj',
  4054. 'font-samples_fontSamples.obj',
  4055. 'libpanda.dll',
  4056. 'libpandaexpress.dll',
  4057. 'libp3dtool.dll',
  4058. 'libp3dtoolconfig.dll',
  4059. 'libprogbase.lib',
  4060. 'libpandatoolbase.lib',
  4061. 'libp3pystub.dll',
  4062. ])
  4063. EnqueueCxx(ipath=IPATH, opts=OPTS, src='default_index_icons.cxx', obj='indexify_default_index_icons.obj')
  4064. EnqueueCxx(ipath=IPATH, opts=OPTS, src='default_font.cxx', obj='indexify_default_font.obj')
  4065. EnqueueCxx(ipath=IPATH, opts=OPTS, src='indexImage.cxx', obj='indexify_indexImage.obj')
  4066. EnqueueCxx(ipath=IPATH, opts=OPTS, src='indexParameters.cxx', obj='indexify_indexParameters.obj')
  4067. EnqueueCxx(ipath=IPATH, opts=OPTS, src='indexify.cxx', obj='indexify_indexify.obj')
  4068. EnqueueCxx(ipath=IPATH, opts=OPTS, src='photo.cxx', obj='indexify_photo.obj')
  4069. EnqueueCxx(ipath=IPATH, opts=OPTS, src='rollDirectory.cxx', obj='indexify_rollDirectory.obj')
  4070. EnqueueLink(opts=['ADVAPI', 'FREETYPE'], dll='indexify.exe', obj=[
  4071. 'indexify_default_index_icons.obj',
  4072. 'indexify_default_font.obj',
  4073. 'indexify_indexImage.obj',
  4074. 'indexify_indexParameters.obj',
  4075. 'indexify_indexify.obj',
  4076. 'indexify_photo.obj',
  4077. 'indexify_rollDirectory.obj',
  4078. 'libpanda.dll',
  4079. 'libpandaexpress.dll',
  4080. 'libp3dtool.dll',
  4081. 'libp3dtoolconfig.dll',
  4082. 'libprogbase.lib',
  4083. 'libpandatoolbase.lib',
  4084. 'libp3pystub.dll',
  4085. ])
  4086. #
  4087. # Generate the models directory and samples directory
  4088. #
  4089. if (OMIT.count("PANDATOOL")==0):
  4090. CompileAllModels("built/models/misc/", "dmodels/src/misc/")
  4091. CompileAllModels("built/models/gui/", "dmodels/src/gui/")
  4092. CompileAllModels("built/models/", "models/")
  4093. CopyAllFiles("built/models/audio/sfx/", "dmodels/src/audio/sfx/", ".wav")
  4094. CopyAllFiles("built/models/icons/", "dmodels/src/icons/", ".gif")
  4095. CopyAllFiles("built/models/maps/", "models/maps/", ".jpg")
  4096. CopyAllFiles("built/models/maps/", "models/maps/", ".png")
  4097. CopyAllFiles("built/models/maps/", "models/maps/", ".rgb")
  4098. CopyAllFiles("built/models/maps/", "models/maps/", ".rgba")
  4099. CopyAllFiles("built/models/maps/", "dmodels/src/maps/", ".jpg")
  4100. CopyAllFiles("built/models/maps/", "dmodels/src/maps/", ".png")
  4101. CopyAllFiles("built/models/maps/", "dmodels/src/maps/", ".rgb")
  4102. CopyAllFiles("built/models/maps/", "dmodels/src/maps/", ".rgba")
  4103. ##########################################################################################
  4104. #
  4105. # Dependency-Based Distributed Build System.
  4106. #
  4107. ##########################################################################################
  4108. def BuildWorker(taskqueue, donequeue, slave):
  4109. print "Slave online: "+slave
  4110. while (1):
  4111. task = taskqueue.get()
  4112. sys.stdout.flush()
  4113. if (task == 0): return
  4114. try:
  4115. apply(task[0],task[1])
  4116. donequeue.put(task)
  4117. except:
  4118. donequeue.put(0)
  4119. def AllSourcesReady(task, pending):
  4120. sources = task[3]
  4121. for x in sources:
  4122. if (pending.has_key(x)):
  4123. return 0
  4124. altsources = task[4]
  4125. for x in altsources:
  4126. if (pending.has_key(x)):
  4127. return 0
  4128. return 1
  4129. def ParallelMake(tasklist):
  4130. # Read the slave-file.
  4131. slaves = []
  4132. for i in range(THREADCOUNT):
  4133. slaves.append("local")
  4134. # create the communication queues.
  4135. donequeue=Queue.Queue()
  4136. taskqueue=Queue.Queue()
  4137. # build up a table listing all the pending targets
  4138. pending = {}
  4139. for task in tasklist:
  4140. for target in task[2]:
  4141. pending[target] = 1
  4142. # create the workers
  4143. for slave in slaves:
  4144. th = threading.Thread(target=BuildWorker, args=[taskqueue,donequeue,slave])
  4145. th.setDaemon(1)
  4146. th.start()
  4147. # feed tasks to the workers.
  4148. tasksqueued = 0
  4149. while (1):
  4150. if (tasksqueued < len(slaves)*2):
  4151. extras = []
  4152. for task in tasklist:
  4153. if (tasksqueued < len(slaves)*3) & (AllSourcesReady(task, pending)):
  4154. if (NeedsBuild(task[2], task[3])):
  4155. tasksqueued += 1
  4156. taskqueue.put(task)
  4157. else:
  4158. for target in task[2]:
  4159. del pending[target]
  4160. else:
  4161. extras.append(task)
  4162. tasklist = extras
  4163. sys.stdout.flush()
  4164. if (tasksqueued == 0): break
  4165. donetask = donequeue.get()
  4166. if (donetask == 0):
  4167. exit("Build process aborting.")
  4168. sys.stdout.flush()
  4169. tasksqueued -= 1
  4170. JustBuilt(donetask[2], donetask[3])
  4171. for target in donetask[2]:
  4172. del pending[target]
  4173. # kill the workers.
  4174. for slave in slaves:
  4175. taskqueue.put(0)
  4176. # make sure there aren't any unsatisfied tasks
  4177. if (len(tasklist)>0):
  4178. exit("Dependency problem - task unsatisfied: "+str(tasklist[0][2]))
  4179. def SequentialMake(tasklist):
  4180. for task in tasklist:
  4181. if (NeedsBuild(task[2], task[3])):
  4182. apply(task[0], task[1])
  4183. JustBuilt(task[2], task[3])
  4184. def RunDependencyQueue(tasklist):
  4185. if (THREADCOUNT!=0):
  4186. ParallelMake(tasklist)
  4187. else:
  4188. SequentialMake(tasklist)
  4189. RunDependencyQueue(DEPENDENCYQUEUE)
  4190. ##########################################################################################
  4191. #
  4192. # Run genpycode
  4193. #
  4194. ##########################################################################################
  4195. if (OMIT.count("PYTHON")==0):
  4196. inputs = []
  4197. for x in GetDirectoryContents("built/pandac/input", ["*.in"]):
  4198. inputs.append("built/pandac/input/" + x)
  4199. if (NeedsBuild(['built/pandac/PandaModules.py'],inputs)):
  4200. if (GENMAN): oscmd("built/bin/genpycode -d")
  4201. else : oscmd("built/bin/genpycode")
  4202. JustBuilt(['built/pandac/PandaModules.py'],inputs)
  4203. ##########################################################################################
  4204. #
  4205. # The Installers
  4206. #
  4207. # Under windows, we can build an 'exe' package using NSIS
  4208. # Under linux, we can build a 'deb' package or an 'rpm' package.
  4209. #
  4210. ##########################################################################################
  4211. def MakeInstallerNSIS(file,fullname,smdirectory,installdir):
  4212. print "Building "+fullname+" installer. This can take up to an hour."
  4213. if (COMPRESSOR != "lzma"):
  4214. print("Note: you are using zlib, which is faster, but lzma gives better compression.")
  4215. if (os.path.exists(file)):
  4216. os.remove(file)
  4217. if (os.path.exists("nsis-output.exe")):
  4218. os.remove("nsis-output.exe")
  4219. psource=os.path.abspath(".")
  4220. panda=os.path.abspath("built")
  4221. cmd="thirdparty/win-nsis/makensis /V2 "
  4222. cmd=cmd+'/DCOMPRESSOR="'+COMPRESSOR+'" '
  4223. cmd=cmd+'/DNAME="'+fullname+'" '
  4224. cmd=cmd+'/DSMDIRECTORY="'+smdirectory+'" '
  4225. cmd=cmd+'/DINSTALLDIR="'+installdir+'" '
  4226. cmd=cmd+'/DOUTFILE="'+psource+'\\nsis-output.exe" '
  4227. cmd=cmd+'/DLICENSE="'+panda+'\\LICENSE" '
  4228. cmd=cmd+'/DLANGUAGE="Panda3DEnglish" '
  4229. cmd=cmd+'/DRUNTEXT="Visit the Panda Manual" '
  4230. cmd=cmd+'/DIBITMAP="panda-install.bmp" '
  4231. cmd=cmd+'/DUBITMAP="panda-uninstall.bmp" '
  4232. cmd=cmd+'/DPANDA="'+panda+'" '
  4233. cmd=cmd+'/DPANDACONF="'+panda+'\\etc" '
  4234. cmd=cmd+'/DPSOURCE="'+psource+'" '
  4235. cmd=cmd+'/DPYEXTRAS="'+psource+'\\thirdparty\\win-extras" '
  4236. cmd=cmd+'"'+psource+'\\direct\\src\\directscripts\\packpanda.nsi"'
  4237. oscmd( cmd)
  4238. os.rename("nsis-output.exe", file)
  4239. INSTALLER_DEB_FILE="""
  4240. Package: panda3d
  4241. Version: VERSION
  4242. Section: libdevel
  4243. Priority: optional
  4244. Architecture: i386
  4245. Essential: no
  4246. Depends: PYTHONV
  4247. Provides: panda3d
  4248. Maintainer: [email protected]
  4249. Description: The panda3D free 3D engine
  4250. """
  4251. INSTALLER_SPEC_FILE="""
  4252. Summary: Panda 3D Engine
  4253. Name: panda3d
  4254. Version: VERSION
  4255. Release: 1
  4256. License: Panda3D License
  4257. Group: Development/Libraries
  4258. BuildRoot: PANDASOURCE/linuxroot
  4259. %description
  4260. The Panda3D engine.
  4261. %post
  4262. /sbin/ldconfig
  4263. %postun
  4264. /sbin/ldconfig
  4265. %files
  4266. %defattr(-,root,root)
  4267. /etc/Confauto.prc
  4268. /etc/Config.prc
  4269. /usr/share/panda3d
  4270. /etc/ld.so.conf.d/panda3d.conf
  4271. /usr/bin
  4272. /usr/lib
  4273. /usr/include/panda3d
  4274. """
  4275. def MakeInstallerLinux():
  4276. import compileall
  4277. PYTHONV=os.path.basename(PYTHONSDK)
  4278. if (os.path.isdir("linuxroot")): oscmd("chmod -R 755 linuxroot")
  4279. if (os.path.exists("/usr/bin/dpkg-deb")):
  4280. oscmd("dpkg --print-architecture > built/tmp/architecture.txt")
  4281. if (os.path.exists("/usr/bin/rpmbuild")):
  4282. oscmd("rpm -E '%_target_cpu' > built/tmp/architecture.txt")
  4283. ARCH=ReadFile("built/tmp/architecture.txt").strip()
  4284. oscmd("rm -rf linuxroot data.tar.gz control.tar.gz panda3d.spec "+ARCH)
  4285. oscmd("mkdir -p linuxroot/usr/bin")
  4286. oscmd("mkdir -p linuxroot/usr/include")
  4287. oscmd("mkdir -p linuxroot/usr/share/panda3d")
  4288. oscmd("mkdir -p linuxroot/usr/lib/panda3d")
  4289. oscmd("mkdir -p linuxroot/usr/lib/"+PYTHONV+"/lib-dynload")
  4290. oscmd("mkdir -p linuxroot/usr/lib/"+PYTHONV+"/site-packages")
  4291. oscmd("mkdir -p linuxroot/etc/ld.so.conf.d")
  4292. oscmd("sed -e 's@model-cache-@# model-cache-@' -e 's@$THIS_PRC_DIR/[.][.]@/usr/share/panda3d@' < built/etc/Config.prc > linuxroot/etc/Config.prc")
  4293. oscmd("cp built/etc/Confauto.prc linuxroot/etc/Confauto.prc")
  4294. oscmd("cp --recursive built/include linuxroot/usr/include/panda3d")
  4295. oscmd("cp --recursive direct linuxroot/usr/share/panda3d/direct")
  4296. oscmd("cp --recursive built/pandac linuxroot/usr/share/panda3d/pandac")
  4297. oscmd("cp --recursive built/Pmw linuxroot/usr/share/panda3d/Pmw")
  4298. oscmd("cp built/direct/__init__.py linuxroot/usr/share/panda3d/direct/__init__.py")
  4299. oscmd("cp --recursive built/models linuxroot/usr/share/panda3d/models")
  4300. oscmd("cp --recursive samples linuxroot/usr/share/panda3d/samples")
  4301. oscmd("cp doc/LICENSE linuxroot/usr/share/panda3d/LICENSE")
  4302. oscmd("cp doc/LICENSE linuxroot/usr/include/panda3d/LICENSE")
  4303. oscmd("cp doc/ReleaseNotes linuxroot/usr/share/panda3d/ReleaseNotes")
  4304. oscmd("echo '/usr/lib/panda3d' > linuxroot/etc/ld.so.conf.d/panda3d.conf")
  4305. oscmd("echo '/usr/share/panda3d' > linuxroot/usr/lib/"+PYTHONV+"/site-packages/panda3d.pth")
  4306. oscmd("echo '/usr/lib/panda3d' >> linuxroot/usr/lib/"+PYTHONV+"/site-packages/panda3d.pth")
  4307. oscmd("cp built/bin/* linuxroot/usr/bin/")
  4308. for base in os.listdir("built/lib"):
  4309. oscmd("cp built/lib/"+base+" linuxroot/usr/lib/panda3d/"+base)
  4310. for base in os.listdir("linuxroot/usr/share/panda3d/direct/src"):
  4311. if ((base != "extensions") and (base != "extensions_native")):
  4312. compileall.compile_dir("linuxroot/usr/share/panda3d/direct/src/"+base)
  4313. compileall.compile_dir("linuxroot/usr/share/panda3d/Pmw")
  4314. DeleteCVS("linuxroot")
  4315. oscmd("chmod -R 555 linuxroot/usr/share/panda3d")
  4316. if (os.path.exists("/usr/bin/dpkg-deb")):
  4317. txt = INSTALLER_DEB_FILE[1:].replace("VERSION",str(VERSION)).replace("PYTHONV",PYTHONV)
  4318. oscmd("mkdir -p linuxroot/DEBIAN")
  4319. oscmd("cd linuxroot ; (find usr -type f -exec md5sum {} \;) > DEBIAN/md5sums")
  4320. oscmd("cd linuxroot ; (find etc -type f -exec md5sum {} \;) >> DEBIAN/md5sums")
  4321. WriteFile("linuxroot/DEBIAN/conffiles","/etc/Config.prc\n")
  4322. WriteFile("linuxroot/DEBIAN/control",txt)
  4323. WriteFile("linuxroot/DEBIAN/postinst","#!/bin/sh\necho running ldconfig\nldconfig\n")
  4324. oscmd("chmod 755 linuxroot/DEBIAN/postinst")
  4325. oscmd("cp linuxroot/DEBIAN/postinst linuxroot/DEBIAN/postrm")
  4326. oscmd("dpkg-deb -b linuxroot panda3d_"+VERSION+"_"+ARCH+".deb")
  4327. oscmd("chmod -R 755 linuxroot")
  4328. if (os.path.exists("/usr/bin/rpmbuild")):
  4329. txt = INSTALLER_SPEC_FILE[1:].replace("VERSION",VERSION).replace("PANDASOURCE",PANDASOURCE)
  4330. WriteFile("panda3d.spec", txt)
  4331. oscmd("rpmbuild --define '_rpmdir "+PANDASOURCE+"' -bb panda3d.spec")
  4332. oscmd("mv "+ARCH+"/panda3d-"+VERSION+"-1."+ARCH+".rpm .")
  4333. # oscmd("chmod -R 755 linuxroot")
  4334. # oscmd("rm -rf linuxroot data.tar.gz control.tar.gz panda3d.spec "+ARCH)
  4335. if (INSTALLER != 0):
  4336. if (sys.platform == "win32"):
  4337. MakeInstallerNSIS("Panda3D-"+VERSION+".exe", "Panda3D", "Panda3D "+VERSION, "C:\\Panda3D-"+VERSION)
  4338. elif (sys.platform == "linux2"):
  4339. MakeInstallerLinux()
  4340. else:
  4341. exit("Do not know how to make an installer for this platform")
  4342. ##########################################################################################
  4343. #
  4344. # Print final status report.
  4345. #
  4346. ##########################################################################################
  4347. SaveDependencyCache()
  4348. WARNINGS.append("Elapsed Time: "+PrettyTime(time.time() - STARTTIME))
  4349. #WARNINGS.append("Time(EnqueueCxx): "+PrettyTime(TIMECOMPILEC))
  4350. #WARNINGS.append("Time(CompileLib): "+PrettyTime(TIMECOMPILELIB))
  4351. #WARNINGS.append("Time(EnqueueLink): "+PrettyTime(TIMECOMPILELINK))
  4352. #WARNINGS.append("Time(EnqueueIgate): "+PrettyTime(TIMEINTERROGATE))
  4353. #WARNINGS.append("Time(EnqueueImod): "+PrettyTime(TIMEINTERROGATEMODULE))
  4354. printStatus("Makepanda Final Status Report", WARNINGS)