Add option for white text fix.

This commit is contained in:
Scott Giese 2019-09-29 17:50:58 -05:00
parent 61fbe94ee2
commit f61d0d35bd

View File

@ -17,6 +17,28 @@ REM You should have received a copy of the GNU General Public License
REM along with this program; if not, write to the Free Software REM along with this program; if not, write to the Free Software
REM Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. REM Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
REM Defaults
set WHITE_TEXT_FIX=0
set OSG_SOURCE_PATH=scratch-source/openscenegraph-3.6-git
set OSG_BUILD_PATH=scratch-build/openscenegraph-3.6
REM Process arguments
:parse
if "%~1"=="" goto endparse
if "%~1"=="-wt"(
set WHITE_TEXT_FIX=1
set OSG_SOURCE_PATH=scratch-source/openscenegraph-fix-git
set OSG_BUILD_PATH=scratch-build/openscenegraph-fix
)
if "%~1"=="--whitetext"(
set WHITE_TEXT_FIX=1
set OSG_SOURCE_PATH=scratch-source/openscenegraph-fix-git
set OSG_BUILD_PATH=scratch-build/openscenegraph-fix
)
SHIFT
goto parse
:endparse
set ROOT_DIR=%CD% set ROOT_DIR=%CD%
set PATH=%ROOT_DIR%/vcpkg-git/installed/x64-windows/bin;%ROOT_DIR%/vcpkg-git/installed/x64-windows/include;%ROOT_DIR%/vcpkg-git/installed/x64-windows/lib;%PATH% set PATH=%ROOT_DIR%/vcpkg-git/installed/x64-windows/bin;%ROOT_DIR%/vcpkg-git/installed/x64-windows/include;%ROOT_DIR%/vcpkg-git/installed/x64-windows/lib;%PATH%
@ -75,6 +97,19 @@ if not exist scratch-install/NUL (
mkdir scratch-install mkdir scratch-install
) )
if %WHITE_TEXT_FIX%==1 (
if not exist scratch-build/openscenegraph-fix/NUL (
mkdir scratch-build\openscenegraph-fix
)
if not exist scratch-source/openscenegraph-fix-git/NUL (
echo Downloading OpenSceneGraph (white text fix) . . .
git clone -b fgfs-342-1 https://github.com/zakalawe/osg.git scratch-source/openscenegraph-fix-git
) else (
echo Updating OpenSceneGraph (white text fix) . . .
cd scratch-source/openscenegraph-fix-git
git pull
)
) else (
if not exist scratch-build/openscenegraph-3.6/NUL ( if not exist scratch-build/openscenegraph-3.6/NUL (
mkdir scratch-build\openscenegraph-3.6 mkdir scratch-build\openscenegraph-3.6
) )
@ -86,6 +121,7 @@ if not exist scratch-source/openscenegraph-3.6-git/NUL (
cd scratch-source/openscenegraph-3.6-git cd scratch-source/openscenegraph-3.6-git
git pull git pull
) )
)
cd %ROOT_DIR% cd %ROOT_DIR%
if not exist scratch-build/simgear/NUL ( if not exist scratch-build/simgear/NUL (
@ -133,8 +169,8 @@ REM -DQt5OpenGL_DIR=%QT5x64_CMAKE%/Qt5OpenGL ^
REM -DQt5Widgets_DIR=%QT5x64_CMAKE%/Qt5Widgets ^ REM -DQt5Widgets_DIR=%QT5x64_CMAKE%/Qt5Widgets ^
echo Compiling OpenSceneGraph . . . echo Compiling OpenSceneGraph . . .
cd scratch-build\openscenegraph-3.6 cd %OSG_BUILD_PATH%
cmake ..\..\scratch-source\openscenegraph-3.6-git -G %CMAKE_TOOLCHAIN% ^ cmake ..\..\%OSG_SOURCE_PATH% -G %CMAKE_TOOLCHAIN% ^
-DCMAKE_CONFIGURATION_TYPES:STRING=Debug;Release ^ -DCMAKE_CONFIGURATION_TYPES:STRING=Debug;Release ^
-DCMAKE_BUILD_TYPE:STRING=Release ^ -DCMAKE_BUILD_TYPE:STRING=Release ^
-DCMAKE_INSTALL_PREFIX:PATH=%ROOT_DIR%/scratch-install ^ -DCMAKE_INSTALL_PREFIX:PATH=%ROOT_DIR%/scratch-install ^