• R/O
  • HTTP
  • SSH
  • HTTPS

MUtilities: 提交

MUtilities development repository


Commit MetaInfo

修订版f56c49767ca0c0306b8b7200b5e7f0eb1949deed (tree)
时间2016-12-21 05:02:20
作者LoRd_MuldeR <mulder2@gmx....>
CommiterLoRd_MuldeR

Log Message

Added script for creating release packages.

更改概述

差异

--- a/include/MUtils/Global.h
+++ b/include/MUtils/Global.h
@@ -258,7 +258,7 @@ namespace MUtils
258258 /**
259259 * \brief Clean up a file name string
260260 *
261- * 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.
261+ * 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.
262262 *
263263 * \param list A read-only reference to the QString holding the original, potentially invalid file name.
264264 *
@@ -269,7 +269,7 @@ namespace MUtils
269269 /**
270270 * \brief Clean up a file path string
271271 *
272- * 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.
272+ * 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.
273273 *
274274 * \param list A read-only reference to the QString holding the original, potentially invalid file path.
275275 *
--- /dev/null
+++ b/z_mkpack.bat
@@ -0,0 +1,31 @@
1+@echo off
2+set "GIT_PATH=c:\Program Files\Git"
3+set "PATH=%GIT_PATH%;%GIT_PATH%\mingw64\bin;%GIT_PATH%\usr\bin;%PATH%"
4+set "OUT_PATH=%TEMP%\~%RANDOM%%RANDOM%.tmp"
5+
6+mkdir "%OUT_PATH%"
7+mkdir "%OUT_PATH%\MUtilities"
8+
9+call::git_export "%~dp0\." MUtilities
10+
11+pushd "%OUT_PATH%"
12+tar -cvf ./sources.tar *
13+"%~dp0\..\Prerequisites\SevenZip\7za.exe" a -txz "%~dp0\~sources.tar.xz" "sources.tar"
14+popd
15+
16+pushd "%~dp0"
17+rmdir /S /Q "%OUT_PATH%"
18+
19+pause
20+exit
21+
22+
23+:git_export
24+pushd "%~1"
25+git archive --verbose --output "%OUT_PATH%\%~2.tar" MASTER
26+popd
27+pushd "%OUT_PATH%\%~2"
28+tar -xvf "../%~2.tar"
29+del "%OUT_PATH%\%~2.tar"
30+popd
31+goto:eof
Show on old repository browser