package_openmpt_args.cmd 6.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. @echo off
  2. set BATCH_DIR=%~dp0
  3. cd %BATCH_DIR%
  4. cd ..\..
  5. set MY_DIR=%CD%
  6. call "build\auto\setup_arguments.cmd" %1 %2 %3 %4 %5 %6
  7. call build\auto\setup_vs_any.cmd
  8. call build\auto\helper_get_svnversion.cmd
  9. call build\auto\helper_get_openmpt_version.cmd
  10. set MPT_REVISION=%OPENMPT_VERSION%-%SVNVERSION%
  11. cmd /c build\auto\update_package_template.cmd || goto error
  12. cd bin || goto error
  13. rmdir /s /q openmpt
  14. mkdir openmpt || goto error
  15. mkdir openmpt\bin.%MPT_DIST_VARIANT_TRK%
  16. mkdir openmpt\bin.%MPT_DIST_VARIANT_TRK%\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%
  17. mkdir openmpt\dbg.%MPT_DIST_VARIANT_TRK%
  18. mkdir openmpt\dbg.%MPT_DIST_VARIANT_TRK%\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%
  19. rmdir /s /q openmpt-%MPT_DIST_VARIANT_TRK%
  20. del /f /q openmpt-%MPT_DIST_VARIANT_TRK%.tar
  21. del /f /q openmpt-%MPT_DIST_VARIANT_TRK%-%MPT_REVISION%.%MPT_PKG_FORMAT%
  22. del /f /q openmpt-%MPT_DIST_VARIANT_TRK%-%MPT_REVISION%-symbols.%MPT_PKG_FORMAT_SYMBOLS%
  23. mkdir openmpt-%MPT_DIST_VARIANT_TRK%
  24. cd openmpt-%MPT_DIST_VARIANT_TRK% || goto error
  25. copy /y ..\..\LICENSE .\License.txt || goto error
  26. rmdir /s /q Licenses
  27. mkdir Licenses
  28. copy /y ..\..\packageTemplate\Licenses\*.* .\Licenses\ || goto error
  29. rmdir /s /q extraKeymaps
  30. mkdir extraKeymaps
  31. copy /y ..\..\packageTemplate\extraKeymaps\*.* .\extraKeymaps\ || goto error
  32. copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\%MPT_BIN_ARCH_TRK%\OpenMPT%MPT_VS_FLAVOUR%.exe .\ || goto error
  33. copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\%MPT_BIN_ARCH_TRK%\OpenMPT%MPT_VS_FLAVOUR%.pdb .\ || goto error
  34. copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\%MPT_BIN_ARCH_TRK%\openmpt-lame.dll .\ || goto error
  35. copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\%MPT_BIN_ARCH_TRK%\openmpt-lame.pdb .\ || goto error
  36. copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\%MPT_BIN_ARCH_TRK%\openmpt-mpg123.dll .\ || goto error
  37. copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\%MPT_BIN_ARCH_TRK%\openmpt-mpg123.pdb .\ || goto error
  38. copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\%MPT_BIN_ARCH_TRK%\openmpt-soundtouch.dll .\ || goto error
  39. copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\%MPT_BIN_ARCH_TRK%\openmpt-soundtouch.pdb .\ || goto error
  40. copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\x86\PluginBridge-x86.exe .\ || goto error
  41. copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\x86\PluginBridge-x86.pdb .\ || goto error
  42. copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\amd64\PluginBridge-amd64.exe .\ || goto error
  43. copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\amd64\PluginBridge-amd64.pdb .\ || goto error
  44. copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\x86\PluginBridgeLegacy-x86.exe .\ || goto error
  45. copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\x86\PluginBridgeLegacy-x86.pdb .\ || goto error
  46. copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\amd64\PluginBridgeLegacy-amd64.exe .\ || goto error
  47. copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\amd64\PluginBridgeLegacy-amd64.pdb .\ || goto error
  48. copy /y ..\..\bin\%MPT_BIN_CONF%\%MPT_VS_VER%-%MPT_BIN_TARGET%-%MPT_BIN_RUNTIME%\%MPT_BIN_ARCH_TRK%\openmpt-wine-support.zip .\ || goto error
  49. ..\..\build\tools\7zip\7z.exe a -t%MPT_PKG_FORMAT% -mx=9 ..\openmpt\bin.%MPT_DIST_VARIANT_TRK%\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\openmpt-%MPT_DIST_VARIANT_TRK%-%MPT_REVISION%.%MPT_PKG_FORMAT% ^
  50. License.txt ^
  51. Licenses ^
  52. OpenMPT%MPT_VS_FLAVOUR%.exe ^
  53. openmpt-lame.dll ^
  54. openmpt-mpg123.dll ^
  55. openmpt-soundtouch.dll ^
  56. PluginBridge-x86.exe ^
  57. PluginBridge-amd64.exe ^
  58. PluginBridgeLegacy-x86.exe ^
  59. PluginBridgeLegacy-amd64.exe ^
  60. openmpt-wine-support.zip ^
  61. extraKeymaps ^
  62. || goto error
  63. mkdir ..\openmpt\dbg.%MPT_DIST_VARIANT_TRK%\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\openmpt-%MPT_DIST_VARIANT_TRK%-%MPT_REVISION%-symbols || goto error
  64. ..\..\build\tools\7zip\7z.exe a -t%MPT_PKG_FORMAT_SYMBOLS% -mx=9 ..\openmpt\dbg.%MPT_DIST_VARIANT_TRK%\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\openmpt-%MPT_DIST_VARIANT_TRK%-%MPT_REVISION%-symbols\OpenMPT%MPT_VS_FLAVOUR%.pdb.%MPT_PKG_FORMAT_SYMBOLS% OpenMPT%MPT_VS_FLAVOUR%.pdb || goto error
  65. ..\..\build\tools\7zip\7z.exe a -t%MPT_PKG_FORMAT_SYMBOLS% -mx=9 ..\openmpt\dbg.%MPT_DIST_VARIANT_TRK%\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\openmpt-%MPT_DIST_VARIANT_TRK%-%MPT_REVISION%-symbols\openmpt-lame.pdb.%MPT_PKG_FORMAT_SYMBOLS% openmpt-lame.pdb || goto error
  66. ..\..\build\tools\7zip\7z.exe a -t%MPT_PKG_FORMAT_SYMBOLS% -mx=9 ..\openmpt\dbg.%MPT_DIST_VARIANT_TRK%\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\openmpt-%MPT_DIST_VARIANT_TRK%-%MPT_REVISION%-symbols\openmpt-mpg123.pdb.%MPT_PKG_FORMAT_SYMBOLS% openmpt-mpg123.pdb || goto error
  67. ..\..\build\tools\7zip\7z.exe a -t%MPT_PKG_FORMAT_SYMBOLS% -mx=9 ..\openmpt\dbg.%MPT_DIST_VARIANT_TRK%\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\openmpt-%MPT_DIST_VARIANT_TRK%-%MPT_REVISION%-symbols\openmpt-soundtouch.pdb.%MPT_PKG_FORMAT_SYMBOLS% openmpt-soundtouch.pdb || goto error
  68. ..\..\build\tools\7zip\7z.exe a -t%MPT_PKG_FORMAT_SYMBOLS% -mx=9 ..\openmpt\dbg.%MPT_DIST_VARIANT_TRK%\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\openmpt-%MPT_DIST_VARIANT_TRK%-%MPT_REVISION%-symbols\PluginBridge-x86.pdb.%MPT_PKG_FORMAT_SYMBOLS% PluginBridge-x86.pdb || goto error
  69. ..\..\build\tools\7zip\7z.exe a -t%MPT_PKG_FORMAT_SYMBOLS% -mx=9 ..\openmpt\dbg.%MPT_DIST_VARIANT_TRK%\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\openmpt-%MPT_DIST_VARIANT_TRK%-%MPT_REVISION%-symbols\PluginBridge-amd64.pdb.%MPT_PKG_FORMAT_SYMBOLS% PluginBridge-amd64.pdb || goto error
  70. ..\..\build\tools\7zip\7z.exe a -t%MPT_PKG_FORMAT_SYMBOLS% -mx=9 ..\openmpt\dbg.%MPT_DIST_VARIANT_TRK%\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\openmpt-%MPT_DIST_VARIANT_TRK%-%MPT_REVISION%-symbols\PluginBridgeLegacy-x86.pdb.%MPT_PKG_FORMAT_SYMBOLS% PluginBridgeLegacy-x86.pdb || goto error
  71. ..\..\build\tools\7zip\7z.exe a -t%MPT_PKG_FORMAT_SYMBOLS% -mx=9 ..\openmpt\dbg.%MPT_DIST_VARIANT_TRK%\%OPENMPT_VERSION_MAJORMAJOR%.%OPENMPT_VERSION_MAJOR%\openmpt-%MPT_DIST_VARIANT_TRK%-%MPT_REVISION%-symbols\PluginBridgeLegacy-amd64.pdb.%MPT_PKG_FORMAT_SYMBOLS% PluginBridgeLegacy-amd64.pdb || goto error
  72. cd .. || goto error
  73. ..\build\tools\7zip\7z.exe a -ttar openmpt-%MPT_DIST_VARIANT_TRK%.tar openmpt || goto error
  74. del /f /q openmpt-%MPT_DIST_VARIANT_TRK%-%MPT_REVISION%.%MPT_PKG_FORMAT%
  75. del /f /q openmpt-%MPT_DIST_VARIANT_TRK%-%MPT_REVISION%-symbols.%MPT_PKG_FORMAT_SYMBOLS%
  76. rmdir /s /q openmpt-%MPT_DIST_VARIANT_TRK%
  77. cd .. || goto error
  78. goto noerror
  79. :error
  80. cd "%MY_DIR%"
  81. exit 1
  82. :noerror
  83. cd "%MY_DIR%"
  84. exit 0