makepanda.py 186 KB

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