Skip to content

Commit 77e87a2

Browse files
committed
Merge branch 'release/v5.6.2'
# Conflicts: # src/MW5.sln # src/SolutionItems/SolutionInfoCore.cs
2 parents 0ef1bd6 + ce8babc commit 77e87a2

File tree

16 files changed

+618
-474
lines changed

16 files changed

+618
-474
lines changed

install/MapWindow5.iss

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#define MyAppPublisher "MapWindow Open Source GIS Community"
1414
#define MyAppURL "https://www.mapwindow.org/documentation/mapwindow5/"
1515
#define ReleaseNotes ExeBinPath + "\..\..\..\src\SolutionItems\ReleaseNotes.rtf"
16-
#define GdalLicensePath ExeBinPath + "\..\..\..\..\..\MapWinGIS\git\support\GDAL_SDK\licenses\
16+
#define GdalLicensePath ExeBinPath + "\..\..\..\..\..\MapWinGIS\git\support\GDAL_SDK\licenses\"
1717

1818
#define x64BitVersion true
1919

@@ -29,18 +29,21 @@
2929
; NOTE: The value of AppId uniquely identifies this application.
3030
; Do not use the same AppId value in installers for other applications.
3131
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
32-
;; x86:
33-
;;AppId={{EB12FA54-F2EE-4536-9A3E-3477A6049798}
34-
;; x64:
35-
AppId={{AF7BDDC6-2263-47B0-9AA2-DA03CA6E8DC6}
32+
#ifdef x64BitVersion
33+
;; x64:
34+
AppId={{AF7BDDC6-2263-47B0-9AA2-DA03CA6E8DC6}
35+
#else
36+
;; x86:
37+
AppId={{EB12FA54-F2EE-4536-9A3E-3477A6049798}
38+
#endif
3639

3740
AppName={#MyAppName}
3841
AppVersion={#MyAppVersion}
3942
AppPublisher={#MyAppPublisher}
4043
AppPublisherURL={#MyAppURL}
4144
AppSupportURL={#MyAppURL}
4245
AppUpdatesURL={#MyAppURL}
43-
DefaultDirName={pf}\MapWindow5
46+
DefaultDirName={commonpf}\MapWindow5
4447
DisableProgramGroupPage=no
4548
DefaultGroupName={#MyAppName}
4649
LicenseFile={#ExeBinPath}\..\..\..\licenses\MapWindow5License.rtf
@@ -75,7 +78,6 @@ AlwaysShowComponentsList=false
7578
ArchitecturesInstallIn64BitMode=x64
7679
#endif
7780
ChangesAssociations=Yes
78-
UsePreviousAppDir=False
7981

8082
[Components]
8183
Name: "MapWindow"; Description: "MapWindow5 files"; Types: full custom compact; Flags: fixed
@@ -94,7 +96,7 @@ Source: "{#ExeBinPath}\Projections\*"; DestDir: "{app}\Projections"; Flags: igno
9496
;; Manuals sub folder
9597
Source: "{#ExeBinPath}\Manuals\*"; DestDir: "{app}\Manuals"; Flags: ignoreversion recursesubdirs createallsubdirs {#SystemFlag}; Components: MapWindow
9698
;; Plugins subfolder
97-
Source: "{#ExeBinPath}\Plugins\*"; DestDir: "{app}\Plugins"; Flags: ignoreversion recursesubdirs createallsubdirs {#SystemFlag}; Components: MapWindow; Excludes: "Interop.MapWinGIS.dll,MW5.TemplatePlugin.dll,Syncfusion.*"
99+
Source: "{#ExeBinPath}\Plugins\*"; DestDir: "{app}\Plugins"; Flags: ignoreversion recursesubdirs createallsubdirs {#SystemFlag}; Components: MapWindow; Excludes: "AxInterop.MapWinGIS.dll,Interop.MapWinGIS.dll,MW5.TemplatePlugin.dll,Syncfusion.*, *.pdb"
98100
;; Styles subfolder
99101
Source: "{#ExeBinPath}\Styles\*"; DestDir: "{app}\Styles"; Flags: ignoreversion recursesubdirs createallsubdirs {#SystemFlag}; Components: MapWindow
100102
;; SQLite interop:
@@ -126,9 +128,9 @@ BeveledLabel={#MyAppName}
126128
[Run]
127129
; Install VC++ 2017 if needed:
128130
#ifdef x64BitVersion
129-
Filename: "{tmp}\{#vcredist}"; Parameters: "/quiet"; Flags: waituntilterminated; Check: VCRedistNeedsInstall_x64()
131+
Filename: "{tmp}\{#vcredist}"; Parameters: "/quiet"; Flags: waituntilterminated; Check: VCRedistNeedsInstall_x64()
130132
#else
131-
Filename: "{tmp}\{#vcredist}"; Parameters: "/quiet"; Flags: waituntilterminated; Check: VCRedistNeedsInstall_x86()
133+
Filename: "{tmp}\{#vcredist}"; Parameters: "/quiet"; Flags: waituntilterminated; Check: VCRedistNeedsInstall_x86()
132134
#endif
133135
Filename: "{app}\MapWindow.exe"; Flags: shellexec runasoriginaluser postinstall nowait skipifsilent; Description: "Start MapWindow5 GIS?"
134136
Filename: "{code:GetDataDir}"; Flags: shellexec runasoriginaluser nowait skipifsilent; Description: "Open sample data folder"; Components: USASampleData
@@ -160,6 +162,7 @@ Root: "HKCR"; Subkey: "MW5Project\"; ValueName: "InstallDir"; ValueType: string;
160162
[InstallDelete]
161163
Type: files; Name: "{app}\Plugins\MW5.TemplatePlugin.dll"; Components: MapWindow
162164
Type: files; Name: "{app}\Plugins\Interop.MapWinGIS.dll"; Components: MapWindow
165+
Type: files; Name: "{app}\Plugins\AxInterop.MapWinGIS.dll"; Components: MapWindow
163166
;; Old ECW driver, conflicts with new driver:
164167
Type: files; Name: "{app}\MapWinGIS\libecwj2.dll"; Components: MapWindow
165168

@@ -268,8 +271,6 @@ end;
268271
269272
// custom wizard page setup, for data dir.
270273
procedure InitializeWizard;
271-
var
272-
myLocalAppData: String;
273274
begin
274275
DataDirPage := CreateInputDirPage(
275276
wpSelectComponents,
@@ -298,7 +299,7 @@ begin
298299
// if the page that is asked to be skipped is your custom page, then...
299300
if PageID = DataDirPage.ID then
300301
// if the component is not selected, skip the page
301-
Result := not IsComponentSelected('USASampleData');
302+
Result := not WizardIsComponentSelected('USASampleData');
302303
end;
303304
304305
function IsDotNetDetected(version: string; service: cardinal): boolean;

src/MW5.AdvancedSnapping/MW5.AdvancedSnapping.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
4141
</PropertyGroup>
4242
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
43-
<OutputPath>..\..\bin\x86\Release\Plugins\</OutputPath>
43+
<OutputPath>..\..\..\bin\x86\Release\Plugins\</OutputPath>
4444
<DefineConstants>TRACE</DefineConstants>
4545
<Optimize>true</Optimize>
4646
<DebugType>none</DebugType>

src/MW5.AdvancedSnapping/Restrictions/CircularRestriction.cs

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,9 @@ public IEnumerable<ICoordinate> FindIntersection(LinearRestriction restrictionA)
6363
if (restrictionA == null)
6464
yield break;
6565

66+
if (Distance == 0)
67+
yield break;
68+
6669
// Translate line so circle center is at origin
6770
var A = restrictionA.Factor;
6871
var B = -1.0;
@@ -77,6 +80,9 @@ public IEnumerable<ICoordinate> GetIntersections(CircularRestriction restriction
7780
if (restrictionA == null)
7881
yield break;
7982

83+
if (Distance == 0)
84+
yield break;
85+
8086
// Some things we'll need a lot:
8187
var distance = restrictionA.Anchor.Distance(Anchor);
8288
double combinedDiameters = (restrictionA.Factor + Factor);
@@ -130,7 +136,10 @@ public IGeometry ToMapGeometry(int segments)
130136
{
131137
var geometry = new Geometry(Api.Enums.GeometryType.Point);
132138
geometry.Points.Add(new Coordinate(Anchor.X, Anchor.Y));
133-
return geometry.Buffer(Distance, segments).Boundary();
139+
if (Math.Abs(Distance) <= double.Epsilon)
140+
return geometry;
141+
IGeometry buffer = geometry.Buffer(Distance, segments);
142+
return buffer?.Boundary() ?? geometry;
134143
}
135144

136145
private int CalculateNumberOfGeometrySegments(IMap map)

src/MW5.AdvancedSnapping/Restrictions/LinearRestriction.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ public virtual void OffsetByDistance(double distance)
119119
{
120120
var delta = distance - _offset;
121121
var offsets = GetNewAnchorsAtDistance(delta);
122+
if (!offsets.Any())
123+
return;
122124
if (delta > 0)
123125
Anchor = offsets.First();
124126
else

src/MW5.AdvancedSnapping/Services/SnapRestrictionService.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,6 +258,11 @@ public void SnapDistance(ICoordinate anchor, int handle = 0)
258258
// Show input box to end-user to enter the distance
259259
// live updating the map with the snap line
260260
void inputAction (double value) {
261+
if (Math.Abs(value) <= double.Epsilon)
262+
{
263+
RemoveRestriction(restriction);
264+
return;
265+
}
261266
restriction.Distance = value;
262267
restriction.RefreshGuideline(_context.Map as IMap);
263268
};

src/MW5.Api/MW5.Api.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,11 +317,11 @@
317317
<COMReference Include="MapWinGIS">
318318
<Guid>{C368D713-CC5F-40ED-9F53-F84FE197B96A}</Guid>
319319
<VersionMajor>5</VersionMajor>
320-
<VersionMinor>1</VersionMinor>
320+
<VersionMinor>2</VersionMinor>
321321
<Lcid>0</Lcid>
322322
<WrapperTool>tlbimp</WrapperTool>
323-
<Isolated>True</Isolated>
324-
<EmbedInteropTypes>False</EmbedInteropTypes>
323+
<Isolated>False</Isolated>
324+
<EmbedInteropTypes>True</EmbedInteropTypes>
325325
</COMReference>
326326
<COMReference Include="stdole">
327327
<Guid>{00020430-0000-0000-C000-000000000046}</Guid>

src/MW5.Data/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="System.Data.SQLite.Core" version="1.0.113" targetFramework="net46" />
3+
<package id="System.Data.SQLite.Core" version="1.0.113.1" targetFramework="net46" />
44
</packages>

src/MW5.Projections/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="System.Data.SQLite.Core" version="1.0.113" targetFramework="net46" />
3+
<package id="System.Data.SQLite.Core" version="1.0.113.1" targetFramework="net46" />
44
</packages>

src/MW5/packages.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
33
<package id="NUnit" version="3.12.0" targetFramework="net46" />
4-
<package id="System.Data.SQLite.Core" version="1.0.113" targetFramework="net46" />
4+
<package id="System.Data.SQLite.Core" version="1.0.113.1" targetFramework="net46" />
55
</packages>

src/Plugins/MW5.ImageRegistration/MW5.ImageRegistration.csproj

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@
2626
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
2727
<DefineConstants>TRACE</DefineConstants>
2828
<Optimize>true</Optimize>
29-
<DebugType>pdbonly</DebugType>
29+
<DebugType>none</DebugType>
3030
<PlatformTarget>x86</PlatformTarget>
3131
<ErrorReport>prompt</ErrorReport>
3232
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
33-
<LangVersion>7.1</LangVersion>
33+
<LangVersion>default</LangVersion>
3434
</PropertyGroup>
3535
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
3636
<DebugSymbols>true</DebugSymbols>
@@ -47,6 +47,7 @@
4747
<PlatformTarget>x64</PlatformTarget>
4848
<ErrorReport>prompt</ErrorReport>
4949
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
50+
<LangVersion>default</LangVersion>
5051
</PropertyGroup>
5152
<ItemGroup>
5253
<Reference Include="Syncfusion.Grid.Grouping.Windows, Version=16.1460.0.24, Culture=neutral, PublicKeyToken=3d67ed1f87d44c89, processorArchitecture=MSIL">

0 commit comments

Comments
 (0)