[mapguide-commits] r5811 - in trunk/Tools/Maestro: . Maestro.Base Maestro.Base/Commands Maestro.Base/Properties

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Tue May 17 11:58:31 EDT 2011


Author: jng
Date: 2011-05-17 08:58:31 -0700 (Tue, 17 May 2011)
New Revision: 5811

Added:
   trunk/Tools/Maestro/Maestro.Base/Commands/UserGuideCommand.cs
Modified:
   trunk/Tools/Maestro/Maestro.Base/Maestro.Base.addin
   trunk/Tools/Maestro/Maestro.Base/Maestro.Base.csproj
   trunk/Tools/Maestro/Maestro.Base/Properties/Resources.Designer.cs
   trunk/Tools/Maestro/Maestro.Base/Properties/Resources.resx
   trunk/Tools/Maestro/build.bat
Log:
#1677: Build the user guide as part of the top-level build script. Add a command to launch the index page of the user guide.

Added: trunk/Tools/Maestro/Maestro.Base/Commands/UserGuideCommand.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Commands/UserGuideCommand.cs	                        (rev 0)
+++ trunk/Tools/Maestro/Maestro.Base/Commands/UserGuideCommand.cs	2011-05-17 15:58:31 UTC (rev 5811)
@@ -0,0 +1,44 @@
+#region Disclaimer / License
+// Copyright (C) 2011, Jackie Ng
+// http://trac.osgeo.org/mapguide/wiki/maestro, jumpinjackie at gmail.com
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+// 
+// This library 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
+// Lesser General Public License for more details.
+// 
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+// 
+#endregion
+using System;
+using System.Collections.Generic;
+using System.Text;
+using ICSharpCode.Core;
+using System.IO;
+using System.Diagnostics;
+
+namespace Maestro.Base.Commands
+{
+    internal class UserGuideCommand : AbstractMenuCommand
+    {
+        public override void Run()
+        {
+            var path = Path.Combine(FileUtility.ApplicationRootPath, "UserDoc/index.html");
+            if (!File.Exists(path))
+            {
+                MessageService.ShowError(Properties.Resources.HelpFileNotFound);
+            }
+            else 
+            {
+                Process.Start(path);
+            }
+        }
+    }
+}

Modified: trunk/Tools/Maestro/Maestro.Base/Maestro.Base.addin
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Maestro.Base.addin	2011-05-17 15:48:03 UTC (rev 5810)
+++ trunk/Tools/Maestro/Maestro.Base/Maestro.Base.addin	2011-05-17 15:58:31 UTC (rev 5811)
@@ -242,6 +242,9 @@
         <MenuItem id="Menu_Help"
                   type="Menu"
                   label="${res:Menu_Help}">
+            <MenuItem id="Menu_Help_UserGuide"
+                      label="${res:Menu_Help_UserGuide}"
+                      class="Maestro.Base.Commands.UserGuideCommand" />
             <MenuItem id="Menu_Help_Totd"
                       label="${res:Menu_Help_Totd}"
                       class="Maestro.Base.Commands.TipOfTheDayCommand" />

Modified: trunk/Tools/Maestro/Maestro.Base/Maestro.Base.csproj
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Maestro.Base.csproj	2011-05-17 15:48:03 UTC (rev 5810)
+++ trunk/Tools/Maestro/Maestro.Base/Maestro.Base.csproj	2011-05-17 15:58:31 UTC (rev 5811)
@@ -127,6 +127,7 @@
     <Compile Include="Commands\Test\SelectFdoProviderCommand.cs" />
     <Compile Include="Commands\Test\TestCommands.cs" />
     <Compile Include="Commands\TipOfTheDayCommand.cs" />
+    <Compile Include="Commands\UserGuideCommand.cs" />
     <Compile Include="Commands\ValidateEditedResourceCommand.cs" />
     <Compile Include="Commands\XmlEditCommand.cs" />
     <Compile Include="Editor\DrawingSourceEditor.cs">

Modified: trunk/Tools/Maestro/Maestro.Base/Properties/Resources.Designer.cs
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Properties/Resources.Designer.cs	2011-05-17 15:48:03 UTC (rev 5810)
+++ trunk/Tools/Maestro/Maestro.Base/Properties/Resources.Designer.cs	2011-05-17 15:58:31 UTC (rev 5811)
@@ -741,6 +741,15 @@
             }
         }
         
+        /// <summary>
+        ///   Looks up a localized string similar to Could not find help file.
+        /// </summary>
+        internal static string HelpFileNotFound {
+            get {
+                return ResourceManager.GetString("HelpFileNotFound", resourceCulture);
+            }
+        }
+        
         internal static System.Drawing.Bitmap images_stack {
             get {
                 object obj = ResourceManager.GetObject("images_stack", resourceCulture);
@@ -1056,6 +1065,15 @@
         }
         
         /// <summary>
+        ///   Looks up a localized string similar to User Guide.
+        /// </summary>
+        internal static string Menu_Help_UserGuide {
+            get {
+                return ResourceManager.GetString("Menu_Help_UserGuide", resourceCulture);
+            }
+        }
+        
+        /// <summary>
         ///   Looks up a localized string similar to Package.
         /// </summary>
         internal static string Menu_Package {

Modified: trunk/Tools/Maestro/Maestro.Base/Properties/Resources.resx
===================================================================
--- trunk/Tools/Maestro/Maestro.Base/Properties/Resources.resx	2011-05-17 15:48:03 UTC (rev 5810)
+++ trunk/Tools/Maestro/Maestro.Base/Properties/Resources.resx	2011-05-17 15:58:31 UTC (rev 5811)
@@ -1013,4 +1013,10 @@
   <data name="Menu_Help_Totd" xml:space="preserve">
     <value>Tip of the Day</value>
   </data>
+  <data name="HelpFileNotFound" xml:space="preserve">
+    <value>Could not find help file</value>
+  </data>
+  <data name="Menu_Help_UserGuide" xml:space="preserve">
+    <value>User Guide</value>
+  </data>
 </root>
\ No newline at end of file

Modified: trunk/Tools/Maestro/build.bat
===================================================================
--- trunk/Tools/Maestro/build.bat	2011-05-17 15:48:03 UTC (rev 5810)
+++ trunk/Tools/Maestro/build.bat	2011-05-17 15:58:31 UTC (rev 5811)
@@ -5,6 +5,7 @@
 SET RELEASE_VERSION=3.0.0
 SET OLDPATH=%PATH%
 SET PATH=%PATH%;%CD%\Thirdparty\NSIS;C:\Windows\Microsoft.NET\Framework\v3.5
+SET SLNDIR=%CD%
 
 :study_params
 if (%1)==() goto start_build
@@ -77,6 +78,12 @@
 pushd Maestro
 %MSBUILD% Maestro.sln
 popd
+pushd UserDoc
+make html
+popd
+pushd UserDoc\build\html
+xcopy /S /Y *.* %SLNDIR%\out\%TYPEBUILD%\UserDoc\
+popd
 pushd Install
 %MAKENSIS% Maestro.nsi
 popd



More information about the mapguide-commits mailing list