From 3d97955d41cbbefe8773430a8921c9c7d0715c01 Mon Sep 17 00:00:00 2001 From: Username404-59 Date: Sun, 31 Mar 2024 19:52:38 +0200 Subject: [PATCH] CMakeLists.txt: Replace the deprecated vercel_pkg with yao_pkg Signed-off-by: Username404 --- CMakeLists.txt | 6 +++--- Jenkinsfile | 4 ++-- resources/package.json | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c424629..2bf96b6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -213,10 +213,10 @@ if (EMSCRIPTEN) configure_file("resources/package.json" "processed/package.json" @ONLY) file(COPY "${CMAKE_CURRENT_BINARY_DIR}/processed/package.json" DESTINATION ".") file(COPY "resources/.npmrc" DESTINATION ".") - add_custom_target(vercel_pkg COMMAND ${NODE_PACKAGE_PROGRAM} install) - add_dependencies(vercel_pkg ${EXENAME}) + add_custom_target(yao_pkg COMMAND ${NODE_PACKAGE_PROGRAM} install) + add_dependencies(yao_pkg ${EXENAME}) # Warning: https://github.com/sbingner/ldid has to be on the PATH, before packaging, for the arm64 macOS executable to work - add_custom_command(TARGET vercel_pkg POST_BUILD COMMAND node_modules/.bin/pkg --config processed/package.json -C Brotli $ --no-bytecode --public-packages "\"*\"" --public --output "${EXENAME}-mac" VERBATIM) + add_custom_command(TARGET yao_pkg POST_BUILD COMMAND node_modules/.bin/pkg --config processed/package.json -C Brotli $ --no-bytecode --public-packages "\"*\"" --public --output "${EXENAME}-mac" VERBATIM) endif() endif() diff --git a/Jenkinsfile b/Jenkinsfile index 265a0f2..142d017 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -14,7 +14,7 @@ boolean use_yarn_or_npm() { return fileExists('/usr/bin/yarn') || fileExists('/u Optional Tools: - Ninja - UPX (d61edc9 or higher) - - Vercel PKG (https://github.com/vercel/pkg) + - Yao PKG (https://github.com/yao-pkg/pkg) - LDID (https://github.com/sbingner/ldid) */ @@ -73,7 +73,7 @@ pipeline { cmakeBuild buildDir: build_directory, buildType: 'release', cleanBuild: true, installation: 'Latest', cmakeArgs: "--no-warn-unused-cli ${use_toolchain ? "-DCMAKE_TOOLCHAIN_FILE=${path}" : "-DCMAKE_SYSTEM_NAME=\"${system_name}\" -DCXX_TARGET=\"${use_toolchain ? 'noarch' : debArch}\" -DCPACK_RPM_PACKAGE_ARCHITECTURE=${rpmArch} -DCPACK_DEBIAN_PACKAGE_ARCHITECTURE=${debArch} -DCMAKE_C_COMPILER=/usr/bin/${path}-gcc -DCMAKE_CXX_COMPILER=/usr/bin/${path}-g++ ${system_name == 'Android' ? "-DCMAKE_SYSTEM_VERSION=21 -DCMAKE_ANDROID_STL_TYPE=c++_static -DCMAKE_CXX_FLAGS=-static-openmp -DCMAKE_ANDROID_NDK=/usr/android-ndk -DCMAKE_ANDROID_ARCH_ABI=${"${TARGET}".substring("${TARGET}".indexOf(' -> ') + 4)}" : "-DCMAKE_SYSTEM_PROCESSOR=${path.substring(0, path.indexOf('-'))}"} -DCMAKE_LINKER=${fileExists("${linker}.gold") ? "${linker}.gold" : linker} -DCMAKE_AR=/usr/bin/${path}-ar -DCMAKE_RC_COMPILER=/usr/bin/${path}-windres -DCMAKE_EXE_LINKER_FLAGS=-static"} -DNO_SELF_PACKER=${!(not_packer_compatible || use_toolchain) ? "OFF" : "ON"} -DIGNORE_MINIMAL_COMPILER_VERSION=ON -DNO_CCACHE=ON -DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON${path.endsWith('armv7-w64-mingw32') ? ' -DCMAKE_INTERPROCEDURAL_OPTIMIZATION_RELEASE=NO' : ''}", generator: cmake_generator() - cmake arguments: "--build ./$build_directory --target ${!("${TARGET}".endsWith('Emscripten.cmake') && use_yarn_or_npm()) ? 'ybcon' : 'vercel_pkg'}", installation: 'Latest' + cmake arguments: "--build ./$build_directory --target ${!("${TARGET}".endsWith('Emscripten.cmake') && use_yarn_or_npm()) ? 'ybcon' : 'yao_pkg'}", installation: 'Latest' } } } diff --git a/resources/package.json b/resources/package.json index c475403..f936267 100644 --- a/resources/package.json +++ b/resources/package.json @@ -2,7 +2,7 @@ "name": "@EXENAME@", "bin": "@EXENAME@.js", "license": "@CPACK_RPM_PACKAGE_LICENSE@", - "devDependencies": { "pkg": "^5.8.0" }, + "devDependencies": { "@yao-pkg/pkg": "^5.9.0" }, "pkg": { "assets": "../@EXENAME@.worker.js", "targets": [