User Tools

Site Tools


wiki:development:build-howto-mswin:x2goclient

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
wiki:development:build-howto-mswin:x2goclient [2020/02/05 18:43]
ionic Link against static DLL import library. Yes, they are supposed to be static. Whoops.
wiki:development:build-howto-mswin:x2goclient [2023/05/08 22:20] (current)
orion [Copying the nxproxy binaries] Use nxproxy\src\.libs\nxproxy.exe
Line 174: Line 174:
 Open a terminal window. Crucially, this must **not** be a ''Cygwin'' instance. Open a terminal window. Crucially, this must **not** be a ''Cygwin'' instance.
  
-Make sure that the mingw toolchain that was used to build Qt (and will be used to build X2Go CLient later on) is part of the %PATH% variable. On the X2Go Windows Builder, a session spawned via ''cmd.exe'' typically fulfils this requirement. Additionally, use the same ''zlib'' version for building both ''Qt'' and ''libssh''.+Make sure that the MinGW toolchain that was used to build Qt (and will be used to build X2Go CLient later on) is part of the %PATH% variable. On the X2Go Windows Builder, a session spawned via ''cmd.exe'' typically fulfills this requirement. Additionally, use the same ''zlib'' version for building both ''Qt'' and ''libssh''.
  
 Go to the unpacked source directory: <code>D:; cd Build\libssh\libssh-...</code> Go to the unpacked source directory: <code>D:; cd Build\libssh\libssh-...</code>
Line 182: Line 182:
 The pre-built libssh versions in ''x2goclient-contrib'' contain a file called ''CMake-Show-My-Changes.txt''. Use this as a reference for building. The pre-built libssh versions in ''x2goclient-contrib'' contain a file called ''CMake-Show-My-Changes.txt''. Use this as a reference for building.
  
-Call ''cmake'' to configure the project, example (adapt to your system!): <code>"C:\Program Files\CMake\bin\cmake.exe" -G "MinGW Makefiles" -DCMAKE_C_COMPILER:FILEPATH="D:/i686-4.8.2-release-posix-dwarf-rt_v3-rev3/mingw32/bin/gcc.exe" -DCMAKE_LINKER:FILEPATH="D:/i686-4.8.2-release-posix-dwarf-rt_v3-rev3/mingw32/bin/ld.exe" -DZLIB_LIBRARY_RELEASE:FILEPATH="D:/x2goclient-contrib/zlib/1.2.8_bin/zlib1.dll" -DWITH_GSSAPI:BOOL="0" -DWITH_NACL:BOOL="0" -DCMAKE_BUILD_TYPE:STRING="Release" -DCMAKE_MAKE_PROGRAM:FILEPATH="D:/i686-4.8.2-release-posix-dwarf-rt_v3-rev3/mingw32/bin/mingw32-make.exe" -DWITH_EXAMPLES:BOOL="0" -DZLIB_INCLUDE_DIR:PATH="D:/Build/zlib/zlib-1.2.8/" -DLIB_EAY:FILEPATH="D:/OpenSSL-Win32/lib/MinGW/libeay32.a" -DSSL_EAY:FILEPATH="D:/OpenSSL-Win32/lib/MinGW/ssleay32.a" -DOPENSSL_INCLUDE_DIR:PATH="D:/OpenSSL-Win32/include" ..</code>+Call ''cmake'' to configure the project, example (adapt to your system!): <code>"C:\Program Files\CMake\bin\cmake.exe" -G "MinGW Makefiles" -DCMAKE_INSTALL_PREFIX:PATH="D:/Build/libssh/libssh-staging" -DCMAKE_C_COMPILER:FILEPATH="D:/i686-4.8.2-release-posix-dwarf-rt_v3-rev3/mingw32/bin/gcc.exe" -DCMAKE_LINKER:FILEPATH="D:/i686-4.8.2-release-posix-dwarf-rt_v3-rev3/mingw32/bin/ld.exe" -DZLIB_LIBRARY_RELEASE:FILEPATH="D:/x2goclient-contrib/zlib/1.2.8_bin/zlib1.dll" -DWITH_GSSAPI:BOOL="0" -DWITH_NACL:BOOL="0" -DCMAKE_BUILD_TYPE:STRING="Release" -DCMAKE_MAKE_PROGRAM:FILEPATH="D:/i686-4.8.2-release-posix-dwarf-rt_v3-rev3/mingw32/bin/mingw32-make.exe" -DWITH_EXAMPLES:BOOL="0" -DZLIB_INCLUDE_DIR:PATH="D:/Build/zlib/zlib-1.2.8/" -DLIB_EAY:FILEPATH="D:/OpenSSL-Win32/lib/MinGW/libeay32.a" -DSSL_EAY:FILEPATH="D:/OpenSSL-Win32/lib/MinGW/ssleay32.a" -DOPENSSL_INCLUDE_DIR:PATH="D:/OpenSSL-Win32/include" ..</code>
  
 == Build == == Build ==
Line 189: Line 189:
  
 <code>"D:\i686-4.8.2-release-posix-dwarf-rt_v3-rev3\mingw32\bin\mingw32-make.exe"</code> <code>"D:\i686-4.8.2-release-posix-dwarf-rt_v3-rev3\mingw32\bin\mingw32-make.exe"</code>
 +
 +== Install ==
 +
 +It's recommended to make sure that the install staging area is clean (fully deleted or at least empty) before installing/staging the built software.
 +
 +This ensures that old/removed files won't linger around and that changes will not remain undetected.
 +
 +<code>rm -rf "D:\Build\libssh\libssh-staging"
 +"D:\i686-4.8.2-release-posix-dwarf-rt_v3-rev3\mingw32\bin\mingw32-make.exe" install</code>
 +
 +Afterwards, clean and install the newly built files into the MinGW prefix:
 +
 +Header files:
 +
 +<code>
 +rm -rf "D:\i686-4.8.2-release-posix-dwarf-rt_v3-rev3\mingw32\i686-w64-mingw32\include\libssh"
 +cp -av "D:\Build\libssh\libssh-staging\include\libssh" "D:\i686-4.8.2-release-posix-dwarf-rt_v3-rev3\mingw32\i686-w64-mingw32\include\libssh"
 +</code>
 +
 +<note>''(dll).a'' files can be static libraries that are being used as "DLL import libraries" on Windows. They do not actually contain the library contents but a mechanism for loading the shared DLL files at run time. This differs from the UNIX concept of the linker automatically generating (unresolved) symbols and ignoring them (if an eventual symbol scanning suceeds) that are automatically resolved at run time.
 +
 +As such, it is important to keep these static DLL import libraries around on Windows, even if library is supposed to be used in a dynamically-linked fashion.</note>
 +
 +
 +Library files:
 +
 +<code>
 +for /R "D:\i686-4.8.2-release-posix-dwarf-rt_v3-rev3\mingw32\i686-w64-mingw32\lib\" %I in (libssh*) do rm -rf "%I"
 +D:
 +cd "D:\Build\libssh\libssh-staging\lib"
 +for %I in (libssh*) do cp -av "%I" "D:\i686-4.8.2-release-posix-dwarf-rt_v3-rev3\mingw32\i686-w64-mingw32\lib\"
 +</code>
 +
 +Afterwards, optionally bundle the new libssh source and binaries in x2goclient-contrib. Explicitly document the command line invocation in a file named ''CMake-Show-My-Changes.txt''.
  
 ===== Build X2Go Client ===== ===== Build X2Go Client =====
Line 482: Line 516:
   - nx-libs 3.5: From ''nxproxy'' directory (''D:\Build\nx-libs\nxproxy'') - ''nxproxy.exe''   - nx-libs 3.5: From ''nxproxy'' directory (''D:\Build\nx-libs\nxproxy'') - ''nxproxy.exe''
   - nx-libs 3.5: From ''nxcomp'' directory (''D:\Build\nx-libs\nxcomp'') - ''cygXcomp.dll''   - nx-libs 3.5: From ''nxcomp'' directory (''D:\Build\nx-libs\nxcomp'') - ''cygXcomp.dll''
-  - nx-libs 3.6: From ''nxproxy\src'' directory (''D:\Build\nx-libs\nxproxy\src'') - ''nxproxy.exe''+  - nx-libs 3.6: From ''nxproxy\src\.libs'' directory (''D:\Build\nx-libs\nxproxy\src\.libs'') - ''nxproxy.exe''
   - nx-libs 3.6: From ''nxcomp\src\.libs'' directory (''D:\Build\nx-libs\nxcomp\src\.libs'') - ''cygXcomp-3.dll''   - nx-libs 3.6: From ''nxcomp\src\.libs'' directory (''D:\Build\nx-libs\nxcomp\src\.libs'') - ''cygXcomp-3.dll''
  
Line 491: Line 525:
     * ''cygpng15-15.dll'' (x2goclient 4.0.3.x)     * ''cygpng15-15.dll'' (x2goclient 4.0.3.x)
     * ''cygpng16-16.dll'' (x2goclient 4.0.4.x+)     * ''cygpng16-16.dll'' (x2goclient 4.0.4.x+)
-    * ''cygstdc\+\+-6.dll''+    * ''cygstdc%%++%%-6.dll''
     * ''cygwin1.dll''     * ''cygwin1.dll''
     * ''cygz.dll''     * ''cygz.dll''
wiki/development/build-howto-mswin/x2goclient.1580928195.txt.gz ยท Last modified: 2020/02/05 18:43 by ionic