Browse Source

Replaced MakeRelease.bat with PackagedBuild cmake target

release/1.1
Jessica James 3 years ago
parent
commit
52b2fac881
  1. 28
      CMakeLists.txt
  2. 84
      MakeRelease.bat
  3. 0
      baseline/Config.ini
  4. 0
      baseline/Configs/ChannelRelay.ini
  5. 0
      baseline/Configs/HTTPServer.ini
  6. 0
      baseline/Configs/IRC.Core.ini
  7. 0
      baseline/Configs/RenX.Announcements.ini
  8. 0
      baseline/Configs/RenX.Commands.ini
  9. 0
      baseline/Configs/RenX.Core.ini
  10. 0
      baseline/Configs/RenX.ExcessiveHeadshots.ini
  11. 0
      baseline/Configs/RenX.ExtraLogging.ini
  12. 0
      baseline/Configs/RenX.Greetings.ini
  13. 0
      baseline/Configs/RenX.IRCJoin.ini
  14. 0
      baseline/Configs/RenX.Ladder.All-Time.ini
  15. 0
      baseline/Configs/RenX.Ladder.Daily.ini
  16. 0
      baseline/Configs/RenX.Ladder.Monthly.ini
  17. 0
      baseline/Configs/RenX.Ladder.Web.ini
  18. 0
      baseline/Configs/RenX.Ladder.Weekly.ini
  19. 0
      baseline/Configs/RenX.Ladder.Yearly.ini
  20. 0
      baseline/Configs/RenX.Ladder.ini
  21. 0
      baseline/Configs/RenX.Listen.ini
  22. 0
      baseline/Configs/RenX.Logging.ini
  23. 0
      baseline/Configs/RenX.Medals.ini
  24. 0
      baseline/Configs/RenX.MinPlayers.ini
  25. 0
      baseline/Configs/RenX.ModSystem.ini
  26. 0
      baseline/Configs/RenX.Relay.ini
  27. 0
      baseline/Configs/RenX.ServerList.ini
  28. 0
      baseline/Configs/RenX.SetJoin.ini
  29. 0
      baseline/Configs/RenX.Warn.ini
  30. 0
      baseline/Configs/SetJoin.ini
  31. 0
      baseline/RenXGameCommands.ini
  32. 3
      src/CMakeLists.txt
  33. 6
      src/Plugins/CMakeLists.txt
  34. 5
      src/Plugins/RenX/CMakeLists.txt

28
CMakeLists.txt

@ -8,3 +8,31 @@ include(build/CMakeLists.txt)
# Setup source files
add_subdirectory(src)
# Add PackagedBuild target to package a release build
add_custom_target(PackagedBuild)
add_dependencies(PackagedBuild jupiter Bot)
if(NOT DEFINED ${PACKAGED_BUILD_PATH})
set(PACKAGED_BUILD_PATH "${CMAKE_CURRENT_SOURCE_DIR}/bin")
endif()
add_custom_command(TARGET PackagedBuild
PRE_BUILD
COMMAND ${CMAKE_COMMAND} -E rm -rf ${PACKAGED_BUILD_PATH})
add_custom_command(TARGET PackagedBuild
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E make_directory ${PACKAGED_BUILD_PATH}/Plugins/)
add_custom_command(TARGET PackagedBuild
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:jupiter> $<TARGET_FILE:Bot> ${CMAKE_CURRENT_SOURCE_DIR}/LICENSE ${PACKAGED_BUILD_PATH}/)
add_custom_command(TARGET PackagedBuild
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_CURRENT_SOURCE_DIR}/baseline ${PACKAGED_BUILD_PATH}/)
foreach(plugin ${JUPITER_PLUGINS})
add_dependencies(PackagedBuild ${plugin})
add_custom_command(TARGET PackagedBuild
POST_BUILD
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${plugin}> ${PACKAGED_BUILD_PATH}/Plugins/)
endforeach()

84
MakeRelease.bat

@ -1,84 +0,0 @@
@ECHO OFF
if NOT "%1" == "-scr" ECHO Copyright (C) 2014-2017 Jessica James. All rights reserved.
ECHO.
SET Platform=Win32
SET NoArgs=False
SET BinDir=cmake-build-win-release-x64\bin\\
if "%1" == "" SET NoArgs=True
:ParseParams:
if "%1" == "-platform" (
SET Platform=%2
SHIFT /1
GOTO ParseParamsCondition
)
if "%1" == "/?" GOTO Help
if "%1" == "-help" GOTO Help
if "%1" == "--help" GOTO Help
if "%1" == "-clean" GOTO CleanUp
if "%1" == "-binary" GOTO BinaryCopy
if "%1" == "-source" GOTO SourceCopy
:ParseParamsCondition:
SHIFT /1
if NOT "%1" == "" GOTO ParseParams
:EndParseParams:
CALL %0 -scr -platform %Platform% -clean
CALL %0 -scr -platform %Platform% -binary
CALL %0 -scr -platform %Platform% -source
if %NoArgs% == "True" GOTO Done
GOTO EOF
:Help:
ECHO This is a convenience script to assist in build release.
ECHO Usage: %0 [-clean/-binary/-source]
ECHO.
ECHO Clean: Deletes any contents from previous builds.
ECHO Binary: Copies and ZIPS the essential binaries to run the applicaiton.
ECHO Source: Copies and ZIPS the source code to run the application.
ECHO.
ECHO If no parameters are given, then all functions will be executed.
ECHO.
ECHO If a parameter other than "-clean", "-binary", or "-source" is given,
ECHO then the program will execute all functions without pausing at the end.
ECHO.
ECHO Program execution order:
ECHO Clean
ECHO Binary
ECHO Source
ECHO.
ECHO Dependencies:
ECHO COPY, ROBOCOPY, DEL, RMDIR, PAUSE, ECHO, GOTO, IF, CALL
GOTO EOF
:CleanUp:
RMDIR /S /Q "..\Jupiter Bot Binaries"
RMDIR /S /Q "..\Jupiter Bot Source"
DEL /F /Q "..\Jupiter Bot Binaries.zip"
DEL /F /Q "..\Jupiter Bot.zip"
GOTO EOF
:BinaryCopy:
ROBOCOPY "%BinDir%" "..\Jupiter Bot Binaries\\" *.dll *.exe /S /xf Tester.exe
ROBOCOPY "Configs\\" "..\Jupiter Bot Binaries\Configs\\" *
ROBOCOPY ".\\" "..\Jupiter Bot Binaries\\" *.ini *.txt LICENSE
"C:\Program Files\WinRAR\WinRAR.exe" a -r "..\Jupiter Bot Binaries.zip" "..\Jupiter Bot Binaries"
GOTO EOF
:SourceCopy:
ROBOCOPY ".\\" "..\Jupiter Bot Source\\" *.* /S /XD Win32 x64 .*
ROBOCOPY "%BinDir%" "..\Jupiter Bot Source\%BinDir%" *.dll *.exe /S
ROBOCOPY "Configs\\" "..\Jupiter Bot Source\Configs\\" *
ROBOCOPY ".\\" "..\Jupiter Bot Source\\" *.ini *.txt LICENSE
"C:\Program Files\WinRAR\WinRAR.exe" a -r "..\Jupiter Bot.zip" "..\Jupiter Bot Source"
GOTO EOF
:Done:
ECHO Operations complete.
PAUSE
GOTO EOF
:EOF:

0
Config.ini → baseline/Config.ini

0
Configs/ChannelRelay.ini → baseline/Configs/ChannelRelay.ini

0
Configs/HTTPServer.ini → baseline/Configs/HTTPServer.ini

0
Configs/IRC.Core.ini → baseline/Configs/IRC.Core.ini

0
Configs/RenX.Announcements.ini → baseline/Configs/RenX.Announcements.ini

0
Configs/RenX.Commands.ini → baseline/Configs/RenX.Commands.ini

0
Configs/RenX.Core.ini → baseline/Configs/RenX.Core.ini

0
Configs/RenX.ExcessiveHeadshots.ini → baseline/Configs/RenX.ExcessiveHeadshots.ini

0
Configs/RenX.ExtraLogging.ini → baseline/Configs/RenX.ExtraLogging.ini

0
Configs/RenX.Greetings.ini → baseline/Configs/RenX.Greetings.ini

0
Configs/RenX.IRCJoin.ini → baseline/Configs/RenX.IRCJoin.ini

0
Configs/RenX.Ladder.All-Time.ini → baseline/Configs/RenX.Ladder.All-Time.ini

0
Configs/RenX.Ladder.Daily.ini → baseline/Configs/RenX.Ladder.Daily.ini

0
Configs/RenX.Ladder.Monthly.ini → baseline/Configs/RenX.Ladder.Monthly.ini

0
Configs/RenX.Ladder.Web.ini → baseline/Configs/RenX.Ladder.Web.ini

0
Configs/RenX.Ladder.Weekly.ini → baseline/Configs/RenX.Ladder.Weekly.ini

0
Configs/RenX.Ladder.Yearly.ini → baseline/Configs/RenX.Ladder.Yearly.ini

0
Configs/RenX.Ladder.ini → baseline/Configs/RenX.Ladder.ini

0
Configs/RenX.Listen.ini → baseline/Configs/RenX.Listen.ini

0
Configs/RenX.Logging.ini → baseline/Configs/RenX.Logging.ini

0
Configs/RenX.Medals.ini → baseline/Configs/RenX.Medals.ini

0
Configs/RenX.MinPlayers.ini → baseline/Configs/RenX.MinPlayers.ini

0
Configs/RenX.ModSystem.ini → baseline/Configs/RenX.ModSystem.ini

0
Configs/RenX.Relay.ini → baseline/Configs/RenX.Relay.ini

0
Configs/RenX.ServerList.ini → baseline/Configs/RenX.ServerList.ini

0
Configs/RenX.SetJoin.ini → baseline/Configs/RenX.SetJoin.ini

0
Configs/RenX.Warn.ini → baseline/Configs/RenX.Warn.ini

0
Configs/SetJoin.ini → baseline/Configs/SetJoin.ini

0
RenXGameCommands.ini → baseline/RenXGameCommands.ini

3
src/CMakeLists.txt

@ -9,3 +9,6 @@ add_subdirectory(Bot)
# Setup output paths for plugins
add_subdirectory(Plugins)
# Propagate JUPITER_PLUGINS upwards
set(JUPITER_PLUGINS "${JUPITER_PLUGINS}" PARENT_SCOPE)

6
src/Plugins/CMakeLists.txt

@ -4,6 +4,7 @@ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/Plugins)
macro(add_plugin target)
add_library(${target} SHARED ${ARGN})
target_link_libraries(${target} Bot)
set(JUPITER_PLUGINS "${JUPITER_PLUGINS}" "${target}" PARENT_SCOPE)
endmacro(add_plugin)
# Add plugins
@ -17,4 +18,7 @@ add_subdirectory(PluginManager)
add_subdirectory(SetJoin)
# Add RenX plugins
add_subdirectory(RenX)
add_subdirectory(RenX)
# Propagate JUPITER_PLUGINS upwards
set(JUPITER_PLUGINS "${JUPITER_PLUGINS}" PARENT_SCOPE)

5
src/Plugins/RenX/CMakeLists.txt

@ -6,7 +6,7 @@ target_include_directories(RenX.Core PUBLIC
RenX.Core)
macro(add_renx_plugin target)
add_library(${target} SHARED ${ARGN})
add_plugin(${target} ${ARGN})
target_link_libraries(${target} RenX.Core)
endmacro(add_renx_plugin)
@ -40,3 +40,6 @@ add_subdirectory(RenX.Relay)
add_subdirectory(RenX.ServerList)
add_subdirectory(RenX.SetJoin)
add_subdirectory(RenX.Warn)
# Propagate JUPITER_PLUGINS upwards
set(JUPITER_PLUGINS "${JUPITER_PLUGINS}" PARENT_SCOPE)

Loading…
Cancel
Save