Browse Source

Rename 'WIN32' build option to 'MINGW'.

Yao Wei Tjong 姚伟忠 7 years ago
parent
commit
abaa5ae884
8 changed files with 17 additions and 16 deletions
  1. 9 9
      .travis.yml
  2. 1 1
      Docs/GettingStarted.dox
  3. 1 0
      Docs/Urho3D.dox
  4. 2 2
      Rakefile
  5. 1 1
      script/.build-options
  6. 1 1
      script/.env-file
  7. 1 1
      script/cmake_generic.sh
  8. 1 1
      script/cmake_mingw.sh

+ 9 - 9
.travis.yml

@@ -57,7 +57,7 @@ before_script:
       elif [[ ! $PACKAGE_UPLOAD ]]; then
         export DISPLAY=:99.0; bash -e /etc/init.d/xvfb start;
       fi;
-    elif [[ $WIN32 ]]; then
+    elif [[ $MINGW ]]; then
       if [[ "$URHO3D_64BIT" == "0" ]]; then export ARCH=i686; else export ARCH=x86_64; fi;
       export MINGW_PREFIX=/usr/bin/${ARCH}-w64-mingw32 DIRECTX_LIB_SEARCH_PATHS=/usr/${ARCH}-w64-mingw32/lib;
     fi
@@ -117,23 +117,23 @@ matrix:
     - &MinGW-64bit
       compiler: mingw-w64-x86_64
       addons: {apt: {packages: [*default_packages, gcc-mingw-w64-x86-64, g++-mingw-w64-x86-64, binutils-mingw-w64-x86-64]}}
-      env: WIN32=1 URHO3D_LIB_TYPE=STATIC
+      env: MINGW=1 URHO3D_LIB_TYPE=STATIC
     - <<: *MinGW-64bit
-      env: WIN32=1 URHO3D_LIB_TYPE=SHARED
+      env: MINGW=1 URHO3D_LIB_TYPE=SHARED
     - <<: *MinGW-64bit
-      env: WIN32=1 URHO3D_LIB_TYPE=STATIC URHO3D_OPENGL=0
+      env: MINGW=1 URHO3D_LIB_TYPE=STATIC URHO3D_OPENGL=0
     - <<: *MinGW-64bit
-      env: WIN32=1 URHO3D_LIB_TYPE=SHARED URHO3D_OPENGL=0
+      env: MINGW=1 URHO3D_LIB_TYPE=SHARED URHO3D_OPENGL=0
     - &MinGW-32bit
       compiler: mingw-w64-i686
       addons: {apt: {packages: [*default_packages, gcc-mingw-w64-i686, g++-mingw-w64-i686, binutils-mingw-w64-i686]}}
-      env: WIN32=1 URHO3D_LIB_TYPE=STATIC URHO3D_64BIT=0
+      env: MINGW=1 URHO3D_LIB_TYPE=STATIC URHO3D_64BIT=0
     - <<: *MinGW-32bit
-      env: WIN32=1 URHO3D_LIB_TYPE=SHARED URHO3D_64BIT=0
+      env: MINGW=1 URHO3D_LIB_TYPE=SHARED URHO3D_64BIT=0
     - <<: *MinGW-32bit
-      env: WIN32=1 URHO3D_LIB_TYPE=STATIC URHO3D_64BIT=0 URHO3D_OPENGL=0
+      env: MINGW=1 URHO3D_LIB_TYPE=STATIC URHO3D_64BIT=0 URHO3D_OPENGL=0
     - <<: *MinGW-32bit
-      env: WIN32=1 URHO3D_LIB_TYPE=SHARED URHO3D_64BIT=0 URHO3D_OPENGL=0
+      env: MINGW=1 URHO3D_LIB_TYPE=SHARED URHO3D_64BIT=0 URHO3D_OPENGL=0
     - &debug-build-stage
       stage: debug build configuration
       addons: *pulseaudio

+ 1 - 1
Docs/GettingStarted.dox

@@ -101,7 +101,7 @@ A number of build options can be defined when invoking the build scripts or when
 |Build Option         |Value|Description          |
 |---------------------|-----|---------------------|
 |RPI                  |0|Configure project using Raspberry Pi cross-compiler toolchain (cmake_generic.sh only), cmake-gui users need to specify RPI toolchain file for cross-compiling explicitly|
-|WIN32                |0|Configure project using MinGW (32-bit or 64-bit) cross-compiler toolchain (cmake_generic.sh only), cmake-gui users need to specify MinGW toolchain file for cross-compiling explicitly|
+|MINGW                |0|Configure project using MinGW (32-bit or 64-bit) cross-compiler toolchain (cmake_generic.bat and cmake_generic.sh only), cmake-gui users need to specify MinGW toolchain file for cross-compiling explicitly|
 |WEB                  |0|Configure project using Emscripten cross-compiler toolchain (cmake_generic.bat and cmake_generic.sh only), cmake-gui users need to specify Emscripten toolchain file for cross-compiling explicitly|
 |IOS                  |0|Configure project for targeting iOS platform (cmake_generic.sh and cmake-gui only)|
 |TVOS                 |0|Configure project for targeting tvOS platform (cmake_generic.sh and cmake-gui only)|

+ 1 - 0
Docs/Urho3D.dox

@@ -1380,6 +1380,7 @@ From 1.7 to master:
 - StringHash::Calculate() method is now case-sensitive.
 - Build system - integrate with Gradle build system and migration to use Kotlin for Android platform.
 - Build system - introduce a new Emscripten-specific build option "EMSCRIPTEN_AUTO_SHELL" (default to TRUE), which cause the build system to automatically add an HTML shell-file if one is not explicitly given. Also set the default for "EMSCRIPTEN_WASM" build option to TRUE in order to align with the upstream EMCC compiler changes.
+- Build system - the 'WIN32' build option for 'cmake_generic.sh' is renamed to 'MINGW' to be consistent with 'cmake_generic.bat'.
 
 */
 

+ 2 - 2
Rakefile

@@ -66,7 +66,7 @@ task :cmake do
       script = "cmake_#{option}" unless script == 'cmake_clean'
     when 'android', 'arm', 'ios', 'tvos', 'mingw', 'rpi', 'web'
       platform = option
-      build_options = "#{build_options} -D#{option == 'mingw' ? 'WIN32' : option.upcase}=1" unless script == 'cmake_clean'
+      build_options = "#{build_options} -D#{option.upcase}=1" unless script == 'cmake_clean'
       script = 'cmake_xcode' if /(?:i|tv)os/ =~ option && script != 'cmake_clean'
       script = 'cmake_mingw' if option == 'mingw' && ENV['OS'] && script != 'cmake_clean'
     when 'fix_scm'
@@ -354,7 +354,7 @@ task :ci do
   generator = ENV['XCODE'] ? 'xcode' : (ENV['APPVEYOR'] ? (ENV['MINGW'] ? 'mingw' : 'vs2017') : '')
   # LuaJIT on MinGW build is not possible on Travis-CI with Ubuntu 14.04 LTS still as its GCC cross-compiler does not have native exception handling
   # LuaJIT on Web platform is not possible
-  jit = (ENV['WIN32'] && ENV['TRAVIS']) || ENV['WEB'] ? '' : 'JIT=1 URHO3D_LUAJIT_AMALG='
+  jit = (ENV['MINGW'] && ENV['TRAVIS']) || ENV['WEB'] ? '' : 'JIT=1 URHO3D_LUAJIT_AMALG='
   system "cp -rp #{ENV['HOME']}/initial-build-tree #{ENV['build_tree']}" if (ENV['OSX'] || ENV['WEB']) && ENV['CI'] && File.exist?("#{ENV['HOME']}/initial-build-tree/CMakeCache.txt")
   system "rake cmake #{generator} URHO3D_LUA#{jit}=1 URHO3D_DATABASE_SQLITE=1 URHO3D_EXTRAS=1" or abort 'Failed to configure Urho3D library build'
   system "cp -rp #{ENV['build_tree']}/* #{ENV['HOME']}/initial-build-tree 2>/dev/null && rm -rf #{ENV['HOME']}/initial-build-tree/{bin,include} 2>/dev/null" if (ENV['OSX'] || ENV['WEB']) && ENV['CI']

+ 1 - 1
script/.build-options

@@ -1,5 +1,5 @@
 RPI
-WIN32
+MINGW
 WEB
 IOS
 TVOS

+ 1 - 1
script/.env-file

@@ -43,6 +43,7 @@ LLVM_CLANG_ROOT
 MAKEFILE
 mcpu
 mfpu
+MINGW
 MINGW_PREFIX
 MINGW_SYSROOT
 MINGW_URL
@@ -118,5 +119,4 @@ URHO3D_WEBP
 URHO3D_WIN32_CONSOLE
 USE_CCACHE
 WEB
-WIN32
 XCODE

+ 1 - 1
script/cmake_generic.sh

@@ -60,7 +60,7 @@ for a in $@; do
         -DARM=1)
             if [[ ! $(uname -m) =~ ^(arm|aarch64) ]]; then OPTS="-DCMAKE_TOOLCHAIN_FILE=$TOOLCHAINS/Arm.cmake"; fi
             ;;
-        -DWIN32=1)
+        -DMINGW=1)
             OPTS="-DCMAKE_TOOLCHAIN_FILE=$TOOLCHAINS/MinGW.cmake"
             ;;
         -DWEB=1)

+ 1 - 1
script/cmake_mingw.sh

@@ -21,6 +21,6 @@
 # THE SOFTWARE.
 #
 
-$(dirname $0)/cmake_generic.sh "$@" -DWIN32=1
+$(dirname $0)/cmake_generic.sh "$@" -DMINGW=1
 
 # vi: set ts=4 sw=4 expandtab: