Skip to content

Commit eec2c13

Browse files
committed
Getting ready for v5.3.0
1 parent c5a1741 commit eec2c13

16 files changed

Lines changed: 26406 additions & 7337 deletions

src/CopyTamasFiles.bat

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,8 @@ xcopy /v /c /r /y %_from_dir%\gdal-data\*.* %_to_dir%gdal-data\
3636
xcopy /v /c /r /y %_from_dir%\proj\SHARE\*.* %_to_dir%..\PROJ_NAD\
3737

3838
REM Copy needed Tamas binaries:
39-
FOR %%G IN (cfitsio.dll expat.dll freexl.dll geos.dll geos_c.dll hdf5.dll hdf5_hl.dll hdf5_cpp.dll hdf5_hl_cpp.dll libcrypto-1_1.dll libcrypto-1_1-x64.dll libcurl.dll
39+
FOR %%G IN (cfitsio.dll expat.dll freexl.dll geos.dll geos_c.dll hdf5.dll hdf5_hl.dll hdf5_cpp.dll hdf5_hl_cpp.dll libcrypto-1_1.dll libcrypto-1_1-x64.dll
40+
libcurl.dll ssleay32.dll libeay32.dll
4041
iconv.dll libmysql.dll libpq.dll libssl-1_1.dll libssl-1_1-x64.dll libtiff.dll libxml2.dll lti_lidar_dsdk_1.1.dll netcdf.dll
4142
openjp2.dll proj.dll spatialite.dll sqlite3.dll szip.dll tbb.dll xdrdll.dll zlib1.dll
4243
NCSEcw.dll) DO (
@@ -58,7 +59,7 @@ del /f /q %_to_dir%\lti_dsdk*.dll
5859
xcopy /v /c /r /y %_from_dir%\lti_dsdk*.dll %_to_dir%
5960

6061
REM Updates for GDAL v3:
61-
del /f /q %_to_dir%\gdal*.dll
62+
del /f /q %_to_dir%\gdal3*.dll
6263
xcopy /v /c /r /y %_from_dir%\gdal3*.dll %_to_dir%
6364
del /f /q %_to_dir%\proj_6*.dll
6465
xcopy /v /c /r /y %_from_dir%\proj_6_*.dll %_to_dir%

src/InnoSetup/MapWinGIS-only.iss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,11 @@
22
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
33

44
#define MyAppName "MapWinGIS"
5-
#define MyAppVersion "5.2.4"
65
#define MyAppPublisher "MapWindow Open Source GIS Community"
76
#define MyAppURL "http://www.mapwindow.org"
87
#define SetupLocation "D:\dev\MapWindow\MapWinGIS\git\src\InnoSetup"
98
#define BinLocation "D:\dev\MapWindow\MapWinGIS\git\src\bin"
10-
;; #define x64BitVersion
9+
#define x64BitVersion
1110
;; #define VsVersion = "2015"
1211
#define VsVersion = "2017"
1312

@@ -23,6 +22,8 @@
2322
#define SystemFlag "32bit"
2423
#endif
2524

25+
#define MyAppVersion GetFileVersion(MySourceDir + '\MapWinGIS.ocx')
26+
2627
[Setup]
2728
; NOTE: The value of AppId uniquely identifies this application.
2829
; Do not use the same AppId value in installers for other applications.

src/InnoSetup/ReleaseNotes.rtf

Lines changed: 257 additions & 200 deletions
Large diffs are not rendered by default.

src/InnoSetup/regMapWinGIS.cmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
rem The lines above are from http://www.codeproject.com/Tips/119828/Running-a-bat-file-as-administrator-Correcting-cur.aspx
44

55
REM Unregister any previous versions:
6-
regsvr32 /u /s MapWinGIS.ocx
6+
%systemroot%\SysWoW64\regsvr32 /u /s MapWinGIS.ocx
77
REM Register current version:
8-
regsvr32 /s MapWinGIS.ocx
8+
%systemroot%\SysWoW64\regsvr32 /s MapWinGIS.ocx
99

src/MapWinGIS.cpp

Lines changed: 100 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -19,19 +19,19 @@
1919
#include "TileCacheManager.h"
2020

2121
class CMapWinGISModule :
22-
public ATL::CAtlMfcModule
22+
public ATL::CAtlMfcModule
2323
{
2424
public:
25-
DECLARE_LIBID(LIBID_MapWinGIS);
26-
DECLARE_REGISTRY_APPID_RESOURCEID(IDR_MAPWINGIS, "{8308CC9E-4AEF-4D31-9081-86CD61B9E641}");
25+
DECLARE_LIBID(LIBID_MapWinGIS);
26+
DECLARE_REGISTRY_APPID_RESOURCEID(IDR_MAPWINGIS, "{8308CC9E-4AEF-4D31-9081-86CD61B9E641}");
2727
};
2828

2929
#undef THIS_FILE
3030
static char THIS_FILE[] = __FILE__;
3131

3232
const GUID CDECL BASED_CODE _tlid = { 0xc368d713, 0xcc5f, 0x40ed, { 0x9f, 0x53, 0xf8, 0x4f, 0xe1, 0x97, 0xb9, 0x6a } };
3333
const WORD _wVerMajor = 5;
34-
const WORD _wVerMinor = 2;
34+
const WORD _wVerMinor = 3;
3535

3636
CMapWinGISApp NEAR theApp;
3737
CMapWinGISModule _AtlModule; // this one is from ATL7 (used by all ATL co-classes)
@@ -43,136 +43,136 @@ GlobalClassFactory m_factory; // make sure that this one is initialized after th
4343
// ******************************************************
4444
BOOL CMapWinGISApp::InitInstance()
4545
{
46-
// let's generate floating point exceptions
47-
#ifndef RELEASE_MODE
48-
//_clearfp();
49-
//_controlfp(0, EM_ZERODIVIDE);
50-
#endif
46+
// let's generate floating point exceptions
47+
#ifndef RELEASE_MODE
48+
//_clearfp();
49+
//_controlfp(0, EM_ZERODIVIDE);
50+
#endif
51+
52+
Debug::Init();
5153

52-
Debug::Init();
54+
//Neio modified 2009, following http_://www.mapwindow.org/phorum/read.php?7,12162 by gischai, for multi-language support
55+
//std::locale::global(std::locale(""));
56+
//19-Oct-09 Rob Cairns: (See Bug 1446) - I hate doing this if it prevents our Chinese friends opening Chinese character shapefiles and data.
57+
//However, there are just too many bugs associated with this change. See Bug 1446 for more information. Changing back to classic.
58+
std::locale::global(std::locale("C"));
5359

54-
//Neio modified 2009, following http_://www.mapwindow.org/phorum/read.php?7,12162 by gischai, for multi-language support
55-
//std::locale::global(std::locale(""));
56-
//19-Oct-09 Rob Cairns: (See Bug 1446) - I hate doing this if it prevents our Chinese friends opening Chinese character shapefiles and data.
57-
//However, there are just too many bugs associated with this change. See Bug 1446 for more information. Changing back to classic.
58-
std::locale::global(std::locale("C"));
60+
// http_://stackoverflow.com/questions/7659127/createex-causes-unhandled-exception-the-activation-context-being-deactivated-is
61+
//AfxSetAmbientActCtx(FALSE);
5962

60-
// http_://stackoverflow.com/questions/7659127/createex-causes-unhandled-exception-the-activation-context-being-deactivated-is
61-
//AfxSetAmbientActCtx(FALSE);
63+
// UTF8 string are expected by default; the enviroment variable shoud be set to restore older behavior
64+
// see more details here: http_://trac.osgeo.org/gdal/wiki/ConfigOptions
65+
m_globalSettings.SetGdalUtf8(false);
6266

63-
// UTF8 string are expected by default; the enviroment variable shoud be set to restore older behavior
64-
// see more details here: http_://trac.osgeo.org/gdal/wiki/ConfigOptions
65-
m_globalSettings.SetGdalUtf8(false);
66-
67-
GdalHelper::SetDefaultConfigPaths();
67+
GdalHelper::SetDefaultConfigPaths();
6868

69-
parser::InitializeFunctions();
69+
parser::InitializeFunctions();
7070

71-
// initialize all static variables, to keep our memory leaking report clean from them
71+
// initialize all static variables, to keep our memory leaking report clean from them
7272
#ifdef _DEBUG
73-
gMemLeakDetect.stopped = true;
74-
GDALAllRegister();
75-
gMemLeakDetect.stopped = false;
73+
gMemLeakDetect.stopped = true;
74+
GDALAllRegister();
75+
gMemLeakDetect.stopped = false;
7676
#endif
7777

78-
//CMapView::GdiplusStartup(); // moved back to CMapView constructor
78+
//CMapView::GdiplusStartup(); // moved back to CMapView constructor
7979

80-
return COleControlModule::InitInstance() && InitATL();
80+
return COleControlModule::InitInstance() && InitATL();
8181
}
8282

8383
// *****************************************************
8484
// CMapWinGISApp::ExitInstance - DLL termination
8585
// *****************************************************
8686
int CMapWinGISApp::ExitInstance()
8787
{
88-
CPLErrorReset();
88+
CPLErrorReset();
8989

90-
MercatorProjection::ReleaseGeoProjection();
90+
MercatorProjection::ReleaseGeoProjection();
9191

92-
#ifndef RELEASE_MODE
92+
#ifndef RELEASE_MODE
9393

94-
CComBSTR bstr;
94+
CComBSTR bstr;
9595
// make sure m_utils is still extant
96-
if (m_utils)
97-
{
98-
m_utils->get_ComUsageReport(VARIANT_TRUE, &bstr);
99-
}
96+
if (m_utils)
97+
{
98+
m_utils->get_ComUsageReport(VARIANT_TRUE, &bstr);
99+
}
100100

101-
USES_CONVERSION;
102-
CString s = OLE2A(bstr);
103-
Debug::WriteLine(s);
101+
USES_CONVERSION;
102+
CString s = OLE2A(bstr);
103+
Debug::WriteLine(s);
104104

105-
#endif
105+
#endif
106106

107-
if (m_utils)
108-
{
109-
m_utils->Release();
110-
}
107+
if (m_utils)
108+
{
109+
m_utils->Release();
110+
}
111111

112-
TileCacheManager::CloseAll();
112+
TileCacheManager::CloseAll();
113113

114-
PrefetchManagerFactory::Clear();
114+
PrefetchManagerFactory::Clear();
115115

116-
parser::ReleaseFunctions();
116+
parser::ReleaseFunctions();
117117

118-
//CMapView::GdiplusShutdown(); // moved back to CMapView destructor
118+
//CMapView::GdiplusShutdown(); // moved back to CMapView destructor
119119

120-
_Module.Term();
121-
return COleControlModule::ExitInstance();
120+
_Module.Term();
121+
return COleControlModule::ExitInstance();
122122
}
123123

124124
// **************************************************************
125125
// DllRegisterServer - Adds entries to the system registry
126126
// **************************************************************
127127
STDAPI DllRegisterServer(void)
128128
{
129-
_AtlModule.UpdateRegistryAppId(TRUE);
130-
HRESULT hRes2 = _AtlModule.RegisterServer(TRUE);
131-
if (hRes2 != S_OK)
132-
return hRes2;
133-
AFX_MANAGE_STATE(_afxModuleAddrThis);
129+
_AtlModule.UpdateRegistryAppId(TRUE);
130+
HRESULT hRes2 = _AtlModule.RegisterServer(TRUE);
131+
if (hRes2 != S_OK)
132+
return hRes2;
133+
AFX_MANAGE_STATE(_afxModuleAddrThis);
134+
135+
if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
136+
return ResultFromScode(SELFREG_E_TYPELIB);
134137

135-
if (!AfxOleRegisterTypeLib(AfxGetInstanceHandle(), _tlid))
136-
return ResultFromScode(SELFREG_E_TYPELIB);
138+
if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
139+
return ResultFromScode(SELFREG_E_CLASS);
137140

138-
if (!COleObjectFactoryEx::UpdateRegistryAll(TRUE))
139-
return ResultFromScode(SELFREG_E_CLASS);
141+
return _Module.RegisterServer(TRUE);
140142

141-
return _Module.RegisterServer(TRUE);
142-
143143

144-
return NOERROR;
144+
return NOERROR;
145145
}
146146

147147
// **************************************************************
148148
// GetModuleInstance
149149
// **************************************************************
150150
HINSTANCE GetModuleInstance()
151151
{
152-
HINSTANCE instance = _Module.GetModuleInstance();
153-
return instance;
152+
HINSTANCE instance = _Module.GetModuleInstance();
153+
return instance;
154154
}
155155

156156
// **************************************************************
157157
// DllUnregisterServer - Removes entries from the system registry
158158
// **************************************************************
159159
STDAPI DllUnregisterServer(void)
160160
{
161-
_AtlModule.UpdateRegistryAppId(FALSE);
162-
HRESULT hRes2 = _AtlModule.UnregisterServer(TRUE);
163-
if (hRes2 != S_OK)
164-
return hRes2;
165-
AFX_MANAGE_STATE(_afxModuleAddrThis);
161+
_AtlModule.UpdateRegistryAppId(FALSE);
162+
HRESULT hRes2 = _AtlModule.UnregisterServer(TRUE);
163+
if (hRes2 != S_OK)
164+
return hRes2;
165+
AFX_MANAGE_STATE(_afxModuleAddrThis);
166166

167-
if (!AfxOleUnregisterTypeLib(_tlid, _wVerMajor, _wVerMinor))
168-
return ResultFromScode(SELFREG_E_TYPELIB);
167+
if (!AfxOleUnregisterTypeLib(_tlid, _wVerMajor, _wVerMinor))
168+
return ResultFromScode(SELFREG_E_TYPELIB);
169169

170-
if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
171-
return ResultFromScode(SELFREG_E_CLASS);
170+
if (!COleObjectFactoryEx::UpdateRegistryAll(FALSE))
171+
return ResultFromScode(SELFREG_E_CLASS);
172172

173-
_Module.UnregisterServer(TRUE); //TRUE indicates that typelib is unreg'd
173+
_Module.UnregisterServer(TRUE); //TRUE indicates that typelib is unreg'd
174174

175-
return NOERROR;
175+
return NOERROR;
176176
}
177177

178178
#if !defined(_WIN32_WCE) && !defined(_AMD64_) && !defined(_IA64_)
@@ -199,12 +199,12 @@ STDAPI DllUnregisterServer(void)
199199
// **************************************************************
200200
STDAPI DllCanUnloadNow(void)
201201
{
202-
AFX_MANAGE_STATE(AfxGetStaticModuleState());
203-
204-
if (_AtlModule.GetLockCount() > 0)
205-
return S_FALSE;
206-
207-
return (AfxDllCanUnloadNow()==S_OK && _Module.GetLockCount()==0) ? S_OK : S_FALSE;
202+
AFX_MANAGE_STATE(AfxGetStaticModuleState());
203+
204+
if (_AtlModule.GetLockCount() > 0)
205+
return S_FALSE;
206+
207+
return (AfxDllCanUnloadNow() == S_OK && _Module.GetLockCount() == 0) ? S_OK : S_FALSE;
208208
}
209209

210210
// ******************************************************************
@@ -213,25 +213,25 @@ STDAPI DllCanUnloadNow(void)
213213
STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
214214
{
215215
#ifdef _DEBUG
216-
bool state = gMemLeakDetect.stopped;
217-
gMemLeakDetect.stopped = true;
216+
bool state = gMemLeakDetect.stopped;
217+
gMemLeakDetect.stopped = true;
218218
#endif
219219

220-
AFX_MANAGE_STATE(AfxGetStaticModuleState());
221-
222-
HRESULT hres;
223-
if (S_OK == _AtlModule.GetClassObject(rclsid, riid, ppv))
224-
hres = S_OK;
225-
else if(AfxDllGetClassObject(rclsid, riid, ppv) == S_OK)
226-
hres = S_OK;
227-
else
228-
hres = _Module.GetClassObject(rclsid, riid, ppv);
229-
220+
AFX_MANAGE_STATE(AfxGetStaticModuleState());
221+
222+
HRESULT hres;
223+
if (S_OK == _AtlModule.GetClassObject(rclsid, riid, ppv))
224+
hres = S_OK;
225+
else if (AfxDllGetClassObject(rclsid, riid, ppv) == S_OK)
226+
hres = S_OK;
227+
else
228+
hres = _Module.GetClassObject(rclsid, riid, ppv);
229+
230230
#ifdef _DEBUG
231-
gMemLeakDetect.stopped = state;
231+
gMemLeakDetect.stopped = state;
232232
#endif
233233

234-
return hres;
234+
return hres;
235235
}
236236

237237
// *****************************************************************
@@ -241,8 +241,8 @@ STDAPI DllGetClassObject(REFCLSID rclsid, REFIID riid, LPVOID* ppv)
241241
// According to MSDN this macro is obsolete. OBJECT_ENTRY_AUTO should be used instead
242242
BEGIN_OBJECT_MAP(ObjectMap)
243243
#ifdef OLD_API
244-
OBJECT_ENTRY(CLSID_ShapefileColorScheme, CShapefileColorScheme)
245-
OBJECT_ENTRY(CLSID_ShapefileColorBreak, CShapefileColorBreak)
244+
OBJECT_ENTRY(CLSID_ShapefileColorScheme, CShapefileColorScheme)
245+
OBJECT_ENTRY(CLSID_ShapefileColorBreak, CShapefileColorBreak)
246246
#endif
247247
END_OBJECT_MAP()
248248

@@ -251,6 +251,6 @@ END_OBJECT_MAP()
251251
// *****************************************************************
252252
BOOL CMapWinGISApp::InitATL()
253253
{
254-
_Module.Init(ObjectMap, AfxGetInstanceHandle());
255-
return TRUE;
254+
_Module.Init(ObjectMap, AfxGetInstanceHandle());
255+
return TRUE;
256256
}

src/MapWinGIS.h

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#pragma once
33

44
#if !defined( __AFXCTL_H__ )
5-
#error include 'afxctl.h' before including this file
5+
#error include 'afxctl.h' before including this file
66
#endif
77

88
#include "resource.h"
@@ -11,7 +11,7 @@
1111
#include "GlobalClassFactory.h"
1212

1313
#define VERSION_MAJOR 5
14-
#define VERSION_MINOR 2
14+
#define VERSION_MINOR 3
1515

1616
extern const GUID CDECL _tlid;
1717
extern const WORD _wVerMajor;
@@ -24,10 +24,10 @@ HINSTANCE GetModuleInstance();
2424
class CMapWinGISApp : public COleControlModule
2525
{
2626
public:
27-
BOOL InitInstance();
28-
int ExitInstance();
27+
BOOL InitInstance();
28+
int ExitInstance();
2929
private:
30-
BOOL InitATL();
30+
BOOL InitATL();
3131
};
3232

3333
extern GlobalClassFactory m_factory;

0 commit comments

Comments
 (0)