diff --git a/Dockerfile.linux b/Dockerfile.linux index 17f2c65..56b2849 100644 --- a/Dockerfile.linux +++ b/Dockerfile.linux @@ -1,4 +1,5 @@ FROM dockcross/linux-x86:latest COPY . /work +RUN chmod +x /work/build.sh RUN cmake . -ENTRYPOINT ["make"] \ No newline at end of file +ENTRYPOINT ["/work/build.sh"] \ No newline at end of file diff --git a/Dockerfile.windows b/Dockerfile.windows index 051bcb7..703450e 100644 --- a/Dockerfile.windows +++ b/Dockerfile.windows @@ -1,4 +1,5 @@ FROM dockcross/windows-static-x86:latest COPY . /work +RUN chmod +x /work/build.sh RUN cmake -DMXE=true . -ENTRYPOINT ["make"] \ No newline at end of file +ENTRYPOINT ["/work/build.sh"] \ No newline at end of file diff --git a/Taskfile.yml b/Taskfile.yml index 1e16ddf..a1c041e 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -1,17 +1,19 @@ -version: '2' +version: "2" tasks: + build: + deps: [build:linux, build:windows] build:linux: cmds: - - rm -rf builds/SKY.so - - mkdir -p builds - - docker build -f Dockerfile.linux -t oscar-broman/sky:linux . - - docker run --volume=$(pwd)/builds:/work/builds oscar-broman/sky:linux + - rm -rf builds/SKY.so + - mkdir -p builds + - docker build -f Dockerfile.linux -t oscar-broman/sky:linux . + - docker run --volume=$(pwd)/builds:/work/builds oscar-broman/sky:linux build:windows: - cmds: - - rm -rf builds/SKY.dll - - mkdir -p builds - - docker build -f Dockerfile.windows -t oscar-broman/sky:windows . - - docker run --volume=$(pwd)/builds:/work/builds oscar-broman/sky:windows \ No newline at end of file + cmds: + - rm -rf builds/SKY.dll + - mkdir -p builds + - docker build -f Dockerfile.windows -t oscar-broman/sky:windows . + - docker run --volume=$(pwd)/builds:/work/builds oscar-broman/sky:windows diff --git a/lib/cmake-modules b/lib/cmake-modules index 368c988..b5ec035 160000 --- a/lib/cmake-modules +++ b/lib/cmake-modules @@ -1 +1 @@ -Subproject commit 368c9886d1f03d0a32e8a7ae418b3bbac5605640 +Subproject commit b5ec035f5c82d15e4b5ae126786fc8b7ae4a14f6 diff --git a/lib/subhook b/lib/subhook index c1c7be3..29cb47e 160000 --- a/lib/subhook +++ b/lib/subhook @@ -1 +1 @@ -Subproject commit c1c7be366e7310001b30ffc3d90a6d6d62fca0a3 +Subproject commit 29cb47ea7674b36cf2b742c11cf2568add1f47fc diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cafc868..0ba1451 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -32,4 +32,19 @@ if(MXE) endif() set_property(TARGET SKY PROPERTY CXX_STANDARD 14) -set_property(TARGET SKY PROPERTY CXX_STANDARD_REQUIRED ON) \ No newline at end of file +set_property(TARGET SKY PROPERTY CXX_STANDARD_REQUIRED ON) + +install(TARGETS SKY DESTINATION "./") + +set(CPACK_PACKAGE_VERSION ${PLUGIN_VERSION}) +set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0) + +if(WIN32) + set(CPACK_GENERATOR ZIP) + set(CPACK_PACKAGE_FILE_NAME "release-windows") +else() + set(CPACK_GENERATOR TGZ) + set(CPACK_PACKAGE_FILE_NAME "release-linux") +endif() + +include(CPack) \ No newline at end of file diff --git a/src/Structs.h b/src/Structs.h index 03a19f4..314163f 100644 --- a/src/Structs.h +++ b/src/Structs.h @@ -31,6 +31,9 @@ */ /* -------------------------------------------------------- */ +#if defined MAX_OBJECTS +#undef MAX_OBJECTS +#endif // Defines from SAMPGDK #define MAX_PLAYER_NAME (24)