Enable Windows 10 ARM64 support
Signed-off-by: Simon Rozman <simon@rozman.si>
This commit is contained in:
parent
0b586aa141
commit
59493b998e
@ -1 +1 @@
|
||||
Subproject commit e1a01465701da2f554e27a9eaccf7a2a5da0f23b
|
||||
Subproject commit 538cea09453a2ee52f918036f7b2e7b51347d7cc
|
@ -1 +1 @@
|
||||
Subproject commit 1e48c204063258c12615033e5bc66fc39c0d081a
|
||||
Subproject commit 757ad1497554500e2369348455225aa454e2c4e9
|
Binary file not shown.
38
Makefile
38
Makefile
@ -240,19 +240,25 @@ UnregisterShortcuts ::
|
||||
copy /y $** $@ > NUL
|
||||
|
||||
"$(OUTPUT_DIR)\catalog.xml" : \
|
||||
"$(OUTPUT_DIR)\ZRColaEn32.msi" \
|
||||
"$(OUTPUT_DIR)\ZRColaEn64.msi" \
|
||||
"$(OUTPUT_DIR)\ZRColaRu32.msi" \
|
||||
"$(OUTPUT_DIR)\ZRColaRu64.msi" \
|
||||
"$(OUTPUT_DIR)\ZRColaSl32.msi" \
|
||||
"$(OUTPUT_DIR)\ZRColaSl64.msi"
|
||||
"$(OUTPUT_DIR)\ZRColaEn-x86.msi" \
|
||||
"$(OUTPUT_DIR)\ZRColaEn-amd64.msi" \
|
||||
"$(OUTPUT_DIR)\ZRColaEn-arm64.msi" \
|
||||
"$(OUTPUT_DIR)\ZRColaRu-x86.msi" \
|
||||
"$(OUTPUT_DIR)\ZRColaRu-amd64.msi" \
|
||||
"$(OUTPUT_DIR)\ZRColaRu-arm64.msi" \
|
||||
"$(OUTPUT_DIR)\ZRColaSl-x86.msi" \
|
||||
"$(OUTPUT_DIR)\ZRColaSl-amd64.msi" \
|
||||
"$(OUTPUT_DIR)\ZRColaSl-arm64.msi"
|
||||
copy /y "$(PUBLISH_DIR)\catalog-0001.xml" "$(@:"=).tmp" > NUL
|
||||
"$(OUTPUT_DIR)\$(PLAT).Release\UpdPublish.exe" "$(@:"=).tmp" "$(@:"=).tmp" win-x86 en_US "$(PUBLISH_PACKAGE_URL)/ZRColaEn32.msi" -f "$(OUTPUT_DIR)\ZRColaEn32.msi"
|
||||
"$(OUTPUT_DIR)\$(PLAT).Release\UpdPublish.exe" "$(@:"=).tmp" "$(@:"=).tmp" win-amd64 en_US "$(PUBLISH_PACKAGE_URL)/ZRColaEn64.msi" -f "$(OUTPUT_DIR)\ZRColaEn64.msi"
|
||||
"$(OUTPUT_DIR)\$(PLAT).Release\UpdPublish.exe" "$(@:"=).tmp" "$(@:"=).tmp" win-x86 ru_RU "$(PUBLISH_PACKAGE_URL)/ZRColaRu32.msi" -f "$(OUTPUT_DIR)\ZRColaRu32.msi"
|
||||
"$(OUTPUT_DIR)\$(PLAT).Release\UpdPublish.exe" "$(@:"=).tmp" "$(@:"=).tmp" win-amd64 ru_RU "$(PUBLISH_PACKAGE_URL)/ZRColaRu64.msi" -f "$(OUTPUT_DIR)\ZRColaRu64.msi"
|
||||
"$(OUTPUT_DIR)\$(PLAT).Release\UpdPublish.exe" "$(@:"=).tmp" "$(@:"=).tmp" win-x86 sl_SI "$(PUBLISH_PACKAGE_URL)/ZRColaSl32.msi" -f "$(OUTPUT_DIR)\ZRColaSl32.msi"
|
||||
"$(OUTPUT_DIR)\$(PLAT).Release\UpdPublish.exe" "$(@:"=).tmp" "$(@:"=).tmp" win-amd64 sl_SI "$(PUBLISH_PACKAGE_URL)/ZRColaSl64.msi" -f "$(OUTPUT_DIR)\ZRColaSl64.msi"
|
||||
"$(OUTPUT_DIR)\$(PLAT).Release\UpdPublish.exe" "$(@:"=).tmp" "$(@:"=).tmp" win-x86 en_US "$(PUBLISH_PACKAGE_URL)/ZRColaEn-x86.msi" -f "$(OUTPUT_DIR)\ZRColaEn-x86.msi"
|
||||
"$(OUTPUT_DIR)\$(PLAT).Release\UpdPublish.exe" "$(@:"=).tmp" "$(@:"=).tmp" win-amd64 en_US "$(PUBLISH_PACKAGE_URL)/ZRColaEn-amd64.msi" -f "$(OUTPUT_DIR)\ZRColaEn-amd64.msi"
|
||||
"$(OUTPUT_DIR)\$(PLAT).Release\UpdPublish.exe" "$(@:"=).tmp" "$(@:"=).tmp" win-arm64 en_US "$(PUBLISH_PACKAGE_URL)/ZRColaEn-arm64.msi" -f "$(OUTPUT_DIR)\ZRColaEn-arm64.msi"
|
||||
"$(OUTPUT_DIR)\$(PLAT).Release\UpdPublish.exe" "$(@:"=).tmp" "$(@:"=).tmp" win-x86 ru_RU "$(PUBLISH_PACKAGE_URL)/ZRColaRu-x86.msi" -f "$(OUTPUT_DIR)\ZRColaRu-x86.msi"
|
||||
"$(OUTPUT_DIR)\$(PLAT).Release\UpdPublish.exe" "$(@:"=).tmp" "$(@:"=).tmp" win-amd64 ru_RU "$(PUBLISH_PACKAGE_URL)/ZRColaRu-amd64.msi" -f "$(OUTPUT_DIR)\ZRColaRu-amd64.msi"
|
||||
"$(OUTPUT_DIR)\$(PLAT).Release\UpdPublish.exe" "$(@:"=).tmp" "$(@:"=).tmp" win-arm64 ru_RU "$(PUBLISH_PACKAGE_URL)/ZRColaRu-arm64.msi" -f "$(OUTPUT_DIR)\ZRColaRu-arm64.msi"
|
||||
"$(OUTPUT_DIR)\$(PLAT).Release\UpdPublish.exe" "$(@:"=).tmp" "$(@:"=).tmp" win-x86 sl_SI "$(PUBLISH_PACKAGE_URL)/ZRColaSl-x86.msi" -f "$(OUTPUT_DIR)\ZRColaSl-x86.msi"
|
||||
"$(OUTPUT_DIR)\$(PLAT).Release\UpdPublish.exe" "$(@:"=).tmp" "$(@:"=).tmp" win-amd64 sl_SI "$(PUBLISH_PACKAGE_URL)/ZRColaSl-amd64.msi" -f "$(OUTPUT_DIR)\ZRColaSl-amd64.msi"
|
||||
"$(OUTPUT_DIR)\$(PLAT).Release\UpdPublish.exe" "$(@:"=).tmp" "$(@:"=).tmp" win-arm64 sl_SI "$(PUBLISH_PACKAGE_URL)/ZRColaSl-arm64.msi" -f "$(OUTPUT_DIR)\ZRColaSl-arm64.msi"
|
||||
"$(OUTPUT_DIR)\$(PLAT).Release\UpdSignXML.exe" "$(@:"=).tmp" $@
|
||||
-if exist "$(@:"=).tmp" del /f /q "$(@:"=).tmp"
|
||||
|
||||
@ -263,11 +269,15 @@ UnregisterShortcuts ::
|
||||
######################################################################
|
||||
|
||||
PLAT=Win32
|
||||
PLAT_SUFFIX=32
|
||||
PLAT_SUFFIX=-x86
|
||||
!INCLUDE "MakefilePlat.mak"
|
||||
|
||||
PLAT=x64
|
||||
PLAT_SUFFIX=64
|
||||
PLAT_SUFFIX=-amd64
|
||||
!INCLUDE "MakefilePlat.mak"
|
||||
|
||||
PLAT=ARM64
|
||||
PLAT_SUFFIX=-arm64
|
||||
!INCLUDE "MakefilePlat.mak"
|
||||
|
||||
|
||||
|
BIN
MakefileLang.mak
BIN
MakefileLang.mak
Binary file not shown.
2
Updater
2
Updater
@ -1 +1 @@
|
||||
Subproject commit dc4cc1b22e46b376d273d420a50ea4d4c588ec3a
|
||||
Subproject commit 67124a8434e253efdf423f1b4e5467b62fc674b7
|
@ -7,19 +7,7 @@
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup>
|
||||
<OutDir>..\output\$(Platform).$(Configuration)\</OutDir>
|
||||
<LinkIncremental>false</LinkIncremental>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<CompileAsManaged>false</CompileAsManaged>
|
||||
<BufferSecurityCheck>false</BufferSecurityCheck>
|
||||
<BasicRuntimeChecks>Default</BasicRuntimeChecks>
|
||||
<SmallerTypeCheck>false</SmallerTypeCheck>
|
||||
</ClCompile>
|
||||
<Link>
|
||||
<IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
|
||||
</Link>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
|
||||
<ClCompile>
|
||||
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
|
||||
|
@ -23,35 +23,47 @@
|
||||
///
|
||||
/// Main function
|
||||
///
|
||||
extern "C" void WinMainCRTStartup()
|
||||
int CALLBACK WinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPSTR lpCmdLine, _In_ int nCmdShow)
|
||||
{
|
||||
// Load "KERNEL32.DLL".
|
||||
HMODULE hKernel32 = LoadLibrary(TEXT("KERNEL32.DLL"));
|
||||
if (!hKernel32)
|
||||
ExitProcess(1);
|
||||
UNREFERENCED_PARAMETER(hInstance);
|
||||
UNREFERENCED_PARAMETER(hPrevInstance);
|
||||
UNREFERENCED_PARAMETER(lpCmdLine);
|
||||
UNREFERENCED_PARAMETER(nCmdShow);
|
||||
|
||||
// Get IsWow64Process() address.
|
||||
BOOL (WINAPI *_IsWow64Process)(__in HANDLE hProcess, __out PBOOL Wow64Process) = (BOOL(WINAPI*)(__in HANDLE, __out PBOOL))::GetProcAddress(hKernel32, "IsWow64Process");
|
||||
TCHAR szArchProc[MAX_PATH];
|
||||
if (!GetEnvironmentVariable(TEXT("PROCESSOR_ARCHITECTURE"), szArchProc, _countof(szArchProc)))
|
||||
szArchProc[0] = 0;
|
||||
szArchProc[_countof(szArchProc) - 1] = 0;
|
||||
|
||||
BOOL bIs64Bit;
|
||||
#ifndef _WIN64
|
||||
// Determine if this is a 32-bit process under Windows-over-Windows64.
|
||||
if (_IsWow64Process) {
|
||||
// See what IsWow64Process() says.
|
||||
if (!_IsWow64Process(::GetCurrentProcess(), &bIs64Bit)) {
|
||||
// IsWow64Process() returned an error. Assume not 64-bit Windows.
|
||||
bIs64Bit = FALSE;
|
||||
TCHAR szArchWin[MAX_PATH];
|
||||
if (!GetEnvironmentVariable(TEXT("PROCESSOR_ARCHITEW6432"), szArchWin, _countof(szArchWin)))
|
||||
szArchWin[0] = 0;
|
||||
szArchWin[_countof(szArchWin) - 1] = 0;
|
||||
|
||||
// If PROCESSOR_ARCHITEW6432 is defined, this is a Windows-on-Windows
|
||||
// guest of some kind. szArchWin is the host's architecture and szArchProc
|
||||
// is the current process' architecture.
|
||||
|
||||
// If PROCESSOR_ARCHITEW6432 is not defined, then PROCESSOR_ARCHITECTURE
|
||||
// is both the process and OS architecture.
|
||||
if (szArchWin[0] == 0)
|
||||
memcpy_s(szArchWin, sizeof(szArchWin), szArchProc, sizeof(szArchProc));
|
||||
|
||||
// If PROCESSOR_ARCHITECTURE is not defined, then either we're running on
|
||||
// Windows 9x or something is messing with the environment. Make the
|
||||
// Windows 9x assumption.
|
||||
if (szArchProc[0] == 0) {
|
||||
memcpy_s(szArchProc, sizeof(szArchProc), TEXT("x86"), sizeof(TEXT("x86")));
|
||||
memcpy_s(szArchWin , sizeof(szArchWin ), TEXT("x86"), sizeof(TEXT("x86")));
|
||||
}
|
||||
} else {
|
||||
// This platform does not have IsWow64Process(). Therefore, this is definitely not 64-bit Windows.
|
||||
bIs64Bit = FALSE;
|
||||
}
|
||||
#else
|
||||
// This is a running 64-bit process. The Windows must be 64 bit then.
|
||||
bIs64Bit = TRUE;
|
||||
#endif
|
||||
|
||||
FreeLibrary(hKernel32);
|
||||
LPCTSTR pszPlatSuffix;
|
||||
if (_tcsicmp(szArchWin, TEXT("amd64")) == 0)
|
||||
pszPlatSuffix = TEXT("-amd64");
|
||||
else if (_tcsicmp(szArchWin, TEXT("arm64")) == 0)
|
||||
pszPlatSuffix = TEXT("-arm64");
|
||||
else
|
||||
pszPlatSuffix = TEXT("-x86");
|
||||
|
||||
// Get temporary folder path.
|
||||
static const LPTSTR pszTempFolderDefault = TEXT("");
|
||||
@ -74,7 +86,7 @@ extern "C" void WinMainCRTStartup()
|
||||
LPTSTR pszParams;
|
||||
DWORD_PTR aArgs[] = {
|
||||
(DWORD_PTR)TEXT(ZRCOLA_INSTALL_LANG),
|
||||
(DWORD_PTR)(bIs64Bit ? TEXT("64") : TEXT("32")),
|
||||
(DWORD_PTR)pszPlatSuffix,
|
||||
(DWORD_PTR)pszTempFolder,
|
||||
};
|
||||
FormatMessage(
|
||||
|
@ -20,3 +20,4 @@
|
||||
#pragma once
|
||||
|
||||
#include <Windows.h>
|
||||
#include <tchar.h>
|
||||
|
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user