Skip to content

Commit

Permalink
VDB-3573 added Qt deployment step to Windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
boshkins committed Apr 11, 2018
1 parent 7aa6e4d commit 5345a72
Show file tree
Hide file tree
Showing 3 changed files with 87 additions and 26 deletions.
61 changes: 55 additions & 6 deletions build/MSVC/2013/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,28 @@

<property environment="env"/>
<property name="Platform" value="x64" />
<property name="Configuration" value="Debug" />
<property name="Output" value="${basedir}\..\..\..\..\OUTDIR" />
<property name="Configuration" value="Release" />
<property name="Toolset" value="v120" />

<property name="Output" value="${basedir}\..\..\..\..\OUTDIR" />
<property name="TargetDir" value="${Output}\sra-tools\win\${Toolset}\${Platform}\${Configuration}"/>

<condition property="QtConfiguration" value="debug">
<equals arg1="${Configuration}" arg2="Debug"/>
</condition>
<condition property="QtConfiguration" value="release">
<equals arg1="${Configuration}" arg2="Release"/>
</condition>

<condition property="BuildQt" value="true">
<and>
<equals arg1="${Platform}" arg2="x64"/>
<equals arg1="${Configuration}" arg2="Release"/>
<equals arg1="${Toolset}" arg2="v120"/>
</and>
</condition>
<property name="MSVC_Redistributables" value="${env.VS120COMNTOOLS}\..\..\VC\redist\${Platform}\Microsoft.VC120.CRT"/>

<target name="help">
<echo message="">
Apache Ant script for automated testing of SRA-TOOLS on Windonws
Expand All @@ -26,15 +43,16 @@ Supported targets:
clean - remove all build artefacts
build - regular build
quick - same as build
buildQt - build Qt tools (only in Release/x64)
Note: Need to have Qt (version 5.10.0 or newer) platform-specific binaries and tools in PATH, e.g.: C:\Qt\5.10.1\msvc2013_64\bin;C:\Qt\Tools\QtCreator\bin
runtests - build and run small tests
std - clean, runtests (default)
std - clean, runtests, buldQt (default)

Options:
-DConfiguration=Debug or -DConfiguration=Release (default)
-DPlatform=Win32 or -DPlatform=x64 (default)
-DOutput=path folder to create output in (default: ../../../../OUTDIR)

Note: Need to have Qt (version 5.10.0 or newer) platform-specific binaries and tools in PATH, e.g.: C:\Qt\5.10.1\msvc2013_64\bin;C:\Qt\Tools\QtCreator\bin
</echo>
</target>

Expand Down Expand Up @@ -73,15 +91,46 @@ Note: Need to have Qt (version 5.10.0 or newer) platform-specific binaries and t
<arg value="${basedir}\..\..\..\tools\sra-toolkit\sra-toolkit.pro"/>
<arg value="-spec"/>
<arg value="win32-msvc"/>
<arg value="CONFIG+=debug"/>
<arg value="CONFIG+=${QtConfiguration}"/>
</exec>
<exec executable="jom.exe" failonerror="true" dir="${TargetDir}\..\sra-toolkit">
<arg value="-f"/>
<arg value="Makefile.${Configuration}"/>
</exec>
<exec executable="windeployqt.exe" failonerror="true" dir="${TargetDir}\bin">
<arg value="sra-toolkit.exe"/>
<arg value="--compiler-runtime"/>
</exec>
<copy file="${Output}\ncbi-vdb\win\${Toolset}\${Platform}\${Configuration}\bin\ncbi-vdb-md.dll" todir="${TargetDir}\bin"/>
<copy file="${MSVC_Redistributables}\msvcp120.dll" todir="${TargetDir}\bin"/>
<copy file="${MSVC_Redistributables}\msvcr120.dll" todir="${TargetDir}\bin"/>
<copy file="${MSVC_Redistributables}\vccorlib120.dll" todir="${TargetDir}\bin"/>
</sequential>
</target>

<target name="buildQt" if="${BuildQt}">
<sequential>
<mkdir dir="${TargetDir}\..\sra-toolkit"/>
<exec executable="qmake.exe" failonerror="true" dir="${TargetDir}\..\sra-toolkit">
<arg value="${basedir}\..\..\..\tools\sra-toolkit\sra-toolkit.pro"/>
<arg value="-spec"/>
<arg value="win32-msvc"/>
<arg value="CONFIG+=${QtConfiguration}"/>
</exec>
<exec executable="jom.exe" failonerror="true" dir="${TargetDir}\..\sra-toolkit">
<arg value="-f"/>
<arg value="Makefile.${Configuration}"/>
</exec>
<exec executable="windeployqt.exe" failonerror="true" dir="${TargetDir}\bin">
<arg value="sra-toolkit.exe"/>
<arg value="--compiler-runtime"/>
</exec>
<copy file="${Output}\ncbi-vdb\win\${Toolset}\${Platform}\${Configuration}\bin\ncbi-vdb-md.dll" todir="${TargetDir}\bin"/>
<copy file="${MSVC_Redistributables}\msvcp120.dll" todir="${TargetDir}\bin"/>
<copy file="${MSVC_Redistributables}\msvcr120.dll" todir="${TargetDir}\bin"/>
<copy file="${MSVC_Redistributables}\vccorlib120.dll" todir="${TargetDir}\bin"/>
</sequential>
</target>

<target name="runtests" depends="build">
<exec executable="msbuild.exe" failonerror="true">
Expand All @@ -93,7 +142,7 @@ Note: Need to have Qt (version 5.10.0 or newer) platform-specific binaries and t
</exec>
</target>

<target name="std" depends="clean,runtests" />
<target name="std" depends="clean,runtests,buildQt" />

<target name="quick" depends="build" />
</project>
13 changes: 8 additions & 5 deletions tools/sra-toolkit/sra-toolkit.pro
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,23 @@ macx {
}

win32 {
INCLUDEPATH += ../../../ncbi-vdb/interfaces/os/win \
../../../ncbi-vdb/interfaces/cc/vc++
INCLUDEPATH += ../../../../../../ncbi-vdb/interfaces/os/win \
../../../../../../ncbi-vdb/interfaces/cc/vc++

CONFIG(debug) {
CONFIG(debug, debug|release) {
BUILD = Debug
LIBS += $$OUT_PWD/../../../../../ncbi-vdb/win/v120/x64/Release/bin/ncbi-vdb-md.lib
} else {
BUILD = Release
LIBS += $$OUT_PWD/../../../../../ncbi-vdb/win/v120/x64/Release/bin/ncbi-vdb-md.lib
}

message("OUT_PWD=$$OUT_PWD")
TARGDIR = $$OUT_PWD/../$$BUILD
DESTDIR = $$TARGDIR/bin
#message("OUT_PWD=$$OUT_PWD")
#message("TARGDIR=$$TARGDIR")
message("DESTDIR=$$DESTDIR")

LIBS += $$OUT_PWD/../../../../../ncbi-vdb/win/v120/x64/$$BUILD/bin/ncbi-vdb-md.lib
}

OBJECTS_DIR = $$TARGDIR/obj/sra-toolkit
Expand Down
39 changes: 24 additions & 15 deletions tools/sra-toolkit/sra-toolkit.pro.user
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 4.6.0, 2018-04-05T14:15:59. -->
<!-- Written by QtCreator 4.6.0, 2018-04-10T14:26:30. -->
<qtcreator>
<data>
<variable>EnvironmentId</variable>
Expand Down Expand Up @@ -62,7 +62,7 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Desktop Qt 5.10.1 MSVC2013 64bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName">Desktop Qt 5.10.1 MSVC2013 64bit</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">qt.qt5.5101.win64_msvc2013_64_kit</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveBuildConfiguration">1</value>
<value type="int" key="ProjectExplorer.Target.ActiveDeployConfiguration">0</value>
<value type="int" key="ProjectExplorer.Target.ActiveRunConfiguration">0</value>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.0">
Expand Down Expand Up @@ -129,18 +129,16 @@
<value type="bool" key="Qt4ProjectManager.Qt4BuildConfiguration.UseShadowBuild">true</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.Target.BuildConfiguration.1">
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">C:/Users/NCBI/devel/sra-tools/tools/build-sra-toolkit-Desktop_Qt_5_10_1_MSVC2013_64bit-Release</value>
<value type="QString" key="ProjectExplorer.BuildConfiguration.BuildDirectory">%{CurrentProject:NativePath}/../../../../OUTDIR/sra-tools/win/v120/x64/%{CurrentProject:FileBaseName}</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildConfiguration.BuildStepList.0">
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.0">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProcessStep.Arguments"></value>
<value type="QString" key="ProjectExplorer.ProcessStep.Command">C:/Program Files (x86)/Microsoft Visual Studio 12.0/VC/bin/amd64/vcvars64.bat</value>
<value type="QString" key="ProjectExplorer.ProcessStep.WorkingDirectory">%{buildDir}</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Custom Process Step</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.ProcessStep</value>
</valuemap>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.1">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
Expand All @@ -149,10 +147,21 @@
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">Qt4ProjectManager.MakeStep</value>
<valuelist type="QVariantList" key="Qt4ProjectManager.MakeStep.AutomaticallyAddedMakeArguments"/>
<value type="bool" key="Qt4ProjectManager.MakeStep.Clean">false</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments"></value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeArguments">/U</value>
<value type="QString" key="Qt4ProjectManager.MakeStep.MakeCommand"></value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">2</value>
<valuemap type="QVariantMap" key="ProjectExplorer.BuildStepList.Step.2">
<value type="bool" key="ProjectExplorer.BuildStep.Enabled">true</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">qmake</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">QtProjectManager.QMakeBuildStep</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.LinkQmlDebuggingLibrary">false</value>
<value type="QString" key="QtProjectManager.QMakeBuildStep.QMakeArguments"></value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.QMakeForced">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.SeparateDebugInfo">false</value>
<value type="bool" key="QtProjectManager.QMakeBuildStep.UseQtQuickCompiler">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.BuildStepList.StepsCount">3</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DefaultDisplayName">Build</value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.DisplayName"></value>
<value type="QString" key="ProjectExplorer.ProjectConfiguration.Id">ProjectExplorer.BuildSteps.Build</value>
Expand Down Expand Up @@ -247,13 +256,13 @@
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.ProFile">sra-toolkit.pro</value>
<value type="bool" key="Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix">false</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"></value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory.default">C:/Users/NCBI/devel/OUTDIR/sra-tools/win/v120/x64/sra-toolkit/../Debug/bin</value>
<value type="QString" key="Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory.default">C:/Users/NCBI/devel/OUTDIR/sra-tools/win/v120/x64/sra-toolkit/../Release/bin</value>
<value type="uint" key="RunConfiguration.QmlDebugServerPort">3768</value>
<value type="bool" key="RunConfiguration.UseCppDebugger">false</value>
<value type="bool" key="RunConfiguration.UseCppDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseMultiProcess">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">false</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">true</value>
<value type="bool" key="RunConfiguration.UseQmlDebugger">true</value>
<value type="bool" key="RunConfiguration.UseQmlDebuggerAuto">false</value>
</valuemap>
<value type="int" key="ProjectExplorer.Target.RunConfigurationCount">1</value>
</valuemap>
Expand Down

0 comments on commit 5345a72

Please sign in to comment.