mirror of https://github.com/OpenRCT2/OpenRCT2.git
Merge pull request #358 from Balletie/master
Fix for blank screen at startup. (fixes #350)
This commit is contained in:
commit
85d8f26d89
|
@ -1,20 +1,11 @@
|
|||
SET(CMAKE_SYSTEM_NAME Windows)
|
||||
|
||||
if (APPLE)
|
||||
SET(COMPILER_PREFIX i586-mingw32)
|
||||
SET(CMAKE_C_COMPILER ${COMPILER_PREFIX}-gcc)
|
||||
SET(CMAKE_CXX_COMPILER ${COMPILER_PREFIX}-c++)
|
||||
SET(CMAKE_RC_COMPILER ${COMPILER_PREFIX}-windres)
|
||||
SET(CMAKE_PKGCONFIG_EXECUTABLE i686-w64-mingw32-pkg-config)
|
||||
SET(PKG_CONFIG_EXECUTABLE i686-w64-mingw32-pkg-config)
|
||||
else()
|
||||
SET(COMPILER_PREFIX i686-w64-mingw32)
|
||||
SET(CMAKE_C_COMPILER ${COMPILER_PREFIX}-gcc)
|
||||
SET(CMAKE_CXX_COMPILER ${COMPILER_PREFIX}-c++)
|
||||
SET(CMAKE_RC_COMPILER ${COMPILER_PREFIX}-windres)
|
||||
SET(CMAKE_PKGCONFIG_EXECUTABLE ${COMPILER_PREFIX}-pkg-config)
|
||||
SET(PKG_CONFIG_EXECUTABLE ${COMPILER_PREFIX}-pkg-config)
|
||||
endif (APPLE)
|
||||
SET(COMPILER_PREFIX i686-w64-mingw32)
|
||||
SET(CMAKE_C_COMPILER ${COMPILER_PREFIX}-gcc)
|
||||
SET(CMAKE_CXX_COMPILER ${COMPILER_PREFIX}-c++)
|
||||
SET(CMAKE_RC_COMPILER ${COMPILER_PREFIX}-windres)
|
||||
SET(CMAKE_PKGCONFIG_EXECUTABLE ${COMPILER_PREFIX}-pkg-config)
|
||||
SET(PKG_CONFIG_EXECUTABLE ${COMPILER_PREFIX}-pkg-config)
|
||||
|
||||
# potential flags to make code more similar to MSVC:
|
||||
# -fshort-wchar -fshort-enums -mms-bitfields
|
||||
|
@ -22,15 +13,19 @@ endif (APPLE)
|
|||
set(CMAKE_C_FLAGS "-masm=intel -std=gnu99 -fpack-struct=2" CACHE STRING "" FORCE)
|
||||
set(CMAKE_SHARED_LINKER_FLAGS "-static-libgcc" CACHE STRING "" FORCE)
|
||||
|
||||
include_directories("/usr/include/wine/windows/")
|
||||
|
||||
# find and include SDL2
|
||||
INCLUDE(FindPkgConfig)
|
||||
PKG_SEARCH_MODULE(SDL2 REQUIRED sdl2)
|
||||
INCLUDE_DIRECTORIES(${SDL2_INCLUDE_DIRS})
|
||||
|
||||
if(APPLE)
|
||||
SET(TARGET_ENVIRONMENT /usr/local/mingw-w32-bin_i686-darwin/i686-w64-mingw32)
|
||||
else()
|
||||
SET(TARGET_ENVIRONMENT /usr/i686-w64-mingw32)
|
||||
endif(APPLE)
|
||||
|
||||
# here is the target environment located
|
||||
#SET(CMAKE_FIND_ROOT_PATH /usr/${COMPILER_PREFIX})
|
||||
SET(CMAKE_FIND_ROOT_PATH ${TARGET_ENVIRONMENT})
|
||||
|
||||
# adjust the default behaviour of the FIND_XXX() commands:
|
||||
# search headers and libraries in the target environment, search
|
||||
|
|
29
install.sh
29
install.sh
|
@ -49,18 +49,29 @@ if [[ `uname` == "Darwin" ]]; then
|
|||
sudo ln -s $wine_path /usr/include
|
||||
fi
|
||||
|
||||
mingw_dmg=gcc-4.8.0-qt-4.8.4-for-mingw32.dmg
|
||||
mingw_path=/usr/local/gcc-4.8.0-qt-4.8.4-for-mingw32/win32-gcc/bin
|
||||
if [[ ! -f $cachedir/$mingw_dmg ]]; then
|
||||
wget http://crossgcc.rts-software.org/download/gcc-4.8.0-qt-4.8.4-win32/$mingw_dmg --output-document $cachedir/$mingw_dmg
|
||||
mingw_name=mingw-w32-bin_i686-darwin
|
||||
mingw_tar=$mingw_name"_20130531".tar.bz2
|
||||
mingw_path=/usr/local/$mingw_name
|
||||
if [[ ! -f $cachedir/$mingw_tar ]]; then
|
||||
wget "https://downloads.sourceforge.net/project/mingw-w64/Toolchains targetting Win32/Automated Builds/$mingw_tar" --output-document $cachedir/$mingw_tar
|
||||
fi
|
||||
if [[ ! -d $ming_path ]]; then
|
||||
|
||||
if [[ ! -d $mingw_path ]]; then
|
||||
echo "Open the DMG file and install its contents"
|
||||
open $cachedir/$mingw_dmg
|
||||
pushd /usr/local/
|
||||
sudo mkdir $mingw_name
|
||||
popd
|
||||
|
||||
echo "Extracting contents of $mingw_tar to $mingw_path"
|
||||
echo "Don't forget to add $mingw_path to your PATH variable!"
|
||||
sudo tar -xyf $cachedir/$mingw_tar -C $mingw_path
|
||||
|
||||
pushd /usr/local
|
||||
sudo chmod 755 $mingw_name
|
||||
pushd $mingw_name
|
||||
sudo find . -type d -exec chmod 755 {} \;
|
||||
popd
|
||||
popd
|
||||
fi
|
||||
|
||||
echo "You will need to add $mingw_path to your \$PATH"
|
||||
elif [[ `uname` == "Linux" ]]; then
|
||||
sudo apt-get install -y --force-yes binutils-mingw-w64-i686 gcc-mingw-w64-i686 g++-mingw-w64-i686
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue