Added script for creating release packages.

This commit is contained in:
LoRd_MuldeR 2016-12-20 21:02:20 +01:00
parent 32e8f2849a
commit f56c49767c
2 changed files with 33 additions and 2 deletions

View File

@ -258,7 +258,7 @@ namespace MUtils
/**
* \brief Clean up a file name string
*
* This function ensures that the given string is a valid file (or directory) name. It does so by replacing any illegal characters, i.e. any characters *not* allowed in file names (which explicitly *includes* directory separators). Furthermore, the function will trim/remove specific characters that are *not* allowed directly at the beginning or end of a file name. Finally, the function takes care or special "reserved" file names that are forbidden by the file system. You can use this function to convert user inputs into a valid file name.
* This function ensures that the given string is a valid file (or directory) name. It does so by replacing any illegal characters, i.e. any characters *not* allowed in file names (which explicitly *includes* directory separators). Furthermore, the function will trim/remove specific characters that are *not* allowed directly at the beginning or end of a file name. Finally, the function takes care of special "reserved" file names that are forbidden by the file system. You can use this function to convert user inputs into a valid file name.
*
* \param list A read-only reference to the QString holding the original, potentially invalid file name.
*
@ -269,7 +269,7 @@ namespace MUtils
/**
* \brief Clean up a file path string
*
* This function ensures that the given string is a valid file (or directory) path. It does so by replacing any illegal characters, i.e. any characters *not* allowed in file paths. Directory separators are preserved, but they will be "canonicalized". Furthermore, in each path component, the function will trim/remove specific characters that are *not* allowed directly at the beginning or end of a path component. Finally, the function takes care or special "reserved" file names that are forbidden by the file system. You can use this function to convert user inputs into a valid file path.
* This function ensures that the given string is a valid file (or directory) path. It does so by replacing any illegal characters, i.e. any characters *not* allowed in file paths. Directory separators are preserved, but they will be "canonicalized". Furthermore, in each path component, the function will trim/remove specific characters that are *not* allowed directly at the beginning or end of a path component. Finally, the function takes care of special "reserved" file names that are forbidden by the file system. You can use this function to convert user inputs into a valid file path.
*
* \param list A read-only reference to the QString holding the original, potentially invalid file path.
*

31
z_mkpack.bat Normal file
View File

@ -0,0 +1,31 @@
@echo off
set "GIT_PATH=c:\Program Files\Git"
set "PATH=%GIT_PATH%;%GIT_PATH%\mingw64\bin;%GIT_PATH%\usr\bin;%PATH%"
set "OUT_PATH=%TEMP%\~%RANDOM%%RANDOM%.tmp"
mkdir "%OUT_PATH%"
mkdir "%OUT_PATH%\MUtilities"
call::git_export "%~dp0\." MUtilities
pushd "%OUT_PATH%"
tar -cvf ./sources.tar *
"%~dp0\..\Prerequisites\SevenZip\7za.exe" a -txz "%~dp0\~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