From 6a472d827a33e15568586c1eefa3457265ff70ca Mon Sep 17 00:00:00 2001 From: Davide Beatrici Date: Mon, 27 Jul 2020 07:25:00 +0200 Subject: [PATCH] Mayaqua: remove all references to binaries with "_x64" and "_ia64" suffix See the previous commit's message for details. --- src/Cedar/WinUi.c | 4 ++-- src/Mayaqua/Mayaqua.h | 4 ---- src/Mayaqua/Microsoft.c | 48 ++++------------------------------------- src/Mayaqua/Microsoft.h | 7 ++---- 4 files changed, 8 insertions(+), 55 deletions(-) diff --git a/src/Cedar/WinUi.c b/src/Cedar/WinUi.c index 3adc04e6..a32287f7 100644 --- a/src/Cedar/WinUi.c +++ b/src/Cedar/WinUi.c @@ -10112,11 +10112,11 @@ void InitWinUi(wchar_t *software_name, char *font, UINT fontsize) { if (Is64()) { - hDll = MsLoadLibraryAsDataFile(MsGetPenCoreDllFileName()); + hDll = MsLoadLibraryAsDataFile(PENCORE_DLL_NAME); } else { - hDll = MsLoadLibrary(MsGetPenCoreDllFileName()); + hDll = MsLoadLibrary(PENCORE_DLL_NAME); } if (hDll == NULL) diff --git a/src/Mayaqua/Mayaqua.h b/src/Mayaqua/Mayaqua.h index 2eb50599..509b151e 100644 --- a/src/Mayaqua/Mayaqua.h +++ b/src/Mayaqua/Mayaqua.h @@ -12,11 +12,7 @@ #include #include -// PenCore.dll related #define PENCORE_DLL_NAME "|PenCore.dll" -// #define PENCORE_DLL_NAME_X64 "|PenCore_x64.dll" // commonized to x86 -// #define PENCORE_DLL_NAME_IA64 "|PenCore_ia64.dll" // commonized to x86 - //#define USE_PROBE // Use Probe diff --git a/src/Mayaqua/Microsoft.c b/src/Mayaqua/Microsoft.c index 0dbfc24e..3dc3550e 100644 --- a/src/Mayaqua/Microsoft.c +++ b/src/Mayaqua/Microsoft.c @@ -2098,7 +2098,6 @@ bool MsExecDriverInstaller(char *arg) HANDLE h; UINT retcode; SHELLEXECUTEINFOW info; - wchar_t *src_exe; wchar_t *arg_w; // Validate arguments if (arg == NULL) @@ -2110,20 +2109,9 @@ bool MsExecDriverInstaller(char *arg) UniFormat(hamcore_src, sizeof(hamcore_src), L"%s\\hamcore.se2", MsGetExeDirNameW()); // Extract the File - src_exe = VISTA_DRIVER_INSTALLER_SRC; - - if (MsIsX64()) - { - src_exe = VISTA_DRIVER_INSTALLER_SRC_X64; - } - if (MsIsIA64()) - { - src_exe = VISTA_DRIVER_INSTALLER_SRC_IA64; - } - UniFormat(tmp, sizeof(tmp), VISTA_DRIVER_INSTALLER_DST, MsGetMyTempDirW()); - if (FileCopyW(src_exe, tmp) == false) + if (FileCopyW(VISTA_DRIVER_INSTALLER_SRC, tmp) == false) { return false; } @@ -3938,26 +3926,6 @@ LRESULT CALLBACK MsUserModeWindowProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM return DefWindowProc(hWnd, msg, wParam, lParam); } -// Get the name of PenCore.dll -char *MsGetPenCoreDllFileName() -{ - /*if (Is64()) - { - if (IsX64()) - { - return PENCORE_DLL_NAME_X64; - } - else - { - return PENCORE_DLL_NAME_IA64; - } - } - else*/ - { - return PENCORE_DLL_NAME; - } -} - // Get whether this instance is in user mode bool MsIsUserMode() { @@ -4304,11 +4272,11 @@ void MsUserModeW(wchar_t *title, SERVICE_FUNCTION *start, SERVICE_FUNCTION *stop if (Is64()) { - hDll = MsLoadLibraryAsDataFile(MsGetPenCoreDllFileName()); + hDll = MsLoadLibraryAsDataFile(PENCORE_DLL_NAME); } else { - hDll = MsLoadLibrary(MsGetPenCoreDllFileName()); + hDll = MsLoadLibrary(PENCORE_DLL_NAME); } // Read icon @@ -4877,15 +4845,7 @@ UINT MsService(char *name, SERVICE_FUNCTION *start, SERVICE_FUNCTION *stop, UINT wchar_t filename[MAX_PATH]; UniFormat(filename, sizeof(filename), L"\"%s\"", arg_w); - - if (Is64() == false) - { - UniFormat(vpncmgr, sizeof(vpncmgr), L"%s\\vpncmgr.exe", MsGetExeDirNameW()); - } - else - { - UniFormat(vpncmgr, sizeof(vpncmgr), L"%s\\vpncmgr_x64.exe", MsGetExeDirNameW()); - } + UniFormat(vpncmgr, sizeof(vpncmgr), L"%s\\vpncmgr.exe", MsGetExeDirNameW()); RunW(vpncmgr, filename, false, false); } diff --git a/src/Mayaqua/Microsoft.h b/src/Mayaqua/Microsoft.h index 405a8802..6c99a640 100644 --- a/src/Mayaqua/Microsoft.h +++ b/src/Mayaqua/Microsoft.h @@ -133,10 +133,8 @@ typedef void *HWND; // Vista driver installer related -#define VISTA_DRIVER_INSTALLER_SRC L"|driver_installer.exe" -#define VISTA_DRIVER_INSTALLER_SRC_X64 L"|driver_installer_x64.exe" -#define VISTA_DRIVER_INSTALLER_SRC_IA64 L"|driver_installer_ia64.exe" -#define VISTA_DRIVER_INSTALLER_DST L"%s\\driver_installer.exe" +#define VISTA_DRIVER_INSTALLER_SRC L"|driver_installer.exe" +#define VISTA_DRIVER_INSTALLER_DST L"%s\\driver_installer.exe" #define DRIVER_DEVICE_ID_TAG "NeoAdapter_%s" @@ -741,7 +739,6 @@ void MsServiceMode(SERVICE_FUNCTION *start, SERVICE_FUNCTION *stop); void MsUserModeW(wchar_t *title, SERVICE_FUNCTION *start, SERVICE_FUNCTION *stop, UINT icon); bool MsIsUserMode(); void MsTestOnly(); -char *MsGetPenCoreDllFileName(); void MsPlaySound(char *name); void MsSetThreadSingleCpu(); void MsWin9xTest();