[gbrainy] Build web version from command line support



commit 662283e2dfb425240dbbb45b09f3db86c463b225
Author: Jordi Mas <jmas softcatala org>
Date:   Thu Nov 17 20:41:08 2011 +0100

    Build web version from command line support

 configure.ac                                       |   14 ++++-
 help/Makefile.am                                   |    4 +-
 src/Clients/WebForms/AllGames.aspx.designer.cs     |    2 +-
 src/Clients/WebForms/AssemblyInfo.cs.in            |   27 +++++++++
 src/Clients/WebForms/Default.aspx.designer.cs      |    2 +-
 src/Clients/WebForms/Download.aspx.designer.cs     |    2 +-
 src/Clients/WebForms/Game.aspx                     |    6 +-
 src/Clients/WebForms/Game.aspx.cs                  |    3 +-
 src/Clients/WebForms/Game.aspx.designer.cs         |    2 +-
 src/Clients/WebForms/Makefile.am                   |   62 ++++++++++++++++++++
 src/Clients/WebForms/MasterPage.master.designer.cs |    2 +-
 src/Clients/WebForms/Status.aspx.designer.cs       |    2 +-
 src/Makefile.am                                    |    3 +-
 13 files changed, 117 insertions(+), 14 deletions(-)
---
diff --git a/configure.ac b/configure.ac
index 073c188..ee7333a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -62,9 +62,9 @@ fi
 
 if ! pkg-config --atleast-version=2.11 mono; then
    CSC_DEFINES="$CSC_DEFINES -d:CSHARP_STATIC"
-   csharp_static="Yes"
+   csharp_static="yes"
 else
-   csharp_static="No"
+   csharp_static="no"
 fi
 
 
@@ -174,6 +174,12 @@ if test "x$enable_debug" != "xno" ; then
 	CSC_DEFINES="$CSC_DEFINES -debug -d:DEBUG"
 fi
 
+dnl -- Enable web client build
+
+AC_ARG_ENABLE(enable_webclient, AC_HELP_STRING([--enable-webclient], [Enable Web client build]),,enable_webclient=yes)
+
+AM_CONDITIONAL(ENABLE_WEBCLIENT, test "x$enable_webclient" != "xno")
+
 dnl --- Assembly information
 
 BUILD_TIME=`date +"%F %T %Z"`
@@ -208,6 +214,7 @@ AC_OUTPUT([
 src/Core/Main/Defines.cs
 src/Clients/Classical/Defines.cs
 src/Clients/Classical/AssemblyInfo.cs
+src/Clients/WebForms/AssemblyInfo.cs
 src/Core/AssemblyInfo.cs
 src/Games/AssemblyInfo.cs
 Makefile
@@ -217,6 +224,7 @@ tools/Makefile
 src/Core/Makefile
 src/Games/Makefile
 src/Clients/Classical/Makefile
+src/Clients/WebForms/Makefile
 tests/Makefile
 data/Makefile
 data/gbrainy.pc
@@ -228,3 +236,5 @@ echo "Mono-addins:		${enable_addins_sharp}"
 echo "NUnit:			${enable_tests}"
 echo "Debug enabled:		${enable_debug}"
 echo "Mono.CSharp static:	${csharp_static}"
+echo "Enable Webclient:	${enable_webclient}"
+
diff --git a/help/Makefile.am b/help/Makefile.am
index 2ba56bd..2ba5b84 100644
--- a/help/Makefile.am
+++ b/help/Makefile.am
@@ -13,7 +13,7 @@ DOC_FIGURES = \
 
 
 DOC_PAGES = \
-	customgame.page	\ 
+	customgame.page	\
 	gametypes.page	\
 	license.page	\
 	pause.page	\
@@ -22,7 +22,7 @@ DOC_PAGES = \
 	history.page	\
 	multiplayer.page \
 	score.page	\
-	gameplay.page	\	
+	gameplay.page	\
 	index.page	\
 	newgame.page	\
 	times.page	\
diff --git a/src/Clients/WebForms/AllGames.aspx.designer.cs b/src/Clients/WebForms/AllGames.aspx.designer.cs
index 786bf7b..e8d0085 100644
--- a/src/Clients/WebForms/AllGames.aspx.designer.cs
+++ b/src/Clients/WebForms/AllGames.aspx.designer.cs
@@ -1,7 +1,7 @@
 // ------------------------------------------------------------------------------
 //  <autogenerated>
 //      This code was generated by a tool.
-//      Mono Runtime Version: 2.0.50727.1433
+//      Mono Runtime Version: 4.0.30319.1
 // 
 //      Changes to this file may cause incorrect behavior and will be lost if 
 //      the code is regenerated.
diff --git a/src/Clients/WebForms/AssemblyInfo.cs.in b/src/Clients/WebForms/AssemblyInfo.cs.in
new file mode 100644
index 0000000..b0e7c42
--- /dev/null
+++ b/src/Clients/WebForms/AssemblyInfo.cs.in
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2011 Jordi Mas i HernÃndez <jmas softcatala org>
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public
+ * License along with this program; if not, write to the
+ * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ * Boston, MA 02111-1307, USA.
+ */
+
+using System.Reflection;
+
+[assembly: AssemblyVersion("@ASSEMBLY_VERSION@")]
+[assembly: AssemblyTitle ("gbrainy.Web.dll")]
+[assembly: AssemblyCopyright ("@COPYRIGHT@")]
+[assembly: AssemblyDescription ("A brain teaser game for fun and to keep your brain trained")]
+
+
diff --git a/src/Clients/WebForms/Default.aspx.designer.cs b/src/Clients/WebForms/Default.aspx.designer.cs
index fbc0555..262d438 100644
--- a/src/Clients/WebForms/Default.aspx.designer.cs
+++ b/src/Clients/WebForms/Default.aspx.designer.cs
@@ -1,7 +1,7 @@
 // ------------------------------------------------------------------------------
 //  <autogenerated>
 //      This code was generated by a tool.
-//      Mono Runtime Version: 2.0.50727.1433
+//      Mono Runtime Version: 4.0.30319.1
 // 
 //      Changes to this file may cause incorrect behavior and will be lost if 
 //      the code is regenerated.
diff --git a/src/Clients/WebForms/Download.aspx.designer.cs b/src/Clients/WebForms/Download.aspx.designer.cs
index fb2b60f..666cbca 100644
--- a/src/Clients/WebForms/Download.aspx.designer.cs
+++ b/src/Clients/WebForms/Download.aspx.designer.cs
@@ -1,7 +1,7 @@
 // ------------------------------------------------------------------------------
 //  <autogenerated>
 //      This code was generated by a tool.
-//      Mono Runtime Version: 2.0.50727.1433
+//      Mono Runtime Version: 4.0.30319.1
 // 
 //      Changes to this file may cause incorrect behavior and will be lost if 
 //      the code is regenerated.
diff --git a/src/Clients/WebForms/Game.aspx b/src/Clients/WebForms/Game.aspx
index 12bb6a0..6a5770f 100644
--- a/src/Clients/WebForms/Game.aspx
+++ b/src/Clients/WebForms/Game.aspx
@@ -52,10 +52,12 @@
 		<tr>
 			<td>
 				<asp:TextBox id = "answer_textbox" AutoCompleteType="Disabled" EnableViewState="true" runat="server"></asp:TextBox>
-				<asp:Button id = "answer_button" Text = "Answer" OnClick ="OnClickAnswer" runat="server"></asp:Button>
-				<asp:Button id = "nextgame_link" OnClick ="OnClickNextGame" runat="server" />				
+				<asp:Button id = "answer_button" OnClick ="OnClickAnswer" runat="server"></asp:Button>
+				<asp:Button id = "nextgame_link" OnClick ="OnClickNextGame" runat="server" />
+				<br/><br/>
 				<asp:Label id="result_label" runat="server"></asp:Label>
 				<asp:Label id="rationale_label" runat="server"></asp:Label>
+				<hr/>
 			</td>
 		</tr>
 
diff --git a/src/Clients/WebForms/Game.aspx.cs b/src/Clients/WebForms/Game.aspx.cs
index 31b46cd..fe479b9 100644
--- a/src/Clients/WebForms/Game.aspx.cs
+++ b/src/Clients/WebForms/Game.aspx.cs
@@ -169,7 +169,8 @@ namespace gbrainy.Clients.WebForms
 		
 		void SetText ()
 		{
-			nextgame_link.Text = "Next Game";
+			nextgame_link.Text = translations.GetString ("Next Game");
+			answer_button.Text = translations.GetString ("Answer");
 			
 			if (translations == null)
 				return;
diff --git a/src/Clients/WebForms/Game.aspx.designer.cs b/src/Clients/WebForms/Game.aspx.designer.cs
index 8165412..9d8ecfb 100644
--- a/src/Clients/WebForms/Game.aspx.designer.cs
+++ b/src/Clients/WebForms/Game.aspx.designer.cs
@@ -1,7 +1,7 @@
 // ------------------------------------------------------------------------------
 //  <autogenerated>
 //      This code was generated by a tool.
-//      Mono Runtime Version: 2.0.50727.1433
+//      Mono Runtime Version: 4.0.30319.1
 // 
 //      Changes to this file may cause incorrect behavior and will be lost if 
 //      the code is regenerated.
diff --git a/src/Clients/WebForms/Makefile.am b/src/Clients/WebForms/Makefile.am
new file mode 100644
index 0000000..6a3f446
--- /dev/null
+++ b/src/Clients/WebForms/Makefile.am
@@ -0,0 +1,62 @@
+EXTRAFLAGS =  -unsafe -nowarn:0169 $(CSC_DEFINES) 
+
+TARGET = ../../gbrainy.Web.dll
+
+GBRAINY_CSDISTFILES =		\
+	$(srcdir)/Download.aspx.cs \
+	$(srcdir)/Default.aspx.cs \
+	$(srcdir)/Download.aspx.designer.cs \
+	$(srcdir)/Default.aspx.designer.cs \
+	$(srcdir)/Game.aspx.cs \
+	$(srcdir)/Game.aspx.designer.cs \
+	$(srcdir)/MasterPage.master.cs \
+	$(srcdir)/MasterPage.master.designer.cs \
+	$(srcdir)/LanguageSupport.cs \
+	$(srcdir)/Logger.cs \
+	$(srcdir)/Status.aspx.cs \
+	$(srcdir)/Status.aspx.designer.cs \
+	$(srcdir)/Global.asax.cs \
+	$(srcdir)/WebSession.cs \
+	$(srcdir)/TranslationsWeb.cs \
+	$(srcdir)/Defines.cs \
+	$(srcdir)/Help.aspx.cs \
+	$(srcdir)/Help.aspx.designer.cs \
+	$(srcdir)/AllGames.aspx.cs \
+	$(srcdir)/AllGames.aspx.designer.cs \
+	$(srcdir)/GameImage.cs \
+	$(srcdir)/GameImageAreaShape.cs
+
+
+ASSEMBLIES = \
+	 $(GBRAINY_LIBS)    		\
+	 $(MONO_ADDINS_LIBS)    	\
+	-r:System.Web			\
+	-r:Mono.Cairo.dll		\
+	-r:../../gbrainy.Core.dll	\
+	-r:Mono.Posix
+
+RESOURCES =
+
+GBRAINY_CSFILES = $(GBRAINY_CSDISTFILES)	\
+	AssemblyInfo.cs
+
+if ENABLE_WEBCLIENT
+
+../../gbrainy.Web.dll: $(GBRAINY_CSFILES)
+	$(CSC) -target:library -out:$@ $(EXTRAFLAGS) $(GBRAINY_CSFILES) $(ASSEMBLIES) $(RESOURCES)
+
+
+all: ../../gbrainy.Web.dll
+
+EXTRA_DIST = $(GBRAINY_CSDISTFILES)
+
+endif
+
+CLEANFILES =				\
+	../../gbrainy.Web.dll.mdb	\
+	../../gbrainy.Web.dll
+
+
+DISTCLEANFILES = 			\
+	Makefile
+
diff --git a/src/Clients/WebForms/MasterPage.master.designer.cs b/src/Clients/WebForms/MasterPage.master.designer.cs
index 9bd4b47..0130811 100644
--- a/src/Clients/WebForms/MasterPage.master.designer.cs
+++ b/src/Clients/WebForms/MasterPage.master.designer.cs
@@ -1,7 +1,7 @@
 // ------------------------------------------------------------------------------
 //  <autogenerated>
 //      This code was generated by a tool.
-//      Mono Runtime Version: 2.0.50727.1433
+//      Mono Runtime Version: 4.0.30319.1
 // 
 //      Changes to this file may cause incorrect behavior and will be lost if 
 //      the code is regenerated.
diff --git a/src/Clients/WebForms/Status.aspx.designer.cs b/src/Clients/WebForms/Status.aspx.designer.cs
index b2872d9..878b7f8 100644
--- a/src/Clients/WebForms/Status.aspx.designer.cs
+++ b/src/Clients/WebForms/Status.aspx.designer.cs
@@ -1,7 +1,7 @@
 // ------------------------------------------------------------------------------
 //  <autogenerated>
 //      This code was generated by a tool.
-//      Mono Runtime Version: 2.0.50727.1433
+//      Mono Runtime Version: 4.0.30319.1
 // 
 //      Changes to this file may cause incorrect behavior and will be lost if 
 //      the code is regenerated.
diff --git a/src/Makefile.am b/src/Makefile.am
index 6b3e6a1..509aa93 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -1,5 +1,6 @@
 SUBDIRS = 		\
 	Core		\
 	Games		\
-	Clients/Classical
+	Clients/Classical \
+	Clients/WebForms
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]