Subversion Repositories filter_foundry

Rev

Rev 416 | View as "text/x-msdos-batch" | Blame | Compare with Previous | Last modification | View Log | RSS feed

  1. @echo off
  2.  
  3. rem  This file is part of "Filter Foundry", a filter plugin for Adobe Photoshop
  4. rem  Copyright (C) 2003-2009 Toby Thain, toby@telegraphics.net
  5. rem  Copyright (C) 2018-2021 Daniel Marschall, ViaThinkSoft
  6. rem  
  7. rem  This program is free software; you can redistribute it and/or modify
  8. rem  it under the terms of the GNU General Public License as published by
  9. rem  the Free Software Foundation; either version 2 of the License, or
  10. rem  (at your option) any later version.
  11. rem  
  12. rem  This program is distributed in the hope that it will be useful,
  13. rem  but WITHOUT ANY WARRANTY; without even the implied warranty of
  14. rem  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15. rem  GNU General Public License for more details.
  16. rem  
  17. rem  You should have received a copy of the GNU General Public License
  18. rem  along with this program; if not, write to the Free Software
  19. rem  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
  20.  
  21. cd /d %~dp0
  22.  
  23. rem Find latest compiled 32 bit file out of WPJ/VC/MINGW dir
  24. echo Search latest built 32 bit file...
  25. copy /y ..\wpj\FilterFoundry.8bf in\FilterFoundry_wpj.8bf >NUL
  26. copy /y ..\visual_studio\FilterFoundry.8bf in\FilterFoundry_vc.8bf >NUL
  27. copy /y ..\FilterFoundry.8bf in\FilterFoundry_mingw.8bf >NUL
  28. SET FILE1=in\FilterFoundry_wpj.8bf
  29. SET FILE2=in\FilterFoundry_vc.8bf
  30. SET FILE3=in\FilterFoundry_mingw.8bf
  31. if not exist %FILE1% (
  32.         if not exist %FILE2% (
  33.                 if not exist %FILE3% (
  34.                         echo No compiled 32 bit file found! Stop.
  35.                         rem We must output 0 to make sure that the very first compilation (where 32/64 does not exist) does not fail
  36.                         exit /b 0
  37.                 )
  38.         )
  39. )
  40. FOR /F %%i IN ('DIR /B /O:D %FILE1% %FILE2% %FILE3%') DO SET NEWEST=%%i
  41. if "%NEWEST%" == "FilterFoundry_wpj.8bf" (
  42.         set X32COMPILER=OpenWatcom
  43.         set X32TARGET=..\wpj\FilterFoundry.8bf
  44.         move in\FilterFoundry_wpj.8bf in\FilterFoundry.8bf >NUL
  45.         if exist in\FilterFoundry_vc.8bf del in\FilterFoundry_vc.8bf >NUL
  46.         if exist in\FilterFoundry_mingw.8bf del in\FilterFoundry_mingw.8bf >NUL
  47. ) else (
  48.         if "%NEWEST%" == "FilterFoundry_vc.8bf" (
  49.                 set X32COMPILER=VisualCPP
  50.                 set X32TARGET=..\visual_studio\FilterFoundry.8bf
  51.                 if exist in\FilterFoundry_wpj.8bf del in\FilterFoundry_wpj.8bf >NUL
  52.                 move in\FilterFoundry_vc.8bf in\FilterFoundry.8bf >NUL
  53.                 if exist in\FilterFoundry_mingw.8bf del in\FilterFoundry_mingw.8bf >NUL
  54.         ) else (
  55.                 set X32COMPILER=MinGW
  56.                 set X32TARGET=..\FilterFoundry.8bf
  57.                 if exist in\FilterFoundry_wpj.8bf del in\FilterFoundry_wpj.8bf >NUL
  58.                 if exist in\FilterFoundry_vc.8bf del in\FilterFoundry_vc.8bf >NUL
  59.                 move in\FilterFoundry_mingw.8bf in\FilterFoundry.8bf >NUL
  60.         )
  61. )
  62. echo Found: %X32COMPILER%
  63.  
  64. rem Find latest compiled 64 bit file out of VC/MINGW dir
  65. echo Search latest built 64 bit file...
  66. copy /y ..\visual_studio\FilterFoundry64.8bf in\FilterFoundry64_vc.8bf >NUL
  67. copy /y ..\FilterFoundry64.8bf in\FilterFoundry64_mingw.8bf >NUL
  68. SET FILE1=in\FilterFoundry64_vc.8bf
  69. SET FILE2=in\FilterFoundry64_mingw.8bf
  70. if not exist %FILE1% (
  71.         if not exist %FILE2% (
  72.                 echo No compiled 64 bit file found! Stop.
  73.                 rem We must output 0 to make sure that the very first compilation (where 32/64 does not exist) does not fail
  74.                 exit /b 0
  75.         )
  76. )
  77. FOR /F %%i IN ('DIR /B /O:D %FILE1% %FILE2%') DO SET NEWEST=%%i
  78. if "%NEWEST%" == "FilterFoundry64_vc.8bf" (
  79.         set X64COMPILER=VisualCPP
  80.         set X64TARGET=..\visual_studio\FilterFoundry64.8bf
  81.         move in\FilterFoundry64_vc.8bf in\FilterFoundry64.8bf >NUL
  82.         if exist in\FilterFoundry64_mingw.8bf del in\FilterFoundry64_mingw.8bf >NUL
  83. ) else (
  84.         set X64COMPILER=MinGW
  85.         set X64TARGET=..\FilterFoundry64.8bf
  86.         if exist in\FilterFoundry64_vc.8bf del in\FilterFoundry64_vc.8bf >NUL
  87.         move in\FilterFoundry64_mingw.8bf in\FilterFoundry64.8bf >NUL
  88. )
  89. echo Found: %X64COMPILER%
  90.  
  91. rem Now start the mixer!
  92. echo.
  93. echo Now start the mixer!
  94. foundry_3264_mixer.exe
  95. if errorlevel 1 exit /b 1
  96. echo.
  97.  
  98. rem Copy back 32 bit to original build dir, to enable debugging in IDE
  99. echo Copy back 32 bit to %X32COMPILER% build dir, to enable debugging in IDE
  100. copy /y out\FilterFoundry.8bf %X32TARGET%
  101.  
  102. rem Copy back 64 bit to original build dir, to enable debugging in IDE
  103. echo Copy back 64 bit to %X64COMPILER% build dir, to enable debugging in IDE
  104. copy /y out\FilterFoundry64.8bf %X64TARGET%
  105. echo.
  106.