Author: rolf
Date: 2008-02-05 13:47:30 -0500 (Tue, 05 Feb 2008)
New Revision: 94923

Added:
   trunk/moon/src/fullscreen.cs
   trunk/moon/src/fullscreen.sh
Modified:
   trunk/moon/src/ChangeLog
Log:
* fullscreen.cs, fullscreen.sh: Tool to generate fullscreen.h

Modified: trunk/moon/src/ChangeLog
===================================================================
--- trunk/moon/src/ChangeLog    2008-02-05 18:43:44 UTC (rev 94922)
+++ trunk/moon/src/ChangeLog    2008-02-05 18:47:30 UTC (rev 94923)
@@ -1,3 +1,7 @@
+2008-02-05  Rolf Bjarne Kvinge <[EMAIL PROTECTED]> 
+
+       * fullscreen.cs, fullscreen.sh: Tool to generate fullscreen.h
+
 2008-02-05  Chris Toshok  <[EMAIL PROTECTED]>
 
        * runtime.h, runtime.cpp: add support for a "selected" element

Added: trunk/moon/src/fullscreen.cs
===================================================================
--- trunk/moon/src/fullscreen.cs        2008-02-05 18:43:44 UTC (rev 94922)
+++ trunk/moon/src/fullscreen.cs        2008-02-05 18:47:30 UTC (rev 94923)
@@ -0,0 +1,47 @@
+using System;
+using System.IO;
+using System.Collections;
+using System.Collections.Generic;
+
+class convert {
+       static int Main (string [] args)
+       {
+               try {
+                       string sourcefile;
+                       if (args.Length == 0)
+                               sourcefile = "fullscreen.xaml";
+                       else
+                               sourcefile = args [0];
+                       string destfile = Path.ChangeExtension (sourcefile, 
".h");
+                       string [] source = File.ReadAllLines (sourcefile);
+                       List<string> dest = new List <string> ();
+
+                       dest.Add (@"/*
+ * fullscreen.h: the xaml for the fullscreen message.
+ *
+ * Author:
+ *  Rolf Bjarne Kvinge  ([EMAIL PROTECTED])
+ *
+ * Copyright 2007 Novell, Inc. (http://www.novell.com)
+ *
+ * See the LICENSE file included with the distribution for details.
+ * 
+ */");
+
+                       dest.Add ("#define FULLSCREEN_MESSAGE \\");
+
+                       for (int i = 0; i < source.Length; i++) {
+                               dest.Add ("\"" + source [i].Replace ("\"", 
"\\\"") + "\\n\" \\");
+                       }
+                       dest.Add ("\"\"");
+                       dest.Add ("");
+                       File.WriteAllLines (destfile, dest.ToArray ());
+
+                       return 0;
+               } catch (Exception ex) {
+                       Console.WriteLine (ex.Message);
+                       Console.WriteLine (ex.StackTrace);
+                       return 1;
+               }
+       }
+}

Added: trunk/moon/src/fullscreen.sh
===================================================================
--- trunk/moon/src/fullscreen.sh        2008-02-05 18:43:44 UTC (rev 94922)
+++ trunk/moon/src/fullscreen.sh        2008-02-05 18:47:30 UTC (rev 94923)
@@ -0,0 +1,4 @@
+#!/bin/sh
+gmcs -debug fullscreen.cs -target:exe
+mono --debug fullscreen.exe
+rm -f fullscreen.exe*


Property changes on: trunk/moon/src/fullscreen.sh
___________________________________________________________________
Name: svn:executable
   + *

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to