[atk] MSVC builds: Make marshal generation more robust



commit a9c2401c6ce5f412c7ff65f16ec69044f1eb37f8
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Mon Jul 31 16:58:02 2017 +0800

    MSVC builds: Make marshal generation more robust
    
    Since we may now have glib-genmarshal as a Python script or a standard
    .exe binary, make the process more robust by actually trying to run
    glib-genmarshal first as a Python script, and then falling back to the
    former .exe approach if the Python method failed.

 win32/vs10/atk-gen-src.props  |   14 +++++++-------
 win32/vs9/atk-gen-src.vsprops |    8 ++++----
 2 files changed, 11 insertions(+), 11 deletions(-)
---
diff --git a/win32/vs10/atk-gen-src.props b/win32/vs10/atk-gen-src.props
index d4287cb..76f0dfa 100644
--- a/win32/vs10/atk-gen-src.props
+++ b/win32/vs10/atk-gen-src.props
@@ -7,18 +7,18 @@
     <GenConfigH>if not exist ..\..\config.h copy ..\..\config.h.win32 ..\..\config.h</GenConfigH>
     <GenMarshalSrc>
 cd ..\..\atk
-if exist $(GLibEtcInstallRoot)\bin\glib-genmarshal $(PythonDir)\python 
$(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --header --output=atkmarshal.h 
atkmarshal.list
-if not exist atkmarshal.h $(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal atkmarshal.list 
--header --output=atkmarshal.h
-if exist $(GLibEtcInstallRoot)\bin\glib-genmarshal $(PythonDir)\python 
$(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --body --output=atkmarshal.c 
atkmarshal.list
-if not exist atkmarshal.c $(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal atkmarshal.list 
--body --output=atkmarshal.c
+$(PythonDir)\python $(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --header 
--output=atkmarshal.h atkmarshal.list 2&gt;nul &amp; set ERRORLEVEL=0
+if not exist atkmarshal.h $(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal atkmarshal.list 
--header &gt; atkmarshal.h
+$(PythonDir)\python $(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --body 
--output=atkmarshal.c atkmarshal.list 2&gt;nul &amp; set ERRORLEVEL=0
+if not exist atkmarshal.c $(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal atkmarshal.list 
--body &gt; atkmarshal.c
 cd $(SolutionDir)
     </GenMarshalSrc>
     <GenMarshalSrcX64>
 cd ..\..\atk
-if exist $(GLibEtcInstallRoot)\bin\glib-genmarshal $(PythonDirX64)\python 
$(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --header --output=atkmarshal.h 
atkmarshal.list
+$(PythonDirX64)\python $(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --header 
--output=atkmarshal.h atkmarshal.list 2&gt;nul &amp; set ERRORLEVEL=0
 if not exist atkmarshal.h $(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal atkmarshal.list 
--header --output=atkmarshal.h
-if exist $(GLibEtcInstallRoot)\bin\glib-genmarshal $(PythonDirX64)\python 
$(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --body --output=atkmarshal.c 
atkmarshal.list
-if not exist atkmarshal.c $(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal atkmarshal.list 
--body --output=atkmarshal.c
+$(PythonDirX64)\python $(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --body 
--output=atkmarshal.c atkmarshal.list 2&gt;nul &amp; set ERRORLEVEL=0
+if not exist atkmarshal.c $(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal atkmarshal.list 
--body &gt; atkmarshal.c
 cd $(SolutionDir)
     </GenMarshalSrcX64>
   </PropertyGroup>
diff --git a/win32/vs9/atk-gen-src.vsprops b/win32/vs9/atk-gen-src.vsprops
index e7ffb6c..8468687 100644
--- a/win32/vs9/atk-gen-src.vsprops
+++ b/win32/vs9/atk-gen-src.vsprops
@@ -13,9 +13,9 @@
                Name="GenMarshalSrc"
                Value="
 cd ..\..\atk&#x0D;&#x0A;
-if exist $(GLibEtcInstallRoot)\bin\glib-genmarshal $(PythonDir)\python 
$(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --header --output=atkmarshal.h 
atkmarshal.list&#x0D;&#x0A;
+$(PythonDir)\python $(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --header 
--output=atkmarshal.h atkmarshal.list 2&gt;nul &amp; set ERRORLEVEL=0&#x0D;&#x0A;
 if not exist atkmarshal.h $(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal atkmarshal.list 
--header &gt; atkmarshal.h&#x0D;&#x0A;
-if exist $(GLibEtcInstallRoot)\bin\glib-genmarshal $(PythonDir)\python 
$(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --body --output=atkmarshal.c 
atkmarshal.list&#x0D;&#x0A;
+$(PythonDir)\python $(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --body 
--output=atkmarshal.c atkmarshal.list 2&gt;nul &amp; set ERRORLEVEL=0&#x0D;&#x0A;
 if not exist atkmarshal.c $(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal atkmarshal.list 
--body &gt; atkmarshal.c&#x0D;&#x0A;
 cd $(SolutionDir)&#x0D;&#x0A;
                      "
@@ -24,9 +24,9 @@ cd $(SolutionDir)&#x0D;&#x0A;
                 Name="GenMarshalSrcX64"
                 Value="
 cd ..\..\atk&#x0D;&#x0A;
-if exist $(GLibEtcInstallRoot)\bin\glib-genmarshal $(PythonDirX64)\python 
$(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --header --output=atkmarshal.h 
atkmarshal.list&#x0D;&#x0A;
+$(PythonDirX64)\python $(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --header 
--output=atkmarshal.h atkmarshal.list 2&gt;nul &amp; set ERRORLEVEL=0&#x0D;&#x0A;
 if not exist atkmarshal.h $(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal atkmarshal.list 
--header &gt; atkmarshal.h&#x0D;&#x0A;
-if exist $(GLibEtcInstallRoot)\bin\glib-genmarshal $(PythonDirX64)\python 
$(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --body --output=atkmarshal.c 
atkmarshal.list&#x0D;&#x0A;
+$(PythonDirX64)\python $(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal --quiet --body 
--output=atkmarshal.c atkmarshal.list 2&gt;nul &amp; set ERRORLEVEL=0&#x0D;&#x0A;
 if not exist atkmarshal.c $(GLibEtcInstallRoot)\bin\glib-genmarshal --prefix=atk_marshal atkmarshal.list 
--body &gt; atkmarshal.c&#x0D;&#x0A;
 cd $(SolutionDir)&#x0D;&#x0A;
                       "


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]