[mapguide-commits] r7094 - in branches/2.4/MgDev: . nuget nuget/cs-map-dicts nuget/cs-map-dicts/tools nuget/cs-map-dicts/tools/net40

svn_mapguide at osgeo.org svn_mapguide at osgeo.org
Mon Oct 8 05:04:00 PDT 2012


Author: jng
Date: 2012-10-08 05:04:00 -0700 (Mon, 08 Oct 2012)
New Revision: 7094

Added:
   branches/2.4/MgDev/nuget/cs-map-dict-readme.txt
   branches/2.4/MgDev/nuget/cs-map-dictionaries.nuspec.tpl
   branches/2.4/MgDev/nuget/cs-map-dicts/
   branches/2.4/MgDev/nuget/cs-map-dicts/tools/
   branches/2.4/MgDev/nuget/cs-map-dicts/tools/net40/
   branches/2.4/MgDev/nuget/cs-map-dicts/tools/net40/GetCsMapDictPostBuildCmd.ps1
   branches/2.4/MgDev/nuget/cs-map-dicts/tools/net40/install.ps1
   branches/2.4/MgDev/nuget/cs-map-dicts/tools/net40/uninstall.ps1
Modified:
   branches/2.4/MgDev/nuget/api-base-readme.txt
   branches/2.4/MgDev/nuget/api-desktop-readme.txt
   branches/2.4/MgDev/nuget/api-desktop-viewer-readme.txt
   branches/2.4/MgDev/nuget/api-web-readme.txt
   branches/2.4/MgDev/nuget_pack.bat
   branches/2.4/MgDev/nuget_prepare.bat
Log:
Add a CS-Map coordinate system dictionary nuget package. This package is content-only and contains a subset of the CS-Map coordinate system dictionary files (country-specific grid files have been omitted, basically the same subset we bundle for mg-desktop). This package is optional and is primarily for applications consuming the mg-desktop nuget package.

Modified: branches/2.4/MgDev/nuget/api-base-readme.txt
===================================================================
--- branches/2.4/MgDev/nuget/api-base-readme.txt	2012-10-08 09:01:55 UTC (rev 7093)
+++ branches/2.4/MgDev/nuget/api-base-readme.txt	2012-10-08 12:04:00 UTC (rev 7094)
@@ -24,4 +24,6 @@
 
 The ability to use the classes within these libraries depends on how you initialized the platform. See installation notes for (mapguide-api-web) or (mg-desktop-net40).
 
-If you are using this package on its own (for example, you want to use the MgCoordinateSystem classes), then the only initialization requirement is to define the MENTOR_DICTIONARY_PATH environment variable before you use any MgCoordinateSystem class. This variable should be the path to your CS-Map coordinate system dictionaries
\ No newline at end of file
+If you are using this package on its own (for example, you want to use the MgCoordinateSystem classes), then the only initialization requirement is to define the MENTOR_DICTIONARY_PATH environment variable before you use any MgCoordinateSystem class. This variable should be the path to your CS-Map coordinate system dictionaries
+
+Unlike the assemblies that come with your MapGuide Open Source installation, the assemblies in this package are signed. You cannot use this package if you require un-signed MapGuide assemblies.
\ No newline at end of file

Modified: branches/2.4/MgDev/nuget/api-desktop-readme.txt
===================================================================
--- branches/2.4/MgDev/nuget/api-desktop-readme.txt	2012-10-08 09:01:55 UTC (rev 7093)
+++ branches/2.4/MgDev/nuget/api-desktop-readme.txt	2012-10-08 12:04:00 UTC (rev 7094)
@@ -8,6 +8,11 @@
 
 - mapguide-api-base
 
+Optional Dependencies
+=====================
+
+- cs-map-dictionaries
+
 Installation Notes
 ==================
 
@@ -15,7 +20,7 @@
 
  - OSGeo.MapGuide.Desktop
 
-This package does not include the CS-Map coordinate system dictionaries. It is assumed you have an existing copy of these dictionaries that will be copied to the Dictionaries subdirectory of your project's output directory.
+This package does not include the CS-Map coordinate system dictionaries. It is assumed you will install the optional cs-map-dictionaries package or have an existing copy of these dictionaries that will be copied to the Dictionaries subdirectory of your project's output directory.
 
 After package installation, you may need to edit Platform.ini to ensure all the paths defined point to the correct locations
 
@@ -23,6 +28,6 @@
 
  MgdPlatform.Initialize("<path-to>\\Platform.ini");
 
-Before you can use most parts of the MapGuide API.
+before you can use most parts of the MapGuide API.
 
 ======= CHANGELOG ==========

Modified: branches/2.4/MgDev/nuget/api-desktop-viewer-readme.txt
===================================================================
--- branches/2.4/MgDev/nuget/api-desktop-viewer-readme.txt	2012-10-08 09:01:55 UTC (rev 7093)
+++ branches/2.4/MgDev/nuget/api-desktop-viewer-readme.txt	2012-10-08 12:04:00 UTC (rev 7094)
@@ -9,6 +9,11 @@
 - mapguide-api-base
 - mg-desktop-net40
 
+Optional Dependencies
+=====================
+
+- cs-map-dictionaries
+
 Installation Notes
 ==================
 
@@ -19,7 +24,7 @@
 
 Ensure that your executable project's <Platform Target> is updated to match the architecture-specific package you installed. eg. If you installed the x64 package, you must set the <Platform Target> to be x64. Setting it to x86 or AnyCPU may cause a System.BadImageFormatException to be thrown when loading the mg-desktop dlls
 
-This package does not include the CS-Map coordinate system dictionaries. It is assumed you have an existing copy of these dictionaries that will be copied to the Dictionaries subdirectory of your project's output directory.
+This package does not include the CS-Map coordinate system dictionaries. It is assumed you will install the optional cs-map-dictionaries package or have an existing copy of these dictionaries that will be copied to the Dictionaries subdirectory of your project's output directory.
 
 After package installation, you may need to edit Platform.ini to ensure all the paths defined point to the correct locations
 
@@ -27,6 +32,6 @@
 
  MgdPlatform.Initialize("<path-to>\\Platform.ini");
 
-Before you can use most parts of the MapGuide API.
+before you can use most parts of the MapGuide API.
 
 ======= CHANGELOG ==========

Modified: branches/2.4/MgDev/nuget/api-web-readme.txt
===================================================================
--- branches/2.4/MgDev/nuget/api-web-readme.txt	2012-10-08 09:01:55 UTC (rev 7093)
+++ branches/2.4/MgDev/nuget/api-web-readme.txt	2012-10-08 12:04:00 UTC (rev 7094)
@@ -24,4 +24,6 @@
 
 Before you can use most parts of the MapGuide API. For Web Applications (ASP.net), you can generally call this in the Application_Start() method of your Global.asax
 
-If you installed the x64 package, in order to be able to debug your MapGuide Application, you must have your application use <Local IIS> instead of the built-in web server. This normally requires you run Visual Studio as administrator. The reason for this is simply that the built-in web server is a 32-bit process which cannot load your MapGuide 64-bit dlls.
\ No newline at end of file
+If you installed the x64 package, in order to be able to debug your MapGuide Application, you must have your application use <Local IIS> instead of the built-in web server. This normally requires you run Visual Studio as administrator. The reason for this is simply that the built-in web server is a 32-bit process which cannot load your MapGuide 64-bit dlls.
+
+Unlike the assemblies that come with your MapGuide Open Source installation, the assemblies in this package are signed. You cannot use this package if you require un-signed MapGuide assemblies.
\ No newline at end of file

Added: branches/2.4/MgDev/nuget/cs-map-dict-readme.txt
===================================================================
--- branches/2.4/MgDev/nuget/cs-map-dict-readme.txt	                        (rev 0)
+++ branches/2.4/MgDev/nuget/cs-map-dict-readme.txt	2012-10-08 12:04:00 UTC (rev 7094)
@@ -0,0 +1,21 @@
+cs-map-dictionaries README
+==========================
+
+This is an optional content-only NuGet package containing a subset of the CS-Map Coordinate System Dictionary files.
+
+These files are required if your application uses any MgCoordinateSystem* class in the MapGuide API.
+
+To conserve package size, country-specific grid files have been omitted from this package.
+
+If you are building normal web applications with the MapGuide Web API, this package is not necessary as your application will use the dictionary files specified in webconfig.ini (which normally point to dictionary files that come with your MapGuide Open Source installation)
+
+This package is only required if you are building a mg-desktop application (you installed the mg-desktop-net40 package), or you are building a non-standard application that uses the MgCoordinateSystem* classes in the MapGuide API.
+
+Installation Notes
+==================
+
+This package will add a post-build step to copy the dictionary files to a "Dictionaries" subdirectory in the project's output directory.
+
+If you installed the mg-desktop-net40 package, it's Platform.ini expects the dictionary files to be copied to this location and thus does not require any further action on your part if you installed both packages.
+
+For non-standard applications that use the MgCoordinateSystem* classes, you must set the MENTOR_DICTIONARY_PATH environment variable to indicate the directory containing these dictionary files. You must do this before you access the MgCoordinateSystemFactory class.
\ No newline at end of file

Added: branches/2.4/MgDev/nuget/cs-map-dictionaries.nuspec.tpl
===================================================================
--- branches/2.4/MgDev/nuget/cs-map-dictionaries.nuspec.tpl	                        (rev 0)
+++ branches/2.4/MgDev/nuget/cs-map-dictionaries.nuspec.tpl	2012-10-08 12:04:00 UTC (rev 7094)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-16"?>
+<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
+    <metadata>
+        <id>cs-map-dictionaries</id>
+        <version>MG_VERSION</version>
+        <title>CS-Map Coordinate System Dictionary files</title>
+        <authors>Jackie Ng</authors>
+        <owners />
+        <licenseUrl>http://www.gnu.org/licenses/lgpl-2.1.txt</licenseUrl>
+        <projectUrl>http://trac.osgeo.org/metacrs</projectUrl>
+        <requireLicenseAcceptance>true</requireLicenseAcceptance>
+        <description>CS-Map Coordinate System Dictionary files. This is an optional content-only package containing a subset of the CS-Map Coordinate System dictionary files required by applications using the MgCoordinateSystem* classes of the MapGuide API</description>
+        <language>en-US</language>
+    </metadata>
+</package>


Property changes on: branches/2.4/MgDev/nuget/cs-map-dicts
___________________________________________________________________
Added: bugtraq:number
   + true


Property changes on: branches/2.4/MgDev/nuget/cs-map-dicts/tools
___________________________________________________________________
Added: bugtraq:number
   + true


Property changes on: branches/2.4/MgDev/nuget/cs-map-dicts/tools/net40
___________________________________________________________________
Added: bugtraq:number
   + true

Added: branches/2.4/MgDev/nuget/cs-map-dicts/tools/net40/GetCsMapDictPostBuildCmd.ps1
===================================================================
--- branches/2.4/MgDev/nuget/cs-map-dicts/tools/net40/GetCsMapDictPostBuildCmd.ps1	                        (rev 0)
+++ branches/2.4/MgDev/nuget/cs-map-dicts/tools/net40/GetCsMapDictPostBuildCmd.ps1	2012-10-08 12:04:00 UTC (rev 7094)
@@ -0,0 +1,8 @@
+$solutionDir = [System.IO.Path]::GetDirectoryName($dte.Solution.FullName) + "\"
+$path = $installPath.Replace($solutionDir, "`$(SolutionDir)")
+$contentDir = Join-Path $path "dictionaries"
+$files = $(Join-Path $contentDir "*.*")
+
+$CsMapDictPostBuildCmd = "
+if not exist `"`$(TargetDir)Dictionaries`" md `"`$(TargetDir)Dictionaries`"
+xcopy /s /y `"$files`" `"`$(TargetDir)Dictionaries`""
\ No newline at end of file

Added: branches/2.4/MgDev/nuget/cs-map-dicts/tools/net40/install.ps1
===================================================================
--- branches/2.4/MgDev/nuget/cs-map-dicts/tools/net40/install.ps1	                        (rev 0)
+++ branches/2.4/MgDev/nuget/cs-map-dicts/tools/net40/install.ps1	2012-10-08 12:04:00 UTC (rev 7094)
@@ -0,0 +1,12 @@
+param($installPath, $toolsPath, $package, $project)
+
+. (Join-Path $toolsPath "GetCsMapDictPostBuildCmd.ps1")
+
+# Get the current Post Build Event cmd
+$currentPostBuildCmd = $project.Properties.Item("PostBuildEvent").Value
+
+# Append our post build command if it's not already there
+if (!$currentPostBuildCmd.Contains($CsMapDictPostBuildCmd)) {
+    $project.Properties.Item("PostBuildEvent").Value += $CsMapDictPostBuildCmd
+    Write-Host "Updated Post-Build event for project"
+}
\ No newline at end of file

Added: branches/2.4/MgDev/nuget/cs-map-dicts/tools/net40/uninstall.ps1
===================================================================
--- branches/2.4/MgDev/nuget/cs-map-dicts/tools/net40/uninstall.ps1	                        (rev 0)
+++ branches/2.4/MgDev/nuget/cs-map-dicts/tools/net40/uninstall.ps1	2012-10-08 12:04:00 UTC (rev 7094)
@@ -0,0 +1,10 @@
+param($installPath, $toolsPath, $package, $project)
+
+. (Join-Path $toolsPath "GetCsMapDictPostBuildCmd.ps1")
+
+# Get the current Post Build Event cmd
+$currentPostBuildCmd = $project.Properties.Item("PostBuildEvent").Value
+
+# Remove our post build command from it (if it's there)
+$project.Properties.Item("PostBuildEvent").Value = $currentPostBuildCmd.Replace($CsMapDictPostBuildCmd, "")
+Write-Host "Removed Web API post-build event"
\ No newline at end of file

Modified: branches/2.4/MgDev/nuget_pack.bat
===================================================================
--- branches/2.4/MgDev/nuget_pack.bat	2012-10-08 09:01:55 UTC (rev 7093)
+++ branches/2.4/MgDev/nuget_pack.bat	2012-10-08 12:04:00 UTC (rev 7094)
@@ -6,4 +6,5 @@
 nuget pack mg-desktop-net40-%MG_CPU%.nuspec -BasePath %MG_CPU%\api-desktop
 nuget pack mg-desktop-viewer-net40-%MG_CPU%.nuspec -BasePath %MG_CPU%\api-desktop-viewer
 nuget pack mapguide-api-web-%MG_CPU%.nuspec -BasePath %MG_CPU%\api-web
+nuget pack cs-map-dictionaries.nuspec -BasePath cs-map-dicts
 popd
\ No newline at end of file

Modified: branches/2.4/MgDev/nuget_prepare.bat
===================================================================
--- branches/2.4/MgDev/nuget_prepare.bat	2012-10-08 09:01:55 UTC (rev 7093)
+++ branches/2.4/MgDev/nuget_prepare.bat	2012-10-08 12:04:00 UTC (rev 7094)
@@ -34,6 +34,8 @@
 SET NUGET_WEB_ROOT=%NUGET_BASEDIR%\api-web
 SET NUGET_CONTENT_WEB=%NUGET_WEB_ROOT%\mapguide-api-web
 SET NUGET_LIB_WEB=%NUGET_WEB_ROOT%\lib\%NUGET_TARGET%
+SET NUGET_CSMAP_ROOT=%NUGET_ROOT%\cs-map-dicts
+SET NUGET_CONTENT_CSMAP=%NUGET_CSMAP_ROOT%\dictionaries
 SET WEB_BASEDIR=%CD%\Web\bin\%TYPEBUILD%
 SET DESKTOP_SRC=%CD%\Desktop\MgDesktop
 SET DESKTOP_BASEDIR=%CD%\%TYPEBUILD%\Desktop
@@ -51,6 +53,12 @@
 ) ELSE (
     echo MapGuide Web base directory: %WEB_BASEDIR%
 )
+IF NOT EXIST "%DESKTOP_BASEDIR%\Dictionaries" (
+    echo CS-Map dictionaries directory not found: "%DESKTOP_BASEDIR%\Dictionaries"
+    goto error
+) ELSE (
+    echo CS-Map dictionaries directory: "%DESKTOP_BASEDIR%\Dictionaries"
+)
 IF NOT EXIST "%SIGNER_ROOT%" (
     echo Signer root directory not found: %SIGNER_ROOT%
     goto error
@@ -61,6 +69,7 @@
 IF NOT EXIST "%NUGET_CONTENT_BASE%" MKDIR "%NUGET_CONTENT_BASE%"
 IF NOT EXIST "%NUGET_CONTENT_DESKTOP%" MKDIR "%NUGET_CONTENT_DESKTOP%"
 IF NOT EXIST "%NUGET_CONTENT_WEB%" MKDIR "%NUGET_CONTENT_WEB%"
+IF NOT EXIST "%NUGET_CONTENT_CSMAP%" MKDIR "%NUGET_CONTENT_CSMAP%"
 
 echo [install]: Copy api-base files to nuget staging
 xcopy /S /Y "%DESKTOP_BASEDIR%\*" "%NUGET_CONTENT_BASE%" /EXCLUDE:package_excludes.txt+base_package_excludes.txt
@@ -89,6 +98,8 @@
 xcopy /Y /I "%WEB_BASEDIR%\OSGeo.MapGuide.Web.xml" "%NUGET_LIB_WEB%"
 xcopy /Y /I "%SIGNER_ROOT%\SignMapGuideApi.exe" "%NUGET_LIB_WEB%"
 xcopy /Y /I "%SIGNER_ROOT%\maestroapi.key" "%NUGET_LIB_WEB%"
+echo [install]: Copy cs-map dictionaries to nuget staging
+xcopy /S /Y "%DESKTOP_BASEDIR%\Dictionaries\*" "%NUGET_CONTENT_CSMAP%"
 echo [build]: Signing MapGuide API assemblies
 pushd "%NUGET_LIB_WEB%"
 SignMapGuideApi.exe
@@ -115,6 +126,9 @@
 echo [prepare]: mg-desktop-viewer-net40
 call BatchSubstitute.bat MG_CPU %MG_CPU% mg-desktop-viewer-net40.nuspec.tpl > temp.txt
 call BatchSubstitute.bat MG_VERSION %MG_VERSION% temp.txt > mg-desktop-viewer-net40-%MG_CPU%.nuspec
+echo [prepare]: cs-map-dictionaries
+call BatchSubstitute.bat MG_CPU %MG_CPU% cs-map-dictionaries.nuspec.tpl > temp.txt
+call BatchSubstitute.bat MG_VERSION %MG_VERSION% temp.txt > cs-map-dictionaries.nuspec
 del temp.txt
 echo [prepare]: NuGet Package readmes
 type api-base-readme.txt > "%NUGET_BASE_ROOT%\readme.txt"
@@ -123,6 +137,7 @@
 type api-desktop-viewer-readme.txt > "%NUGET_VIEWER_ROOT%\readme.txt"
 type "%DESKTOP_SRC%\changelog.txt" >> "%NUGET_VIEWER_ROOT%\readme.txt"
 type api-web-readme.txt > "%NUGET_WEB_ROOT%\readme.txt"
+type cs-map-dict-readme.txt > "%NUGET_CSMAP_ROOT%\readme.txt"
 popd
 echo mg-desktop is ready for nuget packaging and publishing
 goto quit



More information about the mapguide-commits mailing list