Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c5ef4899bb |
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
cmake_minimum_required(VERSION 3.20)
|
cmake_minimum_required(VERSION 3.20)
|
||||||
project(ObsidianDragon
|
project(ObsidianDragon
|
||||||
VERSION 1.0.0
|
VERSION 1.0.1
|
||||||
LANGUAGES C CXX
|
LANGUAGES C CXX
|
||||||
DESCRIPTION "DragonX Cryptocurrency Wallet"
|
DESCRIPTION "DragonX Cryptocurrency Wallet"
|
||||||
)
|
)
|
||||||
@@ -373,12 +373,14 @@ endif()
|
|||||||
# Windows application icon + VERSIONINFO (.rc -> .res -> linked into .exe)
|
# Windows application icon + VERSIONINFO (.rc -> .res -> linked into .exe)
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
set(OBSIDIAN_ICO_PATH "${CMAKE_SOURCE_DIR}/res/img/ObsidianDragon.ico")
|
set(OBSIDIAN_ICO_PATH "${CMAKE_SOURCE_DIR}/res/img/ObsidianDragon.ico")
|
||||||
|
# Generate manifest with version from project()
|
||||||
|
configure_file(
|
||||||
|
${CMAKE_SOURCE_DIR}/res/ObsidianDragon.manifest.in
|
||||||
|
${CMAKE_SOURCE_DIR}/res/ObsidianDragon.manifest
|
||||||
|
@ONLY
|
||||||
|
)
|
||||||
set(OBSIDIAN_MANIFEST_PATH "${CMAKE_SOURCE_DIR}/res/ObsidianDragon.manifest")
|
set(OBSIDIAN_MANIFEST_PATH "${CMAKE_SOURCE_DIR}/res/ObsidianDragon.manifest")
|
||||||
# Version numbers for the VERSIONINFO resource block
|
# Generate .rc with version from project()
|
||||||
set(DRAGONX_VER_MAJOR 1)
|
|
||||||
set(DRAGONX_VER_MINOR 0)
|
|
||||||
set(DRAGONX_VER_PATCH 0)
|
|
||||||
set(DRAGONX_VERSION "1.0.0")
|
|
||||||
configure_file(
|
configure_file(
|
||||||
${CMAKE_SOURCE_DIR}/res/ObsidianDragon.rc
|
${CMAKE_SOURCE_DIR}/res/ObsidianDragon.rc
|
||||||
${CMAKE_BINARY_DIR}/generated/ObsidianDragon.rc
|
${CMAKE_BINARY_DIR}/generated/ObsidianDragon.rc
|
||||||
@@ -387,6 +389,13 @@ if(WIN32)
|
|||||||
set(WIN_RC_FILE ${CMAKE_BINARY_DIR}/generated/ObsidianDragon.rc)
|
set(WIN_RC_FILE ${CMAKE_BINARY_DIR}/generated/ObsidianDragon.rc)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# Generate version.h from the single project(VERSION ...) declaration
|
||||||
|
configure_file(
|
||||||
|
${CMAKE_SOURCE_DIR}/src/config/version.h.in
|
||||||
|
${CMAKE_SOURCE_DIR}/src/config/version.h
|
||||||
|
@ONLY
|
||||||
|
)
|
||||||
|
|
||||||
# Generate INCBIN font embedding source with absolute paths to .ttf files
|
# Generate INCBIN font embedding source with absolute paths to .ttf files
|
||||||
configure_file(
|
configure_file(
|
||||||
${CMAKE_SOURCE_DIR}/src/embedded/embedded_fonts.cpp.in
|
${CMAKE_SOURCE_DIR}/src/embedded/embedded_fonts.cpp.in
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<assemblyIdentity
|
<assemblyIdentity
|
||||||
type="win32"
|
type="win32"
|
||||||
name="DragonX.ObsidianDragon.Wallet"
|
name="DragonX.ObsidianDragon.Wallet"
|
||||||
version="1.0.0.0"
|
version="1.0.1.0"
|
||||||
processorArchitecture="amd64"
|
processorArchitecture="amd64"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
51
res/ObsidianDragon.manifest.in
Normal file
51
res/ObsidianDragon.manifest.in
Normal file
@@ -0,0 +1,51 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
|
||||||
|
|
||||||
|
<!-- Application identity —————————————————————————————— -->
|
||||||
|
<assemblyIdentity
|
||||||
|
type="win32"
|
||||||
|
name="DragonX.ObsidianDragon.Wallet"
|
||||||
|
version="@PROJECT_VERSION_MAJOR@.@PROJECT_VERSION_MINOR@.@PROJECT_VERSION_PATCH@.0"
|
||||||
|
processorArchitecture="amd64"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<description>ObsidianDragon Wallet</description>
|
||||||
|
|
||||||
|
<!-- Common Controls v6 (themed buttons, etc.) ————————— -->
|
||||||
|
<dependency>
|
||||||
|
<dependentAssembly>
|
||||||
|
<assemblyIdentity
|
||||||
|
type="win32"
|
||||||
|
name="Microsoft.Windows.Common-Controls"
|
||||||
|
version="6.0.0.0"
|
||||||
|
processorArchitecture="*"
|
||||||
|
publicKeyToken="6595b64144ccf1df"
|
||||||
|
language="*"
|
||||||
|
/>
|
||||||
|
</dependentAssembly>
|
||||||
|
</dependency>
|
||||||
|
|
||||||
|
<!-- DPI awareness (Per-Monitor V2) ————————————————————— -->
|
||||||
|
<application xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||||
|
<windowsSettings>
|
||||||
|
<dpiAware xmlns="http://schemas.microsoft.com/SMI/2005/WindowsSettings">true/pm</dpiAware>
|
||||||
|
<dpiAwareness xmlns="http://schemas.microsoft.com/SMI/2016/WindowsSettings">PerMonitorV2,PerMonitor</dpiAwareness>
|
||||||
|
<activeCodePage xmlns="http://schemas.microsoft.com/SMI/2019/WindowsSettings">UTF-8</activeCodePage>
|
||||||
|
</windowsSettings>
|
||||||
|
</application>
|
||||||
|
|
||||||
|
<!-- Supported OS declarations (Windows 7 → 11) ———————— -->
|
||||||
|
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
|
||||||
|
<application>
|
||||||
|
<!-- Windows 7 -->
|
||||||
|
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
|
||||||
|
<!-- Windows 8 -->
|
||||||
|
<supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
|
||||||
|
<!-- Windows 8.1 -->
|
||||||
|
<supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
|
||||||
|
<!-- Windows 10 / 11 -->
|
||||||
|
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
|
||||||
|
</application>
|
||||||
|
</compatibility>
|
||||||
|
|
||||||
|
</assembly>
|
||||||
@@ -19,8 +19,8 @@
|
|||||||
#include <winver.h>
|
#include <winver.h>
|
||||||
|
|
||||||
VS_VERSION_INFO VERSIONINFO
|
VS_VERSION_INFO VERSIONINFO
|
||||||
FILEVERSION @DRAGONX_VER_MAJOR@,@DRAGONX_VER_MINOR@,@DRAGONX_VER_PATCH@,0
|
FILEVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0
|
||||||
PRODUCTVERSION @DRAGONX_VER_MAJOR@,@DRAGONX_VER_MINOR@,@DRAGONX_VER_PATCH@,0
|
PRODUCTVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0
|
||||||
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
|
||||||
FILEFLAGS 0x0L
|
FILEFLAGS 0x0L
|
||||||
FILEOS VOS_NT_WINDOWS32
|
FILEOS VOS_NT_WINDOWS32
|
||||||
@@ -33,12 +33,12 @@ BEGIN
|
|||||||
BEGIN
|
BEGIN
|
||||||
VALUE "CompanyName", "DragonX Developers\0"
|
VALUE "CompanyName", "DragonX Developers\0"
|
||||||
VALUE "FileDescription", "ObsidianDragon Wallet\0"
|
VALUE "FileDescription", "ObsidianDragon Wallet\0"
|
||||||
VALUE "FileVersion", "@DRAGONX_VERSION@\0"
|
VALUE "FileVersion", "@PROJECT_VERSION@\0"
|
||||||
VALUE "InternalName", "ObsidianDragon\0"
|
VALUE "InternalName", "ObsidianDragon\0"
|
||||||
VALUE "LegalCopyright", "Copyright 2024-2026 DragonX Developers. GPLv3.\0"
|
VALUE "LegalCopyright", "Copyright 2024-2026 DragonX Developers. GPLv3.\0"
|
||||||
VALUE "OriginalFilename", "ObsidianDragon.exe\0"
|
VALUE "OriginalFilename", "ObsidianDragon.exe\0"
|
||||||
VALUE "ProductName", "ObsidianDragon\0"
|
VALUE "ProductName", "ObsidianDragon\0"
|
||||||
VALUE "ProductVersion", "@DRAGONX_VERSION@\0"
|
VALUE "ProductVersion", "@PROJECT_VERSION@\0"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK "VarFileInfo"
|
BLOCK "VarFileInfo"
|
||||||
|
|||||||
@@ -4,10 +4,13 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define DRAGONX_VERSION "1.0.0"
|
// !! DO NOT EDIT version.h — it is generated from version.h.in by CMake.
|
||||||
|
// !! Change the version in CMakeLists.txt: project(... VERSION x.y.z ...)
|
||||||
|
|
||||||
|
#define DRAGONX_VERSION "1.0.1"
|
||||||
#define DRAGONX_VERSION_MAJOR 1
|
#define DRAGONX_VERSION_MAJOR 1
|
||||||
#define DRAGONX_VERSION_MINOR 0
|
#define DRAGONX_VERSION_MINOR 0
|
||||||
#define DRAGONX_VERSION_PATCH 0
|
#define DRAGONX_VERSION_PATCH 1
|
||||||
|
|
||||||
#define DRAGONX_APP_NAME "ObsidianDragon"
|
#define DRAGONX_APP_NAME "ObsidianDragon"
|
||||||
#define DRAGONX_ORG_NAME "Hush"
|
#define DRAGONX_ORG_NAME "Hush"
|
||||||
|
|||||||
31
src/config/version.h.in
Normal file
31
src/config/version.h.in
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
// DragonX Wallet - ImGui Edition
|
||||||
|
// Copyright 2024-2026 The Hush Developers
|
||||||
|
// Released under the GPLv3
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
// !! DO NOT EDIT version.h — it is generated from version.h.in by CMake.
|
||||||
|
// !! Change the version in CMakeLists.txt: project(... VERSION x.y.z ...)
|
||||||
|
|
||||||
|
#define DRAGONX_VERSION "@PROJECT_VERSION@"
|
||||||
|
#define DRAGONX_VERSION_MAJOR @PROJECT_VERSION_MAJOR@
|
||||||
|
#define DRAGONX_VERSION_MINOR @PROJECT_VERSION_MINOR@
|
||||||
|
#define DRAGONX_VERSION_PATCH @PROJECT_VERSION_PATCH@
|
||||||
|
|
||||||
|
#define DRAGONX_APP_NAME "ObsidianDragon"
|
||||||
|
#define DRAGONX_ORG_NAME "Hush"
|
||||||
|
|
||||||
|
// Default RPC settings
|
||||||
|
#define DRAGONX_DEFAULT_RPC_HOST "127.0.0.1"
|
||||||
|
#define DRAGONX_DEFAULT_RPC_PORT "21769"
|
||||||
|
|
||||||
|
// Coin parameters
|
||||||
|
#define DRAGONX_TICKER "DRGX"
|
||||||
|
#define DRAGONX_COIN_NAME "DragonX"
|
||||||
|
#define DRAGONX_URI_SCHEME "drgx"
|
||||||
|
#define DRAGONX_ZATOSHI_PER_COIN 100000000
|
||||||
|
#define DRAGONX_DEFAULT_FEE 0.0001
|
||||||
|
|
||||||
|
// Config file names
|
||||||
|
#define DRAGONX_CONF_FILENAME "DRAGONX.conf"
|
||||||
|
#define DRAGONX_WALLET_FILENAME "wallet.dat"
|
||||||
20
src/main.cpp
20
src/main.cpp
@@ -419,12 +419,20 @@ int main(int argc, char* argv[])
|
|||||||
if (!g_single_instance.tryLock()) {
|
if (!g_single_instance.tryLock()) {
|
||||||
fprintf(stderr, "Another instance of ObsidianDragon is already running.\n");
|
fprintf(stderr, "Another instance of ObsidianDragon is already running.\n");
|
||||||
DEBUG_LOGF("Please close the existing instance first.\n");
|
DEBUG_LOGF("Please close the existing instance first.\n");
|
||||||
|
#ifdef _WIN32
|
||||||
|
MessageBoxW(nullptr, L"Another instance of ObsidianDragon is already running.\nPlease close it first.",
|
||||||
|
L"ObsidianDragon", MB_OK | MB_ICONINFORMATION);
|
||||||
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Initialize SDL
|
// Initialize SDL
|
||||||
if (!InitSDL()) {
|
if (!InitSDL()) {
|
||||||
fprintf(stderr, "Failed to initialize SDL!\n");
|
fprintf(stderr, "Failed to initialize SDL!\n");
|
||||||
|
#ifdef _WIN32
|
||||||
|
MessageBoxW(nullptr, L"Failed to initialize SDL. Please check the debug log at\n%APPDATA%\\ObsidianDragon\\dragonx-debug.log",
|
||||||
|
L"ObsidianDragon - Startup Error", MB_OK | MB_ICONERROR);
|
||||||
|
#endif
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -495,6 +503,8 @@ int main(int argc, char* argv[])
|
|||||||
nullptr, nullptr, GetModuleHandleW(nullptr), nullptr);
|
nullptr, nullptr, GetModuleHandleW(nullptr), nullptr);
|
||||||
if (!nativeHwnd) {
|
if (!nativeHwnd) {
|
||||||
fprintf(stderr, "Failed to create native Win32 window (error %lu)\n", GetLastError());
|
fprintf(stderr, "Failed to create native Win32 window (error %lu)\n", GetLastError());
|
||||||
|
MessageBoxW(nullptr, L"Failed to create window. Please check the debug log at\n%APPDATA%\\ObsidianDragon\\dragonx-debug.log",
|
||||||
|
L"ObsidianDragon - Startup Error", MB_OK | MB_ICONERROR);
|
||||||
SDL_Quit();
|
SDL_Quit();
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -534,6 +544,8 @@ int main(int argc, char* argv[])
|
|||||||
SDL_DestroyProperties(createProps);
|
SDL_DestroyProperties(createProps);
|
||||||
if (window == nullptr) {
|
if (window == nullptr) {
|
||||||
fprintf(stderr, "Error: SDL_CreateWindowWithProperties(): %s\n", SDL_GetError());
|
fprintf(stderr, "Error: SDL_CreateWindowWithProperties(): %s\n", SDL_GetError());
|
||||||
|
MessageBoxW(nullptr, L"Failed to create SDL window. Please check the debug log at\n%APPDATA%\\ObsidianDragon\\dragonx-debug.log",
|
||||||
|
L"ObsidianDragon - Startup Error", MB_OK | MB_ICONERROR);
|
||||||
DestroyWindow(nativeHwnd);
|
DestroyWindow(nativeHwnd);
|
||||||
SDL_Quit();
|
SDL_Quit();
|
||||||
return 1;
|
return 1;
|
||||||
@@ -560,6 +572,8 @@ int main(int argc, char* argv[])
|
|||||||
dragonx::platform::DX11Context dx;
|
dragonx::platform::DX11Context dx;
|
||||||
if (!dx.init(window)) {
|
if (!dx.init(window)) {
|
||||||
fprintf(stderr, "Error: Failed to initialize DirectX 11 context\n");
|
fprintf(stderr, "Error: Failed to initialize DirectX 11 context\n");
|
||||||
|
MessageBoxW(nullptr, L"Failed to initialize DirectX 11.\nPlease ensure your graphics drivers are up to date.\n\nCheck the debug log at\n%APPDATA%\\ObsidianDragon\\dragonx-debug.log",
|
||||||
|
L"ObsidianDragon - Graphics Error", MB_OK | MB_ICONERROR);
|
||||||
SDL_DestroyWindow(window);
|
SDL_DestroyWindow(window);
|
||||||
SDL_Quit();
|
SDL_Quit();
|
||||||
return 1;
|
return 1;
|
||||||
@@ -635,6 +649,8 @@ int main(int argc, char* argv[])
|
|||||||
// Initialize ImGui with DX11 backend
|
// Initialize ImGui with DX11 backend
|
||||||
if (!InitImGui(window, dx)) {
|
if (!InitImGui(window, dx)) {
|
||||||
fprintf(stderr, "Failed to initialize ImGui!\n");
|
fprintf(stderr, "Failed to initialize ImGui!\n");
|
||||||
|
MessageBoxW(nullptr, L"Failed to initialize ImGui. Please check the debug log at\n%APPDATA%\\ObsidianDragon\\dragonx-debug.log",
|
||||||
|
L"ObsidianDragon - Startup Error", MB_OK | MB_ICONERROR);
|
||||||
Shutdown(window, dx);
|
Shutdown(window, dx);
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
@@ -808,6 +824,10 @@ int main(int argc, char* argv[])
|
|||||||
dragonx::App app;
|
dragonx::App app;
|
||||||
if (!app.init()) {
|
if (!app.init()) {
|
||||||
fprintf(stderr, "Failed to initialize application!\n");
|
fprintf(stderr, "Failed to initialize application!\n");
|
||||||
|
#ifdef _WIN32
|
||||||
|
MessageBoxW(nullptr, L"Failed to initialize application. Please check the debug log at\n%APPDATA%\\ObsidianDragon\\dragonx-debug.log",
|
||||||
|
L"ObsidianDragon - Startup Error", MB_OK | MB_ICONERROR);
|
||||||
|
#endif
|
||||||
#ifdef DRAGONX_USE_DX11
|
#ifdef DRAGONX_USE_DX11
|
||||||
Shutdown(window, dx);
|
Shutdown(window, dx);
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -61,13 +61,8 @@ bool DX11Context::init(SDL_Window* window)
|
|||||||
D3D_FEATURE_LEVEL_10_0,
|
D3D_FEATURE_LEVEL_10_0,
|
||||||
};
|
};
|
||||||
|
|
||||||
UINT createDeviceFlags = 0;
|
|
||||||
#ifdef DRAGONX_DEBUG
|
|
||||||
createDeviceFlags |= D3D11_CREATE_DEVICE_DEBUG;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Need BGRA support for DirectComposition
|
// Need BGRA support for DirectComposition
|
||||||
createDeviceFlags |= D3D11_CREATE_DEVICE_BGRA_SUPPORT;
|
UINT createDeviceFlags = D3D11_CREATE_DEVICE_BGRA_SUPPORT;
|
||||||
|
|
||||||
HRESULT hr = D3D11CreateDevice(
|
HRESULT hr = D3D11CreateDevice(
|
||||||
nullptr, // Default adapter
|
nullptr, // Default adapter
|
||||||
|
|||||||
@@ -528,7 +528,8 @@ inline void SettingsScreen::renderAboutSection() {
|
|||||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() + (availWidth - nameSize.x) * 0.5f);
|
ImGui::SetCursorPosX(ImGui::GetCursorPosX() + (availWidth - nameSize.x) * 0.5f);
|
||||||
Typography::instance().text(TypeStyle::H6, appName);
|
Typography::instance().text(TypeStyle::H6, appName);
|
||||||
|
|
||||||
const char* version = "Version 1.0.0-imgui";
|
char version[64];
|
||||||
|
snprintf(version, sizeof(version), "Version %s-imgui", DRAGONX_VERSION);
|
||||||
ImVec2 versionSize = ImGui::CalcTextSize(version);
|
ImVec2 versionSize = ImGui::CalcTextSize(version);
|
||||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() + (availWidth - versionSize.x) * 0.5f);
|
ImGui::SetCursorPosX(ImGui::GetCursorPosX() + (availWidth - versionSize.x) * 0.5f);
|
||||||
Typography::instance().textColored(TypeStyle::Caption, OnSurfaceMedium(), version);
|
Typography::instance().textColored(TypeStyle::Caption, OnSurfaceMedium(), version);
|
||||||
|
|||||||
Reference in New Issue
Block a user