commit 6e3a4ecfe78c5221e0d819c22afb69280c55c978
Author: Peter Kümmel <kuem...@lyx.org>
Date:   Wed Jan 13 15:42:43 2016 +0100

    mingw.bat: circumvent critical python detection
    
    LyX could be build with a double click on mingw.bat.

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e10ab3d..39880f2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -640,24 +640,25 @@ foreach(_spell "ASPELL" "Enchant" "Hunspell")
   endif()
 endforeach()
 
+if(NOT LYX_PYTHON_EXECUTABLE)
+       find_package(PythonInterp 2.7 QUIET)
+       if(PYTHONINTERP_FOUND)
+         if(PYTHON_VERSION_STRING VERSION_GREATER 2.8)
+               unset(PYTHONINTERP_FOUND)
+         endif()
+       endif()
 
-find_package(PythonInterp 2.7 QUIET)
-if(PYTHONINTERP_FOUND)
-  if(PYTHON_VERSION_STRING VERSION_GREATER 2.8)
-    unset(PYTHONINTERP_FOUND)
-  endif()
-endif()
+       if(NOT PYTHONINTERP_FOUND AND NOT GNUWIN32_DIR)
+         unset(PYTHON_EXECUTABLE CACHE)
+         unset(PYTHON_VERSION_MAJOR)
+         unset(PYTHON_VERSION_MINOR)
+         unset(PYTHON_VERSION_STRING)
+         find_package(PythonInterp 3.3 REQUIRED)
+       endif()
 
-if(NOT PYTHONINTERP_FOUND AND NOT GNUWIN32_DIR)
-  unset(PYTHON_EXECUTABLE CACHE)
-  unset(PYTHON_VERSION_MAJOR)
-  unset(PYTHON_VERSION_MINOR)
-  unset(PYTHON_VERSION_STRING)
-  find_package(PythonInterp 3.3 REQUIRED)
+       set(LYX_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "Python 
to be used by LyX")
 endif()
 
-set(LYX_PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE} CACHE FILEPATH "Python to be 
used by LyX")
-
 if(LYX_NLS)
        find_package(LyXGettext)
        if(LYX_PYTHON_EXECUTABLE AND GETTEXT_FOUND)
diff --git a/development/cmake/mingw.bat b/development/cmake/mingw.bat
index f4eac47..e9041b9 100644
--- a/development/cmake/mingw.bat
+++ b/development/cmake/mingw.bat
@@ -1,5 +1,10 @@
+REM Run this script via double click.
+
+REM Create a link and add  cmd.exe /k  in the preferences in front of the 
mingw.bat call to prevent closing the cmd window.
+
 echo off
 
+REM Install Qt from qt.io
 set PATH=C:\Qt\Qt5.5.1\5.5\mingw492_32\bin;%PATH%
 set PATH=C:\Qt\Qt5.5.1\Tools\mingw492_32\bin;%PATH%
 
@@ -9,20 +14,21 @@ set LYX_BUILD=%LYX_SOURCE%\..\compile-mingw
 echo LyX source: %LYX_SOURCE%
 echo LyX build : %LYX_BUILD%
 
-set GNUWIN32_DIR=%LYX_SOURCE%\..\msvc2010-deps
-set PATH="%GNUWIN32_DIR%\deps20\Python";%PATH%
+REM Download 
http://sourceforge.net/projects/lyx/files/Win_installers/Dependencies/lyx20-deps-msvc2010-x86.zip
+REM Extract on the same level as LyX sources
+set GNUWIN32_DIR=%LYX_SOURCE%\..\lyx20-deps-msvc2010-x86\deps20
 
 mkdir %LYX_BUILD%
 rmdir /s/q %LYX_BUILD%
 mkdir %LYX_BUILD%
 
 cd %LYX_BUILD%
-cmake %LYX_SOURCE% -GNinja -DLYX_3RDPARTY_BUILD=ON -DLYX_ENABLE_CXX11=ON 
-DLYX_USE_QT=QT5 -DLYX_MERGE_REBUILD=1 -DLYX_MERGE_FILES=1 -DLYX_NLS=1 
-DLYX_INSTALL=1 -DLYX_RELEASE=1 -DLYX_CONSOLE=OFF 
-
-ninja
-ninja install
+cmake %LYX_SOURCE% -G"MinGW Makefiles" 
-DLYX_PYTHON_EXECUTABLE=%GNUWIN32_DIR%\Python\python -DLYX_3RDPARTY_BUILD=1 
-DLYX_ENABLE_CXX11=ON -DLYX_USE_QT=QT5 -DLYX_MERGE_REBUILD=1 
-DLYX_MERGE_FILES=1 -DLYX_NLS=1 -DLYX_INSTALL=1 -DLYX_RELEASE=1 
-DLYX_CONSOLE=OFF 
 
-cd ..
+mingw32-make doc
+mingw32-make translations
+mingw32-make
+mingw32-make install/strip
 
 goto :eof
 :eof

Reply via email to