Skip to content

Developers guide: Getting started

Lezh1k edited this page Nov 23, 2017 · 6 revisions

Getting started

Download SubutaiTray source tree.

Windows

  1. Download and install QT SDK. instruction. It's not recommended to use mingw because our build server uses qt with visual studio 2017 and related compiler. Also there is no need to rebuild libssh2, because we have built one (with all related lib, exp files) in our repo. If you want to use mingw or another compiler you have to rebuild libssh2 and move result dll, lib and exp files to SubutaiTray/libssh2/lib/win32 .
  2. Add QT/bin to PATH. QT/bin here is folder containing qmake.exe, moc.exe etc. Qt installer asks about this path at the beginning of installation. Example : F:\Programs\QT\Tools\QtCreator\bin F:\Programs\QT\5.9.2\msvc2017_64\bin
  3. Add git to PATH too.
  4. Download OpenSSL libraries (libeay32.dll and ssleay32.dll are required) built with chosen compiler.
  5. Launch command line (WARNING: our build server uses x64 Native Tools Command Promt for VS2017), go to source directory and run build_win.bat "path_to_(libeay32.dll and ssleay32.dll)".
  6. After successful build executable should be located in src_dir\subutai_tray_bin.

Mac OSX

  1. Download and install XCode
  2. Download and install QT SDK. instruction
  3. Launch CLI and modify PATH like this : export PATH=path_to_qmake_bin:$PATH
  4. Run ./build_mac.sh
  5. After successful build bundle SubutaiTray.app should be located in src_dir\subutai_tray_bin\
  6. You can launch it with open -a SubutaiTray.app command

Linux

  1. You need to create static version of qt libraries. instruction
  2. Modify PATH like this : export PATH=path_to_static_qt_bin:$PATH
  3. Run ./build_linux.sh
  4. After successful build executabble SubutaiTray should be located in src_dir\subutai_tray_bin.

How to create packages

Windows

  1. There is SubutaiTraySetup.sln (vs solution) here in win folder.
  2. If you don't want to use CLI - open this solution in VisualStudio. Download and install (if not installed) "Visual Studio Setup Project" plugin. Change everything you need there and just press "Rebuild"
  3. devenv SubutaiTraySetup.sln /Rebuild Release from CLI does same.
  4. Now these operations are in build-*.bat files here

Mac OSX

  1. Build tray with "build_mac.sh" (instructions are above)
  2. Create folder /Applications/Subutai and move result bundle (named SubutaiTray.app in subutai_tray_bin) to that folder.
  3. Then use command pkgbuild --component /Applications/Subutai/SubutaiTray.app --version $(cat version) --identifier com.subutai-io.SubutaiTray subutai-tray-$branch.pkg` . Branch should be defined before this call or you can set it manually.
  4. Done . Now you have subutai-tray.pkg file. You can provide it to users.

Linux

  1. Everything does pack_debian.sh script .