Convert CCEngine project to Qt project

This commit is contained in:
Peter Sykora 2018-04-01 17:12:30 +02:00
parent 27077c519a
commit 0cc651bebb
8 changed files with 548 additions and 47 deletions

2
.gitignore vendored
View File

@ -9,3 +9,5 @@
/CCEngineLoader/Debug/
/CCEngineLoader/Release/
/CCEngineLoader/GeneratedFiles/
/CCEngine/GeneratedFiles/
/CCEngine/CCEngine.aps

BIN
CCEngine/CCEngine.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 361 KiB

5
CCEngine/CCEngine.qrc Normal file
View File

@ -0,0 +1,5 @@
<RCC>
<qresource prefix="/">
<file>Resources/iconmonstr-banknote-multi-6-icon-256.png</file>
</qresource>
</RCC>

2
CCEngine/CCEngine.rc Normal file
View File

@ -0,0 +1,2 @@
IDI_ICON1 ICON DISCARDABLE "CCEngine.ico"

442
CCEngine/CCEngine.ui Normal file
View File

@ -0,0 +1,442 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>CCEngineClass</class>
<widget class="QMainWindow" name="CCEngineClass">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>400</width>
<height>265</height>
</rect>
</property>
<property name="windowTitle">
<string>CCEngine</string>
</property>
<property name="windowIcon">
<iconset resource="CCEngine.qrc">
<normaloff>:/Resources/iconmonstr-banknote-multi-6-icon-256.png</normaloff>:/Resources/iconmonstr-banknote-multi-6-icon-256.png</iconset>
</property>
<widget class="QWidget" name="centralWidget">
<widget class="QGroupBox" name="grpActivation">
<property name="geometry">
<rect>
<x>10</x>
<y>10</y>
<width>381</width>
<height>51</height>
</rect>
</property>
<property name="title">
<string>Activation</string>
</property>
<widget class="QLabel" name="lblActivationStatus">
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
<width>51</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Status:</string>
</property>
</widget>
<widget class="QLabel" name="lblActivationStatusVal">
<property name="geometry">
<rect>
<x>70</x>
<y>20</y>
<width>111</width>
<height>16</height>
</rect>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>150</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>150</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>120</red>
<green>120</green>
<blue>120</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="text">
<string>Active</string>
</property>
</widget>
<widget class="QPushButton" name="btnActivationDetail">
<property name="geometry">
<rect>
<x>140</x>
<y>20</y>
<width>70</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Detail</string>
</property>
</widget>
<widget class="QPushButton" name="btnActivate">
<property name="geometry">
<rect>
<x>220</x>
<y>20</y>
<width>70</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Activate</string>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="grpHttpServer">
<property name="geometry">
<rect>
<x>10</x>
<y>70</y>
<width>381</width>
<height>81</height>
</rect>
</property>
<property name="title">
<string>HTTP Server</string>
</property>
<widget class="QLabel" name="lblListenPort">
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
<width>109</width>
<height>23</height>
</rect>
</property>
<property name="text">
<string>Port</string>
</property>
</widget>
<widget class="QLineEdit" name="txtPort">
<property name="geometry">
<rect>
<x>70</x>
<y>20</y>
<width>50</width>
<height>20</height>
</rect>
</property>
<property name="inputMask">
<string notr="true"/>
</property>
<property name="maxLength">
<number>5</number>
</property>
</widget>
<widget class="QPushButton" name="btnOpenBrowser">
<property name="geometry">
<rect>
<x>140</x>
<y>50</y>
<width>101</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Open browser</string>
</property>
<property name="default">
<bool>false</bool>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
<widget class="QLabel" name="lblHttpServerStatus">
<property name="geometry">
<rect>
<x>10</x>
<y>50</y>
<width>51</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Status:</string>
</property>
</widget>
<widget class="QLabel" name="lblHttpServerStatusVal">
<property name="geometry">
<rect>
<x>70</x>
<y>50</y>
<width>111</width>
<height>16</height>
</rect>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>150</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>150</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>120</red>
<green>120</green>
<blue>120</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="text">
<string>Running</string>
</property>
</widget>
<widget class="QPushButton" name="btnRestartServer">
<property name="geometry">
<rect>
<x>140</x>
<y>20</y>
<width>101</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Restart</string>
</property>
<property name="default">
<bool>false</bool>
</property>
<property name="flat">
<bool>false</bool>
</property>
</widget>
</widget>
<widget class="QGroupBox" name="grpUpdates">
<property name="geometry">
<rect>
<x>10</x>
<y>160</y>
<width>381</width>
<height>81</height>
</rect>
</property>
<property name="title">
<string>Updates</string>
</property>
<widget class="QLabel" name="lblUpdateStatus">
<property name="geometry">
<rect>
<x>10</x>
<y>20</y>
<width>51</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Status:</string>
</property>
</widget>
<widget class="QLabel" name="lblUpdateStatusVal">
<property name="geometry">
<rect>
<x>130</x>
<y>20</y>
<width>111</width>
<height>16</height>
</rect>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>150</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>150</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>120</red>
<green>120</green>
<blue>120</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="text">
<string>Up to date</string>
</property>
</widget>
<widget class="QPushButton" name="btnUpdatesCheck">
<property name="geometry">
<rect>
<x>240</x>
<y>20</y>
<width>101</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Check for updates</string>
</property>
</widget>
<widget class="QPushButton" name="btnUpdate">
<property name="geometry">
<rect>
<x>240</x>
<y>50</y>
<width>101</width>
<height>20</height>
</rect>
</property>
<property name="text">
<string>Update</string>
</property>
</widget>
<widget class="QLabel" name="lblUpdatesPending">
<property name="geometry">
<rect>
<x>10</x>
<y>50</y>
<width>121</width>
<height>16</height>
</rect>
</property>
<property name="text">
<string>Updates pending</string>
</property>
</widget>
<widget class="QLabel" name="lblUpdatesPendingVal">
<property name="geometry">
<rect>
<x>130</x>
<y>50</y>
<width>111</width>
<height>16</height>
</rect>
</property>
<property name="palette">
<palette>
<active>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>150</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</active>
<inactive>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>0</red>
<green>150</green>
<blue>0</blue>
</color>
</brush>
</colorrole>
</inactive>
<disabled>
<colorrole role="WindowText">
<brush brushstyle="SolidPattern">
<color alpha="255">
<red>120</red>
<green>120</green>
<blue>120</blue>
</color>
</brush>
</colorrole>
</disabled>
</palette>
</property>
<property name="text">
<string>0</string>
</property>
</widget>
</widget>
</widget>
<widget class="QStatusBar" name="statusBar"/>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources>
<include location="CCEngine.qrc"/>
</resources>
<connections/>
</ui>

View File

@ -10,24 +10,9 @@
<Platform>Win32</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="src\CCEngine.cpp" />
<ClCompile Include="src\CCServer.cpp" />
<ClCompile Include="src\ProcessUtils.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\CCServer.h" />
<ClInclude Include="src\ProcessUtils.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\libLicenseClient\libLicenseClient.vcxproj">
<Project>{51345e59-83e5-4389-93a9-0131b40522b7}</Project>
</ProjectReference>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{51637EB3-9942-43AE-9272-9DD85412EFC7}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<Keyword>Qt4VSv1.0</Keyword>
<RootNamespace>CCEngine</RootNamespace>
<WindowsTargetPlatformVersion>10.0.16299.0</WindowsTargetPlatformVersion>
</PropertyGroup>
@ -46,17 +31,28 @@
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
<PropertyGroup Condition="'$(QtMsBuild)'=='' or !Exists('$(QtMsBuild)\qt.targets')">
<QtMsBuild>$(MSBuildProjectDirectory)\QtMsBuild</QtMsBuild>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" />
<Target Name="QtMsBuildNotFound" BeforeTargets="CustomBuild;ClCompile" Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
<Message Importance="High" Text="QtMsBuild: could not locate qt.targets, qt.props; project may not build correctly." />
</Target>
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.props')">
<Import Project="$(QtMsBuild)\qt.props" />
</ImportGroup>
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="Shared" />
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="project-common.props" />
<Import Project="..\qt-ui-debug.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="project-common.props" />
<Import Project="..\qt-ui-release.props" />
<Import Project="..\non-debugable.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
@ -72,15 +68,17 @@
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(ProjectDir)..\..\libLicenseClient\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpplatest</LanguageStandard>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalOptions>/verbose:lib %(AdditionalOptions)</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
@ -89,14 +87,13 @@
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions);BOOST_EXCEPTION_DISABLE</PreprocessorDefinitions>
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;WIN32;NDEBUG;%(PreprocessorDefinitions);BOOST_EXCEPTION_DISABLE</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(ProjectDir)..\..\libLicenseClient\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpplatest</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>false</GenerateDebugInformation>
<StripPrivateSymbols>YES</StripPrivateSymbols>
@ -104,8 +101,45 @@
<ProgramDatabaseFile />
<FullProgramDatabaseFile>false</FullProgramDatabaseFile>
</Link>
<QtMoc>
<Define>WIN32;_MBCS;CURL_STATICLIB;_SILENCE_CXX17_ADAPTOR_TYPEDEFS_DEPRECATION_WARNING;_SILENCE_CXX17_ALLOCATOR_VOID_DEPRECATION_WARNING;_SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING;_SILENCE_CXX17_RESULT_OF_DEPRECATION_WARNING;%(Define)</Define>
<IncludePath>$(BOOST_ROOT_DIR);%(IncludePath)</IncludePath>
</QtMoc>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="src\CCEngine.cpp" />
<ClCompile Include="src\CCServer.cpp" />
<ClCompile Include="src\ProcessUtils.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\CCServer.h" />
<ClInclude Include="src\ProcessUtils.h" />
</ItemGroup>
<ItemGroup>
<QtUic Include="CCEngine.ui" />
</ItemGroup>
<ItemGroup>
<QtRcc Include="CCEngine.qrc" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="CCEngine.rc" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\libLicenseClient\libLicenseClient.vcxproj">
<Project>{51345e59-83e5-4389-93a9-0131b40522b7}</Project>
</ProjectReference>
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">
<Import Project="$(QtMsBuild)\qt.targets" />
</ImportGroup>
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<ProjectExtensions>
<VisualStudio>
<UserProperties MocDir=".\GeneratedFiles\$(ConfigurationName)" UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" lupdateOptions="" lupdateOnBuild="0" lreleaseOptions="" Qt5Version_x0020_Win32="qt-msvc2015-x86" MocOptions="" />
</VisualStudio>
</ProjectExtensions>
</Project>

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -55,40 +55,56 @@
<Import Project="..\non-debugable.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)..\..\libLicenseClient\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>
<AdditionalOptions>/verbose:lib %(AdditionalOptions)</AdditionalOptions>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
</Link>
<QtMoc>
<Define>WIN32;_MBCS;CURL_STATICLIB;_SILENCE_CXX17_ADAPTOR_TYPEDEFS_DEPRECATION_WARNING;_SILENCE_CXX17_ALLOCATOR_VOID_DEPRECATION_WARNING;_SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING;_SILENCE_CXX17_RESULT_OF_DEPRECATION_WARNING;%(Define)</Define>
<IncludePath>$(BOOST_ROOT_DIR);%(IncludePath)</IncludePath>
</QtMoc>
</ItemDefinitionGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PreprocessorDefinitions>WIN32;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>$(ProjectDir)..\..\libLicenseClient\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;WIN32;_DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(ProjectDir)..\..\libLicenseClient\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpplatest</LanguageStandard>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;WIN32;NDEBUG;%(PreprocessorDefinitions);BOOST_EXCEPTION_DISABLE</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<AdditionalIncludeDirectories>$(ProjectDir)..\..\libLicenseClient\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<LanguageStandard>stdcpplatest</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>false</GenerateDebugInformation>
<StripPrivateSymbols>YES</StripPrivateSymbols>
<AssemblyDebug>false</AssemblyDebug>
<ProgramDatabaseFile />
<FullProgramDatabaseFile>false</FullProgramDatabaseFile>
</Link>
<QtMoc>
<Define>WIN32;_MBCS;CURL_STATICLIB;_SILENCE_CXX17_ADAPTOR_TYPEDEFS_DEPRECATION_WARNING;_SILENCE_CXX17_ALLOCATOR_VOID_DEPRECATION_WARNING;_SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING;_SILENCE_CXX17_RESULT_OF_DEPRECATION_WARNING;%(Define)</Define>
<IncludePath>$(BOOST_ROOT_DIR);%(IncludePath)</IncludePath>
</QtMoc>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="CCEngineLoader.cpp" />
<ClCompile Include="main.cpp" />