create_snapshot.bat 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. rem Set Double Commander version
  2. set DC_VER=1.1.0
  3. rem The new package will be created from here
  4. set BUILD_PACK_DIR=%TEMP%\doublecmd-release
  5. rem The new package will be saved here
  6. set PACK_DIR=%CD%\doublecmd-release
  7. rem Prepare target dir
  8. mkdir %PACK_DIR%
  9. rem Get revision number
  10. call src\platform\git2revisioninc.exe.cmd %CD%
  11. echo %REVISION%> %PACK_DIR%\revision.txt
  12. rem Change log
  13. git log -n 10 --format="%%h %%al %%ai%%n%%s%%n" > %PACK_DIR%\changelog.txt
  14. rem Get libraries
  15. pushd install
  16. curl -o windows.7z -L https://github.com/doublecmd/snapshots/raw/main/windows.7z
  17. "%ProgramFiles%\7-Zip\7z.exe" x windows.7z
  18. del /Q windows.7z
  19. popd
  20. rem Set processor architecture
  21. set CPU_TARGET=i386
  22. set OS_TARGET=win32
  23. call :doublecmd
  24. rem Set processor architecture
  25. set CPU_TARGET=x86_64
  26. set OS_TARGET=win64
  27. call :doublecmd
  28. GOTO:EOF
  29. :doublecmd
  30. rem Build all components of Double Commander
  31. call build.bat darkwin
  32. rem Copy libraries
  33. copy install\windows\lib\%CPU_TARGET%\*.dll %CD%\
  34. copy install\windows\lib\%CPU_TARGET%\winpty-agent.exe %CD%\
  35. rem Prepare install dir
  36. mkdir %BUILD_PACK_DIR%
  37. rem Prepare install files
  38. call install\windows\install.bat
  39. rem Create *.7z archive
  40. "%ProgramFiles%\7-Zip\7z.exe" a -mx9 %PACK_DIR%\doublecmd-%DC_VER%.r%REVISION%.%CPU_TARGET%-%OS_TARGET%.7z %DC_INSTALL_DIR%\*
  41. rem Clean
  42. del /Q *.dll
  43. del /Q *.exe
  44. call clean.bat
  45. rm -rf %BUILD_PACK_DIR%
  46. GOTO:EOF