mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-24 15:24:30 +01:00
disable register-shell for mingw
This commit is contained in:
@@ -58,7 +58,7 @@ static exitcode_t HandleCommandHost(CommandLineArgEnumerator * enumerator);
|
||||
static exitcode_t HandleCommandJoin(CommandLineArgEnumerator * enumerator);
|
||||
static exitcode_t HandleCommandSetRCT2(CommandLineArgEnumerator * enumerator);
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
#if defined(__WINDOWS__) && !defined(__MINGW32__)
|
||||
|
||||
static bool _removeShell = false;
|
||||
|
||||
@@ -87,7 +87,7 @@ const CommandLineCommand CommandLine::RootCommands[]
|
||||
#endif
|
||||
DefineCommand("set-rct2", "<path>", StandardOptions, HandleCommandSetRCT2),
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
#if defined(__WINDOWS__) && !defined(__MINGW32__)
|
||||
DefineCommand("register-shell", "", RegisterShellOptions, HandleCommandRegisterShell),
|
||||
#endif
|
||||
|
||||
@@ -338,7 +338,7 @@ static exitcode_t HandleCommandSetRCT2(CommandLineArgEnumerator * enumerator)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef __WINDOWS__
|
||||
#if defined(__WINDOWS__) && !defined(__MINGW32__)
|
||||
static exitcode_t HandleCommandRegisterShell(CommandLineArgEnumerator * enumerator)
|
||||
{
|
||||
exitcode_t result = CommandLine::HandleCommandDefault();
|
||||
@@ -357,7 +357,7 @@ static exitcode_t HandleCommandRegisterShell(CommandLineArgEnumerator * enumerat
|
||||
}
|
||||
return EXITCODE_OK;
|
||||
}
|
||||
#endif // __WINDOWS__
|
||||
#endif // defined(__WINDOWS__) && !defined(__MINGW32__)
|
||||
|
||||
static void PrintAbout()
|
||||
{
|
||||
|
||||
@@ -1035,9 +1035,14 @@ utf8* platform_get_username() {
|
||||
return username;
|
||||
}
|
||||
|
||||
#ifndef __MINGW32__
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// File association setup
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#define SOFTWARE_CLASSES L"Software\\Classes"
|
||||
|
||||
void get_progIdName(wchar_t *dst, const utf8 *extension)
|
||||
static void get_progIdName(wchar_t *dst, const utf8 *extension)
|
||||
{
|
||||
utf8 progIdName[128];
|
||||
safe_strcpy(progIdName, OPENRCT2_NAME, sizeof(progIdName));
|
||||
@@ -1048,12 +1053,13 @@ void get_progIdName(wchar_t *dst, const utf8 *extension)
|
||||
free(progIdNameW);
|
||||
}
|
||||
|
||||
bool windows_setup_file_association(const utf8 * extension,
|
||||
const utf8 * fileTypeText,
|
||||
const utf8 * commandText,
|
||||
const utf8 * commandArgs,
|
||||
const uint32 iconIndex)
|
||||
{
|
||||
static bool windows_setup_file_association(
|
||||
const utf8 * extension,
|
||||
const utf8 * fileTypeText,
|
||||
const utf8 * commandText,
|
||||
const utf8 * commandArgs,
|
||||
const uint32 iconIndex
|
||||
) {
|
||||
wchar_t exePathW[MAX_PATH];
|
||||
wchar_t dllPathW[MAX_PATH];
|
||||
|
||||
@@ -1125,7 +1131,7 @@ fail:
|
||||
return result;
|
||||
}
|
||||
|
||||
void windows_remove_file_association(const utf8 * extension)
|
||||
static void windows_remove_file_association(const utf8 * extension)
|
||||
{
|
||||
// [HKEY_CURRENT_USER\Software\Classes]
|
||||
HKEY hRootKey;
|
||||
@@ -1170,4 +1176,6 @@ void platform_remove_file_associations()
|
||||
SHChangeNotify(SHCNE_ASSOCCHANGED, SHCNF_IDLIST, NULL, NULL);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
#endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user