Advertisement
TeLLie

Untitled

Apr 10th, 2015
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.64 KB | None | 0 0
  1. /* SETMOZENV.CMD - A utility for setting up the build environment for Warpzilla */
  2. /* V 1.1 - mkaply - proper support for GLIB and LIBIDL */
  3. /* V 1.2 - mkaply - use EMX2, not emx_string */
  4. /* V 1.3 - mkaply - Support for a better PERL */
  5. /* V 1.4 - mkaply - Support for an even better PERL */
  6. /* V 1.5 - mkaply - Support for changing FLOCK and perl shell */
  7. /* V 1.6 - mkaply - Make VACPP the default */
  8. /* V 1.7 - mkaply - GCC 3.2.1 support */
  9. /* V 1.8 - pedemont - GCC 3.3.5 Beta 1 support */
  10. /* V 1.9 - pedemont - remove VACPP support */
  11. /* V 1.10 - pedemont - replace bash.exe with ash.exe */
  12. /* V 1.11 - pedemont - add INCLUDE env variable */
  13. /* V 1.12 - Silvan Scherrer - change all references from u: to %unixroot% */
  14. /* adjusted the CPLUS_INCLUDE_PATH env, removed double entry of qt */
  15. /* v 1.13 - Silvan Scherrer - changed all references for qt with %qtdir% */
  16. /* v 1.14 - Silvan Scherrer - added debugger */
  17. /* v 1.15 - Silvan Scherrer - added IPFC env */
  18. /* v 1.16 - Silvan Scherrer - changed all %unixroot%/usr to %gccdir%/usr */
  19. /* v 1.17 - Silvan Scherrer - adjusted python path */
  20. /* v 1.18 - Silvan Scherrer - added gcc 442 support */
  21. /* v 1.19 - Silvan Scherrer - cups support via set command */
  22. /* v 1.20 - Silvan Scherrer - adjusted cplus_include_path */
  23. /* v 1.21 - Silvan Scherrer - emxomfopt added */
  24. /* v 1.22 - Silvan Scherrer - remove python stuff as installed systemwide */
  25. /* v 1.23 - Silvan Scherrer - use systemwide unixroot transition to rpm */
  26. /* v 1.24 - Silvan Scherrer - adjusted qt4 path to shadow builds */
  27. /* v 1.25 - Silvan Scherrer - gcc 4.4.6 */
  28. /* v 1.26 - Silvan Scherrer - watcom support */
  29. /* v 1.27 - Silvan Scherrer - perl adjusted */
  30. /* v 1.28 - Silvan Scherrer - add uixtools */
  31. /* v 1.29 - Silvan Scherrer - get dir of moztools and extras */
  32. /* v 1.30 - Silvan Scherrer - remove perl stuff, as rpm installed */
  33. /* v 1.31 - Silvan Scherrer - added usr\local\bin to the path */
  34. /* v 1.32 - Silvan Scherrer - gcc 4.7.3 */
  35. /* v 1.33 - Silvan Scherrer - remove emxomf options as handled by rpm */
  36. /* v 1.34 - Silvan Scherrer - remove some unneeded stuff */
  37. /* v 1.35 - Silvan Scherrer - remove config.site */
  38. /* v 1.36 - Silvan Scherrer - remove all autoconf stuff in here */
  39. /* v 1.37 - Silvan Scherrer - remove more set= */
  40.  
  41. /* be quiet */
  42. '@ECHO OFF'
  43.  
  44. /* If SETMOZENV has alread been run, don't run it again */
  45. if value('DEVENV',,'OS2ENVIRONMENT') = '1' THEN
  46. DO
  47. exit
  48. END
  49. 'SET unixroot=c:'
  50. 'set DEVENV=1'
  51. 'set lang=en_US'
  52. 'set programs='
  53. 'set qmakespec=os2-g++'
  54. 'set qtdir=%unixroot%\usr\lib\qt4'
  55. 'set PKG_CONFIG_PATH=c:/usr/lib/pkgconfig;c:/extras/lib/pkgconfig'
  56. 'set lrelease=%qtdir%/bin/lrelease.exe'
  57. 'set moc=%qtdir%\bin\moc.exe'
  58. 'set uic=%qtdir%\bin\uic.exe'
  59. 'SET PATH_EMXPGCC=%unixroot%\usr'
  60. 'SET JAM_TOOLSET=gcc'
  61. 'set gcc=%unixroot%\usr'
  62. 'SET CCENV=EMX'
  63. 'SET BUILD_ENV=EMX'
  64. 'SET BUILD_PLATFORM=os2'
  65. 'SET DEBUG_PATH=d:\tools\jitdbg'
  66. 'SET cups=c:/cups'
  67. 'SET cups_includepath=%cups%\include'
  68. 'SET cups_libs='
  69. 'SET WATCOM=e:\WATCOM'
  70. 'SET gccversion=4.9.2'
  71.  
  72. /* Figure out what drive the utility was run on and set it as ROOT */
  73. PARSE SOURCE command
  74. PARSE VAR command word1 word2 path
  75. PARSE UPPER VALUE path WITH root':\'therest
  76. 'SET ROOT='root':'
  77.  
  78. /* If the environment variable GCCDIR is set, use it, otherwise assume GCCDIR is a directory off of ROOT */
  79. if value('GCCDIR',,'OS2ENVIRONMENT') = '' THEN
  80. DO
  81. 'SET GCCDIR=%gcc%'
  82. END
  83. /* Create an environment variable GCCDIR2 with forward slashes instead of backslashes */
  84. 'SET GCCDIR2='backtoforward(value('GCCDIR',,'OS2ENVIRONMENT'));
  85.  
  86. /* If the environment variable TOOLKIT is set, use it, otherwise assume TOOLKIT is a directory off of ROOT */
  87. if value('TOOLKIT',,'OS2ENVIRONMENT') = '' THEN
  88. DO
  89. 'SET TOOLKIT=%ROOT%\os2tk45'
  90. END
  91. /* Create an environment variable TOOLKIT2 with forward slashes instead of backslashes */
  92. 'SET TOOLKIT2='backtoforward(value('TOOLKIT',,'OS2ENVIRONMENT'));
  93.  
  94. /* If a HOME environment variable is not set, set it */
  95. if value('HOME',,'OS2ENVIRONMENT') = '' THEN
  96. DO
  97. 'set HOME=%ROOT%\HOME'
  98. END
  99.  
  100. 'SET BEGINLIBPATH=%BEGINLIBPATH%;%qtdir%\bin'
  101. 'SET PATH=%unixroot%\usr\bin;%unixroot%\usr\libexec\bin;%qtdir%\bin;%PATH%;%unixroot%\extras\bin'
  102. 'SET DPATH=%DPATH%;%TOOLKIT%\msg'
  103.  
  104. /* REM *** shell settings **** */
  105. 'set SHELL=sh.exe'
  106. 'SET CONFIG_SHELL=sh.exe'
  107. 'SET MAKESHELL=sh.exe'
  108.  
  109. /* REM *** Compiler settings **** */
  110. /* 'set CC=gcc' */
  111. /*'set CXX=g++' */
  112.  
  113. 'SET C_INCLUDE_PATH=%GCCDIR2%/lib/gcc/i386-pc-os2-emx/%gccversion%/include;%GCCDIR2%/include;%TOOLKIT2%/H;%unixroot%/extras/include;%qtdir%/include;%cups%/include'
  114. 'SET CPLUS_INCLUDE_PATH=%GCCDIR2%/include/c++/%gccversion%;%GCCDIR2%/include/c++/%gccversion%/i386-pc-os2-emx;%GCCDIR2%/lib/gcc/i386-pc-os2-emx/%gccversion%/include'
  115. 'SET CPLUS_INCLUDE_PATH=%CPLUS_INCLUDE_PATH%;%unixroot%/extras/include;%qtdir%/include;%cups%/include;%GCCDIR2%/include/c++/%gccversion%/backward;%GCCDIR2%/include;G:\boost-1.57'
  116.  
  117. 'SET LIBRARY_PATH=%unixroot%/extras/lib;%gccdir2%/lib;%gccdir2%/lib/gcc/i386-pc-os2-emx/%gccversion%;%qtdir%/lib;%cups%/lib;C:\OS2\DLL;C:\MPTN\DLL'
  118. 'SET LIB=%unixroot%\extras\lib;%GCCDIR2%\lib;%qtdir%\lib;%cups%\lib;G:\boost-1.57\stage\lib'
  119.  
  120. 'SET GCCLOAD=5'
  121. 'SET GCCOPT=-pipe'
  122. 'SET EMXOPT=-c -n -h1024'
  123.  
  124. 'SET TERMCAP=%EMX2%/etc/termcap.dat'
  125. 'rem SET TERM=ansi-color-3'
  126.  
  127. 'SET INFOPATH=%EMX2%/info;%unixroot%/usr/share/info'
  128. 'SET EMXBOOK=emxdev.inf+emxlib.inf+emxgnu.inf+emxbsd.inf'
  129. 'SET HELPNDX=EPMKWHLP.NDX+CPP.NDX+CPPBRS.NDX+emxbook.ndx'
  130.  
  131. /* rem *** ASH SHELL STUFF */
  132. /* for some reason, ash.exe ignores the first entry in my PATH when called */
  133. /* from make; create a dummy path at the beginning in order to make it work */
  134. 'SET PATH=%ROOT%\foo;%TOOLKIT%\bin;%PATH%'
  135.  
  136. /* rem *** MOZILLA BUILD **** */
  137. 'set tmp=%unixroot%/temp/tmp'
  138. 'SET TEMP=%TMP%'
  139. 'SET TMPDIR=%TMP%'
  140.  
  141. /* set the IPFC env for the ipf compiler */
  142. 'SET IPFC=%TOOLKIT%\ipfc'
  143.  
  144. /* Is debugger_path set */
  145. if value('DEBUG_PATH',,'OS2ENVIRONMENT') <> '' THEN
  146. DO
  147. 'SET PATH=%PATH%;%Debug_path%\bin'
  148. 'SET BEGINLIBPATH=%BEGINLIBPATH%;%Debug_path%\dll'
  149. 'SET DPATH=%DPATH%;%Debug_path%\help'
  150. 'SET HELP=%HELP%;%Debug_path%\help'
  151. END
  152.  
  153. /* set the watcom stuff here */
  154. 'SET PATH=%PATH%;%watcom%\binp;%watcom%\binw'
  155. 'SET BEGINLIBPATH=%BEGINLIBPATH%;%watcom%\binp\dll'
  156. 'SET BOOKSHELF=%BOOKSHELF%;%watcom%\binp\help'
  157. 'SET HELP=%HELP%;%watcom%\binp\help'
  158. 'SET INCLUDE=%watcom%\H;%watcom%\H\OS2'
  159. 'SET EDPATH=%watcom%\EDDAT'
  160. 'SET WIPFC=%watcom%\WIPFC'
  161.  
  162.  
  163. /* REM *** Set user debug info here *** */
  164. 'set LOGNAME=%hostname%'
  165. 'set USER=%hostname%'
  166. 'set SYSTEMNAME=%hostname%'
  167.  
  168. exit
  169.  
  170. backtoforward: procedure
  171. arg pathname
  172. return Translate(pathname, '/', '\')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement