mirror of
https://github.com/valinet/ExplorerPatcher.git
synced 2024-12-18 02:16:00 +01:00
ep_setup_patch: Supply custom hash as argument 1 (useful in ep_make
)
This commit is contained in:
parent
5ed503e451
commit
c41b93b6b4
@ -18,8 +18,18 @@ int WINAPI wWinMain(
|
|||||||
|
|
||||||
CHAR hash[100];
|
CHAR hash[100];
|
||||||
ZeroMemory(hash, 100);
|
ZeroMemory(hash, 100);
|
||||||
ComputeFileHash2(hModule, wszPath, hash, 100);
|
if (__argc > 1)
|
||||||
FreeLibrary(hModule);
|
{
|
||||||
|
for (size_t i = 0; i < MIN(wcslen(__wargv[1]), 32); ++i)
|
||||||
|
{
|
||||||
|
hash[i] = __wargv[1][i];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ComputeFileHash2(hModule, wszPath, hash, 100);
|
||||||
|
FreeLibrary(hModule);
|
||||||
|
}
|
||||||
|
|
||||||
PathRemoveFileSpecW(wszPath);
|
PathRemoveFileSpecW(wszPath);
|
||||||
wcscat_s(wszPath, MAX_PATH, L"\\" _T(SETUP_UTILITY_NAME));
|
wcscat_s(wszPath, MAX_PATH, L"\\" _T(SETUP_UTILITY_NAME));
|
||||||
|
Loading…
Reference in New Issue
Block a user