diff options
author | Mattes D <github@xoft.cz> | 2019-12-28 12:53:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-28 12:53:37 +0100 |
commit | cc72b204b2bfcf720d6520783290c3fd30a01ea2 (patch) | |
tree | bf0d2f686b4bd45390392788e9e642384fba3d6f | |
parent | WebAdmin improvements (#4433) (diff) | |
download | cuberite-cc72b204b2bfcf720d6520783290c3fd30a01ea2.tar cuberite-cc72b204b2bfcf720d6520783290c3fd30a01ea2.tar.gz cuberite-cc72b204b2bfcf720d6520783290c3fd30a01ea2.tar.bz2 cuberite-cc72b204b2bfcf720d6520783290c3fd30a01ea2.tar.lz cuberite-cc72b204b2bfcf720d6520783290c3fd30a01ea2.tar.xz cuberite-cc72b204b2bfcf720d6520783290c3fd30a01ea2.tar.zst cuberite-cc72b204b2bfcf720d6520783290c3fd30a01ea2.zip |
Diffstat (limited to '')
-rw-r--r-- | .travis.yml | 4 | ||||
-rw-r--r-- | BACKERS (renamed from Server/BACKERS) | 0 | ||||
-rwxr-xr-x | CIbuild.sh | 2 | ||||
-rw-r--r-- | Install/WCVersion.cmd.template | 1 | ||||
-rw-r--r-- | Install/Zip2008.list | 19 | ||||
-rw-r--r-- | Install/Zip2008_PDBs.list | 3 | ||||
-rw-r--r-- | Server/Install/.gitignore (renamed from Install/.gitignore) | 0 | ||||
-rw-r--r-- | Server/Install/Cuberite_high_detail_debug.cmd (renamed from Install/Cuberite_high_detail_debug.cmd) | 0 | ||||
-rw-r--r-- | Server/Install/Cuberite_medium_detail_debug.cmd (renamed from Install/Cuberite_medium_detail_debug.cmd) | 0 | ||||
-rw-r--r-- | Server/Install/PackWindowsExecutables.cmd | 21 | ||||
-rw-r--r-- | Server/Install/ThirdPartyLicenses/LibEvent-LICENSE.txt (renamed from Install/ThirdPartyLicenses/LibEvent-LICENSE.txt) | 0 | ||||
-rw-r--r-- | Server/Install/ThirdPartyLicenses/Lua-LICENSE.txt (renamed from Install/ThirdPartyLicenses/Lua-LICENSE.txt) | 0 | ||||
-rw-r--r-- | Server/Install/ThirdPartyLicenses/LuaExpat-license.html (renamed from Install/ThirdPartyLicenses/LuaExpat-license.html) | 0 | ||||
-rw-r--r-- | Server/Install/ThirdPartyLicenses/LuaSQLite3-LICENSE.txt (renamed from Install/ThirdPartyLicenses/LuaSQLite3-LICENSE.txt) | 0 | ||||
-rw-r--r-- | Server/Install/ThirdPartyLicenses/MersenneTwister-LICENSE.txt (renamed from Install/ThirdPartyLicenses/MersenneTwister-LICENSE.txt) | 0 | ||||
-rw-r--r-- | Server/Install/ThirdPartyLicenses/SQLiteCpp-LICENSE.txt (renamed from Install/ThirdPartyLicenses/SQLiteCpp-LICENSE.txt) | 0 | ||||
-rw-r--r-- | Server/Install/ThirdPartyLicenses/fmt-LICENSE.rst (renamed from Install/ThirdPartyLicenses/fmt-LICENSE.rst) | 0 | ||||
-rw-r--r-- | Server/Install/WindowsExecutables.list | 19 | ||||
-rw-r--r-- | Server/Install/WindowsPDBs.list | 2 | ||||
-rw-r--r-- | appveyor.yml | 68 | ||||
m--------- | lib/lua | 0 | ||||
-rw-r--r-- | src/CMakeLists.txt | 87 |
22 files changed, 143 insertions, 83 deletions
diff --git a/.travis.yml b/.travis.yml index 266077156..742064177 100644 --- a/.travis.yml +++ b/.travis.yml @@ -14,13 +14,13 @@ matrix: packages: - ccache env: &Debug - - TRAVIS_CUBERITE_BUILD_TYPE=DEBUG CUBERITE_PATH=./Cuberite_debug + - TRAVIS_CUBERITE_BUILD_TYPE=DEBUG # AppleClang # OSX workers are slower to start up. Having these first in the build matrix makes travis faster overall. - os: osx compiler: clang env: &Release - - TRAVIS_CUBERITE_BUILD_TYPE=RELEASE CUBERITE_PATH=./Cuberite + - TRAVIS_CUBERITE_BUILD_TYPE=RELEASE - os: osx compiler: clang env: *Debug diff --git a/Server/BACKERS b/BACKERS index cf61dfe94..cf61dfe94 100644 --- a/Server/BACKERS +++ b/BACKERS diff --git a/CIbuild.sh b/CIbuild.sh index 9f2145624..b4163f0a8 100755 --- a/CIbuild.sh +++ b/CIbuild.sh @@ -24,7 +24,7 @@ echo "Testing..." cd Server/; touch apiCheckFailed.flag if [ "$TRAVIS_CUBERITE_BUILD_TYPE" != "COVERAGE" ]; then - ${CUBERITE_PATH} <<- EOF + ./Cuberite <<- EOF load APIDump apicheck restart diff --git a/Install/WCVersion.cmd.template b/Install/WCVersion.cmd.template deleted file mode 100644 index 7c6fac164..000000000 --- a/Install/WCVersion.cmd.template +++ /dev/null @@ -1 +0,0 @@ -set WCREV=$WCREV$
\ No newline at end of file diff --git a/Install/Zip2008.list b/Install/Zip2008.list deleted file mode 100644 index 92c728d52..000000000 --- a/Install/Zip2008.list +++ /dev/null @@ -1,19 +0,0 @@ -..\Server\Cuberite.exe -..\Server\*.dll -..\Server\Plugins -..\Server\Prefabs -..\Server\webadmin -..\Server\BACKERS -..\Server\brewing.txt -..\Server\crafting.txt -..\Server\furnace.txt -..\Server\items.ini -..\Server\monsters.ini -..\Server\buildinfo.txt -..\Server\README.txt -..\Server\favicon.png -..\CONTRIBUTORS -..\LICENSE -Cuberite*debug.cmd -*.example.ini -ThirdPartyLicenses diff --git a/Install/Zip2008_PDBs.list b/Install/Zip2008_PDBs.list deleted file mode 100644 index ca523522e..000000000 --- a/Install/Zip2008_PDBs.list +++ /dev/null @@ -1,3 +0,0 @@ -Server\*.pdb -Server\buildinfo.txt -src\Bindings\Bindings.* diff --git a/Install/.gitignore b/Server/Install/.gitignore index 52c5ca5a9..52c5ca5a9 100644 --- a/Install/.gitignore +++ b/Server/Install/.gitignore diff --git a/Install/Cuberite_high_detail_debug.cmd b/Server/Install/Cuberite_high_detail_debug.cmd index 0880495e3..0880495e3 100644 --- a/Install/Cuberite_high_detail_debug.cmd +++ b/Server/Install/Cuberite_high_detail_debug.cmd diff --git a/Install/Cuberite_medium_detail_debug.cmd b/Server/Install/Cuberite_medium_detail_debug.cmd index 1dcb291a0..1dcb291a0 100644 --- a/Install/Cuberite_medium_detail_debug.cmd +++ b/Server/Install/Cuberite_medium_detail_debug.cmd diff --git a/Server/Install/PackWindowsExecutables.cmd b/Server/Install/PackWindowsExecutables.cmd new file mode 100644 index 000000000..8993ab3ed --- /dev/null +++ b/Server/Install/PackWindowsExecutables.cmd @@ -0,0 +1,21 @@ +@echo off +:: This script is run in the Appveyor CI builds to pack up the artifacts +:: It is expected to be run with the Server folder as the current working dir +@echo on + +del Cuberite.zip +del PDBs.zip +del ManualAPI.zip +del AutoAPI.zip +rd /q /s Plugins\ManualApiDump +7z a -tzip -y Cuberite.zip -scsWIN -i@Install\WindowsExecutables.list -xr!*.git* +7z a -tzip -y PDBs.zip -scsWIN -i@Install/WindowsPDBs.list -xr!*.git* +git clone https://github.com/madmaxoft/ManualApiDump Plugins/ManualApiDump +echo load ManualApiDump 1>cmds.txt +echo manualapi 1>>cmds.txt +echo load APIDump 1>>cmds.txt +echo api 1>>cmds.txt +echo stop 1>>cmds.txt +Cuberite --port 32767 0<cmds.txt +7z a -tzip -y ManualAPI.zip -scsWIN "ManualAPI.lua" +7z a -tzip -y AutoAPI.zip -scsWIN "BindingsDocs\*.lua" -x!_raw.lua diff --git a/Install/ThirdPartyLicenses/LibEvent-LICENSE.txt b/Server/Install/ThirdPartyLicenses/LibEvent-LICENSE.txt index 402ca5089..402ca5089 100644 --- a/Install/ThirdPartyLicenses/LibEvent-LICENSE.txt +++ b/Server/Install/ThirdPartyLicenses/LibEvent-LICENSE.txt diff --git a/Install/ThirdPartyLicenses/Lua-LICENSE.txt b/Server/Install/ThirdPartyLicenses/Lua-LICENSE.txt index 3c6d06fcf..3c6d06fcf 100644 --- a/Install/ThirdPartyLicenses/Lua-LICENSE.txt +++ b/Server/Install/ThirdPartyLicenses/Lua-LICENSE.txt diff --git a/Install/ThirdPartyLicenses/LuaExpat-license.html b/Server/Install/ThirdPartyLicenses/LuaExpat-license.html index bd4a54f9a..bd4a54f9a 100644 --- a/Install/ThirdPartyLicenses/LuaExpat-license.html +++ b/Server/Install/ThirdPartyLicenses/LuaExpat-license.html diff --git a/Install/ThirdPartyLicenses/LuaSQLite3-LICENSE.txt b/Server/Install/ThirdPartyLicenses/LuaSQLite3-LICENSE.txt index cf1014378..cf1014378 100644 --- a/Install/ThirdPartyLicenses/LuaSQLite3-LICENSE.txt +++ b/Server/Install/ThirdPartyLicenses/LuaSQLite3-LICENSE.txt diff --git a/Install/ThirdPartyLicenses/MersenneTwister-LICENSE.txt b/Server/Install/ThirdPartyLicenses/MersenneTwister-LICENSE.txt index 5c7a6ef04..5c7a6ef04 100644 --- a/Install/ThirdPartyLicenses/MersenneTwister-LICENSE.txt +++ b/Server/Install/ThirdPartyLicenses/MersenneTwister-LICENSE.txt diff --git a/Install/ThirdPartyLicenses/SQLiteCpp-LICENSE.txt b/Server/Install/ThirdPartyLicenses/SQLiteCpp-LICENSE.txt index ec952abba..ec952abba 100644 --- a/Install/ThirdPartyLicenses/SQLiteCpp-LICENSE.txt +++ b/Server/Install/ThirdPartyLicenses/SQLiteCpp-LICENSE.txt diff --git a/Install/ThirdPartyLicenses/fmt-LICENSE.rst b/Server/Install/ThirdPartyLicenses/fmt-LICENSE.rst index eb6be6503..eb6be6503 100644 --- a/Install/ThirdPartyLicenses/fmt-LICENSE.rst +++ b/Server/Install/ThirdPartyLicenses/fmt-LICENSE.rst diff --git a/Server/Install/WindowsExecutables.list b/Server/Install/WindowsExecutables.list new file mode 100644 index 000000000..66eeb4175 --- /dev/null +++ b/Server/Install/WindowsExecutables.list @@ -0,0 +1,19 @@ +Cuberite.exe +*.dll +Plugins +Prefabs +webadmin +BACKERS +brewing.txt +crafting.txt +furnace.txt +items.ini +monsters.ini +buildinfo.txt +README.txt +favicon.png +CONTRIBUTORS +LICENSE +Cuberite*debug.cmd +*.example.ini +ThirdPartyLicenses diff --git a/Server/Install/WindowsPDBs.list b/Server/Install/WindowsPDBs.list new file mode 100644 index 000000000..56b161b04 --- /dev/null +++ b/Server/Install/WindowsPDBs.list @@ -0,0 +1,2 @@ +*.pdb +buildinfo.txt diff --git a/appveyor.yml b/appveyor.yml index 2ba248df0..2be646452 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -11,15 +11,15 @@ environment: matrix: - job_name: Windows-x64-debug configuration: Debug - CUBERITE_EXECUTABLE: cuberite_debug + BUILD_DIR: Debug-x64 - job_name: Windows-x86 configuration: Release - CUBERITE_EXECUTABLE: cuberite + BUILD_DIR: Release-x86 - job_name: Windows-x64 configuration: Release - CUBERITE_EXECUTABLE: cuberite + BUILD_DIR: Release-x64 install: - echo %TIME% @@ -35,8 +35,8 @@ for: - job_name: Windows-x64-debug before_build: - - if not exist Debug-x64 mkdir Debug-x64 - - cd Debug-x64 + - if not exist %BUILD_DIR% mkdir %BUILD_DIR% + - cd %BUILD_DIR% - echo %TIME% - cmake -G "Visual Studio 14 2015 Win64" -DSELF_TEST=1 -DBUILD_TOOLS=1 .. - echo %TIME% @@ -56,8 +56,8 @@ for: - job_name: Windows-x86 before_build: - - if not exist Release-x86 mkdir Release-x86 - - cd Release-x86 + - if not exist %BUILD_DIR% mkdir %BUILD_DIR% + - cd %BUILD_DIR% - echo %TIME% - cmake -G "Visual Studio 14 2015" .. - echo %TIME% @@ -77,8 +77,8 @@ for: - job_name: Windows-x64 before_build: - - if not exist Release-x64 mkdir Release-x64 - - cd Release-x64 + - if not exist %BUILD_DIR% mkdir %BUILD_DIR% + - cd %BUILD_DIR% - echo %TIME% - cmake -G "Visual Studio 14 2015 Win64" .. - echo %TIME% @@ -89,44 +89,24 @@ for: parallel: true verbosity: minimal +########################################### +# Cache for speeding up subsequent builds # +########################################### cache: - Debug-x64 - Release-x86 - Release-x64 +##################### +# Package artifacts # +##################### + after_build: -- cd Install -- echo Cuberite %APPVEYOR_JOB_NAME%-#%APPVEYOR_BUILD_NUMBER% 1>..\Server\buildinfo.txt -- 7z a -tzip -y ../Cuberite.zip -scsWIN -i@Zip2008.list -xr!*.git* -- cd .. -- 7z a -tzip -y PDBs.zip -scsWIN -i@Install/Zip2008_PDBs.list -xr!*.git* -- cd Server\plugins -- git clone https://github.com/madmaxoft/ManualApiDump -- cd .. -- echo load ManualApiDump 1>cmds.txt -- echo manualapi 1>>cmds.txt -- echo load APIDump 1>>cmds.txt -- echo api 1>>cmds.txt -- echo stop 1>>cmds.txt -- "%CUBERITE_EXECUTABLE% --port 32767 0<cmds.txt" -- cd .. -- cd src/Bindings/docs -- 7z a -tzip -y ../../../AutoAPI.zip -scsWIN "*.lua" -x!_raw.lua -- cd ..\..\..\Server -- 7z a -tzip -y ../ManualAPI.zip -scsWIN "ManualAPI.lua" - -artifacts: - - path: Cuberite.zip - name: Cuberite - - - path: PDBs.zip - name: PDBs - - - path: AutoAPI.zip - name: AutoAPI - - - path: ManualAPI.zip - name: ManualAPI - - - path: Server\.luacheckrc - name: .luacheckrc +- cd %BUILD_DIR%\Server +- echo Cuberite %APPVEYOR_JOB_NAME%-#%APPVEYOR_BUILD_NUMBER% 1>buildinfo.txt +- Install\PackWindowsExecutables.cmd +- appveyor PushArtifact Cuberite.zip -FileName Cuberite.zip +- appveyor PushArtifact PDBs.zip -FileName PDBs.zip +- appveyor PushArtifact AutoAPI.zip -FileName AutoAPI.zip +- appveyor PushArtifact ManualAPI.zip -FileName ManualAPI.zip +- appveyor PushArtifact .luacheckrc -FileName .luacheckrc diff --git a/lib/lua b/lib/lua -Subproject e28ba276192e2aa68601952ab88760387fa7fd2 +Subproject 4a435929d50870b63bc97174a9e5820e400f93d diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 105f234f1..4358f6bce 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -323,25 +323,84 @@ if (MSVC) endif() + + + add_executable(${CMAKE_PROJECT_NAME} ${SOURCE}) # Output the executable into the $/Server folder, so that it has access to external resources: SET_TARGET_PROPERTIES(${CMAKE_PROJECT_NAME} PROPERTIES - RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/Server - RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_SOURCE_DIR}/Server - RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_SOURCE_DIR}/Server - RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_SOURCE_DIR}/Server - RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_SOURCE_DIR}/Server - RUNTIME_OUTPUT_DIRECTORY_DEBUGPROFILE ${CMAKE_SOURCE_DIR}/Server - RUNTIME_OUTPUT_DIRECTORY_RELEASEPROFILE ${CMAKE_SOURCE_DIR}/Server + RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Server + RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/Server + RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/Server + RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO ${CMAKE_BINARY_DIR}/Server + RUNTIME_OUTPUT_DIRECTORY_MINSIZEREL ${CMAKE_BINARY_DIR}/Server + RUNTIME_OUTPUT_DIRECTORY_DEBUGPROFILE ${CMAKE_BINARY_DIR}/Server + RUNTIME_OUTPUT_DIRECTORY_RELEASEPROFILE ${CMAKE_BINARY_DIR}/Server +) + + + + + +# Create a symbolic link from ${orig} to ${link} +# If ${link} already exists, does nothing. +function(make_symlink orig link) + # Get OS dependent path to use in `execute_process` + message("Creating symlink, orig = ${orig}; link = ${link}") + file(TO_NATIVE_PATH "${orig}" orig) + file(TO_NATIVE_PATH "${link}" link) + + if (NOT EXISTS ${link}) + if (CMAKE_HOST_UNIX) + set(command ln -s ${orig} ${link}) + else() + if (IS_DIRECTORY ${orig}) + set(command cmd.exe /c mklink /j ${link} ${orig}) + else() + set(command cmd.exe /c mklink /h ${link} ${orig}) + endif() + endif() + + execute_process(COMMAND ${command} + RESULT_VARIABLE result + ERROR_VARIABLE output) + + if (NOT ${result} EQUAL 0) + message(FATAL_ERROR "Could not create symbolic link for: ${link} --> ${orig}: ${output}") + endif() + endif() +endfunction(make_symlink) + + + + + +# Populate the output folder with symlinks to the Server folder's internals: +set(symlinks + Install + lang + Plugins + Prefabs + Protocol + webadmin + brewing.txt + crafting.txt + favicon.png + items.ini + monsters.ini ) +message("Creating output folder and symlinks...") +file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/Server") +foreach (symlink ${symlinks}) + make_symlink("${CMAKE_SOURCE_DIR}/Server/${symlink}" "${CMAKE_BINARY_DIR}/Server/${symlink}") +endforeach(symlink) +make_symlink("${CMAKE_SOURCE_DIR}/BACKERS" "${CMAKE_BINARY_DIR}/Server/BACKERS") +make_symlink("${CMAKE_SOURCE_DIR}/CONTRIBUTORS" "${CMAKE_BINARY_DIR}/Server/CONTRIBUTORS") +make_symlink("${CMAKE_SOURCE_DIR}/LICENSE" "${CMAKE_BINARY_DIR}/Server/LICENSE") +make_symlink("${CMAKE_SOURCE_DIR}/Server/Install/ThirdPartyLicenses" "${CMAKE_BINARY_DIR}/Server/ThirdPartyLicenses") -# Make the debug executable have a "_debug" suffix -SET_TARGET_PROPERTIES(${CMAKE_PROJECT_NAME} PROPERTIES DEBUG_POSTFIX "_debug") -# Make the profiled executables have a "_profile" postfix -SET_TARGET_PROPERTIES(${CMAKE_PROJECT_NAME} PROPERTIES DEBUGPROFILE_POSTFIX "_debug_profile") -SET_TARGET_PROPERTIES(${CMAKE_PROJECT_NAME} PROPERTIES RELEASEPROFILE_POSTFIX "_profile") # Precompiled headers (2nd part) @@ -375,9 +434,11 @@ target_link_libraries(${CMAKE_PROJECT_NAME} luaexpat jsoncpp_lib_static mbedtls # Create a folder for Bindings' documentation: FILE(MAKE_DIRECTORY "Bindings/docs") +make_symlink("${CMAKE_SOURCE_DIR}/src/Bindings/docs" "${CMAKE_BINARY_DIR}/Server/BindingsDocs") -# For MSVC, set the startup project to Cuberite: +# For MSVC, set the startup project to Cuberite, and the debugger dir: if (MSVC) set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ${CMAKE_PROJECT_NAME}) + set_target_properties(${CMAKE_PROJECT_NAME} PROPERTIES VS_DEBUGGER_WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/Server") endif() |