Some branding and licensing work (#22)

* Fix stdafx include

* Fix basic handling of "Games" folder on Windows10 RS4 (#10)
This does the following:
- Sets the default state to hidden
- Skips the Games folder when searching

This does not:
- Hide the dead menu entry.

I do not currently know how to actively change the user preference setting to forcefully hide it.

* Add basic Visual Studio gitignore

* Add specific entries to gitignore

* Do not set default menu to Win7 on RS4 (#10)

* Rename "PC Settings" to "Settings" (#12)

* Create distinction between modern and legacy settings in search results

* Add more build artifacts to gitignore

* Add default paths for toolset and build all languages

* Fix several memsize, memtype and nullpointer issues

* create trunk branch containing all changes

* set fallback and next version to 4.3.2, set resource fallback value to allow loading in IDE

* add generated en-US.dll to gitignore

* Don't echo script contents, add disabled "git clean -dfx" to build fresh

* Initial re-branding work (#21)

* Create copy of __MakeFinal to build all languages (Use this file when releasing new versions)

* Move the registry key IvoSoft->Passionate-Coder (#21)

* Change company/mfg name IvoSoft->Passionate-Coder (#21)

* Update some leftover copyright dates (#21)

* Fix accidental copy-paste breaking MakeFinal scripts

* Fix invalid company name for Wix and change registry keys to match the new string (#21)

* Update more copyright and legal text (#21)

* Update RTF files format (Wordpad generated those) (#21)

* update license text in RTF files (#21)
We lost the blue link text in the installer page. Will have to manually re-color all the links later.
This commit is contained in:
Xenhat
2018-06-25 01:42:52 -04:00
committed by GitHub
parent e0d1c72b0b
commit 0adcd693e4
1296 changed files with 7476 additions and 27790 deletions

View File

@@ -0,0 +1,123 @@
// dllmain.cpp : Implementation of DllMain.
#include "stdafx.h"
#include "resource.h"
#include "StartMenuHelper_i.h"
#include "dllmain.h"
#include "Settings.h"
#include "Translations.h"
#include "StringUtils.h"
#include "ResourceHelper.h"
#include "..\ClassicStartMenuDLL\LogManager.h"
CStartMenuHelperModule _AtlModule;
void UpgradeSettings( bool bShared )
{
}
void UpdateSettings( void )
{
CRegKey regKey;
wchar_t language[100]=L"";
if (regKey.Open(HKEY_LOCAL_MACHINE,L"Software\\PassionateCoder\\ClassicStart",KEY_READ|KEY_WOW64_64KEY)==ERROR_SUCCESS)
{
ULONG size=_countof(language);
if (regKey.QueryStringValue(L"DefaultLanguage",language,&size)!=ERROR_SUCCESS)
language[0]=0;
}
UpdateSetting(L"Language",language,false);
}
void ClosingSettings( HWND hWnd, int flags, int command )
{
}
void SettingChangedCallback( const CSetting *pSetting )
{
}
const wchar_t *GetDocRelativePath( void )
{
return L"";
}
CSetting g_Settings[]={
{L"MenuStyleGroup",CSetting::TYPE_GROUP},
{L"MenuStyle",CSetting::TYPE_INT,0,0,2},
{L"Classic1",CSetting::TYPE_RADIO},
{L"Classic2",CSetting::TYPE_RADIO},
{L"Win7",CSetting::TYPE_RADIO},
{L"GeneralBehavior",CSetting::TYPE_GROUP},
{L"AutoStart",CSetting::TYPE_BOOL,0,0,1},
{L"PinnedPrograms",CSetting::TYPE_INT,0,0,1},
{L"FastItems",CSetting::TYPE_RADIO},
{L"PinnedItems",CSetting::TYPE_RADIO},
{L"DisablePinExt",CSetting::TYPE_BOOL,0,0,0},
{L"FolderStartMenu",CSetting::TYPE_STRING,0,0,L""},
{L"FolderCommonStartMenu",CSetting::TYPE_STRING,0,0,L""},
{L"Language",CSetting::TYPE_GROUP},
{L"Language",CSetting::TYPE_STRING,0,0,L"",CSetting::FLAG_COLD|CSetting::FLAG_SHARED},
{NULL}
};
static HANDLE g_DllInitThread;
static DWORD CALLBACK DllInitThread( void* )
{
CoInitialize(NULL);
InitSettings(g_Settings,COMPONENT_MENU,NULL);
wchar_t path[_MAX_PATH];
path[0]=0;
#ifdef BUILD_SETUP
{
CRegKey regKey;
if (regKey.Open(HKEY_LOCAL_MACHINE,L"Software\\PassionateCoder\\ClassicStart",KEY_READ|KEY_WOW64_64KEY)==ERROR_SUCCESS)
{
ULONG size=_countof(path);
if (regKey.QueryStringValue(L"Path",path,&size)!=ERROR_SUCCESS)
path[0]=0;
}
}
#endif
if (!path[0])
{
GetModuleFileName(g_Instance,path,_countof(path));
PathRemoveFileSpec(path);
}
wchar_t fname[_MAX_PATH];
Sprintf(fname,_countof(fname),L"%s" INI_PATH L"StartMenuHelperL10N.ini",path);
CString language=GetSettingString(L"Language");
ParseTranslations(fname,language);
CoUninitialize();
return 0;
}
void WaitDllInitThread( void )
{
ATLASSERT(g_DllInitThread);
WaitForSingleObject(g_DllInitThread,INFINITE);
LogToFile(STARTUP_LOG,L"StartMenuHelper: WaitDllInitThread");
}
// DLL Entry Point
extern "C" BOOL WINAPI DllMain(HINSTANCE hInstance, DWORD dwReason, LPVOID lpReserved)
{
if (dwReason==DLL_PROCESS_ATTACH)
{
LogToFile(STARTUP_LOG,L"StartMenuHelper: DLL_PROCESS_ATTACH");
g_Instance=hInstance;
g_DllInitThread=CreateThread(NULL,0,DllInitThread,NULL,0,NULL);
}
if (dwReason==DLL_PROCESS_DETACH)
{
LogToFile(STARTUP_LOG,L"StartMenuHelper: DLL_PROCESS_DETACH");
}
return _AtlModule.DllMain(dwReason, lpReserved);
}