build: msvc: chdir with change drive to script location
PATCH 1/1 build: msvc: chdir with change drive to script location
--- msvc-build.bat | 1 + msvc-dev.bat | 2 +- msvc-env.bat | 2 -- 3 files changed, 2 insertions(+), 3 deletions(-)
msvc-build.bat +1 -0
@@ -4,6 +4,7 @@ rem Copyright (C) 2008-2012 Alon Bar-Lev <[email protected]...> @rem this stupid command needed for SetEnv.cmd to operate setlocal ENABLEDELAYEDEXPANSION +cd /d %0\.. call msvc-env.bat set PLATFORMS=Win32
msvc-dev.bat +1 -1
@@ -1,7 +1,7 @@ @echo off setlocal -cd %0\.. +cd /d %0\.. call msvc-env.bat if exist "%VSHOME%\Common7\IDE\VCExpress.exe" (
msvc-env.bat +0 -2
@@ -1,7 +1,5 @@ @echo off -cd %0\.. - rem Put your own settings at msvc-env-local.bat if exist msvc-env-local.bat call msvc-env-local.bat
Signature · 1 line
1.7.3.4
Please apply.
https://github.com/alonbl/openvpn/commit/692c35a3cce6226dd36bbc6b9138a353d1d14634
Quoted 47 lines · Alon Bar-Lev
Signed-off-by Alon Bar-Lev <[email protected]...>---
msvc-build.bat | 1 +
msvc-dev.bat | 2 +-
msvc-env.bat | 2 --3 files changed, 2 insertions(+), 3 deletions(-)msvc-build.bat +0
-0@@ -4,6 +4,7 @@ rem Copyright (C) 2008-2012 Alon Bar-Lev <[email protected]...>@...1738... this stupid command needed for SetEnv.cmd to operate setlocal ENABLEDELAYEDEXPANSION
+cd /d %0\..
call msvc-env.batset PLATFORMS=Win32
msvc-dev.bat +0
-0@@ -1,7 +1,7 @@@...1657... off
setlocal
msvc-dev.bat +1
-1-cd %0\.. +cd /d %0\..call msvc-env.bat
if exist "%VSHOME%\Common7\IDE\VCExpress.exe" (
msvc-env.bat +0
-0@@ -1,7 +1,5 @@@...1657... off
msvc-env.bat +0
-2-cd %0\.. -rem Put your own settings at msvc-env-local.bat if exist msvc-env-local.bat call msvc-env-local.bat
--
1.7.3.4
I tested building with "openvpn-build\msvc" with this patch applied, and it still worked. I don't see any reason not to apply this, so it's an ACK.
The "cd /d %0\.." magic is very interesting... "cd %0\.." seems to work exactly the same: both switch to the directory where msvc-build.bat is located (i.e. openvpn build root).
If I understood correctly, the /d switch allows changing to a directory on an another drive, right?
Samuli
Quoted 44 lines
Signed-off-by Alon Bar-Lev <[email protected]...>--- msvc-build.bat | 1 + msvc-dev.bat | 2 +- msvc-env.bat | 2 -- 3 files changed, 2 insertions(+), 3 deletions(-)msvc-build.bat +1
-0@@ -4,6 +4,7 @@ rem Copyright (C) 2008-2012 Alon Bar-Lev <[email protected]...> @rem this stupid command needed for SetEnv.cmd to operate setlocal ENABLEDELAYEDEXPANSION +cd /d %0\.. call msvc-env.bat set PLATFORMS=Win32msvc-dev.bat +1
-1@@ -1,7 +1,7 @@ @echo off setlocal -cd %0\.. +cd /d %0\.. call msvc-env.bat if exist "%VSHOME%\Common7\IDE\VCExpress.exe" (msvc-env.bat +0
-2@@ -1,7 +1,5 @@ @echo off -cd %0\.. - rem Put your own settings at msvc-env-local.bat if exist msvc-env-local.bat call msvc-env-local.bat
David Sommerseth
Applied-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 4 lines · Alon Bar-Lev
Signed-off-by Alon Bar-Lev <[email protected]...> ---msvc-build.bat | 1 + msvc-dev.bat | 2 +- msvc-env.bat |
2 -- 3 files changed, 2 insertions(+), 3 deletions(-)
Applied to master.
commit 6d2b65ad322e587efaf43c1b8cf6da8c36cf1ae1
Author: Alon Bar-Lev <[email protected]...> Date: Sat Apr 28 21:51:58 2012 +0300
build: msvc: chdir with change drive to script location
Signed-off-by: Alon Bar-Lev <[email protected]...>
Acked-by: Samuli Seppänen <[email protected]...>
Message-Id: [email protected]...
URL: http://article.gmane.org/gmane.network.openvpn.devel/6383
Signed-off-by: David Sommerseth <[email protected]...>kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAk/tZvIACgkQDC186MBRfrppvACfSGt/dhmxvIJdMD0+1WacGJKy 2PsAn1kWrwj8SKiXF6sXJyYTc8rT06uG
=3iVf
-----END PGP SIGNATURE-----