Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change Win build to 64 only #162

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,12 @@ Compiling qtbindings requires the following prerequisites:

1. Ruby (Ruby must be compiled with --enable-shared on all platforms and with --with-gcc=clang on OSX)
On Windows use the latest from [RubyInstaller](http://rubyinstaller.org/downloads/)
You'll need both the 32bit and 64bit installers to make the fat binary gem
2. [CMake 3.6.x](https://cmake.org/download)
3. On Windows get [OpenSSL 1.0.2 x64](http://slproweb.com/products/Win32OpenSSL.html) (not Light)
Install with all defaults to C:\OpenSSL-Win64
4. [QT 4.8.6](https://download.qt.io/official_releases/qt/4.8/4.8.6/) (mingw version for Windows)
On Windows install to C:\Qt\4.8.6-Ruby24 (when installing specify the mingw inside the 32bit DevKit)
On Windows install a second copy to C:\Qt\4.8.6-64-Ruby24 (when installing specify the mingw inside the 64bit DevKit)
Install [Jom](https://wiki.qt.io/Jom) to C:\Qt\4.8.6-64-Ruby24 (or anywhere in your path)
4. [QT 4.8.6](https://download.qt.io/archive/qt/4.8/4.8.6/) (mingw version for Windows)
On Windows install to C:\Qt\4.8.6 (when installing specify C:\Ruby26-x64\msys64\mingw64 as the mingw installation)
Install [Jom](https://wiki.qt.io/Jom) to C:\Qt\4.8.6 (or anywhere in your path)
5. gcc 4.x, 5.x, or 6.x (or clang for OSX 10.9)
On Windows gcc 4.x is included in the DevKit

Expand Down
97 changes: 35 additions & 62 deletions vendor/BuildWindowsGems.bat
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Builds Windows 32-bit and 64-bit gems for Windows
:: Builds Windows 64-bit gems for Windows
:: Usage: BuildWindowsGems VERSION
::
:: Make sure you have installed the following before running:
:: a. Windows SDK for Windows version you are on
:: b. Cmake
:: c. The 32-bit and 64-bit versions of msys2 for Ruby 2.4
:: d. Qt built with msys for both 32-bit and 64-bit Ruby 2.4
:: See BuildQt4Win32Ruby24.bat and BuildQt4Win64Ruby24.bat
:: e. Ruby version 2.4 both 32-bit and 64-bit version
:: c. The 64-bit versions of msys2 for Ruby 2.6
:: d. Qt built with msys2 for 64-bit Ruby 2.6
:: See BuildQt4Win64Ruby24.bat
:: e. Ruby version 2.4, 2.5, 2.6 64-bit version
:: f. Update all the paths below to your installations
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

@echo off
@echo on
SETLOCAL ENABLEEXTENSIONS ENABLEDELAYEDEXPANSION

IF [%1]==[] (
Expand All @@ -21,88 +21,61 @@ IF [%1]==[] (
) else (
set COSMOS_INSTALL=%~1
)
set MSYS64_32_PATH=C:\msys64
set MSYS64_64_PATH=C:\msys64
set QT_32_RUBY24_PATH=C:\Qt\4.8.6-Ruby24
set Qt_64_RUBY24_PATH=C:\Qt\4.8.6-64-Ruby24
set RUBY24_32_PATH=C:\Ruby242
set RUBY24_64_PATH=C:\Ruby242-x64
set RUBY25_32_PATH=C:\Ruby251
set RUBY25_64_PATH=C:\Ruby251-x64

:: Down to the main directory

set CMAKE_PATH="C:\Program Files\CMake\bin"
set QT_PATH=C:\Qt\4.8.6
set RUBY24_64_PATH=C:\Ruby24-x64
set RUBY25_64_PATH=C:\Ruby25-x64
set RUBY26_64_PATH=C:\Ruby26-x64
set MINGW_PATH=!RUBY26_64_PATH!\msys64\mingw64
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume it's ok to compile QT with Ruby 2.6 msys and use that with Ruby 2.4 and 2.5

set PERL_PATH=C:\Strawberry\perl\bin
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

when I called configure it said I needed Perl in my path


cd !QT_PATH!
copy "!MINGW_PATH!\bin\libgcc_s_seh-1.dll" bin
copy "!MINGW_PATH!\bin\libstdc++-6.dll" bin
copy "!MINGW_PATH!\bin\libwinpthread-1.dll" bin
set INCLUDE=!MINGW_PATH!\x86_64-w64-mingw32\include;
set LIB=!MINGW_PATH!\x86_64-w64-mingw32\lib;
set PATH=!MINGW_PATH!\bin;!QT_PATH!;!QT_PATH!\bin;!PERL_PATH!
echo !PATH!
call configure -opensource -confirm-license -release -platform win32-g++-4.6 -opengl desktop -webkit -openssl -qt-style-windowsxp -qt-style-windowsvista -I C:\OpenSSL-Win64\include -L C:\OpenSSL-Win64 -nomake examples -nomake demos
call make clean
jom

:: Go back to where we started
cd "%~dp0"
cd ..
mkdir release

:: 32-bit version

:: Cleanup

set QTBINDINGS_QT_PATH=!QT_32_RUBY24_PATH!
set PATH=!MSYS64_32_PATH!\mingw32\bin;!QT_32_RUBY24_PATH!\bin;!PATH!
set PATH=!RUBY24_32_PATH!\bin;!PATH!
set QTBINDINGS_QT_PATH=!QT_PATH!
set PATH=!CMAKE_PATH!;!MINGW_PATH!\bin;!QT_PATH!\bin;!RUBY24_64_PATH!\bin
echo.
echo Cleanup
call ruby -e "puts RUBY_VERSION"
echo.
call rake distclean

:: Build 32-bit
echo.
echo Building 32-bit
echo.

:: Build 64-bit
echo.
echo Ruby
call ruby -e "puts RUBY_VERSION"
echo Building 64-bit
echo.
call rake build

set PATH=!RUBY25_32_PATH!\bin;!PATH!
echo.
echo Ruby
call ruby -e "puts RUBY_VERSION"
echo.
call rake build

echo.
echo Build 32-bit qtbindings gem
echo.
call rake VERSION=%1 gemnative

echo.
echo Build 32-bit qtbindings-qt gem
echo.
call rake VERSION=%1 gemqt

move *.gem release
move release\*.gemspec .

:: 64-bit version

:: Cleanup

set QTBINDINGS_QT_PATH=!QT_64_RUBY24_PATH!
set PATH=!MSYS64_64_PATH!\mingw64\bin;!QT_64_RUBY24_PATH!\bin;!PATH!
set PATH=!RUBY24_64_PATH!\bin;!PATH!
echo.
echo Cleanup
call ruby -e "puts RUBY_VERSION"
echo.
call rake distclean

:: Build 64-bit
echo.
echo Building 64-bit
echo.

set PATH=!RUBY25_64_PATH!\bin;!PATH!
echo.
echo Ruby
call ruby -e "puts RUBY_VERSION"
echo.
call rake build

set PATH=!RUBY25_64_PATH!\bin;!PATH!
set PATH=!RUBY26_64_PATH!\bin;!PATH!
echo.
echo Ruby
call ruby -e "puts RUBY_VERSION"
Expand Down