Remove GetDocRelativePath function

Help is always located in the same folder as binary that is using it.
This commit is contained in:
ge0rdi
2023-06-09 17:52:19 +02:00
parent 4377817bef
commit 9800b03b63
11 changed files with 2 additions and 57 deletions

View File

@@ -48,11 +48,6 @@ static int g_LoadDialogs[]=
0 0
}; };
const wchar_t *GetDocRelativePath( void )
{
return DOC_PATH;
}
struct FindChild struct FindChild
{ {
const wchar_t *className; const wchar_t *className;

View File

@@ -26,10 +26,4 @@ using namespace ATL;
#include <shlguid.h> #include <shlguid.h>
#include <shlobj.h> #include <shlobj.h>
#ifdef BUILD_SETUP
#define DOC_PATH L""
#else
#define DOC_PATH L"..\\..\\Docs\\Help\\"
#endif
#include "StringUtils.h" #include "StringUtils.h"

View File

@@ -33,11 +33,6 @@ static int g_LoadDialogs[]=
0 0
}; };
const wchar_t *GetDocRelativePath( void )
{
return DOC_PATH;
}
static void NewVersionCallback( VersionData &data ) static void NewVersionCallback( VersionData &data )
{ {
wchar_t path[_MAX_PATH]; wchar_t path[_MAX_PATH];

View File

@@ -24,10 +24,4 @@
using namespace ATL; using namespace ATL;
#ifdef BUILD_SETUP
#define DOC_PATH L""
#else
#define DOC_PATH L"..\\..\\Docs\\Help\\"
#endif
#include "StringUtils.h" #include "StringUtils.h"

View File

@@ -18,12 +18,6 @@
#include <map> #include <map>
#include <algorithm> #include <algorithm>
#ifdef BUILD_SETUP
#define DOC_PATH L""
#else
#define DOC_PATH L"..\\..\\Docs\\Help\\"
#endif
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
// Read/Write lock for accessing the settings. Can't be acquired recursively. Only the main UI thread (the one displaying the settings UI) // Read/Write lock for accessing the settings. Can't be acquired recursively. Only the main UI thread (the one displaying the settings UI)
@@ -2185,7 +2179,7 @@ bool HasHelp( void )
GetModuleFileName(_AtlBaseModule.GetResourceInstance(),path,_countof(path)); GetModuleFileName(_AtlBaseModule.GetResourceInstance(),path,_countof(path));
*PathFindFileName(path)=0; *PathFindFileName(path)=0;
wchar_t topic[_MAX_PATH]; wchar_t topic[_MAX_PATH];
Sprintf(topic,_countof(topic),L"%s%sOpenShell.chm",path,GetDocRelativePath()); Sprintf(topic,_countof(topic),L"%sOpenShell.chm",path);
return (GetFileAttributes(topic)!=INVALID_FILE_ATTRIBUTES); return (GetFileAttributes(topic)!=INVALID_FILE_ATTRIBUTES);
} }
@@ -2195,7 +2189,7 @@ void ShowHelp( void )
GetModuleFileName(_AtlBaseModule.GetResourceInstance(),path,_countof(path)); GetModuleFileName(_AtlBaseModule.GetResourceInstance(),path,_countof(path));
*PathFindFileName(path)=0; *PathFindFileName(path)=0;
wchar_t topic[_MAX_PATH]; wchar_t topic[_MAX_PATH];
Sprintf(topic,_countof(topic),L"%s%sOpenShell.chm::/%s.html",path,GetDocRelativePath(),PathFindFileName(g_SettingsManager.GetRegPath())); Sprintf(topic,_countof(topic),L"%sOpenShell.chm::/%s.html",path,PathFindFileName(g_SettingsManager.GetRegPath()));
HtmlHelp(GetDesktopWindow(),topic,HH_DISPLAY_TOPIC,NULL); HtmlHelp(GetDesktopWindow(),topic,HH_DISPLAY_TOPIC,NULL);
} }

View File

@@ -136,7 +136,6 @@ void SelectSettingsTab( int tab, bool bAdvanced, const CSetting *pSelect );
void UpdateSettings( void ); // implemented by the user void UpdateSettings( void ); // implemented by the user
void UpgradeSettings( bool bShared ); // implemented by the user (called when converting 3.0 settings to 4.0) void UpgradeSettings( bool bShared ); // implemented by the user (called when converting 3.0 settings to 4.0)
void ClosingSettings( HWND hWnd, int flags, int command ); // implemented by the user void ClosingSettings( HWND hWnd, int flags, int command ); // implemented by the user
const wchar_t *GetDocRelativePath( void ); // implemented by the user
void SettingChangedCallback( const CSetting *pSetting ); // implemented by the user void SettingChangedCallback( const CSetting *pSetting ); // implemented by the user
bool IsSettingsMessage( MSG *msg ); bool IsSettingsMessage( MSG *msg );
bool ImportSettingsXml( const wchar_t *fname ); bool ImportSettingsXml( const wchar_t *fname );

View File

@@ -53,11 +53,6 @@ void UpdateSettings( void )
{ {
} }
const wchar_t *GetDocRelativePath( void )
{
return NULL;
}
/////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////
static const wchar_t *g_Tabs=L"\t\t\t\t\t\t\t\t\t\t"; static const wchar_t *g_Tabs=L"\t\t\t\t\t\t\t\t\t\t";

View File

@@ -45,11 +45,6 @@ static int g_LoadDialogs[]=
0 0
}; };
const wchar_t *GetDocRelativePath( void )
{
return DOC_PATH;
}
static HANDLE g_DllInitThread; static HANDLE g_DllInitThread;
static DWORD CALLBACK DllInitThread( void* ) static DWORD CALLBACK DllInitThread( void* )

View File

@@ -22,12 +22,6 @@
#include <atlstr.h> #include <atlstr.h>
#include <atlwin.h> #include <atlwin.h>
#ifdef BUILD_SETUP
#define DOC_PATH L""
#else
#define DOC_PATH L"..\\..\\Docs\\Help\\"
#endif
#include "StringUtils.h" #include "StringUtils.h"
#include "TrackResources.h" #include "TrackResources.h"
#include "Assert.h" #include "Assert.h"

View File

@@ -37,11 +37,6 @@ void SettingChangedCallback( const CSetting *pSetting )
{ {
} }
const wchar_t *GetDocRelativePath( void )
{
return L"";
}
CSetting g_Settings[]={ CSetting g_Settings[]={
{L"MenuStyleGroup",CSetting::TYPE_GROUP}, {L"MenuStyleGroup",CSetting::TYPE_GROUP},
{L"MenuStyle",CSetting::TYPE_INT,0,0,2}, {L"MenuStyle",CSetting::TYPE_INT,0,0,2},

View File

@@ -44,11 +44,6 @@ void UpdateSettings( void )
UpdateSetting(L"Language",language,false); UpdateSetting(L"Language",language,false);
} }
const wchar_t *GetDocRelativePath( void )
{
return NULL;
}
static int g_LoadDialogs[]= static int g_LoadDialogs[]=
{ {
IDD_UPDATE,0x04000000, IDD_UPDATE,0x04000000,