add version.h, constants.h (and move constants there), and proper VERSIONINFO in .rc file
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
#ifndef XP_ACTIVATE32_CONSTANTS_H_
|
||||
#define XP_ACTIVATE32_CONSTANTS_H_
|
||||
|
||||
typedef int64_t i64;
|
||||
typedef uint64_t ui64;
|
||||
|
||||
#define MOD 0x16A6B036D7F2A79ULL
|
||||
|
||||
#define NON_RESIDUE 43
|
||||
|
||||
static const ui64 f[6] = {0, 0x21840136C85381ULL, 0x44197B83892AD0ULL, 0x1400606322B3B04ULL, 0x1400606322B3B04ULL, 1};
|
||||
|
||||
#endif // XP_ACTIVATE32_CONSTANTS_H_
|
||||
+16
-7
@@ -3,8 +3,12 @@
|
||||
// Used by Resource.rc
|
||||
//
|
||||
|
||||
#pragma once
|
||||
|
||||
#pragma code_page(65001) // UTF-8
|
||||
|
||||
#include "version.h"
|
||||
|
||||
#define IDI_MAINFRAME 103
|
||||
#define IDD_MAINFRAME 100
|
||||
|
||||
@@ -13,12 +17,17 @@
|
||||
#endif // IDC_STATIC
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 103
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
||||
// See https://learn.microsoft.com/en-us/cpp/mfc/tn035-using-multiple-resource-files-and-header-files-with-visual-cpp
|
||||
#define _APS_NO_MFC 130
|
||||
#define _APS_NEXT_RESOURCE_VALUE 103
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
// New MSVS projects use these.
|
||||
//#define _APS_NEXT_COMMAND_VALUE 32771
|
||||
//#define _APS_NEXT_CONTROL_VALUE 1000
|
||||
//#define _APS_NEXT_SYMED_VALUE 103
|
||||
#endif // APSTUDIO_READONLY_SYMBOLS
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
+43
-2
@@ -47,6 +47,47 @@ END
|
||||
|
||||
#endif // APSTUDIO_INVOKED
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Version Information
|
||||
//
|
||||
|
||||
VS_VERSION_INFO VERSIONINFO
|
||||
FILEVERSION MAJOR_VERSION, MINOR_VERSION, BUILD_VERSION
|
||||
PRODUCTVERSION MAJOR_VERSION, MINOR_VERSION, BUILD_VERSION
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS VS_FF_DEBUG // 0x00000010L
|
||||
#else
|
||||
FILEFLAGS 0x00000000L // Normal?
|
||||
#endif
|
||||
// Windows NT
|
||||
FILEOS VOS_NT_WINDOWS32 // 0x00040004L
|
||||
FILETYPE VFT_APP // 0x00000001L
|
||||
FILESUBTYPE VFT2_UNKNOWN // 0x00000000L
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904B0" // English Unicode
|
||||
BEGIN
|
||||
VALUE "Comments", "https://github.com/Alex313031/xp_activate32"
|
||||
VALUE "CompanyName", "Alex313031"
|
||||
VALUE "FileDescription", "XPConfirmationIDKeygen"
|
||||
VALUE "FileVersion", VERSION_STRING
|
||||
VALUE "InternalName", "xp_activate32"
|
||||
VALUE "LegalCopyright", LEGAL_COPYRIGHT
|
||||
VALUE "LegalTrademarks", "AGPL-3.0"
|
||||
VALUE "OriginalFilename", "xp_activate32.exe"
|
||||
VALUE "ProductName", "XP_Activate32"
|
||||
VALUE "ProductVersion", VERSION_STRING
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x0409, 1200
|
||||
END
|
||||
END
|
||||
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Icon
|
||||
@@ -69,7 +110,7 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
|
||||
|
||||
IDD_MAINFRAME DIALOGEX 0, 0, 410, 46
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "XP_Activate32"
|
||||
CAPTION MAIN_TITLE
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
CTEXT "Код установки:",-1,2,11,75,10
|
||||
@@ -120,7 +161,7 @@ LANGUAGE LANG_ENGLISH, SUBLANG_NEUTRAL
|
||||
|
||||
IDD_MAINFRAME DIALOGEX 0, 0, 395, 46
|
||||
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_CAPTION | WS_SYSMENU
|
||||
CAPTION "XP_Activate32"
|
||||
CAPTION MAIN_TITLE
|
||||
FONT 8, "MS Shell Dlg", 0, 0, 0x1
|
||||
BEGIN
|
||||
CTEXT "Installation ID:",-1,2,11,58,10
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
#ifndef XP_ACTIVATE32_VERSION_H_
|
||||
#define XP_ACTIVATE32_VERSION_H_
|
||||
|
||||
#pragma code_page(65001) // UTF-8
|
||||
|
||||
// Macro to convert to string
|
||||
#if !defined(_STRINGIZER) && !defined(STRINGIZE)
|
||||
#define _STRINGIZER(in) #in
|
||||
#define STRINGIZE(in) _STRINGIZER(in)
|
||||
#endif
|
||||
|
||||
// Main version constant
|
||||
#ifndef _VERSION
|
||||
// Run stringizer above
|
||||
#define _VERSION(major,minor,build) STRINGIZE(major) "." STRINGIZE(minor) "." STRINGIZE(build)
|
||||
#endif
|
||||
|
||||
// These next few lines are where we control version number and copyright year
|
||||
// Adhere to semver > semver.org
|
||||
#define MAJOR_VERSION 1
|
||||
#define MINOR_VERSION 0
|
||||
#define BUILD_VERSION 1
|
||||
|
||||
#define MAIN_TITLE L"XP_Activate32"
|
||||
|
||||
#ifndef VERSION_STRING
|
||||
#define VERSION_STRING _VERSION(MAJOR_VERSION, MINOR_VERSION, BUILD_VERSION)
|
||||
#define ABOUT_TITLE L"About XP_Activate32"
|
||||
#define ABOUT_VERSION L"xp_activate32 ver. 1.0.1"
|
||||
#define ABOUT_COPYRIGHT L"Copyright © 2025 Alex313031"
|
||||
#define LEGAL_COPYRIGHT L"© 2025"
|
||||
#endif // VERSION_STRING
|
||||
|
||||
#endif // XP_ACTIVATE32_VERSION_H_
|
||||
+3
-14
@@ -1,14 +1,12 @@
|
||||
#ifndef XP_ACTIVATE32_H_
|
||||
#define XP_ACTIVATE32_H_
|
||||
|
||||
#include "resource.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <intrin.h>
|
||||
|
||||
#ifndef MAJOR_VERSION
|
||||
#define MAJOR_VERSION 1
|
||||
#define MINOR_VERSION 0
|
||||
#define PATCH_VERSION 1
|
||||
#endif
|
||||
#include "constants.h"
|
||||
|
||||
#ifndef STRICT
|
||||
#define STRICT
|
||||
@@ -22,13 +20,4 @@
|
||||
#define _UNICODE
|
||||
#endif
|
||||
|
||||
typedef int64_t i64;
|
||||
typedef uint64_t ui64;
|
||||
|
||||
#define MOD 0x16A6B036D7F2A79ULL
|
||||
|
||||
#define NON_RESIDUE 43
|
||||
|
||||
static const ui64 f[6] = {0, 0x21840136C85381ULL, 0x44197B83892AD0ULL, 0x1400606322B3B04ULL, 0x1400606322B3B04ULL, 1};
|
||||
|
||||
#endif // XP_ACTIVATE32_H_
|
||||
|
||||
@@ -153,8 +153,10 @@
|
||||
<ClCompile Include="src/xp_activate32.cc" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src/constants.h" />
|
||||
<ClInclude Include="src/resource.h" />
|
||||
<ClInclude Include="src/xp_activate32.h" />
|
||||
<ClInclude Include="src/version.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="src/resource.rc" />
|
||||
|
||||
@@ -25,12 +25,18 @@
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="src/constants.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src/resource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src/xp_activate32.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="src/version.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="src/resource.rc">
|
||||
|
||||
Reference in New Issue
Block a user