changeset 1:4ff09911ef64

Re #242: Create Qt# UI for WarFoundry * Convert to Visual Studio 2005 project * Add Solution file * Update compile script to be more readable and to check whether rebuilds are needed
author IBBoard <dev@ibboard.co.uk>
date Sat, 23 Jan 2010 19:55:54 +0000
parents 620c62ba4d07
children cf68a996b3f1
files IBBoard.WarFoundry.GUI.QtSharp.csproj IBBoard.WarFoundry.GUI.QtSharp.mdp IBBoard.WarFoundry.GUI.QtSharp.pidb IBBoard.WarFoundry.GUI.QtSharp.sln compile-ui.sh qt-gui/MainWindowLayout.cs
diffstat 6 files changed, 115 insertions(+), 39 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/IBBoard.WarFoundry.GUI.QtSharp.csproj	Sat Jan 23 19:55:54 2010 +0000
@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <PropertyGroup>
+    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
+    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
+    <ProductVersion>8.0.50727</ProductVersion>
+    <SchemaVersion>2.0</SchemaVersion>
+    <ProjectGuid>{299D84D6-C84A-45CD-B709-AF536FCBA937}</ProjectGuid>
+    <OutputType>Exe</OutputType>
+    <RootNamespace>IBBoard.WarFoundry.GUI.QtSharp</RootNamespace>
+    <AssemblyName>IBBoard.WarFoundry.GUI.QtSharp</AssemblyName>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
+    <DebugSymbols>true</DebugSymbols>
+    <DebugType>full</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Debug</OutputPath>
+    <DefineConstants>DEBUG</DefineConstants>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+    <CustomCommands>
+      <CustomCommands>
+        <Command type="BeforeBuild" command="compile-ui.sh" workingdir="${ProjectDir}" />
+      </CustomCommands>
+    </CustomCommands>
+  </PropertyGroup>
+  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
+    <DebugType>none</DebugType>
+    <Optimize>false</Optimize>
+    <OutputPath>bin\Release</OutputPath>
+    <ErrorReport>prompt</ErrorReport>
+    <WarningLevel>4</WarningLevel>
+  </PropertyGroup>
+  <ItemGroup>
+    <Compile Include="AssemblyInfo.cs" />
+    <Compile Include="MainWindow.cs" />
+    <Compile Include="Main.cs" />
+    <Compile Include="qt-gui\MainWindowLayout.cs" />
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="compile-ui.sh" />
+    <None Include="qt-gui\MainWindowLayout.ui" />
+  </ItemGroup>
+  <ItemGroup>
+    <Folder Include="qt-gui\" />
+    <Folder Include="icons\" />
+  </ItemGroup>
+  <ItemGroup>
+    <Content Include="icons\App.png">
+      <CopyToOutputDirectory>Always</CopyToOutputDirectory>
+    </Content>
+  </ItemGroup>
+  <ItemGroup>
+    <Reference Include="System" />
+    <Reference Include="qt-dotnet, Version=4.5.0.0, Culture=neutral, PublicKeyToken=194a23ba31c08164" />
+  </ItemGroup>
+  <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" />
+  <ItemGroup>
+    <ProjectReference Include="..\IBBoard.WarFoundry.API\IBBoard.WarFoundry.API.csproj">
+      <Project>{951E6C7A-7FBA-4F68-9D9E-F48618BB9626}</Project>
+      <Name>IBBoard.WarFoundry.API</Name>
+    </ProjectReference>
+  </ItemGroup>
+</Project>
\ No newline at end of file
--- a/IBBoard.WarFoundry.GUI.QtSharp.mdp	Sat Jan 23 17:05:18 2010 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,34 +0,0 @@
-<Project name="IBBoard.WarFoundry.GUI.QtSharp" fileversion="2.0" DefaultNamespace="IBBoard.WarFoundry.GUI.QtSharp" language="C#" targetFramework="2.0" ctype="DotNetProject">
-  <Configurations active="Debug">
-    <Configuration name="Debug" ctype="DotNetProjectConfiguration">
-      <CustomCommands>
-        <Command type="BeforeBuild" command="compile-ui.sh" workingdir="${ProjectDir}" />
-      </CustomCommands>
-      <Output directory="bin/Debug" assembly="IBBoard.WarFoundry.GUI.QtSharp" />
-      <Build debugmode="True" target="Exe" />
-      <Execution consolepause="True" runwithwarnings="True" runtime="MsNet" />
-      <CodeGeneration compiler="Mcs" warninglevel="4" optimize="False" unsafecodeallowed="False" generateoverflowchecks="False" definesymbols="DEBUG" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
-    </Configuration>
-    <Configuration name="Release" ctype="DotNetProjectConfiguration">
-      <Output directory="bin/Release" assembly="IBBoard.WarFoundry.GUI.QtSharp" />
-      <Build debugmode="False" target="Exe" />
-      <Execution consolepause="True" runwithwarnings="True" runtime="MsNet" />
-      <CodeGeneration compiler="Mcs" warninglevel="4" optimize="False" unsafecodeallowed="False" generateoverflowchecks="False" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
-    </Configuration>
-  </Configurations>
-  <Contents>
-    <File subtype="Code" buildaction="Compile" name="AssemblyInfo.cs" />
-    <File subtype="Code" buildaction="Compile" name="MainWindow.cs" />
-    <File subtype="Code" buildaction="Compile" name="Main.cs" />
-    <File subtype="Code" buildaction="Nothing" name="compile-ui.sh" />
-    <File subtype="Directory" buildaction="Compile" name="qt-gui" />
-    <File subtype="Code" buildaction="Compile" name="qt-gui/MainWindowLayout.cs" />
-    <File subtype="Code" buildaction="Nothing" name="qt-gui/MainWindowLayout.ui" />
-    <File subtype="Directory" buildaction="Compile" name="icons" />
-    <File subtype="Code" name="icons/App.png" buildaction="FileCopy" />
-  </Contents>
-  <References>
-    <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
-    <ProjectReference type="Gac" localcopy="True" refto="qt-dotnet, Version=4.5.0.0, Culture=neutral, PublicKeyToken=194a23ba31c08164" />
-  </References>
-</Project>
\ No newline at end of file
Binary file IBBoard.WarFoundry.GUI.QtSharp.pidb has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/IBBoard.WarFoundry.GUI.QtSharp.sln	Sat Jan 23 19:55:54 2010 +0000
@@ -0,0 +1,38 @@
+
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IBBoard.WarFoundry.GUI.QtSharp", "IBBoard.WarFoundry.GUI.QtSharp.csproj", "{299D84D6-C84A-45CD-B709-AF536FCBA937}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IBBoard", "..\IBBoard\IBBoard.csproj", "{5DFD64F6-FC2B-4B4F-B92E-483BAC468105}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IBBoard.WarFoundry.API", "..\IBBoard.WarFoundry.API\IBBoard.WarFoundry.API.csproj", "{951E6C7A-7FBA-4F68-9D9E-F48618BB9626}"
+EndProject
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IBBoard.WarFoundry.API.Tests", "..\IBBoard.WarFoundry.API.Tests\IBBoard.WarFoundry.API.Tests.csproj", "{B20E808D-878E-4F6D-B1E3-84A9A49905CB}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Any CPU = Debug|Any CPU
+		Release|Any CPU = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{299D84D6-C84A-45CD-B709-AF536FCBA937}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{299D84D6-C84A-45CD-B709-AF536FCBA937}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{299D84D6-C84A-45CD-B709-AF536FCBA937}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{299D84D6-C84A-45CD-B709-AF536FCBA937}.Release|Any CPU.Build.0 = Release|Any CPU
+		{5DFD64F6-FC2B-4B4F-B92E-483BAC468105}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{5DFD64F6-FC2B-4B4F-B92E-483BAC468105}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{5DFD64F6-FC2B-4B4F-B92E-483BAC468105}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{5DFD64F6-FC2B-4B4F-B92E-483BAC468105}.Release|Any CPU.Build.0 = Release|Any CPU
+		{951E6C7A-7FBA-4F68-9D9E-F48618BB9626}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{951E6C7A-7FBA-4F68-9D9E-F48618BB9626}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{951E6C7A-7FBA-4F68-9D9E-F48618BB9626}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{951E6C7A-7FBA-4F68-9D9E-F48618BB9626}.Release|Any CPU.Build.0 = Release|Any CPU
+		{B20E808D-878E-4F6D-B1E3-84A9A49905CB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+		{B20E808D-878E-4F6D-B1E3-84A9A49905CB}.Debug|Any CPU.Build.0 = Debug|Any CPU
+		{B20E808D-878E-4F6D-B1E3-84A9A49905CB}.Release|Any CPU.ActiveCfg = Release|Any CPU
+		{B20E808D-878E-4F6D-B1E3-84A9A49905CB}.Release|Any CPU.Build.0 = Release|Any CPU
+	EndGlobalSection
+	GlobalSection(MonoDevelopProperties) = preSolution
+		StartupItem = IBBoard.WarFoundry.GUI.QtSharp.csproj
+	EndGlobalSection
+EndGlobal
--- a/compile-ui.sh	Sat Jan 23 17:05:18 2010 +0000
+++ b/compile-ui.sh	Sat Jan 23 19:55:54 2010 +0000
@@ -2,11 +2,19 @@
 
 echo "Compiling .ui files to C#"
 
-for f in qt-gui/*.ui
+for uiFile in qt-gui/*.ui
 do
-	echo -ne "  * Compiling $f..."
-	uics -o ${f/.ui/.cs} $f
-	echo "...compiled."
+	csFile=${uiFile/.ui/.cs}
+	
+	# Only update if file has changed
+	if test $uiFile -nt $csFile
+	then
+		echo -ne "  * Compiling $uiFile..."
+		uics -o $csFile $uiFile
+		echo "...compiled."
+	else
+		echo "  * Skipping $uiFile - no update needed"
+	fi
 done
 
 echo
--- a/qt-gui/MainWindowLayout.cs	Sat Jan 23 17:05:18 2010 +0000
+++ b/qt-gui/MainWindowLayout.cs	Sat Jan 23 19:55:54 2010 +0000
@@ -1,7 +1,7 @@
 /********************************************************************************
 ** Form generated from reading ui file 'MainWindowLayout.ui'
 **
-** Created: Sat Jan 23 16:57:44 2010
+** Created: Sat Jan 23 19:54:08 2010
 **      by: Qt User Interface Compiler for C# version 4.5.3
 **
 ** WARNING! All changes made in this file will be lost when recompiling ui file!