CMakeLists.txt: Replace the deprecated vercel_pkg with yao_pkg

Signed-off-by: Username404 <w.iron.zombie@gmail.com>
This commit is contained in:
Username404-59 2024-03-31 19:52:38 +02:00 committed by Username404
parent 5d43854e6d
commit 3d97955d41
Signed by: Username404-59
GPG Key ID: 7AB361FBB257A5D1
3 changed files with 6 additions and 6 deletions

View File

@ -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 $<TARGET_FILE:${EXENAME}> --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 $<TARGET_FILE:${EXENAME}> --no-bytecode --public-packages "\"*\"" --public --output "${EXENAME}-mac" VERBATIM)
endif()
endif()

4
Jenkinsfile vendored
View File

@ -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'
}
}
}

View File

@ -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": [