Skip to content

Latest commit

 

History

History
68 lines (41 loc) · 1.91 KB

2. Running - QtSharp.CLI.md

File metadata and controls

68 lines (41 loc) · 1.91 KB

QtSharp Building / Running

Setting up the Sources

First we need to clone QtSharp to our local machine

mkdir C:\GITHUB
cd C:\GITHUB\
git clone https://github.com/ddobrev/QtSharp.git QtSharp
cd C:\GITHUB\QtSharp
git checkout master

Next we need to tell NuGet to download any missing depends into a packages sub directory <br > To do this at the command line

nuget.exe restore QtSharp.sln

The other alternative is just to

  • Open the solution in Visual Studio
  • Right click solution
  • Select "Manage NuGet Packages for Solution"
  • Select the "Restore" button at the top right

This should create a packages subdirectory and download any needed external libraries

Building QtSharp / QtSharp.CLI

Visual Studio 2013

To build the sources under Visual Studio 2013

  • Open up the QtSharp.sln File within Visual Studio
  • Right Click Build on the QtSharp / QtSharp.CLI / QtSharp.Tests Projects

Windows Command Line

TODO

Mono Command Line

TODO

Running the Build

QtSharp.CLI is the app to run to generate the bindings

To run from the command line

cd C:\GITHUB\QtSharp\QtSharp.CLI\bin\Debug
QtSharp.CLI.exe C:\Qt\Qt5.4.1\5.4\mingw491_32\bin\qmake.exe C:\Qt\Qt5.4.1\Tools\mingw491_32\bin\mingw32-make.exe

Or you could just add the above cmd line options to QtSharp.CLI under Project Properties and run it from within Visual Studio

This will do the following

  • The file Wrappers\QtCore\QtCore.cs will be overwritten with a new generated copy

  • Using the project file within Wrappers\QtCore\ the dll's QtCoreSharp.dll, QtCore-inlines.dll will be generated

  • The above will be repeated for any additional Qt Modules included in the build process

The 2 files needed for QtCore will be

  • CppSharp.Runtime.dll
  • QtCoreSharp.dll

Note currently there may be some issues when running QtSharp.CLI for the QtGUI Module <br > I found that rebuilding CppSharp seemed to fix this problem