makepanda.py 187 KB

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