Skip to content

Commit

Permalink
update 1.22.0
Browse files Browse the repository at this point in the history
  • Loading branch information
lmintlcx committed Jun 22, 2024
1 parent a49f6b0 commit 3e8c4f8
Show file tree
Hide file tree
Showing 54 changed files with 2,769 additions and 1,113 deletions.
13 changes: 13 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
---
Language: Cpp
BasedOnStyle: LLVM
SortIncludes: true
ColumnLimit: 0
UseTab: Never
TabWidth: 4
IndentWidth: 4
BreakBeforeBraces: Allman
AccessModifierOffset: -2
AllowShortLambdasOnASingleLine: None
SpacesBeforeTrailingComments: 1
---
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
out/
tmp/
build/
23 changes: 14 additions & 9 deletions .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,27 @@
{
"name": "Win32",
"includePath": [
"C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/include",
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.19041.0/ucrt",
"${workspaceFolder}/fltk/include",
"${workspaceFolder}/zlib/include",
"${workspaceFolder}/src"
"C:/VisualStudio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/include",
"C:/Program Files (x86)/Windows Kits/10/Include/10.0.17763.0/ucrt",
"C:/Dev/fltk_1.4.0/msvc2017_x86/static/include"
// "${workspaceFolder}"
],
"defines": [
"WIN32",
"_DEBUG",
"UNICODE",
"_UNICODE"
"_UNICODE",
"NOMINMAX",
"WIN32_LEAN_AND_MEAN",
"_WIN32_WINNT=0x0600",
"_REGEX_MAX_STACK_COUNT=0",
"_PTK_CHINESE_UI",
"_PVZ_BETA_LEAK_SUPPORT"
],
"windowsSdkVersion": "10.0.19041.0",
"compilerPath": "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.29.30133/bin/Hostx86/x86/cl.exe",
"windowsSdkVersion": "10.0.17763.0",
"compilerPath": "C:/VisualStudio/2017/BuildTools/VC/Tools/MSVC/14.16.27023/bin/Hostx86/x86/cl.exe",
"cStandard": "c17",
"cppStandard": "c++20",
"cppStandard": "c++17",
"intelliSenseMode": "msvc-x86"
}
],
Expand Down
4 changes: 2 additions & 2 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
"name": "Launch",
"type": "cppvsdbg",
"request": "launch",
"program": "${workspaceFolder}/out/pvztoolkitd.exe",
"program": "${workspaceFolder}/build/pvztoolkitd.exe",
"args": [],
"stopAtEntry": false,
"cwd": "${workspaceFolder}/out",
"cwd": "${workspaceFolder}/build",
"environment": [],
"console": "integratedTerminal",
"preLaunchTask": "Build"
Expand Down
63 changes: 25 additions & 38 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
{
"files.associations": {
"*.ts": "xml",
"*.release": "makefile",
"*.debug": "makefile",
"*.rc": "cpp",
"*.inc": "cpp",
"utility": "cpp",
"*.makefile": "makefile",
"*.rc": "plaintext",
"xstring": "cpp",
"algorithm": "cpp",
"array": "cpp",
"atomic": "cpp",
"cctype": "cpp",
"charconv": "cpp",
"chrono": "cpp",
"clocale": "cpp",
"cmath": "cpp",
"codecvt": "cpp",
"cstddef": "cpp",
"cstdint": "cpp",
"cstdio": "cpp",
Expand All @@ -17,12 +20,14 @@
"ctime": "cpp",
"cwchar": "cpp",
"exception": "cpp",
"filesystem": "cpp",
"list": "cpp",
"map": "cpp",
"string": "cpp",
"unordered_map": "cpp",
"vector": "cpp",
"xutility": "cpp",
"forward_list": "cpp",
"fstream": "cpp",
"functional": "cpp",
"initializer_list": "cpp",
"iomanip": "cpp",
Expand All @@ -32,58 +37,40 @@
"istream": "cpp",
"iterator": "cpp",
"limits": "cpp",
"locale": "cpp",
"memory": "cpp",
"mutex": "cpp",
"new": "cpp",
"optional": "cpp",
"ostream": "cpp",
"random": "cpp",
"ratio": "cpp",
"regex": "cpp",
"sstream": "cpp",
"stdexcept": "cpp",
"streambuf": "cpp",
"string_view": "cpp",
"system_error": "cpp",
"thread": "cpp",
"tuple": "cpp",
"type_traits": "cpp",
"typeinfo": "cpp",
"unordered_map": "cpp",
"utility": "cpp",
"xfacet": "cpp",
"xhash": "cpp",
"xiosbase": "cpp",
"xlocale": "cpp",
"xlocbuf": "cpp",
"xlocinfo": "cpp",
"xlocmes": "cpp",
"xlocmon": "cpp",
"xlocnum": "cpp",
"xloctime": "cpp",
"xmemory": "cpp",
"xmemory0": "cpp",
"xstddef": "cpp",
"xstring": "cpp",
"xtr1common": "cpp",
"xtree": "cpp",
"bitset": "cpp",
"locale": "cpp",
"regex": "cpp",
"xlocbuf": "cpp",
"xlocmes": "cpp",
"random": "cpp",
"chrono": "cpp",
"ratio": "cpp",
"filesystem": "cpp",
"codecvt": "cpp",
"string_view": "cpp",
"variant": "cpp",
"atomic": "cpp",
"cctype": "cpp",
"charconv": "cpp",
"clocale": "cpp",
"forward_list": "cpp",
"optional": "cpp",
"bit": "cpp",
"compare": "cpp",
"concepts": "cpp",
"format": "cpp",
"fstream": "cpp",
"numeric": "cpp",
"valarray": "cpp",
"cassert": "cpp",
"mutex": "cpp",
"stop_token": "cpp",
"thread": "cpp"
"xtree": "cpp"
}
}
47 changes: 45 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,54 @@
{
"label": "Build",
"type": "shell",
"command": "${workspaceRoot}/build.bat",
"command": "${workspaceRoot}/tools/build_pvztoolkit.bat",
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
}
// {
// "version": "2.0.0",
// "tasks": [
// {
// "type": "shell",
// "label": "cmake",
// "command": "cmake",
// "args": [
// "-G",
// "Visual Studio 15 2017",
// "-A",
// "Win32",
// // "-D",
// // "CMAKE_BUILD_TYPE=Debug",
// "-D",
// "FLTK_DIR=C:/Dev/fltk_1.4.0/msvc2017_x86/static/CMake",
// "-B",
// "./build",
// "-S",
// "."
// ]
// },
// {
// "type": "shell",
// "label": "make",
// "command": "cmake",
// "args": [
// "--build",
// "./build",
// "--config",
// "Debug"
// ]
// },
// {
// "label": "Build",
// "dependsOrder": "sequence",
// "dependsOn": [
// "cmake",
// "make"
// ]
// }
// ]
// }
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@

更新日志: (记录每一版的主要改动.)

## [1.22.0] - 2024/06/22

- Improved English UI.
- 项目构建系统迁移到 CMake.
- 兼容 Windows 2000 / XP.
- 可切换小王子出怪器布局.
- 直接过关可选结束时炮最亮.
- 默认金币 80000 智慧树 1000.

### [1.20.3] - 2022/09/03

- Redesigned English UI.
Expand Down
49 changes: 49 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

cmake_minimum_required(VERSION 3.15)

project(pvztoolkit)

# set(CMAKE_BUILD_TYPE MinSizeRel)
# set(FLTK_DIR "C:/Dev/fltk_1.4.0/msvc2017_x86/static/CMake")

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")

find_package(FLTK CONFIG REQUIRED)

aux_source_directory(./src PZTK_SRCS)
add_executable(pvztoolkit WIN32 ${PZTK_SRCS})

# target_include_directories(
# pvztoolkit PRIVATE
# ./inc
# )

target_sources(
pvztoolkit PRIVATE
./res/version.rc
./res/pvztoolkit.manifest
)

target_compile_definitions(
pvztoolkit PRIVATE
UNICODE _UNICODE
WIN32_LEAN_AND_MEAN NOMINMAX
_WIN32_WINNT=0x0600
_REGEX_MAX_STACK_COUNT=0
_PVZ_BETA_LEAK_SUPPORT
)

target_compile_options(
pvztoolkit PRIVATE
/Zc:wchar_t /Zc:__cplusplus
/utf-8
)

target_link_libraries(
pvztoolkit PRIVATE
fltk::fltk fltk::images fltk::jpeg fltk::png fltk::z
crypt32.lib advapi32.lib wintrust.lib shlwapi.lib
)
Loading

0 comments on commit 3e8c4f8

Please sign in to comment.