fix: fix qwfassoc build error

- fix qwfassoc build error
- set version of wfassoc to official version
- add version restriction when qwfassoc finding wfassoc
- rename qwfassoc project name in cmake configuration file
- set standalone build to OFF in default
This commit is contained in:
2026-08-18 20:27:08 +08:00
parent 6687ccb143
commit 27235c2619
7 changed files with 127 additions and 10 deletions
Generated
+3 -3
View File
@@ -720,7 +720,7 @@ dependencies = [
[[package]] [[package]]
name = "wfassoc" name = "wfassoc"
version = "0.1.0" version = "1.0.0"
dependencies = [ dependencies = [
"indexmap", "indexmap",
"regex", "regex",
@@ -734,7 +734,7 @@ dependencies = [
[[package]] [[package]]
name = "wfassoc-cdylib" name = "wfassoc-cdylib"
version = "0.1.0" version = "1.0.0"
dependencies = [ dependencies = [
"num_enum", "num_enum",
"sarasacw-omrf", "sarasacw-omrf",
@@ -745,7 +745,7 @@ dependencies = [
[[package]] [[package]]
name = "wfassoc-exec" name = "wfassoc-exec"
version = "0.1.0" version = "1.0.0"
dependencies = [ dependencies = [
"clap", "clap",
"comfy-table", "comfy-table",
+117
View File
@@ -0,0 +1,117 @@
## ===== Personal =====
build/
install/
## ===== Visual Studio (Partial) =====
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
## ===== C++ =====
# Prerequisites
*.d
# Compiled Object files
*.slo
*.lo
*.o
*.obj
# Precompiled Headers
*.gch
*.pch
# Compiled Dynamic libraries
*.so
*.dylib
*.dll
# Fortran module files
*.mod
*.smod
# Compiled Static libraries
*.lai
*.la
*.a
*.lib
# Executables
*.exe
*.out
*.app
## ===== Qt =====
# C++ objects and libs
*.slo
*.lo
*.o
*.a
*.la
*.lai
*.so
*.so.*
*.dll
*.dylib
# Qt-es
object_script.*.Release
object_script.*.Debug
*_plugin_import.cpp
/.qmake.cache
/.qmake.stash
*.pro.user
*.pro.user.*
*.qbs.user
*.qbs.user.*
*.moc
moc_*.cpp
moc_*.h
qrc_*.cpp
ui_*.h
*.qmlc
*.jsc
Makefile*
*build-*
*.qm
*.prl
# Qt unit tests
target_wrapper.*
# QtCreator
*.autosave
# QtCreator Qml
*.qmlproject.user
*.qmlproject.user.*
# QtCreator CMake
CMakeLists.txt.user*
# QtCreator 4.8< compilation database
compile_commands.json
# QtCreator local machine specific files for imported projects
*creator.user*
*_qmlcache.qrc
+3 -3
View File
@@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.20) cmake_minimum_required(VERSION 3.20)
project(qwfassoc_suite LANGUAGES CXX) project(qwfassoc LANGUAGES CXX)
# Qt 6 requires C++17 at minimum. # Qt 6 requires C++17 at minimum.
set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD 17)
@@ -22,10 +22,10 @@ set(CMAKE_AUTORCC ON)
# toml11 is only needed when the standalone executable is built, so it is # toml11 is only needed when the standalone executable is built, so it is
# looked up conditionally below. # looked up conditionally below.
find_package(Qt6 REQUIRED COMPONENTS Widgets LinguistTools) find_package(Qt6 REQUIRED COMPONENTS Widgets LinguistTools)
find_package(wfassoc REQUIRED) find_package(wfassoc 1.0.0 REQUIRED)
# The standalone executable is optional: embedders may want only the library. # The standalone executable is optional: embedders may want only the library.
option(QWFASSOC_BUILD_STANDALONE "Build the qwfassoc-standalone executable" ON) option(QWFASSOC_BUILD_STANDALONE "Build the qwfassoc-standalone executable" OFF)
add_subdirectory(qwfassoc) add_subdirectory(qwfassoc)
@@ -91,7 +91,7 @@ Manifest parseManifestFile(const std::string& path) {
} }
} catch (const std::exception& e) { } catch (const std::exception& e) {
throw std::runtime_error( throw std::runtime_error(
"Manifest \"exts\" table contains an invalid entry: " + std::string("Manifest \"exts\" table contains an invalid entry: ") +
e.what()); e.what());
} }
} }
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "wfassoc-cdylib" name = "wfassoc-cdylib"
version = "0.1.0" version = "1.0.0"
authors = ["yyc12345"] authors = ["yyc12345"]
edition = "2024" edition = "2024"
description = "The dynamic library exposed for C/C++ users reading or manipulating Windows file assocation." description = "The dynamic library exposed for C/C++ users reading or manipulating Windows file assocation."
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "wfassoc-exec" name = "wfassoc-exec"
version = "0.1.0" version = "1.0.0"
authors = ["yyc12345"] authors = ["yyc12345"]
edition = "2024" edition = "2024"
description = "The executable configuring Windows file assocation according to user given profile and request." description = "The executable configuring Windows file assocation according to user given profile and request."
+1 -1
View File
@@ -1,6 +1,6 @@
[package] [package]
name = "wfassoc" name = "wfassoc"
version = "0.1.0" version = "1.0.0"
authors = ["yyc12345"] authors = ["yyc12345"]
edition = "2024" edition = "2024"
description = "The library reading or manipulating Windows file assocation." description = "The library reading or manipulating Windows file assocation."