From 2db74fad61a05a36ca293d7af331fcf40c2720c7 Mon Sep 17 00:00:00 2001 From: LoRd_MuldeR Date: Sat, 24 Oct 2015 11:34:55 +0200 Subject: [PATCH] Added script for creating "all inclusive" source packages. --- etc/Deployment/pack_source.bat | 49 ++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 etc/Deployment/pack_source.bat diff --git a/etc/Deployment/pack_source.bat b/etc/Deployment/pack_source.bat new file mode 100644 index 00000000..9b1fc7dc --- /dev/null +++ b/etc/Deployment/pack_source.bat @@ -0,0 +1,49 @@ +@echo off +set "GIT_PATH=c:\Program Files\Git" +set "ZIP_PATH=c:\Program Files\7-Zip" +set "PATH=%GIT_PATH%;%GIT_PATH%\mingw64\bin;%GIT_PATH%\usr\bin;%PATH%" +set "OUT_PATH=%TEMP%\~%RANDOM%%RANDOM%.tmp" + +mkdir "%OUT_PATH%" +for %%i in (LameXP_Qt,MUtilities,Prerequisites) do ( + mkdir "%OUT_PATH%\%%i" +) + +call::git_export "%~dp0..\.." LameXP_Qt +call::git_export "%~dp0\..\..\..\MUtilities" MUtilities + +copy "..\..\*.txt" "%OUT_PATH%" + +for %%i in (EncodePointer,VisualLeakDetector) do ( + mkdir "%OUT_PATH%\Prerequisites\%%i" + xcopy /S /Y "%~dp0\..\..\..\Prerequisites\%%i" "%OUT_PATH%\Prerequisites\%%i" +) + +for %%k in (v100,v120_xp,v140_xp) do ( + for %%i in (Static,Shared,Debug) do ( + mkdir "%OUT_PATH%\Prerequisites\Qt4\%%k\%%i" + echo Please put the Qt library files here! > "%OUT_PATH%\Prerequisites\Qt4\%%k\%%i\README.txt" + ) +) + +pushd "%OUT_PATH%" +tar -cvf ./sources.tar * +"%ZIP_PATH%\7z.exe" a -txz "%~dp0\..\..\out\~sources.tar.xz" "sources.tar" +popd + +pushd "%~dp0" +rmdir /S /Q "%OUT_PATH%" + +pause +exit + + +:git_export +pushd "%~1" +git archive --verbose --output "%OUT_PATH%\%~2.tar" MASTER +popd +pushd "%OUT_PATH%\%~2" +tar -xvf "../%~2.tar" +del "%OUT_PATH%\%~2.tar" +popd +goto:eof