diff options
author | newhook <matthew.newhook@gmail.com> | 2015-04-22 16:17:04 -0230 |
---|---|---|
committer | newhook <matthew.newhook@gmail.com> | 2015-04-22 16:17:04 -0230 |
commit | e95d34aa245abb5c7dba23a2da0d17c90e90f706 (patch) | |
tree | 8e56352ab7b319f883e633622a6802d4a3e23eec | |
parent | ICE-6457 (diff) | |
download | ice-e95d34aa245abb5c7dba23a2da0d17c90e90f706.tar.bz2 ice-e95d34aa245abb5c7dba23a2da0d17c90e90f706.tar.xz ice-e95d34aa245abb5c7dba23a2da0d17c90e90f706.zip |
ICE-6455 - remove slice2py and slice2rb C++ exe
Fix slice2rb.rb and slice2py.py scripts for Windows.
Fix build issue with IceSSL and MinGW.
-rw-r--r-- | cpp/config/Make.rules | 8 | ||||
-rw-r--r-- | cpp/config/Make.rules.MINGW | 8 | ||||
-rw-r--r-- | cpp/src/IceSSL/Util.cpp | 2 | ||||
-rwxr-xr-x | python/config/slice2py.py | 27 | ||||
-rwxr-xr-x | ruby/config/slice2rb.rb | 25 |
5 files changed, 50 insertions, 20 deletions
diff --git a/cpp/config/Make.rules b/cpp/config/Make.rules index cdd3315faf8..01dfdeaf94c 100644 --- a/cpp/config/Make.rules +++ b/cpp/config/Make.rules @@ -134,14 +134,6 @@ USE_READLINE ?= no #GENPIC ?= yes # -# If building with MinGW and third party libraries are not installed -# in the default location and THIRDPARTY_HOME is not set in your -# environment variables, change the following setting to reflect the -# installation location. -# -#THIRDPARTY_HOME ?= C:\Program Files (x86)\ZeroC\Ice-$(VERSION)-ThirdParty - -# # Default Mutex protocol: one of PrioNone or PrioInherit. # #DEFAULT_MUTEX_PROTOCOL ?= PrioNone diff --git a/cpp/config/Make.rules.MINGW b/cpp/config/Make.rules.MINGW index 0fe6af9f45c..02b11feecd6 100644 --- a/cpp/config/Make.rules.MINGW +++ b/cpp/config/Make.rules.MINGW @@ -8,6 +8,14 @@ # ********************************************************************** # +# If building with MinGW and third party libraries are not installed +# in the default location and THIRDPARTY_HOME is not set in your +# environment variables, change the following setting to reflect the +# installation location. +# +THIRDPARTY_HOME ?= C:\Program Files (x86)\ZeroC\Ice-$(VERSION)-ThirdParty + +# # This file is included by Make.rules when building with MinGW. # diff --git a/cpp/src/IceSSL/Util.cpp b/cpp/src/IceSSL/Util.cpp index 06ee07cfece..2e3287c1c35 100644 --- a/cpp/src/IceSSL/Util.cpp +++ b/cpp/src/IceSSL/Util.cpp @@ -1116,7 +1116,7 @@ IceSSL::findCertificates(const string& prop, const string& storeSpec, const stri CERT_OID_NAME_STR | CERT_NAME_STR_FORCE_UTF8_DIR_STR_FLAG, CERT_OID_NAME_STR | CERT_NAME_STR_FORCE_UTF8_DIR_STR_FLAG | CERT_NAME_STR_REVERSE_FLAG }; - for(int i = 0; i < sizeof(flags) / sizeof(DWORD); ++i) + for(size_t i = 0; i < sizeof(flags) / sizeof(DWORD); ++i) { DWORD length = 0; if(!CertStrToNameW(X509_ASN_ENCODING, argW.c_str(), flags[i], 0, 0, &length, 0)) diff --git a/python/config/slice2py.py b/python/config/slice2py.py index 237eb023737..64d73120ace 100755 --- a/python/config/slice2py.py +++ b/python/config/slice2py.py @@ -11,17 +11,22 @@ import sys, os, platform sys.path.append(os.path.join(os.path.dirname(sys.argv[0]), "..", "python")) if sys.platform == "win32": - path = os.getenv('PATH') - path = path + ';' + os.path.join(os.path.dirname(sys.argv[0]), "..", "..", "cpp", "bin") - if os.getenv("PLATFORM") == "X64": - bit, name = platform.architecture() - if bit == "64bit": - path = path + ";c:/Program Files (x86)/ZeroC/Ice-3.6.0-ThirdParty/bin/x64" - else: - path = path + ";c:/Program Files (x86)/ZeroC/Ice-3.6.0-ThirdParty/bin" - else: - path = path + ";c:/Program Files/ZeroC/Ice-3.6.0-ThirdParty/bin" - os.putenv('PATH', path) + path = os.getenv('PATH') + path = path + ';' + os.path.join(os.path.dirname(sys.argv[0]), "..", "..", "cpp", "bin") + + programFiles = "ProgramFiles" + arch1 = os.getenv('PROCESSOR_ARCHITECTURE') + arch2 = os.getenv('PROCESSOR_ARCHITEW6432') + + # 64 bit windows machine? + if arch1 == "AMD64" or arch1 == "IA64" or arch2 == "AMD64" or arch2 == "IA64": + programFiles += "(x86)" + bit, name = platform.architecture() + # 64 bit python? + if bit == "64bit": + suffix = "x64" + path = path + ";" + os.path.join(os.getenv(programFiles), "ZeroC", "Ice-3.6.0-ThirdParty","bin", suffix) + os.putenv('PATH', path) import IcePy diff --git a/ruby/config/slice2rb.rb b/ruby/config/slice2rb.rb index 7fcddf9582a..2744db07692 100755 --- a/ruby/config/slice2rb.rb +++ b/ruby/config/slice2rb.rb @@ -10,6 +10,31 @@ $:.unshift File.join(File.dirname(__FILE__), "..", "ruby") +# Fix up the environment PATH under Windows so that the plugin can load. +if RUBY_PLATFORM =~ /mswin|mingw|cygwin/ + path = ENV["PATH"] + + iceBinDir = File.join(File.dirname(__FILE__), "..", "..", "cpp", "bin") + programFiles = "ProgramFiles" + suffix = "" + + # 64 bit windows machine? + arch1 = ENV['PROCESSOR_ARCHITECTURE'] + arch2 = ENV['PROCESSOR_ARCHITEW6432'] + if arch1 == "AMD64" || arch1 == "IA64" || arch2 == "AMD64" || arch2 == "IA64" + programFiles += "(x86)" + + # 64 bit ruby? + if RUBY_PLATFORM == "x64-mingw32" + suffix = "x64" + end + end + path = path + ";" + File.join(ENV[programFiles], "ZeroC","Ice-3.6.0-ThirdParty", "bin", suffix) + path = path + ";" + File.join(iceBinDir, suffix) + + ENV['PATH'] = path +end + require 'IceRuby' rc = Ice::compile(ARGV) |