From af9143355591f85d7fda7682f403b721c1d10bf5 Mon Sep 17 00:00:00 2001 From: Marco Hladik Date: Wed, 2 Jun 2021 10:49:27 +0200 Subject: [PATCH] Destroy the cmake dependency. --- CMakeLists.txt | 284 ------- Makefile | 15 + build_binarydist.sh | 2 - build_contents.txt | 150 ---- cmake/FindGLIB.cmake | 21 - cmake/FindGTK2.cmake | 21 - cmake/FindGTK3.cmake | 21 - cmake/FindGtkGLExt.cmake | 27 - cmake/FindMinizip.cmake | 21 - cmake/FindPango.cmake | 23 - cmake/scripts/package.cmake | 16 - compile_debug.sh | 9 - compile_release.sh | 9 - contrib/CMakeLists.txt | 16 - contrib/Makefile | 8 + contrib/brushexport/CMakeLists.txt | 10 - contrib/brushexport/Makefile | 28 + contrib/brushexport/brushexport.def | 7 - contrib/brushexport/plugin.cpp | 8 +- contrib/prtview/AboutDialog.cpp | 2 +- contrib/prtview/CMakeLists.txt | 13 - contrib/prtview/Makefile | 28 + contrib/prtview/PrtView.def | 7 - contrib/prtview/prtview.cpp | 8 +- contrib/prtview/res/PrtView.rc2 | 13 - include/CMakeLists.txt | 48 -- libs/CMakeLists.txt | 64 -- libs/Makefile | 52 ++ libs/cmdlib/CMakeLists.txt | 3 - libs/cmdlib/Makefile | 20 + libs/container/CMakeLists.txt | 8 - libs/container/Makefile | 21 + libs/ddslib/CMakeLists.txt | 3 - libs/ddslib/Makefile | 20 + libs/debugging/CMakeLists.txt | 3 - libs/debugging/Makefile | 20 + libs/etclib/CMakeLists.txt | 3 - libs/etclib/Makefile | 20 + libs/etclib/etclib.c | 114 +++ libs/etclib/etclib.h | 33 + libs/filematch/CMakeLists.txt | 3 - libs/filematch/Makefile | 20 + libs/filematch/filematch.c | 74 ++ libs/filematch/filematch.h | 16 + libs/generic/CMakeLists.txt | 13 - libs/generic/Makefile | 23 + libs/gtkutil/CMakeLists.txt | 37 - libs/gtkutil/Makefile | 57 ++ libs/l_net/CMakeLists.txt | 14 - libs/l_net/Makefile | 21 + libs/math/CMakeLists.txt | 12 - libs/math/Makefile | 20 + libs/mathlib/CMakeLists.txt | 7 - libs/mathlib/Makefile | 24 + libs/memory/CMakeLists.txt | 3 - libs/memory/Makefile | 20 + libs/modulesystem/CMakeLists.txt | 5 - libs/modulesystem/Makefile | 20 + libs/os/CMakeLists.txt | 10 - libs/os/Makefile | 20 + libs/picomodel/CMakeLists.txt | 27 - libs/picomodel/Makefile | 67 ++ libs/picomodel/{lwo => }/clip.c | 2 +- libs/picomodel/{lwo => }/envelope.c | 2 +- libs/picomodel/{lwo => }/list.c | 2 +- libs/picomodel/{lwo => }/lwio.c | 2 +- libs/picomodel/{lwo => }/lwo2.c | 2 +- libs/picomodel/{lwo => }/lwo2.h | 0 libs/picomodel/{lwo => }/lwob.c | 2 +- libs/picomodel/pm_lwo.c | 2 +- libs/picomodel/{lwo => }/pntspols.c | 2 +- libs/picomodel/{lwo => }/surface.c | 2 +- libs/picomodel/{lwo => }/vecmath.c | 0 libs/picomodel/{lwo => }/vmap.c | 2 +- libs/profile/CMakeLists.txt | 4 - libs/profile/Makefile | 21 + libs/script/CMakeLists.txt | 5 - libs/script/Makefile | 20 + libs/signal/CMakeLists.txt | 5 - libs/signal/Makefile | 20 + libs/splines/CMakeLists.txt | 11 - libs/splines/Makefile | 34 + libs/stream/CMakeLists.txt | 8 - libs/stream/Makefile | 20 + libs/string/CMakeLists.txt | 5 - libs/string/Makefile | 20 + libs/uilib/CMakeLists.txt | 18 - libs/uilib/Makefile | 21 + libs/xml/CMakeLists.txt | 15 - libs/xml/Makefile | 21 + plugins/CMakeLists.txt | 22 - plugins/Makefile | 20 + plugins/archivezip/CMakeLists.txt | 10 - plugins/archivezip/Makefile | 23 + plugins/archivezip/archivezip.def | 7 - plugins/archivezip/plugin.cpp | 8 +- plugins/config.mk | 32 - plugins/entity/CMakeLists.txt | 29 - plugins/entity/Makefile | 44 ++ plugins/entity/entityq3.def | 7 - plugins/entity/plugin.cpp | 8 +- plugins/image/CMakeLists.txt | 13 - plugins/image/Makefile | 30 + plugins/image/image.cpp | 8 +- plugins/image/imageq3.def | 7 - plugins/iqmmodel/CMakeLists.txt | 4 - plugins/iqmmodel/Makefile | 26 + plugins/iqmmodel/modeliqm.def | 7 - plugins/iqmmodel/plugin.cpp | 8 +- plugins/mapq3/CMakeLists.txt | 9 - plugins/mapq3/Makefile | 27 + plugins/mapq3/mapq3.def | 7 - plugins/mapq3/plugin.cpp | 8 +- plugins/model/CMakeLists.txt | 7 - plugins/model/Makefile | 26 + plugins/model/modelpico.def | 7 - plugins/model/plugin.cpp | 9 +- plugins/shaders/CMakeLists.txt | 8 - plugins/shaders/Makefile | 26 + plugins/shaders/plugin.cpp | 8 +- plugins/shaders/shadersq3.def | 7 - plugins/vfspk3/CMakeLists.txt | 12 - plugins/vfspk3/Makefile | 27 + plugins/vfspk3/vfspk3.cpp | 8 +- plugins/vfspk3/vfsq3.def | 7 - radiant/CMakeLists.txt | 133 ---- radiant/Makefile | 209 +++++ radiant/gtkdlgs.cpp | 2 +- radiant/main.cpp | 3 + radiant/map.cpp | 3 +- radiant/qe3.cpp | 1 - resources/Resources/FileIcon_.map.tiff | Bin 9537 -> 0 bytes resources/Resources/Info-gnustep.plist | 16 - resources/Resources/icon.tiff | Bin 9542 -> 0 bytes resources/WorldSpawn | 4 - resources/platform.game/platform/entities.def | 713 ------------------ tools/CMakeLists.txt | 121 --- tools/Makefile | 145 ++++ tools/common/cmdlib.c | 4 +- tools/common/cmdlib.h | 5 - tools/common/imagelib.c | 2 +- tools/common/inout.h | 1 + tools/vmap/brush.c | 2 - tools/vmap/convert_bsp.c | 4 +- tools/vmap/convert_map.c | 2 +- tools/vmap/facebsp.c | 2 +- tools/vmap/light.c | 4 +- tools/vmap/light_ydnar.c | 2 +- tools/vmap/lightmaps_ydnar.c | 2 +- tools/vmap/portals.c | 2 +- tools/vmap/surface_meta.c | 6 +- tools/vmap/tjunction.c | 2 +- tools/vmap/vis.c | 4 +- tools/vmap/vmap.h | 4 +- 154 files changed, 1647 insertions(+), 2247 deletions(-) delete mode 100644 CMakeLists.txt create mode 100644 Makefile delete mode 100755 build_binarydist.sh delete mode 100644 build_contents.txt delete mode 100644 cmake/FindGLIB.cmake delete mode 100644 cmake/FindGTK2.cmake delete mode 100644 cmake/FindGTK3.cmake delete mode 100644 cmake/FindGtkGLExt.cmake delete mode 100644 cmake/FindMinizip.cmake delete mode 100644 cmake/FindPango.cmake delete mode 100644 cmake/scripts/package.cmake delete mode 100755 compile_debug.sh delete mode 100755 compile_release.sh delete mode 100644 contrib/CMakeLists.txt create mode 100644 contrib/Makefile delete mode 100644 contrib/brushexport/CMakeLists.txt create mode 100644 contrib/brushexport/Makefile delete mode 100644 contrib/brushexport/brushexport.def delete mode 100644 contrib/prtview/CMakeLists.txt create mode 100644 contrib/prtview/Makefile delete mode 100644 contrib/prtview/PrtView.def delete mode 100644 contrib/prtview/res/PrtView.rc2 delete mode 100644 include/CMakeLists.txt delete mode 100644 libs/CMakeLists.txt create mode 100644 libs/Makefile delete mode 100644 libs/cmdlib/CMakeLists.txt create mode 100644 libs/cmdlib/Makefile delete mode 100644 libs/container/CMakeLists.txt create mode 100644 libs/container/Makefile delete mode 100644 libs/ddslib/CMakeLists.txt create mode 100644 libs/ddslib/Makefile delete mode 100644 libs/debugging/CMakeLists.txt create mode 100644 libs/debugging/Makefile delete mode 100644 libs/etclib/CMakeLists.txt create mode 100644 libs/etclib/Makefile create mode 100644 libs/etclib/etclib.c create mode 100644 libs/etclib/etclib.h delete mode 100644 libs/filematch/CMakeLists.txt create mode 100644 libs/filematch/Makefile create mode 100644 libs/filematch/filematch.c create mode 100644 libs/filematch/filematch.h delete mode 100644 libs/generic/CMakeLists.txt create mode 100644 libs/generic/Makefile delete mode 100644 libs/gtkutil/CMakeLists.txt create mode 100644 libs/gtkutil/Makefile delete mode 100644 libs/l_net/CMakeLists.txt create mode 100644 libs/l_net/Makefile delete mode 100644 libs/math/CMakeLists.txt create mode 100644 libs/math/Makefile delete mode 100644 libs/mathlib/CMakeLists.txt create mode 100644 libs/mathlib/Makefile delete mode 100644 libs/memory/CMakeLists.txt create mode 100644 libs/memory/Makefile delete mode 100644 libs/modulesystem/CMakeLists.txt create mode 100644 libs/modulesystem/Makefile delete mode 100644 libs/os/CMakeLists.txt create mode 100644 libs/os/Makefile delete mode 100644 libs/picomodel/CMakeLists.txt create mode 100644 libs/picomodel/Makefile rename libs/picomodel/{lwo => }/clip.c (99%) rename libs/picomodel/{lwo => }/envelope.c (99%) rename libs/picomodel/{lwo => }/list.c (98%) rename libs/picomodel/{lwo => }/lwio.c (99%) rename libs/picomodel/{lwo => }/lwo2.c (99%) rename libs/picomodel/{lwo => }/lwo2.h (100%) rename libs/picomodel/{lwo => }/lwob.c (99%) rename libs/picomodel/{lwo => }/pntspols.c (99%) rename libs/picomodel/{lwo => }/surface.c (99%) rename libs/picomodel/{lwo => }/vecmath.c (100%) rename libs/picomodel/{lwo => }/vmap.c (99%) delete mode 100644 libs/profile/CMakeLists.txt create mode 100644 libs/profile/Makefile delete mode 100644 libs/script/CMakeLists.txt create mode 100644 libs/script/Makefile delete mode 100644 libs/signal/CMakeLists.txt create mode 100644 libs/signal/Makefile delete mode 100644 libs/splines/CMakeLists.txt create mode 100644 libs/splines/Makefile delete mode 100644 libs/stream/CMakeLists.txt create mode 100644 libs/stream/Makefile delete mode 100644 libs/string/CMakeLists.txt create mode 100644 libs/string/Makefile delete mode 100644 libs/uilib/CMakeLists.txt create mode 100644 libs/uilib/Makefile delete mode 100644 libs/xml/CMakeLists.txt create mode 100644 libs/xml/Makefile delete mode 100644 plugins/CMakeLists.txt create mode 100644 plugins/Makefile delete mode 100644 plugins/archivezip/CMakeLists.txt create mode 100644 plugins/archivezip/Makefile delete mode 100644 plugins/archivezip/archivezip.def delete mode 100644 plugins/config.mk delete mode 100644 plugins/entity/CMakeLists.txt create mode 100644 plugins/entity/Makefile delete mode 100644 plugins/entity/entityq3.def delete mode 100644 plugins/image/CMakeLists.txt create mode 100644 plugins/image/Makefile delete mode 100644 plugins/image/imageq3.def delete mode 100644 plugins/iqmmodel/CMakeLists.txt create mode 100644 plugins/iqmmodel/Makefile delete mode 100644 plugins/iqmmodel/modeliqm.def delete mode 100644 plugins/mapq3/CMakeLists.txt create mode 100644 plugins/mapq3/Makefile delete mode 100644 plugins/mapq3/mapq3.def delete mode 100644 plugins/model/CMakeLists.txt create mode 100644 plugins/model/Makefile delete mode 100644 plugins/model/modelpico.def delete mode 100644 plugins/shaders/CMakeLists.txt create mode 100644 plugins/shaders/Makefile delete mode 100644 plugins/shaders/shadersq3.def delete mode 100644 plugins/vfspk3/CMakeLists.txt create mode 100644 plugins/vfspk3/Makefile delete mode 100644 plugins/vfspk3/vfsq3.def delete mode 100644 radiant/CMakeLists.txt create mode 100644 radiant/Makefile delete mode 100644 resources/Resources/FileIcon_.map.tiff delete mode 100644 resources/Resources/Info-gnustep.plist delete mode 100644 resources/Resources/icon.tiff delete mode 100755 resources/WorldSpawn delete mode 100644 resources/platform.game/platform/entities.def delete mode 100644 tools/CMakeLists.txt create mode 100644 tools/Makefile diff --git a/CMakeLists.txt b/CMakeLists.txt deleted file mode 100644 index a125605..0000000 --- a/CMakeLists.txt +++ /dev/null @@ -1,284 +0,0 @@ -cmake_minimum_required(VERSION 2.8.12 FATAL_ERROR) -list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_LIST_DIR}/cmake") -project(WorldSpawn C CXX) - -option(BUILD_RADIANT "Build the GUI" ON) -option(BUILD_VMAP "Build the Compiler" ON) - -if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX "${PROJECT_SOURCE_DIR}/install" CACHE PATH "..." FORCE) -endif () - -#----------------------------------------------------------------------- -# Version -#----------------------------------------------------------------------- - -# CMake 3.0+ would allow this in project() -set(WorldSpawn_VERSION_MAJOR 1) -set(WorldSpawn_VERSION_MINOR 1) -set(WorldSpawn_VERSION_PATCH 0) -set(WorldSpawn_VERSION "${WorldSpawn_VERSION_MAJOR}.${WorldSpawn_VERSION_MINOR}.${WorldSpawn_VERSION_PATCH}") - -#SET(CMAKE_C_COMPILER gcc-9) -#SET(CMAKE_CXX_COMPILER g++-9) - -file(WRITE "${PROJECT_BINARY_DIR}/WorldSpawn_MAJOR" ${WorldSpawn_VERSION_MAJOR}) -file(WRITE "${PROJECT_BINARY_DIR}/WorldSpawn_MINOR" ${WorldSpawn_VERSION_MINOR}) -file(WRITE "${PROJECT_BINARY_DIR}/WorldSpawn_PATCH" ${WorldSpawn_VERSION_PATCH}) - -#set(WorldSpawn_ABOUTMSG "Custom build" CACHE STRING "About message") - -find_package(Git REQUIRED) -execute_process( - COMMAND ${GIT_EXECUTABLE} rev-parse --short HEAD - WORKING_DIRECTORY ${PROJECT_SOURCE_DIR} - OUTPUT_VARIABLE GIT_VERSION - OUTPUT_STRIP_TRAILING_WHITESPACE -) -set(WorldSpawn_VERSION_STRING "${WorldSpawn_VERSION}n") -if (GIT_VERSION) - set(WorldSpawn_VERSION_STRING "${WorldSpawn_VERSION_STRING}-git-${GIT_VERSION}") -endif () - -message(STATUS "Building ${PROJECT_NAME} ${WorldSpawn_VERSION_STRING} ${WorldSpawn_ABOUTMSG}") - -#----------------------------------------------------------------------- -# Language standard -#----------------------------------------------------------------------- - -set(CMAKE_CXX_STANDARD 11) -set(CMAKE_CXX_STANDARD_REQUIRED ON) -set(CMAKE_CXX_EXTENSIONS OFF) -if (CMAKE_VERSION VERSION_LESS "3.1") - if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR CMAKE_COMPILER_IS_GNUCXX) - include(CheckCXXCompilerFlag) - check_cxx_compiler_flag(--std=c++${CMAKE_CXX_STANDARD} STD_CXX) - if (STD_CXX) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} --std=c++${CMAKE_CXX_STANDARD}") - else () - message(SEND_ERROR "Requires C++${CMAKE_CXX_STANDARD} or better") - endif () - else () - message(WARNING "Unrecognized compiler: ${CMAKE_CXX_COMPILER_ID}, make sure it supports C++${CMAKE_CXX_STANDARD}") - endif () -endif () - -#----------------------------------------------------------------------- -# Flags -#----------------------------------------------------------------------- - -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-exceptions -fno-rtti") -macro(addflags_c args) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${args}") -endmacro() -macro(addflags_cxx args) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${args}") -endmacro() -macro(addflags args) - addflags_c("${args}") - addflags_cxx("${args}") -endmacro() -addflags("-fno-strict-aliasing") -if (NOT WIN32) - addflags("-fvisibility=hidden") -endif () - -if ("${CMAKE_BUILD_TYPE}" STREQUAL "Debug") - #disabled due to GTK bug addflags("-Werror") - addflags("-pedantic-errors") -endif () - -addflags("-Wall") -addflags("-Wextra") -addflags("-pedantic") - -addflags_c("-Wno-deprecated-declarations") # vfs.c: g_strdown - -addflags("-Wno-unused-function") -addflags("-Wno-unused-variable") -addflags("-Wno-unused-parameter") - -set(CMAKE_POSITION_INDEPENDENT_CODE 1) -set(GTK_TARGET 2 CACHE STRING "GTK target") -add_definitions(-DGTK_TARGET=${GTK_TARGET}) - -#----------------------------------------------------------------------- -# Defs -#----------------------------------------------------------------------- - -add_definitions(-DWorldSpawn_VERSION="${WorldSpawn_VERSION}") -add_definitions(-DWorldSpawn_MAJOR_VERSION="${WorldSpawn_VERSION_MAJOR}") -add_definitions(-DWorldSpawn_MINOR_VERSION="${WorldSpawn_VERSION_MINOR}") -add_definitions(-DWorldSpawn_PATCH_VERSION="${WorldSpawn_VERSION_PATCH}") - -add_definitions(-DWorldSpawn_ABOUTMSG="${WorldSpawn_ABOUT}") - -if (NOT CMAKE_BUILD_TYPE MATCHES Release) - add_definitions(-D_DEBUG=1) -endif () - -macro(disable_deprecated name gtk2only) - add_definitions(-D${name}_DISABLE_SINGLE_INCLUDES) - if ((${gtk2only} EQUAL 0) OR (GTK_TARGET EQUAL 2)) - add_definitions(-D${name}_DISABLE_DEPRECATED) - endif () -endmacro() - -disable_deprecated(ATK 0) -disable_deprecated(G 0) -disable_deprecated(GDK 0) -disable_deprecated(GDK_PIXBUF 0) -disable_deprecated(GTK 1) -disable_deprecated(PANGO 0) - -if (APPLE) - option(XWINDOWS "Build against X11" ON) - add_definitions( - -DPOSIX=1 - ) -elseif (WIN32) - add_definitions( - -DWIN32=1 - -D_WIN32=1 - ) -else () - set(XWINDOWS ON) - add_definitions( - -DPOSIX=1 - ) -endif () - -if (XWINDOWS) - find_package(X11 REQUIRED) - include_directories(${X11_INCLUDE_DIR}) - add_definitions(-DXWINDOWS=1) -endif () - -include_directories("${PROJECT_SOURCE_DIR}/include") -include_directories("${PROJECT_SOURCE_DIR}/libs") - -# For our OpenBSD friends, because CMake isn't smart enough to figure that out? -include_directories("/usr/local/include") -link_directories("/usr/local/lib") -include_directories("/usr/X11R6/include") -link_directories("/usr/X11R6/lib") - -if (WIN32 AND NOT CMAKE_CROSSCOMPILING) - set(BUNDLE_LIBRARIES_DEFAULT ON) -else () - set(BUNDLE_LIBRARIES_DEFAULT OFF) -endif () -option(BUNDLE_LIBRARIES "Bundle libraries" ${BUNDLE_LIBRARIES_DEFAULT}) - -macro(copy_dlls target) - if (BUNDLE_LIBRARIES) - add_custom_command(TARGET ${target} POST_BUILD - COMMAND bash - ARGS -c "ldd '$' | grep -v /c/Windows | awk '{ print $1 }' | while read dll; do cp \"$(which $dll)\" '${PROJECT_BINARY_DIR}'; done" - VERBATIM - ) - endif () -endmacro() - -#----------------------------------------------------------------------- -# Libraries -#----------------------------------------------------------------------- - -add_subdirectory(libs) -add_subdirectory(include) - -#----------------------------------------------------------------------- -# Plugins -#----------------------------------------------------------------------- - -if (BUILD_RADIANT) - add_subdirectory(contrib) -endif () - -#----------------------------------------------------------------------- -# Modules -#----------------------------------------------------------------------- - -if (BUILD_RADIANT) - add_subdirectory(plugins) -endif () - -#----------------------------------------------------------------------- -# Radiant -#----------------------------------------------------------------------- - -if (CMAKE_EXECUTABLE_SUFFIX) - string(REGEX REPLACE "^[.]" "" WorldSpawn_EXECUTABLE ${CMAKE_EXECUTABLE_SUFFIX}) -else () - execute_process( - COMMAND uname -m - OUTPUT_VARIABLE WorldSpawn_EXECUTABLE - OUTPUT_STRIP_TRAILING_WHITESPACE - ) -endif () - -macro(radiant_tool name) - add_executable(${name} ${ARGN}) - install( - TARGETS ${name} - RUNTIME DESTINATION . - ) - if (NOT (CMAKE_EXECUTABLE_SUFFIX STREQUAL ".${WorldSpawn_EXECUTABLE}")) - add_custom_command(TARGET ${name} POST_BUILD - COMMAND ln -f -s "$" "${PROJECT_BINARY_DIR}/${name}.${WorldSpawn_EXECUTABLE}" - VERBATIM - ) - install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink - ${name}${CMAKE_EXECUTABLE_SUFFIX} ${CMAKE_INSTALL_PREFIX}/${name}.${WorldSpawn_EXECUTABLE}) - ") - endif () -endmacro() - -if (BUILD_RADIANT) - add_subdirectory(radiant _radiant) - set_target_properties(worldspawn PROPERTIES - COMPILE_DEFINITIONS WorldSpawn_EXECUTABLE="${WorldSpawn_EXECUTABLE}" - ) -endif () - -#----------------------------------------------------------------------- -# Tools -#----------------------------------------------------------------------- - -if (BUILD_VMAP) - add_subdirectory(tools) -endif () - -file(GLOB DATA_FILES "${PROJECT_SOURCE_DIR}/resources/*") - -if (NOT (PROJECT_SOURCE_DIR STREQUAL PROJECT_BINARY_DIR)) - # Copy data files from sources to the build directory - message(STATUS "Copying data files") - file(COPY ${DATA_FILES} DESTINATION "${PROJECT_BINARY_DIR}") -endif () - -#----------------------------------------------------------------------- -# Install -#----------------------------------------------------------------------- - -install( - FILES - "${PROJECT_BINARY_DIR}/WorldSpawn_MAJOR" - "${PROJECT_BINARY_DIR}/WorldSpawn_MINOR" - "${PROJECT_BINARY_DIR}/WorldSpawn_PATCH" - DESTINATION . -) - -install( - DIRECTORY - resources/ - DESTINATION . -) - -install( - DIRECTORY - DESTINATION . - OPTIONAL -) - -include(cmake/scripts/package.cmake) diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..f708f3f --- /dev/null +++ b/Makefile @@ -0,0 +1,15 @@ +all: + cp -Rv ./resources/ ./build/ + cd libs && $(MAKE) + cd radiant && $(MAKE) + cd plugins && $(MAKE) + cd tools && $(MAKE) + cd contrib && $(MAKE) + +clean: + -rm -rf ./build + cd libs && $(MAKE) clean + cd radiant && $(MAKE) clean + cd plugins && $(MAKE) clean + cd tools && $(MAKE) clean + cd contrib && $(MAKE) clean diff --git a/build_binarydist.sh b/build_binarydist.sh deleted file mode 100755 index f379c63..0000000 --- a/build_binarydist.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -zip worldspawn_bin.zip -@ < build_contents.txt diff --git a/build_contents.txt b/build_contents.txt deleted file mode 100644 index 4596d0d..0000000 --- a/build_contents.txt +++ /dev/null @@ -1,150 +0,0 @@ -WorldSpawn.app -WorldSpawn.app/base -WorldSpawn.app/base/textures -WorldSpawn.app/base/textures/radiant -WorldSpawn.app/base/textures/radiant/notex.png -WorldSpawn.app/base/textures/radiant/shadernotex.png -WorldSpawn.app/bitmaps -WorldSpawn.app/bitmaps/black.png -WorldSpawn.app/bitmaps/brush_flipx.png -WorldSpawn.app/bitmaps/brush_flipy.png -WorldSpawn.app/bitmaps/brush_flipz.png -WorldSpawn.app/bitmaps/brush_rotatex.png -WorldSpawn.app/bitmaps/brush_rotatey.png -WorldSpawn.app/bitmaps/brush_rotatez.png -WorldSpawn.app/bitmaps/cap_bevel.png -WorldSpawn.app/bitmaps/cap_curve.png -WorldSpawn.app/bitmaps/cap_cylinder.png -WorldSpawn.app/bitmaps/cap_endcap.png -WorldSpawn.app/bitmaps/cap_ibevel.png -WorldSpawn.app/bitmaps/cap_iendcap.png -WorldSpawn.app/bitmaps/console.png -WorldSpawn.app/bitmaps/dontselectcurve.png -WorldSpawn.app/bitmaps/dontselectmodel.png -WorldSpawn.app/bitmaps/ellipsis.png -WorldSpawn.app/bitmaps/entities.png -WorldSpawn.app/bitmaps/file_open.png -WorldSpawn.app/bitmaps/file_save.png -WorldSpawn.app/bitmaps/icon.png -WorldSpawn.app/bitmaps/lightinspector.png -WorldSpawn.app/bitmaps/logo.png -WorldSpawn.app/bitmaps/modify_edges.png -WorldSpawn.app/bitmaps/modify_faces.png -WorldSpawn.app/bitmaps/modify_vertices.png -WorldSpawn.app/bitmaps/noFalloff.png -WorldSpawn.app/bitmaps/notex.png -WorldSpawn.app/bitmaps/patch_bend.png -WorldSpawn.app/bitmaps/patch_drilldown.png -WorldSpawn.app/bitmaps/patch_insdel.png -WorldSpawn.app/bitmaps/patch_showboundingbox.png -WorldSpawn.app/bitmaps/patch_weld.png -WorldSpawn.app/bitmaps/patch_wireframe.png -WorldSpawn.app/bitmaps/popup_selection.png -WorldSpawn.app/bitmaps/redo.png -WorldSpawn.app/bitmaps/refresh_models.png -WorldSpawn.app/bitmaps/scalelockx.png -WorldSpawn.app/bitmaps/scalelocky.png -WorldSpawn.app/bitmaps/scalelockz.png -WorldSpawn.app/bitmaps/selection_csgmerge.png -WorldSpawn.app/bitmaps/selection_csgsubtract.png -WorldSpawn.app/bitmaps/selection_makehollow.png -WorldSpawn.app/bitmaps/selection_makeroom.png -WorldSpawn.app/bitmaps/selection_selectcompletetall.png -WorldSpawn.app/bitmaps/selection_selectinside.png -WorldSpawn.app/bitmaps/selection_selectpartialtall.png -WorldSpawn.app/bitmaps/selection_selecttouching.png -WorldSpawn.app/bitmaps/select_mouseresize.png -WorldSpawn.app/bitmaps/select_mouserotate.png -WorldSpawn.app/bitmaps/select_mousescale.png -WorldSpawn.app/bitmaps/select_mousetranslate.png -WorldSpawn.app/bitmaps/shadernotex.png -WorldSpawn.app/bitmaps/show_entities.png -WorldSpawn.app/bitmaps/splash.png -WorldSpawn.app/bitmaps/texture_browser.png -WorldSpawn.app/bitmaps/texture_lock.png -WorldSpawn.app/bitmaps/textures_popup.png -WorldSpawn.app/bitmaps/undo.png -WorldSpawn.app/bitmaps/view_cameratoggle.png -WorldSpawn.app/bitmaps/view_cameraupdate.png -WorldSpawn.app/bitmaps/view_change.png -WorldSpawn.app/bitmaps/view_clipper.png -WorldSpawn.app/bitmaps/view_cubicclipping.png -WorldSpawn.app/bitmaps/view_entity.png -WorldSpawn.app/bitmaps/white.png -WorldSpawn.app/bitmaps/window1.png -WorldSpawn.app/bitmaps/window2.png -WorldSpawn.app/bitmaps/window3.png -WorldSpawn.app/bitmaps/window4.png -WorldSpawn.app/games -WorldSpawn.app/games/tw.game -WorldSpawn.app/gl -WorldSpawn.app/gl/lighting_DBS_omni_fp.glp -WorldSpawn.app/gl/lighting_DBS_omni_fp.glsl -WorldSpawn.app/gl/lighting_DBS_omni_vp.glp -WorldSpawn.app/gl/lighting_DBS_omni_vp.glsl -WorldSpawn.app/gl/lighting_DBS_XY_Z_arbfp1.cg -WorldSpawn.app/gl/lighting_DBS_XY_Z_arbvp1.cg -WorldSpawn.app/gl/utils.cg -WorldSpawn.app/gl/zfill_arbfp1.cg -WorldSpawn.app/gl/zfill_arbvp1.cg -WorldSpawn.app/gl/zfill_fp.glp -WorldSpawn.app/gl/zfill_fp.glsl -WorldSpawn.app/gl/zfill_vp.glp -WorldSpawn.app/gl/zfill_vp.glsl -WorldSpawn.app/global.xlink -WorldSpawn.app/modules -WorldSpawn.app/modules/libarchivezip.so -WorldSpawn.app/modules/libentity.so -WorldSpawn.app/modules/libimage.so -WorldSpawn.app/modules/libiqmmodel.so -WorldSpawn.app/modules/libmapq3.so -WorldSpawn.app/modules/libmodel.so -WorldSpawn.app/modules/libshaders.so -WorldSpawn.app/modules/libvfspk3.so -WorldSpawn.app/plugins -WorldSpawn.app/plugins/bitmaps -WorldSpawn.app/plugins/bitmaps/bobtoolz_caulk.png -WorldSpawn.app/plugins/bitmaps/bobtoolz_cleanup.png -WorldSpawn.app/plugins/bitmaps/bobtoolz_dropent.png -WorldSpawn.app/plugins/bitmaps/bobtoolz_merge.png -WorldSpawn.app/plugins/bitmaps/bobtoolz_poly.png -WorldSpawn.app/plugins/bitmaps/bobtoolz_splitcol.png -WorldSpawn.app/plugins/bitmaps/bobtoolz_split.png -WorldSpawn.app/plugins/bitmaps/bobtoolz_splitrow.png -WorldSpawn.app/plugins/bitmaps/bobtoolz_trainpathplot.png -WorldSpawn.app/plugins/bitmaps/bobtoolz_treeplanter.png -WorldSpawn.app/plugins/bitmaps/bobtoolz_turnedge.png -WorldSpawn.app/plugins/bitmaps/ufoai_actorclip.png -WorldSpawn.app/plugins/bitmaps/ufoai_level1.png -WorldSpawn.app/plugins/bitmaps/ufoai_level2.png -WorldSpawn.app/plugins/bitmaps/ufoai_level3.png -WorldSpawn.app/plugins/bitmaps/ufoai_level4.png -WorldSpawn.app/plugins/bitmaps/ufoai_level5.png -WorldSpawn.app/plugins/bitmaps/ufoai_level6.png -WorldSpawn.app/plugins/bitmaps/ufoai_level7.png -WorldSpawn.app/plugins/bitmaps/ufoai_level8.png -WorldSpawn.app/plugins/bitmaps/ufoai_nodraw.png -WorldSpawn.app/plugins/bitmaps/ufoai_stepon.png -WorldSpawn.app/plugins/bitmaps/ufoai_weaponclip.png -WorldSpawn.app/plugins/bt -WorldSpawn.app/plugins/bt/bt-el1.txt -WorldSpawn.app/plugins/bt/bt-el2.txt -WorldSpawn.app/plugins/bt/door-tex-trim.txt -WorldSpawn.app/plugins/bt/door-tex.txt -WorldSpawn.app/plugins/bt/tp_ent.txt -WorldSpawn.app/plugins/libbobtoolz.so -WorldSpawn.app/plugins/libbrushexport.so -WorldSpawn.app/plugins/libprtview.so -WorldSpawn.app/plugins/libshaderplug.so -WorldSpawn.app/plugins/libsunplug.so -WorldSpawn.app/tw.game -WorldSpawn.app/tw.game/default_build_menu.xml -WorldSpawn.app/tw.game/game.xlink -WorldSpawn.app/tw.game/wastes -WorldSpawn.app/tw.game/wastes/entities.def -WorldSpawn.app/Resources -WorldSpawn.app/Resources/Info-gnustep.plist -WorldSpawn.app/Resources/icon.tiff -WorldSpawn.app/vmap -WorldSpawn.app/worldspawn -WorldSpawn.app/WorldSpawn diff --git a/cmake/FindGLIB.cmake b/cmake/FindGLIB.cmake deleted file mode 100644 index 4b1b265..0000000 --- a/cmake/FindGLIB.cmake +++ /dev/null @@ -1,21 +0,0 @@ -find_package(PkgConfig) -if (PKG_CONFIG_FOUND) - if (GLIB_FIND_REQUIRED) - set(_pkgconfig_REQUIRED REQUIRED) - endif () - pkg_check_modules(GLIB ${_pkgconfig_REQUIRED} glib-2.0) -else () - find_path(GLIB_INCLUDE_DIRS glib.h) - find_library(GLIB_LIBRARIES glib-2.0) - if (GLIB_INCLUDE_DIRS AND GLIB_LIBRARIES) - set(GLIB_FOUND 1) - if (NOT GLIB_FIND_QUIETLY) - message(STATUS "Found GLIB: ${GLIB_LIBRARIES}") - endif () - elseif (GLIB_FIND_REQUIRED) - message(SEND_ERROR "Could not find GLIB") - elseif (NOT GLIB_FIND_QUIETLY) - message(STATUS "Could not find GLIB") - endif () -endif () -mark_as_advanced(GLIB_INCLUDE_DIRS GLIB_LIBRARIES) diff --git a/cmake/FindGTK2.cmake b/cmake/FindGTK2.cmake deleted file mode 100644 index ff20526..0000000 --- a/cmake/FindGTK2.cmake +++ /dev/null @@ -1,21 +0,0 @@ -find_package(PkgConfig) -if (PKG_CONFIG_FOUND) - if (GTK2_FIND_REQUIRED) - set(_pkgconfig_REQUIRED REQUIRED) - endif () - pkg_check_modules(GTK2 ${_pkgconfig_REQUIRED} gtk+-2.0) -else () - find_path(GTK2_INCLUDE_DIRS gtk.h) - # find_library(GTK2_LIBRARIES) - if (GTK2_INCLUDE_DIRS AND GTK2_LIBRARIES) - set(GTK2_FOUND 1) - if (NOT GTK2_FIND_QUIETLY) - message(STATUS "Found GTK2: ${GTK2_LIBRARIES}") - endif () - elseif (GTK2_FIND_REQUIRED) - message(SEND_ERROR "Could not find GTK2") - elseif (NOT GTK2_FIND_QUIETLY) - message(STATUS "Could not find GTK2") - endif () -endif () -mark_as_advanced(GTK2_INCLUDE_DIRS GTK2_LIBRARIES) diff --git a/cmake/FindGTK3.cmake b/cmake/FindGTK3.cmake deleted file mode 100644 index 7bef3b0..0000000 --- a/cmake/FindGTK3.cmake +++ /dev/null @@ -1,21 +0,0 @@ -find_package(PkgConfig) -if (PKG_CONFIG_FOUND) - if (GTK3_FIND_REQUIRED) - set(_pkgconfig_REQUIRED REQUIRED) - endif () - pkg_check_modules(GTK3 ${_pkgconfig_REQUIRED} gtk+-3.0) -else () - find_path(GTK3_INCLUDE_DIRS gtk.h) - # find_library(GTK3_LIBRARIES) - if (GTK3_INCLUDE_DIRS AND GTK3_LIBRARIES) - set(GTK3_FOUND 1) - if (NOT GTK3_FIND_QUIETLY) - message(STATUS "Found GTK3: ${GTK3_LIBRARIES}") - endif () - elseif (GTK3_FIND_REQUIRED) - message(SEND_ERROR "Could not find GTK3") - elseif (NOT GTK3_FIND_QUIETLY) - message(STATUS "Could not find GTK3") - endif () -endif () -mark_as_advanced(GTK3_INCLUDE_DIRS GTK3_LIBRARIES) diff --git a/cmake/FindGtkGLExt.cmake b/cmake/FindGtkGLExt.cmake deleted file mode 100644 index b30a1e1..0000000 --- a/cmake/FindGtkGLExt.cmake +++ /dev/null @@ -1,27 +0,0 @@ -find_package(PkgConfig) -if (PKG_CONFIG_FOUND) - if (GtkGLExt_FIND_REQUIRED) - set(_pkgconfig_REQUIRED REQUIRED) - endif () - if (XWINDOWS) - pkg_check_modules(GtkGLExt ${_pkgconfig_REQUIRED} gtkglext-x11-1.0) - elseif (WIN32) - pkg_check_modules(GtkGLExt ${_pkgconfig_REQUIRED} gtkglext-win32-1.0) - else () - pkg_check_modules(GtkGLExt ${_pkgconfig_REQUIRED} gtkglext-quartz-1.0) - endif () -else () - find_path(GtkGLExt_INCLUDE_DIRS gtkglwidget.h) - # find_library(GtkGLExt_LIBRARIES) - if (GtkGLExt_INCLUDE_DIRS AND GtkGLExt_LIBRARIES) - set(GtkGLExt_FOUND 1) - if (NOT GtkGLExt_FIND_QUIETLY) - message(STATUS "Found GtkGLExt: ${GtkGLExt_LIBRARIES}") - endif () - elseif (GtkGLExt_FIND_REQUIRED) - message(SEND_ERROR "Could not find GtkGLExt") - elseif (NOT GtkGLExt_FIND_QUIETLY) - message(STATUS "Could not find GtkGLExt") - endif () -endif () -mark_as_advanced(GtkGLExt_INCLUDE_DIRS GtkGLExt_LIBRARIES) diff --git a/cmake/FindMinizip.cmake b/cmake/FindMinizip.cmake deleted file mode 100644 index 0de098f..0000000 --- a/cmake/FindMinizip.cmake +++ /dev/null @@ -1,21 +0,0 @@ -find_package(PkgConfig) -if (PKG_CONFIG_FOUND) - if (Minizip_FIND_REQUIRED) - set(_pkgconfig_REQUIRED REQUIRED) - endif () - pkg_check_modules(Minizip ${_pkgconfig_REQUIRED} minizip) -else () - find_path(Minizip_INCLUDE_DIRS unzip.h) - # find_library(Minizip_LIBRARIES) - if (Minizip_INCLUDE_DIRS AND Minizip_LIBRARIES) - set(Minizip_FOUND 1) - if (NOT Minizip_FIND_QUIETLY) - message(STATUS "Found Minizip: ${Minizip_LIBRARIES}") - endif () - elseif (Minizip_FIND_REQUIRED) - message(SEND_ERROR "Could not find Minizip") - elseif (NOT Minizip_FIND_QUIETLY) - message(STATUS "Could not find Minizip") - endif () -endif () -mark_as_advanced(Minizip_INCLUDE_DIRS Minizip_LIBRARIES) diff --git a/cmake/FindPango.cmake b/cmake/FindPango.cmake deleted file mode 100644 index 67359ef..0000000 --- a/cmake/FindPango.cmake +++ /dev/null @@ -1,23 +0,0 @@ -find_package(PkgConfig) -if (PKG_CONFIG_FOUND) - if (Pango_FIND_REQUIRED) - set(_pkgconfig_REQUIRED REQUIRED) - endif () - pkg_search_module(Pango ${_pkgconfig_REQUIRED} pango pangocairo) - pkg_search_module(PangoFT2 ${_pkgconfig_REQUIRED} pangoft2) -else () - # find_path(Pango_INCLUDE_DIRS) - # find_library(Pango_LIBRARIES) - if (Pango_INCLUDE_DIRS AND Pango_LIBRARIES) - set(Pango_FOUND 1) - if (NOT Pango_FIND_QUIETLY) - message(STATUS "Found Pango: ${Pango_LIBRARIES}") - endif () - elseif (Pango_FIND_REQUIRED) - message(SEND_ERROR "Could not find Pango") - elseif (NOT Pango_FIND_QUIETLY) - message(STATUS "Could not find Pango") - endif () -endif () -mark_as_advanced(Pango_INCLUDE_DIRS Pango_LIBRARIES) -mark_as_advanced(PangoFT2_INCLUDE_DIRS PangoFT2_LIBRARIES) diff --git a/cmake/scripts/package.cmake b/cmake/scripts/package.cmake deleted file mode 100644 index 8191297..0000000 --- a/cmake/scripts/package.cmake +++ /dev/null @@ -1,16 +0,0 @@ -set(CPACK_PACKAGE_NAME "WorldSpawn") -set(CPACK_PACKAGE_VERSION_MAJOR "${WorldSpawn_VERSION_MAJOR}") -set(CPACK_PACKAGE_VERSION_MINOR "${WorldSpawn_VERSION_MINOR}") -set(CPACK_PACKAGE_VERSION_PATCH "${WorldSpawn_VERSION_PATCH}") - -# binary: --target package -set(CPACK_GENERATOR "ZIP") -set(CPACK_STRIP_FILES 1) - -# source: --target package_source -set(CPACK_SOURCE_GENERATOR "ZIP") -set(CPACK_SOURCE_IGNORE_FILES "/\\\\.git/;/build/;/install/") - -# configure -include(InstallRequiredSystemLibraries) -include(CPack) diff --git a/compile_debug.sh b/compile_debug.sh deleted file mode 100755 index 119e43c..0000000 --- a/compile_debug.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -if ! [ -x "$(command -v nproc)" ]; then - BUILD_PROC=1 -else - BUILD_PROC=$(nproc) -fi - -cmake -G "Unix Makefiles" -H. -Bbuild -DCMAKE_BUILD_TYPE=Debug && cmake --build build -- -j $BUILD_PROC diff --git a/compile_release.sh b/compile_release.sh deleted file mode 100755 index 0a7f4ab..0000000 --- a/compile_release.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh - -if ! [ -x "$(command -v nproc)" ]; then - BUILD_PROC=1 -else - BUILD_PROC=$(nproc) -fi - -cmake -G "Unix Makefiles" -H. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build -- -j $BUILD_PROC diff --git a/contrib/CMakeLists.txt b/contrib/CMakeLists.txt deleted file mode 100644 index 28e3816..0000000 --- a/contrib/CMakeLists.txt +++ /dev/null @@ -1,16 +0,0 @@ -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/plugins") - -add_custom_target(plugins) -macro(radiant_plugin name) - message(STATUS "Found Plugin ${name}") - add_library(${name} MODULE ${ARGN}) - add_dependencies(plugins ${name}) - copy_dlls(${name}) - install( - TARGETS ${name} - LIBRARY DESTINATION plugins - ) -endmacro() - -add_subdirectory(brushexport) -add_subdirectory(prtview) diff --git a/contrib/Makefile b/contrib/Makefile new file mode 100644 index 0000000..53451a3 --- /dev/null +++ b/contrib/Makefile @@ -0,0 +1,8 @@ +all: + mkdir -p ../build/plugins + cd brushexport && $(MAKE) + cd prtview && $(MAKE) +clean: + -rm -rf ../build/plugins + cd brushexport && $(MAKE) clean + cd prtview && $(MAKE) clean diff --git a/contrib/brushexport/CMakeLists.txt b/contrib/brushexport/CMakeLists.txt deleted file mode 100644 index 578588d..0000000 --- a/contrib/brushexport/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -radiant_plugin(brushexport - callbacks.cpp callbacks.h - export.cpp export.h - interface.cpp - plugin.cpp plugin.h - support.cpp support.h - ) - -target_include_directories(brushexport PRIVATE uilib) -target_link_libraries(brushexport PRIVATE uilib) diff --git a/contrib/brushexport/Makefile b/contrib/brushexport/Makefile new file mode 100644 index 0000000..5fd2642 --- /dev/null +++ b/contrib/brushexport/Makefile @@ -0,0 +1,28 @@ +# WorldSpawn Plugin Makefile + +GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 -DXWINDOWS +GLIB_LDFLAGS=$(shell pkg-config --libs gtk+-2.0) +PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../../include -I../../libs -DPOSIX -fPIC -fvisibility=hidden +PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -shared + +DO_CXX=$(CXX) $(PLUGIN_CFLAGS) $(SHLIBCFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + callbacks.o export.o interface.o plugin.o support.o + +# binary target +../../build/plugins/libbrushexport.so: $(WS_OBJS) + $(CXX) $(PLUGIN_LDFLAGS) -o $@ $(WS_OBJS) ../../libs/libuilib.a ../../libs/libgtkutil.a + +# object files +callbacks.o: callbacks.cpp callbacks.h +export.o: export.cpp export.h +interface.o: interface.cpp +plugin.o: plugin.cpp plugin.h +support.o: support.cpp support.h + +clean: + -rm -f *.o ../../build/plugins/libbrushexport.so diff --git a/contrib/brushexport/brushexport.def b/contrib/brushexport/brushexport.def deleted file mode 100644 index 2174016..0000000 --- a/contrib/brushexport/brushexport.def +++ /dev/null @@ -1,7 +0,0 @@ -; brushexport.def : Declares the module parameters for the DLL. - -LIBRARY "BRUSHEXPORT" - -EXPORTS - ; Explicit exports can go here - Radiant_RegisterModules @1 diff --git a/contrib/brushexport/plugin.cpp b/contrib/brushexport/plugin.cpp index 25bdb51..5d86693 100644 --- a/contrib/brushexport/plugin.cpp +++ b/contrib/brushexport/plugin.cpp @@ -128,7 +128,13 @@ public: typedef SingletonModule SingletonBrushExportModule; SingletonBrushExportModule g_BrushExportModule; -extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules(ModuleServer &server) +extern "C" void +#ifdef _WIN32 +__declspec(dllexport) +#else +__attribute__((visibility("default"))) +#endif +Radiant_RegisterModules(ModuleServer &server) { initialiseModule(server); g_BrushExportModule.selfRegister(); diff --git a/contrib/prtview/AboutDialog.cpp b/contrib/prtview/AboutDialog.cpp index 7042359..88d4ecf 100644 --- a/contrib/prtview/AboutDialog.cpp +++ b/contrib/prtview/AboutDialog.cpp @@ -66,7 +66,7 @@ void DoAboutDlg() char const *label_text = "Version 1.000\n\n" "Gtk port by Leonardo Zide\nleo@lokigames.com\n\n" "Written by Geoffrey DeWan\ngdewan@prairienet.org\n\n" - "Built against WorldSpawn " WorldSpawn_VERSION "\n" + "Built against WorldSpawn\n" __DATE__; auto label = ui::Label(label_text); label.show(); diff --git a/contrib/prtview/CMakeLists.txt b/contrib/prtview/CMakeLists.txt deleted file mode 100644 index f08707f..0000000 --- a/contrib/prtview/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -radiant_plugin(prtview - AboutDialog.cpp AboutDialog.h - ConfigDialog.cpp ConfigDialog.h - LoadPortalFileDialog.cpp LoadPortalFileDialog.h - portals.cpp portals.h - prtview.cpp prtview.h - ) - -target_include_directories(prtview PRIVATE uilib) -target_link_libraries(prtview PRIVATE uilib) - -target_include_directories(prtview PRIVATE profile) -target_link_libraries(prtview PRIVATE profile) diff --git a/contrib/prtview/Makefile b/contrib/prtview/Makefile new file mode 100644 index 0000000..70abb5a --- /dev/null +++ b/contrib/prtview/Makefile @@ -0,0 +1,28 @@ +# WorldSpawn Plugin Makefile + +GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 -DXWINDOWS +GLIB_LDFLAGS=$(shell pkg-config --libs gtk+-2.0) +PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../../include -I../../libs -DPOSIX -fPIC -fvisibility=hidden -DWorldSpawn_VERSION=1 -DWorldSpawn_MAJOR_VERSION=1 -DWorldSpawn_MINOR_VERSION=0 -DWorldSpawn_PATCH_VERSION=0 +PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -shared + +DO_CXX=$(CXX) $(PLUGIN_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + AboutDialog.o ConfigDialog.o LoadPortalFileDialog.o portals.o prtview.o + +# binary target +../../build/plugins/libprtview.so: $(WS_OBJS) + $(CXX) $(PLUGIN_LDFLAGS) -o $@ $(WS_OBJS) ../../libs/libuilib.a ../../libs/libgtkutil.a ../../libs/libprofile.a + +# object files +AboutDialog.o: AboutDialog.cpp AboutDialog.h +ConfigDialog.o: ConfigDialog.cpp ConfigDialog.h +LoadPortalFileDialog.o: LoadPortalFileDialog.cpp LoadPortalFileDialog.h +portals.o: portals.cpp portals.h +prtview.o: prtview.cpp prtview.h + +clean: + -rm -f *.o ../../build/plugins/libprtview.so diff --git a/contrib/prtview/PrtView.def b/contrib/prtview/PrtView.def deleted file mode 100644 index 7c18cf8..0000000 --- a/contrib/prtview/PrtView.def +++ /dev/null @@ -1,7 +0,0 @@ -; PrtView.def : Declares the module parameters for the DLL. - -LIBRARY "PrtView" - -EXPORTS - ; Explicit exports can go here - Radiant_RegisterModules @1 diff --git a/contrib/prtview/prtview.cpp b/contrib/prtview/prtview.cpp index e99b176..3f2be68 100644 --- a/contrib/prtview/prtview.cpp +++ b/contrib/prtview/prtview.cpp @@ -315,7 +315,13 @@ typedef SingletonModule Singleto SingletonPrtViewPluginModule g_PrtViewPluginModule; -extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules(ModuleServer &server) +extern "C" void +#ifdef _WIN32 +__declspec(dllexport) +#else +__attribute__((visibility("default"))) +#endif +Radiant_RegisterModules(ModuleServer &server) { initialiseModule(server); diff --git a/contrib/prtview/res/PrtView.rc2 b/contrib/prtview/res/PrtView.rc2 deleted file mode 100644 index 14acdde..0000000 --- a/contrib/prtview/res/PrtView.rc2 +++ /dev/null @@ -1,13 +0,0 @@ -// -// PRTVIEW.RC2 - resources Microsoft Visual C++ does not edit directly -// - -#ifdef APSTUDIO_INVOKED -#error this file is not editable by Microsoft Visual C++ -#endif //APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// Add manually edited resources here... - -///////////////////////////////////////////////////////////////////////////// diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt deleted file mode 100644 index 40ab793..0000000 --- a/include/CMakeLists.txt +++ /dev/null @@ -1,48 +0,0 @@ -add_library(includes - aboutmsg.h - cullable.h - dpkdeps.h - editable.h - iarchive.h - ibrush.h - icamera.h - idatastream.h - ieclass.h - ientity.h - ifilesystem.h - ifiletypes.h - ifilter.h - igl.h - iglrender.h - igtkgl.h - iimage.h - imap.h - imodel.h - ipatch.h - iplugin.h - ireference.h - irender.h - iscenegraph.h - iscriplib.h - iselection.h - ishaders.h - itexdef.h - itextstream.h - itextures.h - itoolbar.h - iundo.h - mapfile.h - modelskin.h - moduleobserver.h - modulesystem.h - nameable.h - namespace.h - preferencesystem.cpp preferencesystem.h - qerplugin.h - renderable.h - selectable.h - stream_version.h - version.h - warnings.h - windowobserver.h - ) diff --git a/libs/CMakeLists.txt b/libs/CMakeLists.txt deleted file mode 100644 index 9f5f834..0000000 --- a/libs/CMakeLists.txt +++ /dev/null @@ -1,64 +0,0 @@ -add_subdirectory(cmdlib) -add_subdirectory(container) -add_subdirectory(ddslib) -add_subdirectory(debugging) -add_subdirectory(etclib) -add_subdirectory(filematch) -add_subdirectory(generic) -if (BUILD_RADIANT) - add_subdirectory(gtkutil) -endif () -add_subdirectory(l_net) -add_subdirectory(math) -add_subdirectory(mathlib) -add_subdirectory(memory) -add_subdirectory(modulesystem) -add_subdirectory(os) -add_subdirectory(picomodel) -add_subdirectory(profile) -add_subdirectory(script) -add_subdirectory(signal) -add_subdirectory(splines) -add_subdirectory(stream) -add_subdirectory(string) -add_subdirectory(uilib) -add_subdirectory(xml) - -add_library(libs - _.cpp - archivelib.h - bytebool.h - bytestreamutils.h - character.h - convert.h - dragplanes.h - eclasslib.h - entitylib.h - entityxml.h - fs_filesystem.h - fs_path.h - globaldefs.h - imagelib.h - property.h - instancelib.h - maplib.h - moduleobservers.h - pivot.h - render.h - scenelib.h - selectionlib.h - shaderlib.h - str.h - stringio.h - texturelib.h - transformlib.h - traverselib.h - typesystem.h - undolib.h - uniquenames.h - versionlib.h - ) - -find_package(GLIB REQUIRED) -target_include_directories(libs PRIVATE ${GLIB_INCLUDE_DIRS}) -target_link_libraries(libs PRIVATE ${GLIB_LIBRARIES}) diff --git a/libs/Makefile b/libs/Makefile new file mode 100644 index 0000000..3f8f76b --- /dev/null +++ b/libs/Makefile @@ -0,0 +1,52 @@ + +all: + cd cmdlib && $(MAKE) + cd container && $(MAKE) + cd ddslib && $(MAKE) + cd debugging && $(MAKE) + cd etclib && $(MAKE) + cd filematch && $(MAKE) + cd generic && $(MAKE) + cd gtkutil && $(MAKE) + cd l_net && $(MAKE) + cd math && $(MAKE) + cd mathlib && $(MAKE) + #cd md5lib && $(MAKE) + cd memory && $(MAKE) + cd modulesystem && $(MAKE) + cd os && $(MAKE) + cd picomodel && $(MAKE) + cd profile && $(MAKE) + cd script && $(MAKE) + cd signal && $(MAKE) + cd splines && $(MAKE) + cd stream && $(MAKE) + cd string && $(MAKE) + cd uilib && $(MAKE) + cd xml && $(MAKE) + +clean: + cd cmdlib && $(MAKE) clean + cd container && $(MAKE) clean + cd ddslib && $(MAKE) clean + cd debugging && $(MAKE) clean + cd etclib && $(MAKE) clean + cd filematch && $(MAKE) clean + cd generic && $(MAKE) clean + cd gtkutil && $(MAKE) clean + cd l_net && $(MAKE) clean + cd math && $(MAKE) clean + cd mathlib && $(MAKE) clean + #cd md5lib && $(MAKE) clean + cd memory && $(MAKE) clean + cd modulesystem && $(MAKE) clean + cd os && $(MAKE) clean + cd picomodel && $(MAKE) clean + cd profile && $(MAKE) clean + cd script && $(MAKE) clean + cd signal && $(MAKE) clean + cd splines && $(MAKE) clean + cd stream && $(MAKE) clean + cd string && $(MAKE) clean + cd uilib && $(MAKE) clean + cd xml && $(MAKE) clean diff --git a/libs/cmdlib/CMakeLists.txt b/libs/cmdlib/CMakeLists.txt deleted file mode 100644 index 5d25ce8..0000000 --- a/libs/cmdlib/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -add_library(cmdlib - cmdlib.cpp ../cmdlib.h - ) diff --git a/libs/cmdlib/Makefile b/libs/cmdlib/Makefile new file mode 100644 index 0000000..4b747c9 --- /dev/null +++ b/libs/cmdlib/Makefile @@ -0,0 +1,20 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + cmdlib.o + +# binary target +../libcmdlib.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +cmdlib.o: cmdlib.cpp + +clean: + -rm -f *.o ../libcmdlib.a diff --git a/libs/container/CMakeLists.txt b/libs/container/CMakeLists.txt deleted file mode 100644 index 00bfbb4..0000000 --- a/libs/container/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -add_library(container - array.cpp array.h - cache.h - container.h - hashfunc.h - hashtable.cpp hashtable.h - stack.h - ) diff --git a/libs/container/Makefile b/libs/container/Makefile new file mode 100644 index 0000000..f701f29 --- /dev/null +++ b/libs/container/Makefile @@ -0,0 +1,21 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + array.o hashtable.o + +# binary target +../libcontainer.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +array.o: array.cpp array.h cache.h container.h hashfunc.h +hashtable.o: hashtable.cpp hashtable.h stack.h + +clean: + -rm -f *.o ../libcontainer.a diff --git a/libs/ddslib/CMakeLists.txt b/libs/ddslib/CMakeLists.txt deleted file mode 100644 index d4de1a7..0000000 --- a/libs/ddslib/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -add_library(ddslib - ddslib.c ../ddslib.h - ) diff --git a/libs/ddslib/Makefile b/libs/ddslib/Makefile new file mode 100644 index 0000000..c5aa975 --- /dev/null +++ b/libs/ddslib/Makefile @@ -0,0 +1,20 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CC=$(CC) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.c.o: + $(DO_CC) + +WS_OBJS = \ + ddslib.o + +# binary target +../libddslib.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +ddslib.o: ddslib.c + +clean: + -rm -f *.o ../libddslib.a diff --git a/libs/debugging/CMakeLists.txt b/libs/debugging/CMakeLists.txt deleted file mode 100644 index e5880de..0000000 --- a/libs/debugging/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -add_library(debugging - debugging.cpp debugging.h - ) diff --git a/libs/debugging/Makefile b/libs/debugging/Makefile new file mode 100644 index 0000000..b4cecac --- /dev/null +++ b/libs/debugging/Makefile @@ -0,0 +1,20 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + debugging.o + +# binary target +../libdebugging.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +debugging.o: debugging.cpp debugging.h + +clean: + -rm -f *.o ../libdebugging.a diff --git a/libs/etclib/CMakeLists.txt b/libs/etclib/CMakeLists.txt deleted file mode 100644 index 8d8fb23..0000000 --- a/libs/etclib/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -add_library(etclib - ../etclib.c ../etclib.h - ) diff --git a/libs/etclib/Makefile b/libs/etclib/Makefile new file mode 100644 index 0000000..79e55c3 --- /dev/null +++ b/libs/etclib/Makefile @@ -0,0 +1,20 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CC=$(CC) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.c.o: + $(DO_CC) + +WS_OBJS = \ + etclib.o + +# binary target +../libetclib.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +etclib.o: etclib.c etclib.h + +clean: + -rm -f *.o ../libetclib.a diff --git a/libs/etclib/etclib.c b/libs/etclib/etclib.c new file mode 100644 index 0000000..09a149e --- /dev/null +++ b/libs/etclib/etclib.c @@ -0,0 +1,114 @@ +// Copyright 2009 Google Inc. +// +// Based on the code from Android ETC1Util. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#include "etclib.h" + +static void ETC_DecodeETC1SubBlock( byte *out, qboolean outRGBA, int r, int g, int b, int tableIndex, unsigned int low, qboolean second, qboolean flipped ){ + int baseX = 0, baseY = 0; + const int modifierTable[] = { + 2, 8, -2, -8, + 5, 17, -5, -17, + 9, 29, -9, -29, + 13, 42, -13, -42, + 18, 60, -18, -60, + 24, 80, -24, -80, + 33, 106, -33, -106, + 47, 183, -47, -183 + }; + const int *table = modifierTable + tableIndex * 4; + int i; + + if ( second ) { + if ( flipped ) { + baseY = 2; + } + else { + baseX = 2; + } + } + + for ( i = 0; i < 8; i++ ) + { + int x, y, k, delta; + int qr, qg, qb; + byte *q; + + if ( flipped ) { + x = baseX + ( i >> 1 ); + y = baseY + ( i & 1 ); + } + else { + x = baseX + ( i >> 2 ); + y = baseY + ( i & 3 ); + } + k = y + ( x * 4 ); + delta = table[( ( low >> k ) & 1 ) | ( ( low >> ( k + 15 ) ) & 2 )]; + + qr = r + delta; + qg = g + delta; + qb = b + delta; + if ( outRGBA ) { + q = out + 4 * ( x + 4 * y ); + } + else { + q = out + 3 * ( x + 4 * y ); + } + *( q++ ) = ( ( qr > 0 ) ? ( ( qr < 255 ) ? qr : 255 ) : 0 ); + *( q++ ) = ( ( qg > 0 ) ? ( ( qg < 255 ) ? qg : 255 ) : 0 ); + *( q++ ) = ( ( qb > 0 ) ? ( ( qb < 255 ) ? qb : 255 ) : 0 ); + if ( outRGBA ) { + *( q++ ) = 255; + } + } +} + +void ETC_DecodeETC1Block( const byte* in, byte* out, qboolean outRGBA ){ + unsigned int high = ( in[0] << 24 ) | ( in[1] << 16 ) | ( in[2] << 8 ) | in[3]; + unsigned int low = ( in[4] << 24 ) | ( in[5] << 16 ) | ( in[6] << 8 ) | in[7]; + int r1, r2, g1, g2, b1, b2; + qboolean flipped = ( ( high & 1 ) != 0 ); + + if ( high & 2 ) { + int rBase, gBase, bBase; + const int lookup[] = { 0, 1, 2, 3, -4, -3, -2, -1 }; + + rBase = ( high >> 27 ) & 31; + r1 = ( rBase << 3 ) | ( rBase >> 2 ); + rBase = ( rBase + ( lookup[( high >> 24 ) & 7] ) ) & 31; + r2 = ( rBase << 3 ) | ( rBase >> 2 ); + + gBase = ( high >> 19 ) & 31; + g1 = ( gBase << 3 ) | ( gBase >> 2 ); + gBase = ( gBase + ( lookup[( high >> 16 ) & 7] ) ) & 31; + g2 = ( gBase << 3 ) | ( gBase >> 2 ); + + bBase = ( high >> 11 ) & 31; + b1 = ( bBase << 3 ) | ( bBase >> 2 ); + bBase = ( bBase + ( lookup[( high >> 8 ) & 7] ) ) & 31; + b2 = ( bBase << 3 ) | ( bBase >> 2 ); + } + else { + r1 = ( ( high >> 24 ) & 0xf0 ) | ( ( high >> 28 ) & 0xf ); + r2 = ( ( high >> 20 ) & 0xf0 ) | ( ( high >> 24 ) & 0xf ); + g1 = ( ( high >> 16 ) & 0xf0 ) | ( ( high >> 20 ) & 0xf ); + g2 = ( ( high >> 12 ) & 0xf0 ) | ( ( high >> 16 ) & 0xf ); + b1 = ( ( high >> 8 ) & 0xf0 ) | ( ( high >> 12 ) & 0xf ); + b2 = ( ( high >> 4 ) & 0xf0 ) | ( ( high >> 8 ) & 0xf ); + } + + ETC_DecodeETC1SubBlock( out, outRGBA, r1, g1, b1, ( high >> 5 ) & 7, low, qfalse, flipped ); + ETC_DecodeETC1SubBlock( out, outRGBA, r2, g2, b2, ( high >> 2 ) & 7, low, qtrue, flipped ); +} diff --git a/libs/etclib/etclib.h b/libs/etclib/etclib.h new file mode 100644 index 0000000..7d24074 --- /dev/null +++ b/libs/etclib/etclib.h @@ -0,0 +1,33 @@ +// Copyright 2009 Google Inc. +// +// Based on the code from Android ETC1Util. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +#ifndef INCLUDED_ETCLIB_H +#define INCLUDED_ETCLIB_H + +#include "bytebool.h" + +#ifdef __cplusplus +extern "C" +{ +#endif + +void ETC_DecodeETC1Block( const byte* in, byte* out, qboolean outRGBA ); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/libs/filematch/CMakeLists.txt b/libs/filematch/CMakeLists.txt deleted file mode 100644 index c7d8a9e..0000000 --- a/libs/filematch/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -add_library(filematch - ../filematch.c ../filematch.h - ) diff --git a/libs/filematch/Makefile b/libs/filematch/Makefile new file mode 100644 index 0000000..f507520 --- /dev/null +++ b/libs/filematch/Makefile @@ -0,0 +1,20 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CC=$(CC) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.c.o: + $(DO_CC) + +WS_OBJS = \ + filematch.o + +# binary target +../libfilematch.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +filematch.o: filematch.c filematch.h + +clean: + -rm -f *.o ../libfilematch.a diff --git a/libs/filematch/filematch.c b/libs/filematch/filematch.c new file mode 100644 index 0000000..5b01db7 --- /dev/null +++ b/libs/filematch/filematch.c @@ -0,0 +1,74 @@ +#include +#include "filematch.h" + +// LordHavoc: some portable directory listing code I wrote for lmp2pcx, now used in darkplaces to load id1/*.pak and such... + +int matchpattern( const char *in, const char *pattern, int caseinsensitive ){ + return matchpattern_with_separator( in, pattern, caseinsensitive, "/\\:", 0 ); +} + +// wildcard_least_one: if true * matches 1 or more characters +// if false * matches 0 or more characters +int matchpattern_with_separator( const char *in, const char *pattern, int caseinsensitive, const char *separators, int wildcard_least_one ){ + int c1, c2; + while ( *pattern ) + { + switch ( *pattern ) + { + case 0: + return 1; // end of pattern + case '?': // match any single character + if ( *in == 0 || strchr( separators, *in ) ) { + return 0; // no match + } + in++; + pattern++; + break; + case '*': // match anything until following string + if ( wildcard_least_one ) { + if ( *in == 0 || strchr( separators, *in ) ) { + return 0; // no match + } + in++; + } + pattern++; + while ( *in ) + { + if ( strchr( separators, *in ) ) { + break; + } + // see if pattern matches at this offset + if ( matchpattern_with_separator( in, pattern, caseinsensitive, separators, wildcard_least_one ) ) { + return 1; + } + // nope, advance to next offset + in++; + } + break; + default: + if ( *in != *pattern ) { + if ( !caseinsensitive ) { + return 0; // no match + } + c1 = *in; + if ( c1 >= 'A' && c1 <= 'Z' ) { + c1 += 'a' - 'A'; + } + c2 = *pattern; + if ( c2 >= 'A' && c2 <= 'Z' ) { + c2 += 'a' - 'A'; + } + if ( c1 != c2 ) { + return 0; // no match + } + } + in++; + pattern++; + break; + } + } + if ( *in ) { + return 0; // reached end of pattern but not end of input + } + return 1; // success +} diff --git a/libs/filematch/filematch.h b/libs/filematch/filematch.h new file mode 100644 index 0000000..cdb340a --- /dev/null +++ b/libs/filematch/filematch.h @@ -0,0 +1,16 @@ +#if !defined( INCLUDED_FILEMATCH_H ) +#define INCLUDED_FILEMATCH_H + +#ifdef __cplusplus +extern "C" +{ +#endif + +int matchpattern( const char *in, const char *pattern, int caseinsensitive ); +int matchpattern_with_separator( const char *in, const char *pattern, int caseinsensitive, const char *separators, int wildcard_least_one ); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/libs/generic/CMakeLists.txt b/libs/generic/CMakeLists.txt deleted file mode 100644 index d89f574..0000000 --- a/libs/generic/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -add_library(generic - arrayrange.h - bitfield.h - callback.cpp callback.h - constant.cpp constant.h - enumeration.h - functional.h - object.cpp object.h - reference.h - referencecounted.h - static.cpp static.h - vector.h - ) diff --git a/libs/generic/Makefile b/libs/generic/Makefile new file mode 100644 index 0000000..3dca823 --- /dev/null +++ b/libs/generic/Makefile @@ -0,0 +1,23 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + callback.o constant.o object.o static.o + +# binary target +../libgeneric.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +callback.o: callback.cpp callback.h +constant.o: constant.cpp constant.h +object.o: object.cpp object.h +static.o: static.cpp static.h + +clean: + -rm -f *.o ../libgeneric.a diff --git a/libs/gtkutil/CMakeLists.txt b/libs/gtkutil/CMakeLists.txt deleted file mode 100644 index b62098c..0000000 --- a/libs/gtkutil/CMakeLists.txt +++ /dev/null @@ -1,37 +0,0 @@ -add_library(gtkutil - accelerator.cpp accelerator.h - button.cpp button.h - clipboard.cpp clipboard.h - closure.h - container.h - cursor.cpp cursor.h - dialog.cpp dialog.h - entry.cpp entry.h - filechooser.cpp filechooser.h - frame.cpp frame.h - glfont.cpp glfont.h - glwidget.cpp glwidget.h - idledraw.h - image.cpp image.h - menu.cpp menu.h - messagebox.cpp messagebox.h - nonmodal.cpp nonmodal.h - paned.cpp paned.h - pointer.h - toolbar.cpp toolbar.h - widget.cpp widget.h - window.cpp window.h - xorrectangle.cpp xorrectangle.h - ) - -target_include_directories(gtkutil PRIVATE uilib) -target_link_libraries(gtkutil PRIVATE uilib) - -target_include_directories(gtkutil PRIVATE ${GTK${GTK_TARGET}_INCLUDE_DIRS}) -target_link_libraries(gtkutil PRIVATE ${GTK${GTK_TARGET}_LIBRARIES}) - -if (GTK_TARGET EQUAL 2) - find_package(GtkGLExt REQUIRED) - target_include_directories(gtkutil PRIVATE ${GtkGLExt_INCLUDE_DIRS}) - target_link_libraries(gtkutil PRIVATE ${GtkGLExt_LIBRARIES}) -endif () diff --git a/libs/gtkutil/Makefile b/libs/gtkutil/Makefile new file mode 100644 index 0000000..c4bb142 --- /dev/null +++ b/libs/gtkutil/Makefile @@ -0,0 +1,57 @@ +# WorldSpawn Makefile + +GTK_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) +LIB_CFLAGS=$(CFLAGS) $(GTK_CFLAGS) -I../../include -I/usr/include/gtkglext-1.0 -I/usr/lib64/gtkglext-1.0/include/ -I../../libs -DGTK_TARGET=2 -DPOSIX -DXWINDOWS +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ +accelerator.o \ +button.o \ +clipboard.o \ +cursor.o \ +dialog.o \ +entry.o \ +filechooser.o \ +frame.o \ +glfont.o \ +glwidget.o \ +image.o \ +menu.o \ +messagebox.o \ +nonmodal.o \ +paned.o \ +toolbar.o \ +widget.o \ +window.o \ +xorrectangle.o \ + +# binary target +../libgtkutil.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +accelerator.o: accelerator.cpp accelerator.h +button.o: button.cpp button.h +clipboard.o: clipboard.cpp clipboard.h +cursor.o: cursor.cpp cursor.h +dialog.o: dialog.cpp dialog.h +entry.o: entry.cpp entry.h +filechooser.o: filechooser.cpp filechooser.h +frame.o: frame.cpp frame.h +glfont.o: glfont.cpp glfont.h +glwidget.o: glwidget.cpp glwidget.h +image.o: image.cpp image.h +menu.o: menu.cpp menu.h +messagebox.o: messagebox.cpp messagebox.h +nonmodal.o: nonmodal.cpp nonmodal.h +paned.o: paned.cpp paned.h +toolbar.o: toolbar.cpp toolbar.h +widget.o: widget.cpp widget.h +window.o: window.cpp window.h +xorrectangle.o: xorrectangle.cpp xorrectangle.h + +clean: + -rm -f *.o ../libgtkutil.a diff --git a/libs/l_net/CMakeLists.txt b/libs/l_net/CMakeLists.txt deleted file mode 100644 index a0a19a8..0000000 --- a/libs/l_net/CMakeLists.txt +++ /dev/null @@ -1,14 +0,0 @@ -set(L_NETLIST - l_net.c l_net.h - ) -if (WIN32) - list(APPEND L_NETLIST l_net_wins.c l_net_wins.h) -else () - list(APPEND L_NETLIST l_net_berkley.c) -endif () - -add_library(l_net ${L_NETLIST}) - -if (WIN32) - target_link_libraries(l_net PRIVATE ws2_32) -endif () diff --git a/libs/l_net/Makefile b/libs/l_net/Makefile new file mode 100644 index 0000000..71c9382 --- /dev/null +++ b/libs/l_net/Makefile @@ -0,0 +1,21 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CC=$(CC) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.c.o: + $(DO_CC) + +WS_OBJS = \ + l_net.o l_net_berkley.o + +# binary target +../libl_net.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +l_net.o: l_net.c l_net.h +l_net_berkley.o: l_net_berkley.c + +clean: + -rm -f *.o ../libl_net.a diff --git a/libs/math/CMakeLists.txt b/libs/math/CMakeLists.txt deleted file mode 100644 index 6cfedbe..0000000 --- a/libs/math/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -add_library(math - _.cpp - aabb.h - curve.h - frustum.h - line.h - matrix.h - pi.h - plane.h - quaternion.h - vector.h - ) diff --git a/libs/math/Makefile b/libs/math/Makefile new file mode 100644 index 0000000..9a17352 --- /dev/null +++ b/libs/math/Makefile @@ -0,0 +1,20 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ +_.o + +# binary target +../libmath.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +_.o: _.cpp aabb.h curve.h frustum.h line.h matrix.h pi.h plane.h quaternion.h vector.h + +clean: + -rm -f *.o ../libmath.a diff --git a/libs/mathlib/CMakeLists.txt b/libs/mathlib/CMakeLists.txt deleted file mode 100644 index 5682a5e..0000000 --- a/libs/mathlib/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -add_library(mathlib - bbox.c - line.c - m4x4.c - mathlib.c ../mathlib.h - ray.c - ) diff --git a/libs/mathlib/Makefile b/libs/mathlib/Makefile new file mode 100644 index 0000000..2e48089 --- /dev/null +++ b/libs/mathlib/Makefile @@ -0,0 +1,24 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CC=$(CC) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.c.o: + $(DO_CC) + +WS_OBJS = \ + bbox.o line.o m4x4.o mathlib.o ray.o + +# binary target +../libmathlib.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +bbox.o: bbox.c +line.o: line.c +m4x4.o: m4x4.c +mathlib.o: mathlib.c ../mathlib.h +ray.o: ray.c + +clean: + -rm -f *.o ../libmathlib.a diff --git a/libs/memory/CMakeLists.txt b/libs/memory/CMakeLists.txt deleted file mode 100644 index 1c34573..0000000 --- a/libs/memory/CMakeLists.txt +++ /dev/null @@ -1,3 +0,0 @@ -add_library(memory - allocator.cpp allocator.h - ) diff --git a/libs/memory/Makefile b/libs/memory/Makefile new file mode 100644 index 0000000..51888ab --- /dev/null +++ b/libs/memory/Makefile @@ -0,0 +1,20 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + allocator.o + +# binary target +../libmemory.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +allocator.o: allocator.cpp allocator.h + +clean: + -rm -f *.o ../libmemory.a diff --git a/libs/modulesystem/CMakeLists.txt b/libs/modulesystem/CMakeLists.txt deleted file mode 100644 index d27aa63..0000000 --- a/libs/modulesystem/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -add_library(modulesystem - moduleregistry.h - modulesmap.h - singletonmodule.cpp singletonmodule.h - ) diff --git a/libs/modulesystem/Makefile b/libs/modulesystem/Makefile new file mode 100644 index 0000000..25a5e73 --- /dev/null +++ b/libs/modulesystem/Makefile @@ -0,0 +1,20 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + singletonmodule.o + +# binary target +../libmodulesystem.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +singletonmodule.o: singletonmodule.cpp singletonmodule.h moduleregistry.h modulesmap.h + +clean: + -rm -f *.o ../libmodulesystem.a diff --git a/libs/os/CMakeLists.txt b/libs/os/CMakeLists.txt deleted file mode 100644 index 437b506..0000000 --- a/libs/os/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -add_library(os - _.cpp - dir.h - file.h - path.h - ) - -find_package(GLIB REQUIRED) -target_include_directories(os PRIVATE ${GLIB_INCLUDE_DIRS}) -target_link_libraries(os PRIVATE ${GLIB_LIBRARIES}) diff --git a/libs/os/Makefile b/libs/os/Makefile new file mode 100644 index 0000000..8fbdb8e --- /dev/null +++ b/libs/os/Makefile @@ -0,0 +1,20 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ +_.o + +# binary target +../libos.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +_.o: _.cpp dir.h file.h path.h + +clean: + -rm -f *.o ../libos.a diff --git a/libs/picomodel/CMakeLists.txt b/libs/picomodel/CMakeLists.txt deleted file mode 100644 index b2e8ccc..0000000 --- a/libs/picomodel/CMakeLists.txt +++ /dev/null @@ -1,27 +0,0 @@ -add_library(picomodel - lwo/clip.c - lwo/envelope.c - lwo/list.c - lwo/lwio.c - lwo/lwo2.c lwo/lwo2.h - lwo/lwob.c - lwo/pntspols.c - lwo/surface.c - lwo/vecmath.c - lwo/vmap.c - - picointernal.c picointernal.h - picomodel.c ../picomodel.h - picomodules.c - pm_3ds.c - pm_ase.c - pm_fm.c pm_fm.h - pm_lwo.c - pm_md2.c - pm_md3.c - pm_mdc.c - pm_ms3d.c - pm_obj.c - pm_terrain.c - pm_iqm.c - ) diff --git a/libs/picomodel/Makefile b/libs/picomodel/Makefile new file mode 100644 index 0000000..89b782d --- /dev/null +++ b/libs/picomodel/Makefile @@ -0,0 +1,67 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CC=$(CC) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.c.o: + $(DO_CC) + +WS_OBJS = \ + clip.o \ + envelope.o \ + list.o \ + lwio.o \ + lwo2.o \ + lwob.o \ + pntspols.o \ + surface.o \ + vecmath.o \ + vmap.o \ + picointernal.o \ + picomodel.o \ + picomodules.o \ + pm_3ds.o \ + pm_ase.o \ + pm_fm.o \ + pm_lwo.o \ + pm_md2.o \ + pm_md3.o \ + pm_mdc.o \ + pm_ms3d.o \ + pm_obj.o \ + pm_terrain.o \ + pm_iqm.o + +# binary target +../libpicomodel.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +clip.o: clip.c +envelope.o: envelope.c +list.o: list.c +lwio.o: lwio.c +lwo2.o: lwo2.c lwo2.h +lwob.o: lwob.c +pntspols.o: pntspols.c +surface.o: surface.c +vecmath.o: vecmath.c +vmap.o: vmap.c + +picointernal.o: picointernal.c picointernal.h +picomodel.o: picomodel.c ../picomodel.h +picomodules.o: picomodules.c +pm_3ds.o: pm_3ds.c +pm_ase.o: pm_ase.c +pm_fm.o: pm_fm.c pm_fm.h +pm_lwo.o: pm_lwo.c +pm_md2.o: pm_md2.c +pm_md3.o: pm_md3.c +pm_mdc.o: pm_mdc.c +pm_ms3d.o: pm_ms3d.c +pm_obj.o: pm_obj.c +pm_terrain.o: pm_terrain.c +pm_iqm.o: pm_iqm.c + +clean: + -rm -f *.o ../libpicomodel.a diff --git a/libs/picomodel/lwo/clip.c b/libs/picomodel/clip.c similarity index 99% rename from libs/picomodel/lwo/clip.c rename to libs/picomodel/clip.c index 6a347f5..8995dd0 100644 --- a/libs/picomodel/lwo/clip.c +++ b/libs/picomodel/clip.c @@ -7,7 +7,7 @@ Ernie Wright 17 Sep 00 ====================================================================== */ -#include "../picointernal.h" +#include "picointernal.h" #include "lwo2.h" diff --git a/libs/picomodel/lwo/envelope.c b/libs/picomodel/envelope.c similarity index 99% rename from libs/picomodel/lwo/envelope.c rename to libs/picomodel/envelope.c index 27992d4..c4120d3 100644 --- a/libs/picomodel/lwo/envelope.c +++ b/libs/picomodel/envelope.c @@ -7,7 +7,7 @@ Ernie Wright 16 Nov 00 ====================================================================== */ -#include "../picointernal.h" +#include "picointernal.h" #include "lwo2.h" /* diff --git a/libs/picomodel/lwo/list.c b/libs/picomodel/list.c similarity index 98% rename from libs/picomodel/lwo/list.c rename to libs/picomodel/list.c index d57547d..097c0af 100644 --- a/libs/picomodel/lwo/list.c +++ b/libs/picomodel/list.c @@ -7,7 +7,7 @@ Ernie Wright 17 Sep 00 ====================================================================== */ -#include "../picointernal.h" +#include "picointernal.h" #include "lwo2.h" diff --git a/libs/picomodel/lwo/lwio.c b/libs/picomodel/lwio.c similarity index 99% rename from libs/picomodel/lwo/lwio.c rename to libs/picomodel/lwio.c index e825a34..aff47e5 100644 --- a/libs/picomodel/lwo/lwio.c +++ b/libs/picomodel/lwio.c @@ -7,7 +7,7 @@ Ernie Wright 17 Sep 00 ====================================================================== */ -#include "../picointernal.h" +#include "picointernal.h" #include "lwo2.h" #include #include "globaldefs.h" diff --git a/libs/picomodel/lwo/lwo2.c b/libs/picomodel/lwo2.c similarity index 99% rename from libs/picomodel/lwo/lwo2.c rename to libs/picomodel/lwo2.c index fd367e4..58b1f8f 100644 --- a/libs/picomodel/lwo/lwo2.c +++ b/libs/picomodel/lwo2.c @@ -7,7 +7,7 @@ Ernie Wright 17 Sep 00 ====================================================================== */ -#include "../picointernal.h" +#include "picointernal.h" #include "lwo2.h" #include "globaldefs.h" diff --git a/libs/picomodel/lwo/lwo2.h b/libs/picomodel/lwo2.h similarity index 100% rename from libs/picomodel/lwo/lwo2.h rename to libs/picomodel/lwo2.h diff --git a/libs/picomodel/lwo/lwob.c b/libs/picomodel/lwob.c similarity index 99% rename from libs/picomodel/lwo/lwob.c rename to libs/picomodel/lwob.c index cae5357..6cad84f 100644 --- a/libs/picomodel/lwo/lwob.c +++ b/libs/picomodel/lwob.c @@ -8,7 +8,7 @@ Ernie Wright 17 Sep 00 ====================================================================== */ -#include "../picointernal.h" +#include "picointernal.h" #include "lwo2.h" #include "globaldefs.h" diff --git a/libs/picomodel/pm_lwo.c b/libs/picomodel/pm_lwo.c index 6cbf0f4..e9ab02b 100644 --- a/libs/picomodel/pm_lwo.c +++ b/libs/picomodel/pm_lwo.c @@ -34,7 +34,7 @@ /* dependencies */ #include "picointernal.h" -#include "lwo/lwo2.h" +#include "lwo2.h" /* uncomment when debugging this module */ /*#define DEBUG_PM_LWO*/ diff --git a/libs/picomodel/lwo/pntspols.c b/libs/picomodel/pntspols.c similarity index 99% rename from libs/picomodel/lwo/pntspols.c rename to libs/picomodel/pntspols.c index fc2f642..52c81b0 100644 --- a/libs/picomodel/lwo/pntspols.c +++ b/libs/picomodel/pntspols.c @@ -7,7 +7,7 @@ Ernie Wright 17 Sep 00 ====================================================================== */ -#include "../picointernal.h" +#include "picointernal.h" #include "lwo2.h" diff --git a/libs/picomodel/lwo/surface.c b/libs/picomodel/surface.c similarity index 99% rename from libs/picomodel/lwo/surface.c rename to libs/picomodel/surface.c index 1b2c1fc..f2200b5 100644 --- a/libs/picomodel/lwo/surface.c +++ b/libs/picomodel/surface.c @@ -7,7 +7,7 @@ Ernie Wright 17 Sep 00 ====================================================================== */ -#include "../picointernal.h" +#include "picointernal.h" #include "lwo2.h" diff --git a/libs/picomodel/lwo/vecmath.c b/libs/picomodel/vecmath.c similarity index 100% rename from libs/picomodel/lwo/vecmath.c rename to libs/picomodel/vecmath.c diff --git a/libs/picomodel/lwo/vmap.c b/libs/picomodel/vmap.c similarity index 99% rename from libs/picomodel/lwo/vmap.c rename to libs/picomodel/vmap.c index 8976572..96a7123 100644 --- a/libs/picomodel/lwo/vmap.c +++ b/libs/picomodel/vmap.c @@ -7,7 +7,7 @@ Ernie Wright 17 Sep 00 ====================================================================== */ -#include "../picointernal.h" +#include "picointernal.h" #include "lwo2.h" diff --git a/libs/profile/CMakeLists.txt b/libs/profile/CMakeLists.txt deleted file mode 100644 index e3822f4..0000000 --- a/libs/profile/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -add_library(profile - file.cpp file.h - profile.cpp profile.h - ) diff --git a/libs/profile/Makefile b/libs/profile/Makefile new file mode 100644 index 0000000..a6c7091 --- /dev/null +++ b/libs/profile/Makefile @@ -0,0 +1,21 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + file.o profile.o + +# binary target +../libprofile.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +file.o: file.cpp file.h +profile.o: profile.cpp profile.h + +clean: + -rm -f *.o ../libprofile.a diff --git a/libs/script/CMakeLists.txt b/libs/script/CMakeLists.txt deleted file mode 100644 index 6e49527..0000000 --- a/libs/script/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -add_library(script - _.cpp - scripttokeniser.h - scripttokenwriter.h - ) diff --git a/libs/script/Makefile b/libs/script/Makefile new file mode 100644 index 0000000..36b5337 --- /dev/null +++ b/libs/script/Makefile @@ -0,0 +1,20 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ +_.o + +# binary target +../libscript.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +_.o: _.cpp scripttokeniser.h scripttokenwriter.h + +clean: + -rm -f *.o ../libscript.a diff --git a/libs/signal/CMakeLists.txt b/libs/signal/CMakeLists.txt deleted file mode 100644 index 499a483..0000000 --- a/libs/signal/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -add_library(signal - isignal.h - signal.cpp signal.h - signalfwd.h - ) diff --git a/libs/signal/Makefile b/libs/signal/Makefile new file mode 100644 index 0000000..d84fbd9 --- /dev/null +++ b/libs/signal/Makefile @@ -0,0 +1,20 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + signal.o + +# binary target +../libsignal.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +signal.o: signal.cpp isignal.h signal.h signalfwd.h + +clean: + -rm -f *.o ../libsignal.a diff --git a/libs/splines/CMakeLists.txt b/libs/splines/CMakeLists.txt deleted file mode 100644 index 3a6b603..0000000 --- a/libs/splines/CMakeLists.txt +++ /dev/null @@ -1,11 +0,0 @@ -add_library(splines - math_angles.cpp math_angles.h - math_matrix.cpp math_matrix.h - math_quaternion.cpp math_quaternion.h - math_vector.cpp math_vector.h - q_parse.cpp - q_shared.cpp q_shared.h - splines.cpp splines.h - util_list.h - util_str.cpp util_str.h - ) diff --git a/libs/splines/Makefile b/libs/splines/Makefile new file mode 100644 index 0000000..a1beebd --- /dev/null +++ b/libs/splines/Makefile @@ -0,0 +1,34 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + math_angles.o \ + math_matrix.o \ + math_quaternion.o \ + math_vector.o \ + q_parse.o \ + q_shared.o \ + splines.o \ + util_str.o + +# binary target +../libsplines.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +math_angles.o: math_angles.cpp math_angles.h +math_matrix.o: math_matrix.cpp math_matrix.h +math_quaternion.o: math_quaternion.cpp math_quaternion.h +math_vector.o: math_vector.cpp math_vector.h +q_parse.o: q_parse.cpp +q_shared.o: q_shared.cpp q_shared.h +splines.o: splines.cpp splines.h +util_str.o: util_str.cpp util_str.h util_list.h + +clean: + -rm -f *.o ../libsplines.a diff --git a/libs/stream/CMakeLists.txt b/libs/stream/CMakeLists.txt deleted file mode 100644 index 6ce7939..0000000 --- a/libs/stream/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -add_library(stream - _.cpp - filestream.h - memstream.h - stringstream.h - textfilestream.h - textstream.h - ) diff --git a/libs/stream/Makefile b/libs/stream/Makefile new file mode 100644 index 0000000..b717df9 --- /dev/null +++ b/libs/stream/Makefile @@ -0,0 +1,20 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + _.o + +# binary target +../libstream.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +_.o: _.cpp filestream.h memstream.h stringstream.h textfilestream.h textstream.h + +clean: + -rm -f *.o ../libstream.a diff --git a/libs/string/CMakeLists.txt b/libs/string/CMakeLists.txt deleted file mode 100644 index 4b0720a..0000000 --- a/libs/string/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -add_library(string - pooledstring.cpp pooledstring.h - string.h - stringfwd.h - ) diff --git a/libs/string/Makefile b/libs/string/Makefile new file mode 100644 index 0000000..a426bda --- /dev/null +++ b/libs/string/Makefile @@ -0,0 +1,20 @@ +# WorldSpawn Makefile + +LIB_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + pooledstring.o + +# binary target +../libstring.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +pooledstring.o: pooledstring.cpp pooledstring.h string.h stringfwd.h + +clean: + -rm -f *.o ../libstring.a diff --git a/libs/uilib/CMakeLists.txt b/libs/uilib/CMakeLists.txt deleted file mode 100644 index 080376b..0000000 --- a/libs/uilib/CMakeLists.txt +++ /dev/null @@ -1,18 +0,0 @@ -add_library(uilib - uilib.cpp - ) - -find_package(GLIB REQUIRED) -target_include_directories(uilib PUBLIC ${GLIB_INCLUDE_DIRS}) -target_link_libraries(uilib PUBLIC ${GLIB_LIBRARIES}) - -find_package(Pango REQUIRED) -target_include_directories(uilib PUBLIC ${Pango_INCLUDE_DIRS} ${PangoFT2_INCLUDE_DIRS}) -target_link_libraries(uilib PUBLIC ${Pango_LIBRARIES} ${PangoFT2_LIBRARIES}) - -find_package(GTK${GTK_TARGET} REQUIRED) -target_include_directories(uilib PUBLIC ${GTK${GTK_TARGET}_INCLUDE_DIRS}) -target_link_libraries(uilib PUBLIC ${GTK${GTK_TARGET}_LIBRARIES}) - -target_include_directories(uilib PUBLIC gtkutil) -target_link_libraries(uilib PUBLIC gtkutil) diff --git a/libs/uilib/Makefile b/libs/uilib/Makefile new file mode 100644 index 0000000..6925190 --- /dev/null +++ b/libs/uilib/Makefile @@ -0,0 +1,21 @@ +# WorldSpawn Makefile + +GTK_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) +LIB_CFLAGS=$(CFLAGS) $(GTK_CFLAGS) -I../../include -I../../libs -DGTK_TARGET=2 -DPOSIX -DXWINDOWS +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + uilib.o + +# binary target +../libuilib.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +uilib.o: uilib.cpp uilib.h + +clean: + -rm -f *.o ../libuilib.a diff --git a/libs/xml/CMakeLists.txt b/libs/xml/CMakeLists.txt deleted file mode 100644 index 96e1e21..0000000 --- a/libs/xml/CMakeLists.txt +++ /dev/null @@ -1,15 +0,0 @@ -add_library(xmllib - ixml.h - xmlelement.h - xmlparser.h - xmltextags.cpp xmltextags.h - xmlwriter.h - ) - -find_package(GLIB REQUIRED) -target_include_directories(xmllib PUBLIC ${GLIB_INCLUDE_DIRS}) -target_link_libraries(xmllib PUBLIC ${GLIB_LIBRARIES}) - -find_package(LibXml2 REQUIRED) -target_include_directories(xmllib PUBLIC ${LIBXML2_INCLUDE_DIR}) -target_link_libraries(xmllib PUBLIC ${LIBXML2_LIBRARIES}) diff --git a/libs/xml/Makefile b/libs/xml/Makefile new file mode 100644 index 0000000..de02b0a --- /dev/null +++ b/libs/xml/Makefile @@ -0,0 +1,21 @@ +# WorldSpawn Makefile + +GTK_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) +LIB_CFLAGS=$(CFLAGS) $(GTK_CFLAGS) -I../../include -I../../libs -DGTK_TARGET=2 -DPOSIX -DXWINDOWS +DO_CXX=$(CXX) -static -fPIC $(LIB_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + xmltextags.o + +# binary target +../libxmllib.a: $(WS_OBJS) + ar rcs $@ $(WS_OBJS) + +# object files +xmltextags.o: ixml.h xmlelement.h xmlparser.h xmltextags.cpp xmltextags.h xmlwriter.h + +clean: + -rm -f *.o ../libxmllib.a diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt deleted file mode 100644 index 4efde2a..0000000 --- a/plugins/CMakeLists.txt +++ /dev/null @@ -1,22 +0,0 @@ -set(CMAKE_LIBRARY_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}/modules") - -add_custom_target(modules) -macro(radiant_plugin name) - message(STATUS "Found Module ${name}") - add_library(${name} MODULE ${ARGN}) - add_dependencies(modules ${name}) - copy_dlls(${name}) - install( - TARGETS ${name} - LIBRARY DESTINATION modules - ) -endmacro() - -add_subdirectory(archivezip) -add_subdirectory(entity) -add_subdirectory(image) -add_subdirectory(mapq3) -add_subdirectory(iqmmodel) -add_subdirectory(model) -add_subdirectory(shaders) -add_subdirectory(vfspk3) diff --git a/plugins/Makefile b/plugins/Makefile new file mode 100644 index 0000000..fd93e87 --- /dev/null +++ b/plugins/Makefile @@ -0,0 +1,20 @@ +all: + mkdir -p ../build/plugins + cd archivezip && $(MAKE) + cd entity && $(MAKE) + cd image && $(MAKE) + cd iqmmodel && $(MAKE) + cd mapq3 && $(MAKE) + cd model && $(MAKE) + cd shaders && $(MAKE) + cd vfspk3 && $(MAKE) +clean: + -rm -rf ../build/plugins + cd archivezip && $(MAKE) clean + cd entity && $(MAKE) clean + cd image && $(MAKE) clean + cd iqmmodel && $(MAKE) clean + cd mapq3 && $(MAKE) clean + cd model && $(MAKE) clean + cd shaders && $(MAKE) clean + cd vfspk3 && $(MAKE) clean diff --git a/plugins/archivezip/CMakeLists.txt b/plugins/archivezip/CMakeLists.txt deleted file mode 100644 index 7ed025d..0000000 --- a/plugins/archivezip/CMakeLists.txt +++ /dev/null @@ -1,10 +0,0 @@ -radiant_plugin(archivezip - archive.cpp archive.h - pkzip.h - plugin.cpp - zlibstream.h - ) - -find_package(ZLIB REQUIRED) -target_include_directories(archivezip PRIVATE ${ZLIB_INCLUDE_DIRS}) -target_link_libraries(archivezip PRIVATE ${ZLIB_LIBRARIES}) diff --git a/plugins/archivezip/Makefile b/plugins/archivezip/Makefile new file mode 100644 index 0000000..a28797b --- /dev/null +++ b/plugins/archivezip/Makefile @@ -0,0 +1,23 @@ +# WorldSpawn Plugin Makefile + +PLUGIN_CFLAGS=$(CFLAGS) -I../../include -I../../libs -DPOSIX -fPIC -fvisibility=hidden +PLUGIN_LDFLAGS=$(LDFLAGS) -shared + +DO_CXX=$(CXX) $(PLUGIN_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + archive.o plugin.o + +# binary target +../../build/plugins/libarchivezip.so: $(WS_OBJS) + $(CXX) $(PLUGIN_LDFLAGS) -o $@ $(WS_OBJS) + +# object files +archive.o: archive.cpp archive.h +plugin.o: plugin.cpp zlibstream.h + +clean: + -rm -f *.o ../../build/plugins/libarchivezip.so diff --git a/plugins/archivezip/archivezip.def b/plugins/archivezip/archivezip.def deleted file mode 100644 index 82b0c81..0000000 --- a/plugins/archivezip/archivezip.def +++ /dev/null @@ -1,7 +0,0 @@ -; archivezip.def : Declares the module parameters for the DLL. - -LIBRARY "ARCHIVEZIP" - -EXPORTS - ; Explicit exports can go here - Radiant_RegisterModules @1 diff --git a/plugins/archivezip/plugin.cpp b/plugins/archivezip/plugin.cpp index eda88c3..eda4b41 100644 --- a/plugins/archivezip/plugin.cpp +++ b/plugins/archivezip/plugin.cpp @@ -96,7 +96,13 @@ typedef SingletonModule ArchiveDPKModule; ArchiveDPKModule g_ArchiveDPKModule; -extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules(ModuleServer &server) +extern "C" void +#ifdef _WIN32 +__declspec(dllexport) +#else +__attribute__((visibility("default"))) +#endif +Radiant_RegisterModules(ModuleServer &server) { initialiseModule(server); diff --git a/plugins/config.mk b/plugins/config.mk deleted file mode 100644 index 8b97a39..0000000 --- a/plugins/config.mk +++ /dev/null @@ -1,32 +0,0 @@ -# Common configuration options for all plugins - -CC=gcc -CXX=g++ -CFLAGS+=`gtk-config --cflags` -Wall -g -I../../include -CPPFLAGS+=`gtk-config --cflags` -Wall -g -I../../include -LDFLAGS+=`gtk-config --libs` -shared -OUTDIR=$(RADIANT_DATA)plugins -OBJS := $(patsubst %.cpp,%.o,$(filter %.cpp,$(SRC))) -OBJS += $(patsubst %.c,%.o,$(filter %.c,$(SRC))) - -all: $(OUTPUT) - -$(OUTPUT): $(OBJS) - $(CXX) -o $(OUTPUT) $(OBJS) $(LDFLAGS) - @if [ -d $(OUTDIR) ]; then cp $(OUTPUT) $(OUTDIR); fi - -## Other targets -.PHONY: clean - -clean: - rm -f *.o *.d $(OUTPUT) core - -## Dependencies --include $(OBJS:.o=.d) - -%.d: %.cpp - @echo -n "$(@) " > $@ - @if { !(eval $(CXX) -MM $(CPPFLAGS) -w $<) >> $@; }; then \ - rm -f $@; exit 1; \ - fi - @[ -s $@ ] || rm -f $@ diff --git a/plugins/entity/CMakeLists.txt b/plugins/entity/CMakeLists.txt deleted file mode 100644 index bd99916..0000000 --- a/plugins/entity/CMakeLists.txt +++ /dev/null @@ -1,29 +0,0 @@ -radiant_plugin(entity - angle.h - angles.h - colour.h - curve.h - eclassmodel.cpp eclassmodel.h - entity.cpp entity.h - filters.cpp filters.h - generic.cpp generic.h - group.cpp group.h - keyobservers.h - light.cpp light.h - miscmodel.cpp miscmodel.h - prop_dynamic.cpp prop_dynamic.h - model.h - modelskinkey.h - namedentity.h - namekeys.h - origin.h - plugin.cpp - rotation.h - scale.h - skincache.cpp skincache.h - targetable.cpp targetable.h - ) - -target_include_directories(entity - PRIVATE $ - ) diff --git a/plugins/entity/Makefile b/plugins/entity/Makefile new file mode 100644 index 0000000..6d908c2 --- /dev/null +++ b/plugins/entity/Makefile @@ -0,0 +1,44 @@ +# WorldSpawn Makefile + +GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 -DXWINDOWS +GLIB_LDFLAGS=$(shell pkg-config --libs gtk+-2.0) +PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../../include -I../../libs -DPOSIX -fPIC -fvisibility=hidden +PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -shared + +DO_CXX=$(CXX) $(PLUGIN_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + eclassmodel.o \ + entity.o \ + filters.o \ + generic.o \ + group.o \ + light.o \ + miscmodel.o \ + prop_dynamic.o \ + plugin.o \ + skincache.o \ + targetable.o + +# binary target +../../build/plugins/libentity.so: $(WS_OBJS) + $(CXX) $(PLUGIN_LDFLAGS) -o $@ $(WS_OBJS) + +# object files +eclassmodel.o: eclassmodel.cpp eclassmodel.h +entity.o: entity.cpp entity.h +filters.o: filters.cpp filters.h +generic.o: generic.cpp generic.h +group.o: group.cpp group.h +light.o: light.cpp light.h +miscmodel.o: miscmodel.cpp miscmodel.h +prop_dynamic.o: prop_dynamic.cpp prop_dynamic.h +plugin.o: plugin.cpp +skincache.o: skincache.cpp skincache.h +targetable.o: targetable.cpp targetable.h + +clean: + -rm -f *.o ../../build/plugins/libentity.so diff --git a/plugins/entity/entityq3.def b/plugins/entity/entityq3.def deleted file mode 100644 index 00d82f4..0000000 --- a/plugins/entity/entityq3.def +++ /dev/null @@ -1,7 +0,0 @@ -; entityq3.def : Declares the module parameters for the DLL. - -LIBRARY "ENTITYQ3" - -EXPORTS - ; Explicit exports can go here - Radiant_RegisterModules @1 diff --git a/plugins/entity/plugin.cpp b/plugins/entity/plugin.cpp index 5dc0a05..eecac6a 100644 --- a/plugins/entity/plugin.cpp +++ b/plugins/entity/plugin.cpp @@ -87,7 +87,13 @@ typedef SingletonModule EntityQ3Module; EntityQ3Module g_EntityQ3Module; -extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules(ModuleServer &server) +extern "C" void +#ifdef _WIN32 +__declspec(dllexport) +#else +__attribute__((visibility("default"))) +#endif +Radiant_RegisterModules(ModuleServer &server) { initialiseModule(server); diff --git a/plugins/image/CMakeLists.txt b/plugins/image/CMakeLists.txt deleted file mode 100644 index e1f40cc..0000000 --- a/plugins/image/CMakeLists.txt +++ /dev/null @@ -1,13 +0,0 @@ -radiant_plugin(image - bmp.cpp bmp.h - dds.cpp dds.h - image.cpp - jpeg.cpp jpeg.h - ktx.cpp ktx.h - pcx.cpp pcx.h - tga.cpp tga.h - ) - -find_package(JPEG REQUIRED) -target_include_directories(image PRIVATE ${JPEG_INCLUDE_DIR}) -target_link_libraries(image PRIVATE ddslib etclib ${JPEG_LIBRARIES}) diff --git a/plugins/image/Makefile b/plugins/image/Makefile new file mode 100644 index 0000000..acb27b9 --- /dev/null +++ b/plugins/image/Makefile @@ -0,0 +1,30 @@ +# WorldSpawn Makefile + +GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 -DXWINDOWS +GLIB_LDFLAGS=$(shell pkg-config --libs gtk+-2.0) +PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../../include -I../../libs -DPOSIX -fPIC -fvisibility=hidden +PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -shared -ljpeg + +DO_CXX=$(CXX) $(PLUGIN_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + bmp.o dds.o image.o jpeg.o ktx.o pcx.o tga.o + +# binary target +../../build/plugins/libimage.so: $(WS_OBJS) + $(CXX) $(PLUGIN_LDFLAGS) -o $@ $(WS_OBJS) ../../libs/libddslib.a ../../libs/libetclib.a + +# object files +bmp.o: bmp.cpp bmp.h +dds.o: dds.cpp dds.h +image.o: image.cpp +jpeg.o: jpeg.cpp jpeg.h +ktx.o: ktx.cpp ktx.h +pcx.o: pcx.cpp pcx.h +tga.o: tga.cpp tga.h + +clean: + -rm -f *.o ../../build/plugins/libimage.so diff --git a/plugins/image/image.cpp b/plugins/image/image.cpp index f7f7352..54cd606 100644 --- a/plugins/image/image.cpp +++ b/plugins/image/image.cpp @@ -173,7 +173,13 @@ typedef SingletonModule ImageKTXModule; ImageKTXModule g_ImageKTXModule; -extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules(ModuleServer &server) +extern "C" void +#ifdef _WIN32 +__declspec(dllexport) +#else +__attribute__((visibility("default"))) +#endif +Radiant_RegisterModules(ModuleServer &server) { initialiseModule(server); diff --git a/plugins/image/imageq3.def b/plugins/image/imageq3.def deleted file mode 100644 index e8c608f..0000000 --- a/plugins/image/imageq3.def +++ /dev/null @@ -1,7 +0,0 @@ -; imageq3.def : Declares the module parameters for the DLL. - -LIBRARY "ImageQ3" - -EXPORTS - ; Explicit exports can go here - Radiant_RegisterModules @1 diff --git a/plugins/iqmmodel/CMakeLists.txt b/plugins/iqmmodel/CMakeLists.txt deleted file mode 100644 index e371ae7..0000000 --- a/plugins/iqmmodel/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -radiant_plugin(iqmmodel - iqm.cpp iqm.h - plugin.cpp plugin.h - ) diff --git a/plugins/iqmmodel/Makefile b/plugins/iqmmodel/Makefile new file mode 100644 index 0000000..b399205 --- /dev/null +++ b/plugins/iqmmodel/Makefile @@ -0,0 +1,26 @@ +# WorldSpawn Makefile + +GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 -DXWINDOWS +GLIB_LDFLAGS=$(shell pkg-config --libs gtk+-2.0) +PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../../include -I../../libs -DPOSIX -fPIC -fvisibility=hidden +PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -shared + +DO_CXX=$(CXX) $(PLUGIN_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + iqm.o plugin.o + +# binary target +../../build/plugins/libiqmmodel.so: $(WS_OBJS) + $(CXX) $(PLUGIN_LDFLAGS) -o $@ $(WS_OBJS) + + +# object files +iqm.o: iqm.cpp iqm.h +plugin.o: plugin.cpp plugin.h + +clean: + -rm -f *.o ../../build/plugins/libiqmmodel.so diff --git a/plugins/iqmmodel/modeliqm.def b/plugins/iqmmodel/modeliqm.def deleted file mode 100644 index 5791cd7..0000000 --- a/plugins/iqmmodel/modeliqm.def +++ /dev/null @@ -1,7 +0,0 @@ -; modeliqm.def : Declares the module parameters for the DLL. - -LIBRARY "MODELIQM" - -EXPORTS - ; Explicit exports can go here - Radiant_RegisterModules @1 diff --git a/plugins/iqmmodel/plugin.cpp b/plugins/iqmmodel/plugin.cpp index 5d0999c..64f62d0 100644 --- a/plugins/iqmmodel/plugin.cpp +++ b/plugins/iqmmodel/plugin.cpp @@ -93,7 +93,13 @@ class ModelVVMAPI : public TypeSystemRef { typedef SingletonModule ModelVVMModule; ModelVVMModule g_ModelVVMModule; -extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules( ModuleServer &server ){ +extern "C" void +#ifdef _WIN32 +__declspec(dllexport) +#else +__attribute__((visibility("default"))) +#endif +Radiant_RegisterModules( ModuleServer &server ){ initialiseModule( server ); g_ModelIQMModule.selfRegister(); diff --git a/plugins/mapq3/CMakeLists.txt b/plugins/mapq3/CMakeLists.txt deleted file mode 100644 index f60c5f9..0000000 --- a/plugins/mapq3/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -radiant_plugin(mapq3 - parse.cpp parse.h - plugin.cpp - write.cpp write.h - ) - -target_include_directories(mapq3 - PRIVATE $ - ) diff --git a/plugins/mapq3/Makefile b/plugins/mapq3/Makefile new file mode 100644 index 0000000..0d507f0 --- /dev/null +++ b/plugins/mapq3/Makefile @@ -0,0 +1,27 @@ +# WorldSpawn Makefile + +GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 -DXWINDOWS +GLIB_LDFLAGS=$(shell pkg-config --libs gtk+-2.0) +PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../../include -I../../libs -DPOSIX -fPIC -fvisibility=hidden +PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -shared + +DO_CXX=$(CXX) $(PLUGIN_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + parse.o plugin.o write.o + +# binary target +../../build/plugins/libmapq3.so: $(WS_OBJS) + $(CXX) $(PLUGIN_LDFLAGS) -o $@ $(WS_OBJS) + + +# object files +parse.o: parse.cpp parse.h +plugin.o: plugin.cpp +write.o: write.cpp write.h + +clean: + -rm -f *.o ../../build/plugins/libmapq3.so diff --git a/plugins/mapq3/mapq3.def b/plugins/mapq3/mapq3.def deleted file mode 100644 index ddbbaf5..0000000 --- a/plugins/mapq3/mapq3.def +++ /dev/null @@ -1,7 +0,0 @@ -; mapq3.def : Declares the module parameters for the DLL. - -LIBRARY "MAPQ3" - -EXPORTS - ; Explicit exports can go here - Radiant_RegisterModules @1 diff --git a/plugins/mapq3/plugin.cpp b/plugins/mapq3/plugin.cpp index a33061c..3ffe32e 100644 --- a/plugins/mapq3/plugin.cpp +++ b/plugins/mapq3/plugin.cpp @@ -138,7 +138,13 @@ typedef SingletonModule MapQ3Module; MapQ3Module g_MapQ3Module; -extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules(ModuleServer &server) +extern "C" void +#ifdef _WIN32 +__declspec(dllexport) +#else +__attribute__((visibility("default"))) +#endif +Radiant_RegisterModules(ModuleServer &server) { initialiseModule(server); diff --git a/plugins/model/CMakeLists.txt b/plugins/model/CMakeLists.txt deleted file mode 100644 index 4a23e28..0000000 --- a/plugins/model/CMakeLists.txt +++ /dev/null @@ -1,7 +0,0 @@ -radiant_plugin(model - model.cpp model.h - plugin.cpp - ) - -target_include_directories(model PRIVATE picomodel) -target_link_libraries(model PRIVATE picomodel) diff --git a/plugins/model/Makefile b/plugins/model/Makefile new file mode 100644 index 0000000..39e9047 --- /dev/null +++ b/plugins/model/Makefile @@ -0,0 +1,26 @@ +# WorldSpawn Makefile + +GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 -DXWINDOWS +GLIB_LDFLAGS=$(shell pkg-config --libs gtk+-2.0) +PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../../include -I../../libs -DPOSIX -fPIC -fvisibility=hidden +PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -shared + +DO_CXX=$(CXX) $(PLUGIN_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + model.o plugin.o + +# binary target +../../build/plugins/libmodel.so: $(WS_OBJS) + $(CXX) $(PLUGIN_LDFLAGS) -o $@ $(WS_OBJS) ../../libs/libpicomodel.a + + +# object files +model.o: model.cpp model.h +plugin.o: plugin.cpp + +clean: + -rm -f *.o ../../build/plugins/libmodel.so diff --git a/plugins/model/modelpico.def b/plugins/model/modelpico.def deleted file mode 100644 index b92e0db..0000000 --- a/plugins/model/modelpico.def +++ /dev/null @@ -1,7 +0,0 @@ -; modelpico.def : Declares the module parameters for the DLL. - -LIBRARY "MODELPICO" - -EXPORTS - ; Explicit exports can go here - Radiant_RegisterModules @1 \ No newline at end of file diff --git a/plugins/model/plugin.cpp b/plugins/model/plugin.cpp index 51aa05b..2f052db 100644 --- a/plugins/model/plugin.cpp +++ b/plugins/model/plugin.cpp @@ -168,8 +168,13 @@ typedef SingletonModule PicoModelModules; PicoModelModules g_PicoModelModules; - -extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules(ModuleServer &server) +extern "C" void +#ifdef _WIN32 +__declspec(dllexport) +#else +__attribute__((visibility("default"))) +#endif +Radiant_RegisterModules(ModuleServer &server) { initialiseModule(server); diff --git a/plugins/shaders/CMakeLists.txt b/plugins/shaders/CMakeLists.txt deleted file mode 100644 index 04de80f..0000000 --- a/plugins/shaders/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -radiant_plugin(shaders - plugin.cpp - shaders.cpp shaders.h -) - -find_package(GLIB REQUIRED) -target_include_directories(shaders PRIVATE ${GLIB_INCLUDE_DIRS}) -target_link_libraries(shaders PRIVATE ${GLIB_LIBRARIES}) diff --git a/plugins/shaders/Makefile b/plugins/shaders/Makefile new file mode 100644 index 0000000..f8f79f4 --- /dev/null +++ b/plugins/shaders/Makefile @@ -0,0 +1,26 @@ +# WorldSpawn Makefile + +GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 -DXWINDOWS +GLIB_LDFLAGS=$(shell pkg-config --libs gtk+-2.0) +PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../../include -I../../libs -DPOSIX -fPIC -fvisibility=hidden +PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -shared + +DO_CXX=$(CXX) $(PLUGIN_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + shaders.o plugin.o + +# binary target +../../build/plugins/libshaders.so: $(WS_OBJS) + $(CXX) $(PLUGIN_LDFLAGS) -o $@ $(WS_OBJS) + + +# object files +shaders.o: shaders.cpp shaders.h +plugin.o: plugin.cpp + +clean: + -rm -f *.o ../../build/plugins/libshaders.so diff --git a/plugins/shaders/plugin.cpp b/plugins/shaders/plugin.cpp index c302d9b..e8ca1de 100644 --- a/plugins/shaders/plugin.cpp +++ b/plugins/shaders/plugin.cpp @@ -79,7 +79,13 @@ public: typedef SingletonModule > MaterialModule; MaterialModule g_MaterialModule; -extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules(ModuleServer &server) +extern "C" void +#ifdef _WIN32 +__declspec(dllexport) +#else +__attribute__((visibility("default"))) +#endif +Radiant_RegisterModules(ModuleServer &server) { initialiseModule(server); g_MaterialModule.selfRegister(); diff --git a/plugins/shaders/shadersq3.def b/plugins/shaders/shadersq3.def deleted file mode 100644 index ab66413..0000000 --- a/plugins/shaders/shadersq3.def +++ /dev/null @@ -1,7 +0,0 @@ -; shadersq3.def : Declares the module parameters for the DLL. - -LIBRARY "ShadersQ3" - -EXPORTS - ; Explicit exports can go here - Radiant_RegisterModules @1 diff --git a/plugins/vfspk3/CMakeLists.txt b/plugins/vfspk3/CMakeLists.txt deleted file mode 100644 index a55e9de..0000000 --- a/plugins/vfspk3/CMakeLists.txt +++ /dev/null @@ -1,12 +0,0 @@ -radiant_plugin(vfspk3 - archive.cpp archive.h - vfs.cpp vfs.h - vfspk3.cpp - ) - -find_package(GLIB REQUIRED) -target_include_directories(vfspk3 PRIVATE ${GLIB_INCLUDE_DIRS}) -target_link_libraries(vfspk3 PRIVATE ${GLIB_LIBRARIES}) - -target_include_directories(vfspk3 PRIVATE filematch) -target_link_libraries(vfspk3 PRIVATE filematch) diff --git a/plugins/vfspk3/Makefile b/plugins/vfspk3/Makefile new file mode 100644 index 0000000..dfbd27f --- /dev/null +++ b/plugins/vfspk3/Makefile @@ -0,0 +1,27 @@ +# WorldSpawn Makefile + +GLIB_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) -DGTK_TARGET=2 -DXWINDOWS +GLIB_LDFLAGS=$(shell pkg-config --libs gtk+-2.0) +PLUGIN_CFLAGS=$(CFLAGS) $(GLIB_CFLAGS) -I../../include -I../../libs -DPOSIX -fPIC -fvisibility=hidden +PLUGIN_LDFLAGS=$(LDFLAGS) $(GLIB_LDFLAGS) -shared + +DO_CXX=$(CXX) $(PLUGIN_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + archive.o vfs.o vfspk3.o + +# binary target +../../build/plugins/libvfspk3.so: $(WS_OBJS) + $(CXX) $(PLUGIN_LDFLAGS) -o $@ $(WS_OBJS) ../../libs/libfilematch.a + + +# object files +archive.o: archive.cpp archive.h +vfs.o: vfs.cpp vfs.h +vfspk3.o: vfspk3.cpp + +clean: + -rm -f *.o ../../build/plugins/libvfspk3.so diff --git a/plugins/vfspk3/vfspk3.cpp b/plugins/vfspk3/vfspk3.cpp index 4f16f73..64e2367 100644 --- a/plugins/vfspk3/vfspk3.cpp +++ b/plugins/vfspk3/vfspk3.cpp @@ -76,7 +76,13 @@ ArchiveModules &FileSystemQ3API_getArchiveModules() } -extern "C" void RADIANT_DLLEXPORT Radiant_RegisterModules(ModuleServer &server) +extern "C" void +#ifdef _WIN32 +__declspec(dllexport) +#else +__attribute__((visibility("default"))) +#endif +Radiant_RegisterModules(ModuleServer &server) { initialiseModule(server); diff --git a/plugins/vfspk3/vfsq3.def b/plugins/vfspk3/vfsq3.def deleted file mode 100644 index 885ffeb..0000000 --- a/plugins/vfspk3/vfsq3.def +++ /dev/null @@ -1,7 +0,0 @@ -; vfsq3.def : Declares the module parameters for the DLL. - -LIBRARY "VFSQ3" - -EXPORTS - ; Explicit exports can go here - Radiant_RegisterModules @1 diff --git a/radiant/CMakeLists.txt b/radiant/CMakeLists.txt deleted file mode 100644 index 170dda1..0000000 --- a/radiant/CMakeLists.txt +++ /dev/null @@ -1,133 +0,0 @@ -set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${PROJECT_BINARY_DIR}") - -find_package(OpenGL REQUIRED) - -string(SUBSTRING ${CMAKE_SHARED_MODULE_SUFFIX} 1 -1 _clibext) -add_definitions(-DCMAKE_SHARED_MODULE_SUFFIX="${_clibext}") -unset(_clibext) - -set(RADIANTLIST - autosave.cpp autosave.h - brush.cpp brush.h - brush_primit.cpp brush_primit.h - brushmanip.cpp brushmanip.h - brushmodule.cpp brushmodule.h - brushnode.cpp brushnode.h - brushtokens.cpp brushtokens.h - brushxml.cpp brushxml.h - build.cpp build.h - camwindow.cpp camwindow.h - clippertool.cpp clippertool.h - commands.cpp commands.h - console.cpp console.h - csg.cpp csg.h - dialog.cpp dialog.h - eclass.cpp eclass.h - eclass_def.cpp eclass_def.h - eclass_doom3.cpp eclass_doom3.h - eclass_fgd.cpp eclass_fgd.h - eclass_xml.cpp eclass_xml.h - entity.cpp entity.h - entityinspector.cpp entityinspector.h - entitylist.cpp entitylist.h - environment.cpp environment.h - error.cpp error.h - feedback.cpp feedback.h - filetypes.cpp filetypes.h - filters.cpp filters.h - findtexturedialog.cpp findtexturedialog.h - glwidget.cpp glwidget.h - grid.cpp grid.h - groupdialog.cpp groupdialog.h - gtkdlgs.cpp gtkdlgs.h - gtkmisc.cpp gtkmisc.h - help.cpp help.h - image.cpp image.h - main.cpp main.h - mainframe.cpp mainframe.h - map.cpp map.h - mru.cpp mru.h - nullmodel.cpp nullmodel.h - parse.cpp parse.h - patch.cpp patch.h - patchdialog.cpp patchdialog.h - patchmanip.cpp patchmanip.h - patchmodule.cpp patchmodule.h - plugin.cpp plugin.h - pluginapi.cpp pluginapi.h - pluginmanager.cpp pluginmanager.h - pluginmenu.cpp pluginmenu.h - plugintoolbar.cpp plugintoolbar.h - points.cpp points.h - preferencedictionary.cpp preferencedictionary.h - preferences.cpp preferences.h - qe3.cpp qe3.h - qgl.cpp qgl.h - referencecache.cpp referencecache.h - renderer.cpp renderer.h - renderstate.cpp renderstate.h - resource.h - scenegraph.cpp scenegraph.h - select.cpp select.h - selection.cpp selection.h - server.cpp server.h - shaders.cpp shaders.h - sockets.cpp sockets.h - stacktrace.cpp stacktrace.h - surfacedialog.cpp surfacedialog.h - texmanip.cpp texmanip.h - textureentry.cpp textureentry.h - textures.cpp textures.h - texwindow.cpp texwindow.h - timer.cpp timer.h - treemodel.cpp treemodel.h - undo.cpp undo.h - url.cpp url.h - view.cpp view.h - watchbsp.cpp watchbsp.h - winding.cpp winding.h - windowobservers.cpp windowobservers.h - xmlstuff.cpp xmlstuff.h - xywindow.cpp xywindow.h - ) -if (WIN32) - list(APPEND RADIANTLIST multimon.cpp multimon.h) -endif () - -radiant_tool(worldspawn WIN32 worldspawn.rc ${RADIANTLIST}) -add_dependencies(worldspawn modules) -target_link_libraries(worldspawn - ${CMAKE_DL_LIBS} - ${LIBXML2_LIBRARIES} - ${OPENGL_gl_LIBRARY} - ${GTK${GTK_TARGET}_LIBRARIES} - ${GTKGL_LIBRARIES} - includes - cmdlib - container - ddslib - debugging - etclib - filematch - generic - l_net - math - mathlib - memory - modulesystem - os - picomodel - profile - script - signal - splines - stream - string - uilib - xmllib - ) -if (X11_LIBRARIES) - target_link_libraries(worldspawn ${X11_LIBRARIES}) -endif () - -copy_dlls(worldspawn) diff --git a/radiant/Makefile b/radiant/Makefile new file mode 100644 index 0000000..c2fa27d --- /dev/null +++ b/radiant/Makefile @@ -0,0 +1,209 @@ +# WorldSpawn Makefile + +GTK_CFLAGS=$(shell pkg-config --cflags gtk+-2.0) +GTK_LDFLAGS=$(shell pkg-config --libs gtk+-2.0) + +WS_VERSION= -DWorldSpawn_VERSION="1" -DWorldSpawn_MAJOR_VERSION="0" -DWorldSpawn_MINOR_VERSION="0" -DWorldSpawn_PATCH_VERSION="0" -DWorldSpawn_ABOUTMSG="" + +WS_LIBS= ../libs/libcmdlib.a \ +../libs/libcontainer.a \ +../libs/libddslib.a \ +../libs/libdebugging.a \ +../libs/libetclib.a \ +../libs/libgeneric.a \ +../libs/libgtkutil.a \ +../libs/libl_net.a \ +../libs/libmath.a \ +../libs/libmathlib.a \ +../libs/libmodulesystem.a \ +../libs/libos.a \ +../libs/libpicomodel.a \ +../libs/libprofile.a \ +../libs/libscript.a \ +../libs/libsignal.a \ +../libs/libsplines.a \ +../libs/libstream.a \ +../libs/libstring.a \ +../libs/libuilib.a \ +../libs/libxmllib.a + +WS_CFLAGS=$(CFLAGS) $(GTK_CFLAGS) -I../include -I../libs -DGTK_TARGET=2 $(WS_VERSION) -DPOSIX -DXWINDOWS +WS_LDFLAGS=$(LDFLAGS) -ldl -lm $(GTK_LDFLAGS) -lX11 -lGL -lxml2 -lgdkglext-x11-1.0 -lgtkglext-x11-1.0 -L../lib $(WS_LIBS) + +DO_CXX=$(CXX) $(WS_CFLAGS) -o $@ -c $< + +.cpp.o: + $(DO_CXX) + +WS_OBJS = \ + autosave.o \ + brush.o \ + brush_primit.o \ + brushmanip.o \ + brushmodule.o \ + brushnode.o \ + brushtokens.o \ + brushxml.o \ + build.o \ + camwindow.o \ + clippertool.o \ + commands.o \ + console.o \ + csg.o \ + dialog.o \ + eclass.o \ + eclass_def.o \ + eclass_doom3.o \ + eclass_fgd.o \ + eclass_xml.o \ + entity.o \ + entityinspector.o \ + entitylist.o \ + environment.o \ + error.o \ + feedback.o \ + filetypes.o \ + filters.o \ + findtexturedialog.o \ + glwidget.o \ + grid.o \ + groupdialog.o \ + gtkdlgs.o \ + gtkmisc.o \ + help.o \ + image.o \ + main.o \ + mainframe.o \ + map.o \ + mru.o \ + nullmodel.o \ + parse.o \ + patch.o \ + patchdialog.o \ + patchmanip.o \ + patchmodule.o \ + plugin.o \ + pluginapi.o \ + pluginmanager.o \ + pluginmenu.o \ + plugintoolbar.o \ + points.o \ + preferencedictionary.o \ + preferences.o \ + qe3.o \ + qgl.o \ + referencecache.o \ + renderer.o \ + renderstate.o \ + scenegraph.o \ + select.o \ + selection.o \ + server.o \ + shaders.o \ + sockets.o \ + stacktrace.o \ + surfacedialog.o \ + texmanip.o \ + textureentry.o \ + textures.o \ + texwindow.o \ + timer.o \ + treemodel.o \ + undo.o \ + url.o \ + view.o \ + watchbsp.o \ + winding.o \ + windowobservers.o \ + xmlstuff.o \ + xywindow.o + +# binary target +../build/worldspawn: $(WS_OBJS) + $(CXX) -o $@ $(WS_OBJS) $(WS_LDFLAGS) + +clean: + -rm -f *.o ../build/worldspawn + +# object files +autosave.o: autosave.cpp autosave.h +brush.o: brush.cpp brush.h +brush_primit.o: brush_primit.cpp brush_primit.h +brushmanip.o: brushmanip.cpp brushmanip.h +brushmodule.o: brushmodule.cpp brushmodule.h +brushnode.o: brushnode.cpp brushnode.h +brushtokens.o: brushtokens.cpp brushtokens.h +brushxml.o: brushxml.cpp brushxml.h +build.o: build.cpp build.h +camwindow.o: camwindow.cpp camwindow.h +clippertool.o: clippertool.cpp clippertool.h +commands.o: commands.cpp commands.h +console.o: console.cpp console.h +csg.o: csg.cpp csg.h +dialog.o: dialog.cpp dialog.h +eclass.o: eclass.cpp eclass.h +eclass_def.o: eclass_def.cpp eclass_def.h +eclass_doom3.o: eclass_doom3.cpp eclass_doom3.h +eclass_fgd.o: eclass_fgd.cpp eclass_fgd.h +eclass_xml.o: eclass_xml.cpp eclass_xml.h +entity.o: entity.cpp entity.h +entityinspector.o: entityinspector.cpp entityinspector.h +entitylist.o: entitylist.cpp entitylist.h +environment.o: environment.cpp environment.h +error.o: error.cpp error.h +feedback.o: feedback.cpp feedback.h +filetypes.o: filetypes.cpp filetypes.h +filters.o: filters.cpp filters.h +findtexturedialog.o: findtexturedialog.cpp findtexturedialog.h +glwidget.o: glwidget.cpp glwidget.h +grid.o: grid.cpp grid.h +groupdialog.o: groupdialog.cpp groupdialog.h +gtkdlgs.o: gtkdlgs.cpp gtkdlgs.h +gtkmisc.o: gtkmisc.cpp gtkmisc.h +help.o: help.cpp help.h +image.o: image.cpp image.h +main.o: main.cpp main.h +mainframe.o: mainframe.cpp mainframe.h +map.o: map.cpp map.h +mru.o: mru.cpp mru.h +nullmodel.o: nullmodel.cpp nullmodel.h +parse.o: parse.cpp parse.h +patch.o: patch.cpp patch.h +patchdialog.o: patchdialog.cpp patchdialog.h +patchmanip.o: patchmanip.cpp patchmanip.h +patchmodule.o: patchmodule.cpp patchmodule.h +plugin.o: plugin.cpp plugin.h +pluginapi.o: pluginapi.cpp pluginapi.h +pluginmanager.o: pluginmanager.cpp pluginmanager.h +pluginmenu.o: pluginmenu.cpp pluginmenu.h +plugintoolbar.o: plugintoolbar.cpp plugintoolbar.h +points.o: points.cpp points.h +preferencedictionary.o: preferencedictionary.cpp preferencedictionary.h +preferences.o: preferences.cpp preferences.h +qe3.o: qe3.cpp qe3.h +qgl.o: qgl.cpp qgl.h +referencecache.o: referencecache.cpp referencecache.h +renderer.o: renderer.cpp renderer.h +renderstate.o: renderstate.cpp renderstate.h +scenegraph.o: scenegraph.cpp scenegraph.h +select.o: select.cpp select.h +selection.o: selection.cpp selection.h +server.o: server.cpp server.h +shaders.o: shaders.cpp shaders.h +sockets.o: sockets.cpp sockets.h +stacktrace.o: stacktrace.cpp stacktrace.h +surfacedialog.o: surfacedialog.cpp surfacedialog.h +texmanip.o: texmanip.cpp texmanip.h +textureentry.o: textureentry.cpp textureentry.h +textures.o: textures.cpp textures.h +texwindow.o: texwindow.cpp texwindow.h +timer.o: timer.cpp timer.h +treemodel.o: treemodel.cpp treemodel.h +undo.o: undo.cpp undo.h +url.o: url.cpp url.h +view.o: view.cpp view.h +watchbsp.o: watchbsp.cpp watchbsp.h +winding.o: winding.cpp winding.h +windowobservers.o: windowobservers.cpp windowobservers.h +xmlstuff.o: xmlstuff.cpp xmlstuff.h +xywindow.o: xywindow.cpp xywindow.h diff --git a/radiant/gtkdlgs.cpp b/radiant/gtkdlgs.cpp index adf5e7d..7bfc817 100644 --- a/radiant/gtkdlgs.cpp +++ b/radiant/gtkdlgs.cpp @@ -438,7 +438,7 @@ void DoAbout() } { - char const *label_text = "WorldSpawn " WorldSpawn_VERSION "\n" + char const *label_text = "WorldSpawn\n" __DATE__ "\n\n" "QER taken to the space age.\n\n" "Developed by Vera Visions LLC.\n" diff --git a/radiant/main.cpp b/radiant/main.cpp index e16a1ce..1820a10 100644 --- a/radiant/main.cpp +++ b/radiant/main.cpp @@ -373,6 +373,8 @@ bool check_version_file(const char *filename, const char *version) bool check_version() { + return true; +#if 0 // a safe check to avoid people running broken installations // (otherwise, they run it, crash it, and blame us for not forcing them hard enough to pay attention while installing) // make something idiot proof and someone will make better idiots, this may be overkill @@ -403,6 +405,7 @@ bool check_version() ui::alert(ui::root, msg.c_str(), "Radiant", ui::alert_type::OK, ui::alert_icon::Default); } return bVerIsGood; +#endif } void create_global_pid() diff --git a/radiant/map.cpp b/radiant/map.cpp index f94aad3..33cda2a 100644 --- a/radiant/map.cpp +++ b/radiant/map.cpp @@ -1647,8 +1647,7 @@ bool Map_ImportFile(const char *filename) extension_equal(path_get_extension(filename), "map"))) { StringBuffer output; output.push_string(AppPath_get()); - output.push_string("q3map2."); - output.push_string(WorldSpawn_EXECUTABLE); + output.push_string("vmap"); output.push_string(" -v -game "); output.push_string((type && *type) ? type : "quake3"); output.push_string(" -fs_basepath \""); diff --git a/radiant/qe3.cpp b/radiant/qe3.cpp index f4646f7..93cad88 100644 --- a/radiant/qe3.cpp +++ b/radiant/qe3.cpp @@ -174,7 +174,6 @@ bool ConfirmModified(const char *title) void bsp_init() { build_set_variable("RadiantPath", AppPath_get()); - build_set_variable("ExecutableType", WorldSpawn_EXECUTABLE); build_set_variable("EnginePath", EnginePath_get()); build_set_variable("UserEnginePath", g_qeglobals.m_userEnginePath.c_str()); build_set_variable("MonitorAddress", (g_WatchBSP_Enabled) ? "127.0.0.1:39000" : ""); diff --git a/resources/Resources/FileIcon_.map.tiff b/resources/Resources/FileIcon_.map.tiff deleted file mode 100644 index 83e7c8601905ff517bda0a290b37210ce6978c70..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 9537 zcmeHNX>?QPnI>&#PXEl0_DmCYFnHhOeUW8L)@Ez5EXlIveUoKd^1fnY48|D87-NH3 zjDgr}AwUTG8o~|<0g{lAkhEFakZF^4Ch2rP?VK~uJojQNZWE5q{F~0{_4%at`|iEE z@B6*m^S;+QUGS{$`_B4*b!2B}2A96Y~%iV?$C(5z=)|WaV`rzoZ)_ z6{}HE-HYm)e$>_vps95|+B=5Oy=n`3`*xsz-8eQ3Phj)reb_#B0K0a*h-T<)`wxDKhaY@~kAM0(9)0#JeDTY#@a0#(#qWOiNBsHE z|AlWm$U8U=e47jc{~BW*qGNI(iLfFrJ_k~1F0^TtFk72YT(%0%sy>vv22oSL4)slg zXlfon=ZY=p?ioW*?`8}PPGZBx0~pWv4K z;a%Lm`vKm1`xCtT@Kb#F@z3$-(HHpqi!Uj|Zz#hbD8paAA;Jv)jejeHz`smcjR^7| z6p{&v#Ej@z8+B3+Lq-jCQ3;E+o^o`fu5mqTn}$)}GJ<8x$I!ZbJGy$tv1VW|21gEH zWDEHpKZ>1`XR+^vSMc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