Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Build TyLauncher on Windows

Tian Yiyan edited this page Aug 14, 2019 · 1 revision

Notes

  • The official TyLauncher is build with Qt 5.5 and Visual Studio C++ 2013
  • Compiler toolkit must be same for Qt and TyLauncher

Download and install Qt

Qt 5.5

Append PATH environment

After the standard installation append the following line to your PATH environment variable: ;C:\Qt\Qt5.5.0\5.5\msvc2013\bin;C:\Qt\Qt5.5.0\Tools\QtCreator\bin


Makefiles

Generating Makefiles

  1. clone the repository: git clone https://github.com/luckytianyiyan/TyLauncher.git
  2. change into the local copy of the repository: cd TyLauncher
  3. create a new folder e.g. build and change into this directory: mkdir build && cd build
  4. generate the Makefiles in the build directory: qmake ../src -r -spec win32-msvc2013

Build

  1. Open Visual Studio Command Prompt (2013) via start menu
  2. Execute jom in the build directory: jom

Copy Dependencies

  1. run after-build script in the build directory: call ..\scripts\after-build.bat ../src %cd%
  2. run packaging script in the build directory:
  • build 32 bit:
    SET QTDIR=D:\Qt\Qt5.5.0\5.5\msvc2013
    call ..\scripts\packaging.bat ../src %cd% TyLauncher C:/Windows/System32
    ```
    
  • build 64 bit:
    SET QTDIR=D:\Qt\Qt5.5.0\5.5\msvc2013_64
    call ..\scripts\packaging.bat ../src %cd% TyLauncher C:/Windows/SysWOW64
    

Build Configuration in Qt Creator

open src/TyLauncher.pro

In Qt Creator Projects

Qt-Creator-Projects

Step.1 Debug Build Configuration

  1. Select debug build configuration.

Qt-Creator-Debug-Configuration

  1. Add after-build Script

Add a Build Steps - Custom Process Steps

Qt-Creator-Add-Build-Steps-Debug

  • Commend: %{sourceDir}\..\scripts\after-build.bat

  • Arguments: %{sourceDir} %{buildDir}

  • Working directory: %{buildDir}

Step.2 Release Build Configuration( like Step.1 )

  1. Select release build configuration.

Qt-Creator-Release-Configuration

  1. Add after-build Script

The same as the Step.1.2.

Step.3 Packaging Build Configuration

This step is optional

  1. Select release build configuration.

Qt-Creator-Release-Configuration

  1. Add Packaging build configuration

clone release build configuration.

Qt-Creator-Release-Packaging

Qt-Creator-New-Packaging

  1. Add after-build-packaging Script

Add a Build Steps - Custom Process Steps

Qt-Creator-Add-Build-Steps-Packaging

  • Commend: %{sourceDir}\..\scripts\packaging.bat

  • Arguments: %{sourceDir} %{buildDir} %{CurrentProject:Name} [windows root]

    if you packaging x86 application. [windows root] is like C:/Windows/System32

    %{sourceDir} %{buildDir} %{CurrentProject:Name} C:/Windows/System32

    or x64 application. [windows root] is like C:/Windows/SysWOW64

    %{sourceDir} %{buildDir} %{CurrentProject:Name} C:/Windows/SysWOW64

  • Working directory: %{buildDir}

Dependencies

TyLauncher directory looks like this:

│  icudt54.dll
│  icuin54.dll
│  icuuc54.dll
│  msvcp120.dll
│  msvcr120.dll
│  Qt5Core.dll
│  Qt5Gui.dll
│  Qt5Network.dll
│  Qt5Svg.dll
│  Qt5Widgets.dll
│  TyLauncher.exe
│
├─bearer
│      qgenericbearer.dll
│      qnativewifibearer.dll
│
├─imageformats
│      qdds.dll
│      qgif.dll
│      qicns.dll
│      qico.dll
│      qjp2.dll
│      qjpeg.dll
│      qmng.dll
│      qsvg.dll
│      qtga.dll
│      qtiff.dll
│      qwbmp.dll
│      qwebp.dll
│
├─language
│      zh_CN.qm
│
├─platforms
│      qwindows.dll
│
└─theme
        oldTheme.qss
        One Dark.qss
        One Light.qss