build.bat 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. @echo off
  2. rem Add Lazarus installation to path
  3. if [%LAZARUS_HOME%] == [] set LAZARUS_HOME=D:\Alexx\Prog\FreePascal\Lazarus
  4. set PATH=%LAZARUS_HOME%;%PATH%
  5. rem You can execute this script with different parameters:
  6. rem components - compiling components needed for doublecmd
  7. rem doublecmd - compiling doublecmd only (release mode)
  8. rem plugins - compiling all doublecmd plugins
  9. rem debug - compiling components, plugins and doublecmd (debug mode)
  10. rem release - compile in release mode (using by default)
  11. if not "%OS_TARGET%" == "" (
  12. set DC_ARCH=%DC_ARCH% --os=%OS_TARGET%
  13. )
  14. if not "%CPU_TARGET%" == "" (
  15. set DC_ARCH=%DC_ARCH% --cpu=%CPU_TARGET%
  16. )
  17. if not "%LCL_PLATFORM%" == "" (
  18. set DC_ARCH=%DC_ARCH% --ws=%LCL_PLATFORM%
  19. )
  20. if "%1"=="components" ( call :components
  21. ) else (
  22. if "%1"=="plugins" ( call :plugins
  23. ) else (
  24. if "%1"=="beta" ( call :release
  25. ) else (
  26. if "%1"=="doublecmd" ( call :doublecmd
  27. ) else (
  28. if "%1"=="release" ( call :release
  29. ) else (
  30. if "%1"=="darkwin" ( call :darkwin
  31. ) else (
  32. if "%1"=="debug" ( call :debug
  33. ) else (
  34. if "%1"=="" ( call :release
  35. ) else (
  36. echo ERROR: Mode not defined: %1
  37. echo Available modes: components, plugins, doublecmd, release, darkwin, debug
  38. ))))))))
  39. GOTO:EOF
  40. :components
  41. call components\build.bat
  42. GOTO:EOF
  43. :plugins
  44. call plugins\build.bat
  45. GOTO:EOF
  46. :release
  47. call :components
  48. call :plugins
  49. call :doublecmd
  50. GOTO:EOF
  51. :debug
  52. call :components
  53. call :plugins
  54. rem Build Double Commander
  55. call :replace_old
  56. lazbuild src\doublecmd.lpi --bm=debug %DC_ARCH%
  57. GOTO:EOF
  58. :doublecmd
  59. rem Build Double Commander
  60. call :replace_old
  61. lazbuild src\doublecmd.lpi --bm=release %DC_ARCH%
  62. call :extract
  63. GOTO:EOF
  64. :darkwin
  65. call :components
  66. call :plugins
  67. rem Build Double Commander
  68. call :replace_old
  69. lazbuild src\doublecmd.lpi --bm=darkwin %DC_ARCH%
  70. call :extract
  71. GOTO:EOF
  72. :extract
  73. rem Build Dwarf LineInfo Extractor
  74. lazbuild tools\extractdwrflnfo.lpi
  75. rem Extract debug line info
  76. tools\extractdwrflnfo doublecmd.dbg
  77. GOTO:EOF
  78. :replace_old
  79. del /Q doublecmd.exe.old
  80. ren doublecmd.exe doublecmd.exe.old
  81. GOTO:EOF