On 05/13/2012 07:06 PM, Maarten Boekhold wrote:
I'm trying to figure out how to build the x2goclient from source on
Windows from source.

Hi all,

I've made some progress on my own. I can compile the x2goclient, and it runs from *inside* the msys-bash shell. With a little bit of trickery (symlink to the X-Server directory inside the release dir) I can now run my resulting x2goclient.exe binary.

However, I can't get it to link statically to all libraries, the way that the official binary distribution seems to do.

See below for the steps I used to get this far. Anybody would could provide the final step of getting the linking right?

Maarten

Download MingW installer from:
https://sourceforge.net/projects/mingw/files/Installer/mingw-get-inst/
get the latest mingw-get-inst-*.exe file
Run the installer, install in C:\sw\MinGW
after installation, run C:\sw\MinGW\msys\1.0\msys.bat (or open the shortcuts
in your start menu/desktop if you installed any)

    cd /c/sw/MinGW/msys/1.0/postinstall
    sh ./pi.sh

Create c:\home
On My Computer->Properties->Advanced->Environment Variables, set
    HOME=c:\home

Create C:\home\.profile

    PATH=$PATH:/c/sw/Qt/4.8.1/bin
    export PATH

Download QT from:
http://releases.qt-project.org/qt4/source/qt-win-opensource-4.8.1-mingw.exe
install in c:\sw\Qt
Make sure to point to the MinGW installation used above.

Download libssh from:
http://winkde.org/pub/kde/ports/win32/repository-4.8/win32libs/libssh-x86-mingw4-0.5.2-1-bin.tar.bz2
http://winkde.org/pub/kde/ports/win32/repository-4.8/win32libs/libssh-x86-mingw4-0.5.2-1-lib.tar.bz2

(libssh seems to be very hard to compile on mingw. Its build-system is based
on CMake, which I don't think is available on mingw. The KDE people have done
the hard work however, so we use their results)

cd /usr/local
tar zxf .../path/to/libssh-x86-mingw4-0.5.2-1-bin.tar.bz2
tar zxf .../path/to/libssh-x86-mingw4-0.5.2-1-lib.tar.bz2

Build a custom version of openssl ("mingw-get install msys-openssl" doesn't
seem to install a compatible version, as static linking doesn't work with that
one).

Download OpenSSL from:
http://www.openssl.org/source/openssl-1.0.1c.tar.gz

cd ~
tar zxf /path/to/openssl-1.0.1c.tar.gz
cd openssl-1.0.1c
./configure mingw --prefix=/usr/local
make
make install
(make install takes a long time, it installs like 10K man pages, somebody could probably find out how to install this without man pages in order to speed this
up)

Download x2goclient source code from:
http://code.x2go.org/releases/source/x2goclient/x2goclient_3.99.2.0.tar.gz

cd ~
tar zxf /path/to/x2goclient_3.99.2.0.tar.gz
cd x2goclient_3.99.2.0
Edit x2goclient.pro file
Replace the part that says:

    win32-* {
       message(building $$TARGET for windows without ldap and cups)
       LIBS += -lwinspool -lws2_32
       CONFIG += static release
    }

with:

    win32-* {
        message(building $$TARGET for windows without ldap and cups)
        INCLUDEPATH += /usr/local/include
        LIBPATH += /usr/local/lib
        LIBS += -lssl -lcrypto -lwinspool -lws2_32
        CONFIG += static release
    }

make build_client

_______________________________________________
X2Go-User mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/x2go-user

Reply via email to