Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
cc9c92e
Added project to wrap toolbar as installable extension
harry-gibson Jan 14, 2020
4ae6f23
updated export form to run outside addin framework
harry-gibson Jan 15, 2020
29664a6
pass application or document as parameter to static validation methods
harry-gibson Jan 16, 2020
b6ee7c4
update comments in basecommand classes
harry-gibson Jan 16, 2020
a22a736
removed more references to addin-generated application hook
harry-gibson Jan 16, 2020
833be84
added basecommand for generation tool
harry-gibson Jan 16, 2020
eaf70c1
Update GenerationTool_Wrapper.cs
harry-gibson Jan 16, 2020
b223717
added basecommands for rename tool and generation tool
harry-gibson Jan 16, 2020
9daa6ea
added button icons (death to the rabbit)
harry-gibson Jan 16, 2020
d493502
added about box basecommand
harry-gibson Jan 17, 2020
e6029dc
started on installer (not done yet)
harry-gibson Jan 17, 2020
f812bb3
installer working
harry-gibson Jan 18, 2020
9fb4563
reinstated silent mode for ESRIRegAsm
harry-gibson Jan 18, 2020
aa79720
first pull-out of addin tools to new project
harry-gibson Jan 18, 2020
97a018c
further renaming of forms vs addin tools
harry-gibson Jan 18, 2020
51bd4b1
brought icons over
harry-gibson Jan 18, 2020
aafde92
fixed addin toolbar
harry-gibson Jan 18, 2020
1990ed9
updated assemblyname to get embedded icons working
harry-gibson Jan 19, 2020
938eb20
Updated launch conditions to correctly search for arcgis 10.6 or 10.6…
harry-gibson Jan 19, 2020
d8dadc4
restored version property in assemblyinfo classes
harry-gibson Jan 19, 2020
779b144
Merge branch 'master' into extension/separated_tools
harry-gibson Mar 2, 2020
81bbe32
updated namespace on new ProductLayer file pulled from master
harry-gibson Mar 3, 2020
165d6ab
temporarily turn off COM registration to enable non-admin build, to t…
harry-gibson Mar 3, 2020
5eac978
Update post-build-copy-addins.cmd
harry-gibson Mar 3, 2020
489119f
Update post_build_copy_addins.cmd
harry-gibson Mar 3, 2020
41f1982
updated make.cmd to build via devenv, setting necessary registry key …
harry-gibson Mar 4, 2020
73dd0aa
Copy MSI into artifacts folder
andrewphilipsmith Apr 8, 2020
6a7d859
Merge branch 'master' into extension/separated_tools
harry-gibson Sep 30, 2020
21c63ff
Update .gitignore
harry-gibson Sep 30, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -189,3 +189,4 @@ arcgis10_mapping_tools/opencover-results.xml
arcgis10_mapping_tools/RenameLayer/RenameLayer/obj/Debug/DesignTimeResolveAssemblyReferences.cache
arcgis10_mapping_tools/RenameLayer/RenameLayer/obj/Debug/DesignTimeResolveAssemblyReferences.cache
arcgis10_mapping_tools/.vs/
.vs/
8 changes: 8 additions & 0 deletions .vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"ExpandedNodes": [
"",
"\\arcgis10_mapping_tools\\MapActionToolbar_COMTools"
],
"SelectedNode": "\\arcgis10_mapping_tools",
"PreviewInSolutionExplorer": false
}
Binary file added .vs/slnx.sqlite
Binary file not shown.
33 changes: 33 additions & 0 deletions DevEnv-EnableOutOfProcBuild.cmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
@SETLOCAL
@REM
@ECHO OFF

ECHO: & ECHO Start %~nx0 & ECHO:


@REM The workaround for building .vdproj by DevEnv for the following error:
@REM Visual Studio has encountered an unexpected error.------ Starting pre-build validation for project 'Setup1' ------
@REM ERROR: An error occurred while validating. HRESULT = '8000000A'
@REM http://stackoverflow.com/questions/8648428/an-error-occurred-while-validating-hresult-8000000a
@REM https://connect.microsoft.com/VisualStudio/feedback/details/595632/inconsistent-hanging-with-devenv-2010

SET current_path="%CD%"
REM Bug! The DisableOutOfProcBuild.exe doesn't work if the current directory of CMD doesn't set to the installation location of DisableOutOfProcBuild.exe.
ECHO Seting the current path to the DisableOutOfProcBuild.exe installation folder.
@REM
CD "%ProgramFiles(x86)%\Microsoft Visual Studio\2017\Community\Common7\IDE\CommonExtensions\Microsoft\VSI\DisableOutOfProcBuild"
ECHO:
CALL DisableOutOfProcBuild.exe


IF [%env_qUtil%] NEQ [] (
CALL %env_qUtil%\exit_if_error
)


ECHO: & ECHO Revert the previous current directory.
CD %current_path%
ECHO CD is set to %CD%


@ECHO End %~nx0 & ECHO:
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 2 additions & 2 deletions arcgis10_mapping_tools/CommonTests/CommonTests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@
<None Include="packages.config" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\MapAction\MapAction\MapAction.csproj">
<ProjectReference Include="..\MapAction\MapAction\MapActionToolbar_Core.csproj">
<Project>{8B7ABA1A-C659-4D80-A2EF-13D953577643}</Project>
<Name>MapAction</Name>
<Name>MapActionToolbar_Core</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
Expand Down
4 changes: 2 additions & 2 deletions arcgis10_mapping_tools/CommonTests/DDPExportTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.ArcMapUI;
using NUnit.Framework;
using MapAction;
using MapActionToolbar_Core;


namespace MapAction.tests
namespace MapActionToolbar_Core.tests
{
/// <summary>
/// The tests in this case are focused on code dealing exporting MapAction specific MXDs which have DataDrivenPages enabled.
Expand Down
8 changes: 4 additions & 4 deletions arcgis10_mapping_tools/CommonTests/EventConfigTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
using System.Linq;
using System.Text;
using NUnit.Framework;
using MapAction;
using MapActionToolbar_Core;

namespace MapAction.tests
namespace MapActionToolbar_Core.tests
{
[TestFixture]
public class EventConfigTests
{
// Class properties
protected string testRootDir;
protected MapAction.EventConfig config;
protected MapActionToolbar_Core.EventConfig config;

private readonly string expectedOperationName= "Op_test";
private readonly string expectedGlideNo= "XY-2006-123456-PAK";
Expand Down Expand Up @@ -41,7 +41,7 @@ public EventConfigTests()
public void Setup()
{
string filePath = Path.Combine(this.testRootDir, @"testfiles\event_description.json");
config = MapAction.Utilities.getEventConfigValues(filePath);
config = MapActionToolbar_Core.Utilities.getEventConfigValues(filePath);
}

[TestCase]
Expand Down
8 changes: 4 additions & 4 deletions arcgis10_mapping_tools/CommonTests/ExportTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
using ESRI.ArcGIS.Carto;
using ESRI.ArcGIS.Framework;
using NUnit.Framework;
using MapAction;
using MapActionToolbar_Core;


namespace MapAction.tests
namespace MapActionToolbar_Core.tests
{
//[Ignore("Ignore Exports whilst fixing PageLayoutElements")]
[TestFixture]
Expand Down Expand Up @@ -88,12 +88,12 @@ public void exportSizedImageNewCreatesFileTest(MapActionExportTypes fileType, st
string outDir = this.exportPath;// just for clarity...

exportFileName = Path.Combine(outDir, "thumbnail.png");
width = MapAction.Properties.Settings.Default.thumbnail_width_px;
width = MapActionToolbar_Core.Properties.Settings.Default.thumbnail_width_px;
}
else
{
// at present the sized export still uses dpi to build the filename, using screen resolution
int dpi = MapAction.MapImageExporter.SCREEN_RES_DPI;
int dpi = MapActionToolbar_Core.MapImageExporter.SCREEN_RES_DPI;

width = 1024;
if (dataFrameName == null)
Expand Down
4 changes: 2 additions & 2 deletions arcgis10_mapping_tools/CommonTests/MATemplateTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
using System.Text;
using ESRI.ArcGIS.ArcMapUI;
using ESRI.ArcGIS.Carto;
using MapAction;
using MapActionToolbar_Core;
using NUnit.Framework;

namespace MapAction.tests
namespace MapActionToolbar_Core.tests
{
/// <summary>
/// The tests in this case are focused on the testing that code dealing with the MapAction specific MXDs work correctly
Expand Down
2 changes: 1 addition & 1 deletion arcgis10_mapping_tools/CommonTests/TestUtilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
/**
* Various static functions that are useful for setting up and tearing down tests for the MapActionToolbox Addins
*/
namespace MapAction.tests
namespace MapActionToolbar_Core.tests
{
class TestUtilities
{
Expand Down
36 changes: 36 additions & 0 deletions arcgis10_mapping_tools/InvokeESRIRegAsm/EsriRegisterer.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

96 changes: 96 additions & 0 deletions arcgis10_mapping_tools/InvokeESRIRegAsm/EsriRegisterer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Configuration.Install;
using System.Linq;
using System.Threading.Tasks;
using System.Diagnostics;

namespace InvokeESRIRegAsm
{
[RunInstaller(true)]
public partial class EsriRegisterer : Installer
{
public EsriRegisterer()
{
InitializeComponent();
}

public override void Install(System.Collections.IDictionary stateSaver)
{
base.Install(stateSaver);

//Register the custom component.
//-----------------------------
//The default location of the ESRIRegAsm utility.
//Note how the whole string is embedded in quotes because of the spaces in the path.
string cmd1 = "\"" + Environment.GetFolderPath
(Environment.SpecialFolder.CommonProgramFilesX86) +
"\\ArcGIS\\bin\\ESRIRegAsm.exe" + "\"";
//Obtain the input argument (via the CustomActionData Property) in the setup project.
//An example CustomActionData property that is passed through might be something like:
// /arg1="[ProgramFilesFolder]\[ProductName]\bin\ArcMapClassLibrary_Implements.dll",
//which translates to the following on a default install:
//C:\Program Files\MyGISApp\bin\ArcMapClassLibrary_Implements.dll.
string part1 = this.Context.Parameters["arg1"];

//Add the appropriate command line switches when invoking the ESRIRegAsm utility.
//In this case: /p:Desktop = means the ArcGIS Desktop product, /s = means a silent install.
string part2 = " /p:Desktop /s";

//It is important to embed the part1 in quotes in case there are any spaces in the path.
string cmd2 = "\"" + part1 + "\"" + part2;

//Call the routing that will execute the ESRIRegAsm utility.
int exitCode = ExecuteCommand(cmd1, cmd2, 30000);
}

public override void Uninstall(System.Collections.IDictionary savedState)
{
base.Uninstall(savedState);

//Unregister the custom component.
//-----------------------------
//The default location of the ESRIRegAsm utility.
//Note how the whole string is embedded in quotes because of the spaces in the path.
string cmd1 = "\"" + Environment.GetFolderPath
(Environment.SpecialFolder.CommonProgramFilesX86) +
"\\ArcGIS\\bin\\ESRIRegAsm.exe" + "\"";
//Obtain the input argument (via the CustomActionData Property) in the setup project.
//An example CustomActionData property that is passed through might be something like:
// /arg1="[ProgramFilesFolder]\[ProductName]\bin\ArcMapClassLibrary_Implements.dll",
//which translate to the following on a default install:
//C:\Program Files\MyGISApp\bin\ArcMapClassLibrary_Implements.dll.
string part1 = this.Context.Parameters["arg1"];

//Add the appropriate command line switches when invoking the ESRIRegAsm utility.
//In this case: /p:Desktop = means the ArcGIS Desktop product, /u = means unregister the Custom Component, /s = means a silent install.
string part2 = " /p:Desktop /u /s";

//It is important to embed the part1 in quotes in case there are any spaces in the path.
string cmd2 = "\"" + part1 + "\"" + part2;

//Call the routing that will execute the ESRIRegAsm utility.
int exitCode = ExecuteCommand(cmd1, cmd2, 30000);
}

public static int ExecuteCommand(string Command1, string Command2, int
Timeout)
{
//Set up a ProcessStartInfo using your path to the executable (Command1) and the command line arguments (Command2).
ProcessStartInfo ProcessInfo = new ProcessStartInfo(Command1, Command2);
ProcessInfo.CreateNoWindow = true;
ProcessInfo.UseShellExecute = false;

//Invoke the process.
Process Process = Process.Start(ProcessInfo);
Process.WaitForExit(Timeout);

//Finish.
int ExitCode = Process.ExitCode;
Process.Close();
return ExitCode;
}
}
}
55 changes: 55 additions & 0 deletions arcgis10_mapping_tools/InvokeESRIRegAsm/InvokeESRIRegAsm.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProjectGuid>{38C0FD0A-697D-4298-AAEE-9A2217CECF29}</ProjectGuid>
<OutputType>Library</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>InvokeESRIRegAsm</RootNamespace>
<AssemblyName>InvokeESRIRegAsm</AssemblyName>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<Deterministic>true</Deterministic>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>bin\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>bin\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Configuration.Install" />
<Reference Include="System.Core" />
<Reference Include="System.Management" />
<Reference Include="System.Xml.Linq" />
<Reference Include="System.Data.DataSetExtensions" />
<Reference Include="Microsoft.CSharp" />
<Reference Include="System.Data" />
<Reference Include="System.Net.Http" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="EsriRegisterer.cs">
<SubType>Component</SubType>
</Compile>
<Compile Include="EsriRegisterer.Designer.cs">
<DependentUpon>EsriRegisterer.cs</DependentUpon>
</Compile>
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
36 changes: 36 additions & 0 deletions arcgis10_mapping_tools/InvokeESRIRegAsm/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;

// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("InvokeESRIRegAsm")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("InvokeESRIRegAsm")]
[assembly: AssemblyCopyright("Copyright © 2020")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]

// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("38c0fd0a-697d-4298-aaee-9a2217cecf29")]

// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
Loading