diff --git a/.github/workflows/monkey_linux.yml b/.github/workflows/monkey_linux.yml deleted file mode 100644 index 8037b902b..000000000 --- a/.github/workflows/monkey_linux.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: Monkey (Linux) - -on: - schedule: # execute every 24 hours - - cron: "0 */24 * * *" - -jobs: - build: - strategy: - matrix: - os: [ubuntu-latest] - kind: [static, shared] - - runs-on: ${{ matrix.os }} - - steps: - - uses: actions/checkout@v1 - - uses: xmake-io/github-action-setup-xmake@v1 - with: - xmake-version: branch@master - - - name: Installation - run: | - # TODO we will remove it later - sudo apt-get install -y libgl1-mesa-dev libglu1-mesa-dev p7zip - sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-9 60 - sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 60 - sudo update-alternatives --install /usr/bin/cpp cpp /usr/bin/cpp-9 60 - sudo update-alternatives --set g++ /usr/bin/g++-9 - sudo update-alternatives --set gcc /usr/bin/gcc-9 - sudo update-alternatives --set cpp /usr/bin/cpp-9 - - - name: Tests - run: | - xmake l ./scripts/monkey.lua -D -k ${{ matrix.kind }} - diff --git a/packages/n/nsis/xmake.lua b/packages/n/nsis/xmake.lua new file mode 100644 index 000000000..460ff829a --- /dev/null +++ b/packages/n/nsis/xmake.lua @@ -0,0 +1,43 @@ +package("nsis") + set_kind("binary") + set_homepage("https://nsis.sourceforge.io/") + set_description("NSIS (Nullsoft Scriptable Install System) is a professional open source system to create Windows installers.") + + add_urls("https://github.com/kichik/nsis/archive/refs/tags/$(version).tar.gz", {version = function (version) + return version:gsub("%.", "") + end}) + add_urls("https://github.com/kichik/nsis.git") + + add_versions("v3.09", "4d2ce0d2fecc28bd2d8a0108152339f091e9d1f35342dac0eb4594157435292b") + + add_resources("3.x", "uac", "https://nsis.sourceforge.io/mediawiki/images/8/8f/UAC.zip", "20e3192af5598568887c16d88de59a52c2ce4a26e42c5fb8bee8105dcbbd1760") + + on_load(function (package) + if not package:is_precompiled() then + package:add("deps", "scons") + package:add("deps", "zlib", {system = false, host = true, configs = {shared = true}}) + end + end) + + on_install("@windows|x64", "@windows|x86", function (package) + local zlib_installdir = package:dep("zlib"):installdir() + os.cp(path.join(zlib_installdir, "lib", "zlib.lib"), path.join(package:installdir("lib"), "zdll.lib")) + os.cp(path.join(zlib_installdir, "bin", "zlib.dll"), path.join(package:installdir("bin"), "zlib.dll")) + os.cp(path.join(zlib_installdir, "include", "*.h"), package:installdir("include")) + local arch = package:arch() + if arch == "x64" then + arch = "amd64" + end + local configs = { + "NSIS_MAX_STRLEN=8192", + "TARGET_ARCH=" .. arch, + "PREFIX=" .. package:installdir(), + "ZLIB_W32=" .. package:installdir(), + "install-compiler", "install-stubs"} + import("package.tools.scons").build(package, configs) + os.cp(path.join(package:resourcedir("uac"), "UAC.nsh"), path.join(package:installdir(), "Include")) + end) + + on_test(function (package) + os.runv("makensis", {"/CMDHELP"}) + end) diff --git a/packages/s/scons/xmake.lua b/packages/s/scons/xmake.lua index 0c7cce6d3..18f9b3a36 100644 --- a/packages/s/scons/xmake.lua +++ b/packages/s/scons/xmake.lua @@ -34,7 +34,7 @@ package("scons") end os.vrunv("python", {"setup.py", "install", "--prefix", package:installdir()}) - if package:is_plat("windows") then + if is_host("windows", "msys") then os.mv(package:installdir("Scripts", "*"), package:installdir("bin")) os.rmdir(package:installdir("Scripts")) end