-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
msi: support path which contains space
When installing fluent-package to c:\Program Files, it must be escaped correctly. * sources.wxs * For xml, double quote (") must be " * to escape double quote in literal, you must escape with ^"e; it is treated as ^", so it intended to execute: "cmd" /c "fsutil ... "c:\Program Files .." "c:\Program Files..."" * .bat * set FOO="..." assign extra double quote, it's not intended * use set "FOO=..." to assign without extra double quote * to get RUBY_VERSION, disable delimiter with delim= and escape * command explicitly. Signed-off-by: Kentaro Hayashi <hayashi@clear-code.com>
- Loading branch information
Showing
3 changed files
with
19 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
@echo off | ||
if "%~nx0" == "td-agent-gem.bat" ( | ||
set FLUENT_PACKAGE_TOPDIR=%~dp0..\ | ||
set "FLUENT_PACKAGE_TOPDIR=%~dp0..\" | ||
) else ( | ||
set FLUENT_PACKAGE_TOPDIR=%~dp0 | ||
set "FLUENT_PACKAGE_TOPDIR=%~dp0" | ||
) | ||
set FLUENT_PACKAGE_BINDIR=%FLUENT_PACKAGE_TOPDIR%bin | ||
set PATH="%FLUENT_PACKAGE_BINDIR%";%PATH% | ||
for /f "usebackq" %%i in (`%FLUENT_PACKAGE_BINDIR%\ruby.exe -rrbconfig -e "print RbConfig::CONFIG['ruby_version']"`) do set RUBY_VERSION=%%i | ||
set GEM_HOME=%FLUENT_PACKAGE_TOPDIR%lib\ruby\gems\%RUBY_VERSION% | ||
set GEM_PATH=%FLUENT_PACKAGE_TOPDIR%lib\ruby\gems\%RUBY_VERSION% | ||
%FLUENT_PACKAGE_BINDIR%\fluent-gem %* | ||
set "FLUENT_PACKAGE_BINDIR=%FLUENT_PACKAGE_TOPDIR%bin" | ||
set PATH=%FLUENT_PACKAGE_BINDIR%;%PATH% | ||
for /f "delim=" %%i in ('^""%FLUENT_PACKAGE_BINDIR%\ruby.exe" -rrbconfig -e "print RbConfig::CONFIG['ruby_version']"^"') do set RUBY_VERSION=%%i | ||
set "GEM_HOME=%FLUENT_PACKAGE_TOPDIR%lib\ruby\gems\%RUBY_VERSION%" | ||
set "GEM_PATH=%FLUENT_PACKAGE_TOPDIR%lib\ruby\gems\%RUBY_VERSION%" | ||
"%FLUENT_PACKAGE_BINDIR%\fluent-gem" %* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters