diff --git a/.devcontainer b/.devcontainer index e8abe40..37c6f25 160000 --- a/.devcontainer +++ b/.devcontainer @@ -1 +1 @@ -Subproject commit e8abe40160130701a4f60f08e60ee3c035b274c7 +Subproject commit 37c6f25041606bc49737abe4228d316daccd386e diff --git a/.github/release-tag.json b/.github/release-tag.json new file mode 100644 index 0000000..421062e --- /dev/null +++ b/.github/release-tag.json @@ -0,0 +1,4 @@ +{ + "message": "xpro version 1.2.4 tag", + "tag": "xpv1.2.4" +} diff --git a/.github/release-tag.yml b/.github/release-tag.yml deleted file mode 100644 index e376104..0000000 --- a/.github/release-tag.yml +++ /dev/null @@ -1,2 +0,0 @@ -tag: xpv1.2.3 -message: "xpro version 1.2.3 tag" diff --git a/.github/workflows/xpbuild.yml b/.github/workflows/xpbuild.yml index 76b2701..846ffc1 100644 --- a/.github/workflows/xpbuild.yml +++ b/.github/workflows/xpbuild.yml @@ -14,11 +14,15 @@ jobs: contents: read pull-requests: write packages: write - uses: externpro/externpro/.github/workflows/build-linux.yml@25.07.6 - secrets: inherit + uses: externpro/externpro/.github/workflows/build-linux.yml@26.01.1 + secrets: + automation_token: ${{ secrets.GHCR_TOKEN }} + with: {} macos: - uses: externpro/externpro/.github/workflows/build-macos.yml@25.07.6 + uses: externpro/externpro/.github/workflows/build-macos.yml@26.01.1 secrets: inherit + with: {} windows: - uses: externpro/externpro/.github/workflows/build-windows.yml@25.07.6 + uses: externpro/externpro/.github/workflows/build-windows.yml@26.01.1 secrets: inherit + with: {} diff --git a/.github/workflows/xpinit.yml b/.github/workflows/xpinit.yml new file mode 100644 index 0000000..4893a2b --- /dev/null +++ b/.github/workflows/xpinit.yml @@ -0,0 +1,12 @@ +name: xpInit externpro +permissions: + contents: write + pull-requests: write + packages: write +on: + workflow_dispatch: +jobs: + init: + uses: externpro/externpro/.github/workflows/init-externpro.yml@main + secrets: + automation_token: ${{ secrets.XPRO_TOKEN }} diff --git a/.github/workflows/xprelease.yml b/.github/workflows/xprelease.yml index a2eb282..ec3022d 100644 --- a/.github/workflows/xprelease.yml +++ b/.github/workflows/xprelease.yml @@ -34,7 +34,7 @@ jobs: # Upload build artifacts as release assets release-from-build: if: github.event_name == 'workflow_dispatch' - uses: externpro/externpro/.github/workflows/release-from-build.yml@25.07.6 + uses: externpro/externpro/.github/workflows/release-from-build.yml@26.01.1 with: workflow_run_url: ${{ github.event.inputs.workflow_run_url }} permissions: diff --git a/.github/workflows/xptag.yml b/.github/workflows/xptag.yml index b5ce950..2946213 100644 --- a/.github/workflows/xptag.yml +++ b/.github/workflows/xptag.yml @@ -8,9 +8,9 @@ on: jobs: tag: if: ${{ github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'xpro' && contains(github.event.pull_request.labels.*.name, 'release:tag') }} - uses: externpro/externpro/.github/workflows/tag-release.yml@25.07.6 + uses: externpro/externpro/.github/workflows/tag-release.yml@26.01.1 with: merge_sha: ${{ github.event.pull_request.merge_commit_sha }} pr_number: ${{ github.event.pull_request.number }} secrets: - workflow_write_token: ${{ secrets.XPUPDATE_TOKEN }} + automation_token: ${{ secrets.XPRO_TOKEN }} diff --git a/CMakeLists.txt b/CMakeLists.txt index cb48a9b..42eb8c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,27 +1,25 @@ -cmake_minimum_required(VERSION 3.31) -set(CMAKE_PROJECT_TOP_LEVEL_INCLUDES .devcontainer/cmake/xproinc.cmake) +cmake_minimum_required(VERSION 4.3) project(wxInclude) -xpFindPkg(PKGS boost) -add_executable(${CMAKE_PROJECT_NAME} wxInclude.cpp) -target_link_libraries(${CMAKE_PROJECT_NAME} PRIVATE Boost::filesystem Boost::program_options Boost::timer) +find_package(Boost) +add_executable(${PROJECT_NAME} wxInclude.cpp) +target_link_libraries(${PROJECT_NAME} PRIVATE Boost::chrono Boost::filesystem Boost::program_options Boost::timer) set(targetsFile ${PROJECT_NAME}-targets) -if(DEFINED XP_NAMESPACE) - xpExternPackage(NAMESPACE ${XP_NAMESPACE} - TARGETS_FILE ${targetsFile} EXE ${CMAKE_PROJECT_NAME} - BASE v1.0 XPDIFF "intro" PVT_DEPS boost +if(COMMAND xpExternPackage) + xpExternPackage(TARGETS_FILE ${targetsFile} + EXE ${PROJECT_NAME} FIND_XPRO_CMAKE + BASE v1.0 XPDIFF "intro" WEB "http://wiki.wxwidgets.org/Embedding_PNG_Images" DESC "embed resources into cross-platform code" LICENSE "[wxWindows](http://wiki.wxwidgets.org/Embedding_PNG_Images 'assumed wxWindows license, since source can be downloaded from wxWiki')" ) - set(nameSpace NAMESPACE ${XP_NAMESPACE}::) elseif(NOT DEFINED CMAKE_INSTALL_CMAKEDIR) set(CMAKE_INSTALL_CMAKEDIR ${CMAKE_INSTALL_DATADIR}/cmake) endif() -install(TARGETS ${CMAKE_PROJECT_NAME} EXPORT ${targetsFile} +install(TARGETS ${PROJECT_NAME} EXPORT ${targetsFile} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} ) -install(EXPORT ${targetsFile} DESTINATION ${CMAKE_INSTALL_CMAKEDIR} ${nameSpace}) +install(EXPORT ${targetsFile} DESTINATION ${CMAKE_INSTALL_CMAKEDIR} NAMESPACE ${PROJECT_NAME}::) add_executable(decompressor decompress.cpp) target_link_libraries(decompressor PRIVATE Boost::filesystem Boost::iostreams) diff --git a/CMakePresets.json b/CMakePresets.json index f82cfdd..28efa39 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -3,6 +3,7 @@ "include": [ ".devcontainer/cmake/presets/xpLinuxNinja.json", ".devcontainer/cmake/presets/xpDarwinNinja.json", - ".devcontainer/cmake/presets/xpWindowsVs2022.json" + ".devcontainer/cmake/presets/xpMswVs2022.json", + ".devcontainer/cmake/presets/xpMswVs2026.json" ] } diff --git a/CMakePresetsBase.json b/CMakePresetsBase.json index 4489d79..c54ade9 100644 --- a/CMakePresetsBase.json +++ b/CMakePresetsBase.json @@ -6,7 +6,7 @@ "hidden": true, "binaryDir": "${sourceDir}/_bld-${presetName}", "cacheVariables": { - "XP_NAMESPACE": "xpro" + "CMAKE_EXPERIMENTAL_GENERATE_SBOM": "ca494ed3-b261-4205-a01f-603c95e4cae0" } } ], diff --git a/wxInclude.cpp b/wxInclude.cpp index 04b8d1b..ccbca6f 100644 --- a/wxInclude.cpp +++ b/wxInclude.cpp @@ -240,10 +240,10 @@ int main(int argc, char* argv[]) throw std::runtime_error( "Failed to create output file!" ); if ( !opt.count( "quiet" ) ) /* Show status */ - std::cout << "Build : file '" << outputpath.leaf() << "'..." << std::endl; + std::cout << "Build : file '" << outputpath.filename().string() << "'..." << std::endl; /* Get base name of file */ - headername = fs::basename( outputpath ); + headername = outputpath.stem().string(); /* Data string stream */ std::ostringstream data; @@ -270,7 +270,7 @@ int main(int argc, char* argv[]) BOOST_FOREACH( std::string& file, files ) { fs::path inputpath( file ); - std::string fileext( fs::extension( inputpath ) ); + std::string fileext = inputpath.extension().string(); fs::ifstream input( inputpath, std::ios::in | std::ios::binary | std::ios::ate ); input.rdbuf()->pubsetbuf( inbuffer, BUFFER_SIZE ); @@ -321,10 +321,10 @@ int main(int argc, char* argv[]) BOOST_FOREACH( std::string& type, types ) { /* Normal file? */ - if ( fs::is_regular( dir_itr->status() ) ) + if ( fs::is_regular_file( dir_itr->status() ) ) { /* Wanted type? */ - std::string fileext( fs::extension( dir_itr->path() )); + std::string fileext = dir_itr->path().extension().string(); bool equals = false; @@ -338,7 +338,7 @@ int main(int argc, char* argv[]) fs::ifstream input( dir_itr->path(), std::ios::in | std::ios::binary | std::ios::ate ); input.rdbuf()->pubsetbuf( inbuffer, BUFFER_SIZE ); - std::string file( dir_itr->path().leaf().string() ); + std::string file = dir_itr->path().filename().string(); if ( input.is_open() ) { diff --git a/xprodeps.md b/xprodeps.md index 37d096b..0e03332 100644 --- a/xprodeps.md +++ b/xprodeps.md @@ -2,10 +2,10 @@ |project|license [^_l]|description [dependencies]|version|source|diff [^_d]| |-------|-------------|--------------------------|-------|------|----------| -|[wxinclude](http://wiki.wxwidgets.org/Embedding_PNG_Images)|[wxWindows](http://wiki.wxwidgets.org/Embedding_PNG_Images 'assumed wxWindows license, since source can be downloaded from wxWiki')|embed resources into cross-platform code [pvt deps: _boost_]| | | [intro]| -|[boost](http://www.boost.org/ 'Boost website')|[BSL-1.0](http://www.boost.org/users/license.html 'Boost Software License')|libraries that give C++ a boost [deps: _bzip2, zlib_]|[xpv1.76.0.5](https://github.com/externpro/boost/releases/tag/xpv1.76.0.5 'release')|[repo](https://github.com/externpro/boost 'github.com/externpro/boost') [upstream](https://github.com/boostorg/boost 'github.com/boostorg/boost')|[diff](https://github.com/externpro/boost/compare/boost-1.76.0...xpv1.76.0.5 'github.com/externpro/boost/compare/boost-1.76.0...xpv1.76.0.5') [native]| -|[bzip2](https://sourceware.org/bzip2/)|[bzip2-1.0.6](https://spdx.org/licenses/bzip2-1.0.6.html 'BSD-like, modified zlib license')|lossless block-sorting data compression library|[xpv1.0.8.4](https://github.com/externpro/bzip2/releases/tag/xpv1.0.8.4 'release')|[repo](https://github.com/externpro/bzip2 'github.com/externpro/bzip2') [upstream](https://github.com/opencor/bzip2 'github.com/opencor/bzip2')|[diff](https://github.com/externpro/bzip2/compare/bzip2-1.0.8...xpv1.0.8.4 'github.com/externpro/bzip2/compare/bzip2-1.0.8...xpv1.0.8.4') [intro]| -|[zlib](https://zlib.net 'zlib website')|[permissive](https://zlib.net/zlib_license.html 'zlib/libpng license, see https://en.wikipedia.org/wiki/Zlib_License')|compression library|[xpv1.3.1.4](https://github.com/externpro/zlib/releases/tag/xpv1.3.1.4 'release')|[repo](https://github.com/externpro/zlib 'github.com/externpro/zlib') [upstream](https://github.com/madler/zlib 'github.com/madler/zlib')|[diff](https://github.com/externpro/zlib/compare/v1.3.1...xpv1.3.1.4 'github.com/externpro/zlib/compare/v1.3.1...xpv1.3.1.4') [patch]| +|[wxInclude](http://wiki.wxwidgets.org/Embedding_PNG_Images)|[wxWindows](http://wiki.wxwidgets.org/Embedding_PNG_Images 'assumed wxWindows license, since source can be downloaded from wxWiki')|embed resources into cross-platform code [pvt deps: _boost_]| | | [intro]| +|[boost](http://www.boost.org/ 'Boost website')|[BSL-1.0](http://www.boost.org/users/license.html 'Boost Software License')|libraries that give C++ a boost [deps: _bzip2, zlib_]|[xpv1.91.0.1](https://github.com/externpro/boost/releases/tag/xpv1.91.0.1 'release')|[repo](https://github.com/externpro/boost 'github.com/externpro/boost') [upstream](https://github.com/boostorg/boost 'github.com/boostorg/boost')|[diff](https://github.com/externpro/boost/compare/boost-1.91.0...xpv1.91.0.1 'github.com/externpro/boost/compare/boost-1.91.0...xpv1.91.0.1') [native]| +|[bzip2](https://sourceware.org/bzip2/)|[bzip2-1.0.6](https://spdx.org/licenses/bzip2-1.0.6.html 'BSD-like, modified zlib license')|lossless block-sorting data compression library|[xpv1.0.8.5](https://github.com/externpro/bzip2/releases/tag/xpv1.0.8.5 'release')|[repo](https://github.com/externpro/bzip2 'github.com/externpro/bzip2') [upstream](https://github.com/opencor/bzip2 'github.com/opencor/bzip2')|[diff](https://github.com/externpro/bzip2/compare/bzip2-1.0.8...xpv1.0.8.5 'github.com/externpro/bzip2/compare/bzip2-1.0.8...xpv1.0.8.5') [intro]| +|[zlib](https://zlib.net/ 'zlib website')|[Zlib](https://zlib.net/zlib_license.html 'zlib/libpng license, see https://en.wikipedia.org/wiki/Zlib_License')|a general-purpose lossless data-compression library|[xpv1.3.2.1](https://github.com/externpro/zlib/releases/tag/xpv1.3.2.1 'release')|[repo](https://github.com/externpro/zlib 'github.com/externpro/zlib') [upstream](https://github.com/madler/zlib 'github.com/madler/zlib')|[diff](https://github.com/externpro/zlib/compare/v1.3.2...xpv1.3.2.1 'github.com/externpro/zlib/compare/v1.3.2...xpv1.3.2.1') [patch]| ![deps](xprodeps.svg 'dependencies') diff --git a/xprodeps.svg b/xprodeps.svg index 9e5a390..96d3c3a 100644 --- a/xprodeps.svg +++ b/xprodeps.svg @@ -8,11 +8,11 @@ viewBox="0.00 0.00 134.00 188.00" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> GG - + -wxinclude +wxInclude -wxinclude +wxInclude @@ -20,9 +20,9 @@ boost - + -wxinclude->boost +wxInclude->boost