update framework.h to not need winsdkver.h/sdkddkver.h, add initial support for cr_base library

This commit is contained in:
Alexander Frick
2025-11-27 14:09:17 -08:00
parent dbaca97953
commit 82c323c59b
3 changed files with 17 additions and 14 deletions
+6 -3
View File
@@ -8,7 +8,6 @@ import("//build/config/win/manifest.gni")
executable("xp_activate32") {
configs -= [
"//build/config/win:console",
"//build/config/win:nominmax",
]
configs += [
@@ -29,8 +28,6 @@ precompiled_header("precompiled") {
}
source_set("xp_activate32_sources") {
configs -= [ "//build/config/win:nominmax", ]
# Must explicitly set this for sources
configs += [ "//build/config/win:windowed", ]
@@ -57,12 +54,18 @@ source_set("xp_activate32_sources") {
"src/utils.cc",
"src/xp_activate32.cc",
]
public_deps = [
"../cr_base:cr_base"
]
}
# Program-specific build config
config("xp_activate32_config") {
defines = []
cflags = []
ldflags = []
defines += [ "USING_CR_BASE" ]
libs = [
"comctl32.lib",
"kernel32.lib",
+7 -11
View File
@@ -12,18 +12,18 @@
#define _UNICODE
#endif
#ifndef __MINGW32__
#include <WinSDKVer.h>
#endif // not __MINGW32__
#ifndef WINVER
#define WINVER _WIN32_WINNT_WINXP
#define WINVER 0x0501
#endif // WINVER
#ifndef _WIN32_WINNT
#define _WIN32_WINNT _WIN32_WINNT_WINXP
#if defined(_M_X64) || defined(__amd64__) || defined(_WIN64)
#define _WIN32_WINNT 0x0502 // Windows XP x64/Server 2003
#else
#define _WIN32_WINNT 0x0501 // Windows XP x86
#endif // defined(_M_X64) || defined(__amd64__) || defined(_WIN64)
#endif // _WIN32_WINNT
#ifndef _WIN64_WINNT
#define _WIN64_WINNT _WIN32_WINNT_WS03s // Minimum version for 64 bit
#define _WIN64_WINNT 0x0502 // Minimum version for 64 bit
#endif // _WIN64_WINNT
#ifndef _WIN32_IE
#define _WIN32_IE 0x0600 // Minimum Internet Explorer version
@@ -35,10 +35,6 @@
#define _ATL_XP_TARGETING
#endif // _ATL_XP_TARGETING
#ifndef __MINGW32__
#include <SDKDDKVer.h>
#endif // not __MINGW32__
#include <windows.h>
#include <commctrl.h>
#include <commdlg.h>
+4
View File
@@ -1,5 +1,9 @@
#include "xp_activate32.h"
#ifdef USING_CR_BASE
#include "base/logging.h"
#endif // USING_CR_BASE
#include "keygen.h"
#include "utils.h"