makepanda.py 187 KB

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