Step-by-step installation guide for go-qml on 64bit Windows

862 views
Skip to first unread message

Alpha2Bio

unread,
Apr 11, 2015, 9:33:25 AM4/11/15
to go-...@googlegroups.com
Step-by-step installation guide for go-qml on 64bit Windows

go-qml is QML support for the Go language.
https://github.com/go-qml/qml

This is a step-by-step installation guide for go-qml on 64bit Windows.
You can build a cross platform GUI application with QML and Go language.
This guide is mainly intended for go-qml beginners.

This protocol is tested on the following  64bit Windows platforms:
Windows 7 Ultimate, Window 8 Pro  and
Windows 10 Technical Preview Build 10049.

Combination of different version software may cause problems.


1. Installation Go language for 64bit Windows.

Download  "go1.4.2.windows-amd64.msi"  file
 ( golang 1.4.1 for 64bit Windows)
from  "https://golang.org/dl/ ".

Install golang by double clicking downloaded file.
Golang will be installed at  C:\Go  by default.


2. Installation of Qt-5.4.1 for 64bit Windows.

Download  "qt-5.4.1-x64-mingw492r1-seh-opengl.exe"  file
( Qt-5.4.1 for 64bit MinGW )
from Qt64-NG site on sourceforge.net

http://sourceforge.net/projects/qt64ng/files/qt/x86-64/5.4.1/mingw-4.9/seh/

Install Qt-5.4.1 by double clicking downloaded file.

At "Select Destination Location" step,
change installation location from default
"C:\Qt\qt-5.4.1-x64-mingw492r1-seh-opengl"
to  "C:\Qt\qt-5.4.1\".

No change at "Select Components" step
"MinGW Compiler and Tools" is needed in the later process.
No separate installation of MinGW is needed.

Qt Creator is NOT included in this installation.
If you need Qt Creator, 
please download " Qt Creator 3.3.2 for Windows" from
"https://www.qt.io/download-open-source/".


3. Installation of git (32bit Windows version)

Download  "Git-1.9.5-preview20150319.exe"  file  from
https://github.com/msysgit/msysgit/releases

Install Git by double clicking downloaded file.

At "Adjusting your PATH environment" step,
select (o) Use Git from Windows Command Prompt

This is necessary because we will patch go-qml source
by executing  git command in  Command Prompt
in the later process.

Git  will be installed at   "C:\Program Files (x86)\Git"
by default.


4. Installation of pkg-config  (64bit Windows version)

Download  "pkg-config_0.28-1_win64.zip"  file from
The GTK+ Project: Download for Windows (64-bit) page.
http://www.gtk.org/download/win64.php

Click  "pkg-config   0.28  Tool".

Direct link of the file,
http://win32builder.gnome.org/packages/3.6/pkg-config_0.28-1_win64.zip

Extract zip file by right clicking the downloaded file
and select "Extract All...".

Copy the extracted "pkg-config.exe" file into the directory
"C:\Qt\qt-5.4.1\mingw64\bin\".


5. Installation of GLib   (64bit Windows version)

Download  "glib_2.34.3-1_win64.zip"  file from
The GTK+ Project: Download for Windows (64-bit) page.
http://www.gtk.org/download/win64.php

Click "GLib 2.34.3  Binaries"

Direct link of the file,
http://win32builder.gnome.org/packages/3.6/glib_2.34.3-1_win64.zip

Extract  zip file by right clicking the downloaded file
and select "Extract All...".

Copy only  "libglib-2.0-0.dll"  file into the  directory
"C:\Qt\qt-5.4.1\mingw64\bin\"


6. Setting environment variables  for installed programs

This step will set two new environment variables
"GOPATH" and "PKG_CONFIG_PATH",
and  change one environment variable "PATH"

Go to  Control Panel   ->  System  ->  Advanced system settings
Click "Environment Variable..." button.

Click "New..."  button for  System variables (lower part), NOT User variables.

Set Variable name,   GOPATH
Set Variable value,  C:\GO_PKG\
Click "OK"  button.

Run following command in the "Command Prompt"
to make "GO_PKG" directory at the root of C:

>mkdir  C:\GO_PKG

Click "New..."  button
Set Variable name,   PKG_CONFIG_PATH
Set Variable value,  C:\Qt\qt-5.4.1\qt-5.4.1-x64-mingw492r1-seh-opengl\lib\pkgconfig
Click "OK"  button.
 
Select "PATH" and click "Edit..." Button
Add following string at the end of value

     ;C:\Qt\qt-5.4.1\qt-5.4.1-x64-mingw492r1-seh-opengl\bin;C:\Qt\qt-5.4.1\mingw64\bin

Click "OK"  button.
Logout  and login to make the value change of environment variables effective.


7. Installation of  go-qml

Install  qo-qml  by executing a following command in Command Prompt.

>go get gopkg.in/qml.v1

Apply Windows patch for qo-qml source
by executing following commands in Command Prompt.

>cd  c:\GO_PKG\src\gopkg.in\qml.v1
>git checkout  -b  neclepsio_v1
>git  pull  https://github.com/neclepsio/qml.git  v1
>go  install  -a


8. Check of the installation by compiling source of  a go-qml example application

Execute following commands in Command Prompt.

>cd  C:\GO_PKG\src\gopkg.in\qml.v1\examples\controls\basiclayouts
>go build
>basiclayouts.exe


Enjoy go-qml on 64bit Windows.


whaly

unread,
Apr 11, 2015, 3:49:42 PM4/11/15
to Alpha2Bio, go-...@googlegroups.com
Great tutorial, it work, thank you !
> --
> You received this message because you are subscribed to the Google Groups
> "go-qml" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to go-qml+un...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Philippe Quesnel

unread,
Apr 11, 2015, 6:24:25 PM4/11/15
to go-...@googlegroups.com
Wow, thanks .... 
hehe too bad I did not know about the available 64bits Qt & cie,
I just spent a lot of time figuring out how to get Go-QML to work on Windows 64 bits (with Qt 32bits)

I might try the 64bits stuff eventually !
thx 

Alpha2Bio

unread,
Nov 24, 2015, 12:39:41 PM11/24/15
to go-qml
Small update on the guide.

New version of Go language is available.

Download "go1.5.1.windows-amd64.msi" file
( golang 1.5.1 for 64bit Windows)
from "https://golang.org/dl/".

If you use golang 1.5.1,
it is not necessary to apply patch for qo-qml source
in "7. Installation of go-qml" step
Reply all
Reply to author
Forward
0 new messages