code.sh: add datafolder

This commit is contained in:
Martin Aeschlimann 2019-05-29 23:18:39 +02:00
parent 0a7ec36603
commit ecf9a9f764
2 changed files with 3 additions and 1 deletions

View file

@ -397,6 +397,7 @@ function packageTask(platform, arch, sourceFolderName, destinationFolderName, op
.pipe(replace('@@VERSION@@', version))
.pipe(replace('@@COMMIT@@', commit))
.pipe(replace('@@APPNAME@@', product.applicationName))
.pipe(replace('@@DATAFOLDER@@', product.dataFolderName))
.pipe(replace('@@QUALITY@@', quality))
.pipe(rename(function (f) { f.basename = product.applicationName; f.extname = ''; })));

View file

@ -6,6 +6,7 @@ COMMIT="@@COMMIT@@"
APP_NAME="@@APPNAME@@"
QUALITY="@@QUALITY@@"
NAME="@@NAME@@"
DATAFOLDER="@@DATAFOLDER@@"
VSCODE_PATH="$(dirname "$(dirname "$(realpath "$0")")")"
ELECTRON="$VSCODE_PATH/$NAME.exe"
if grep -qi Microsoft /proc/version; then
@ -26,7 +27,7 @@ if grep -qi Microsoft /proc/version; then
# replace \r\n with \n in WSL_EXT_WLOC
WSL_CODE=$(wslpath -u "${WSL_EXT_WLOC%%[[:cntrl:]]}")/scripts/wslCode.sh
WIN_CODE_CMD=$(wslpath -w "$VSCODE_PATH/bin/$APP_NAME.cmd")
"$WSL_CODE" $COMMIT $QUALITY "$WIN_CODE_CMD" "$APP_NAME" "$@"
"$WSL_CODE" "$COMMIT" "$QUALITY" "$WIN_CODE_CMD" "$APP_NAME" "$DATAFOLDER" "$@"
exit $?
else
CLI=$(wslpath -m "$VSCODE_PATH/resources/app/out/cli.js")