diff --git a/Makefile b/Makefile index 412357bc3..ff282c87a 100644 --- a/Makefile +++ b/Makefile @@ -19,6 +19,9 @@ clean: distclean: $(Q)git clean -fdx +deb: + $(Q)debuild -b -ui -uc -us + windows: $(Q)dockcross $(CMAKE) -H. -Bbuild -DCMAKE_BUILD_TYPE=$(BUILDTYPE) -DCMAKE_INSTALL_PREFIX=$(INSTALL_DIR) -G$(GENERATOR) $(Q)dockcross $(CMAKE) --build build --target all diff --git a/cmake/toolchains/linux-toolchain.cmake b/cmake/toolchains/linux-toolchain.cmake index 7d40702b0..e74e6ab11 100644 --- a/cmake/toolchains/linux-toolchain.cmake +++ b/cmake/toolchains/linux-toolchain.cmake @@ -87,5 +87,6 @@ set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -DNDEBUG") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_C_FLAGS}") set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_C_FLAGS_RELEASE}") -set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${CMAKE_C_FLAGS_DEBUG} -pedantic -fno-omit-frame-pointer -fsanitize=undefined -fsanitize=address -fsanitize-address-use-after-scope") -set(CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=undefined -fsanitize=address -fsanitize-address-use-after-scope") +set(SANITIZE_FLAGS "-fsanitize=undefined -fsanitize=address -fsanitize-address-use-after-scope") +set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${CMAKE_C_FLAGS_DEBUG} -fstack-protector-strong -fno-omit-frame-pointer ${SANITIZE_FLAGS}") +set(CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer ${SANITIZE_FLAGS}") diff --git a/contrib/installer/linux/thumbnailer.thumbnailer.in b/contrib/installer/linux/thumbnailer.thumbnailer.in index 226be383a..5b3aab227 100644 --- a/contrib/installer/linux/thumbnailer.thumbnailer.in +++ b/contrib/installer/linux/thumbnailer.thumbnailer.in @@ -1,4 +1,4 @@ [Thumbnailer Entry] TryExec=@CMAKE_PROJECT_NAME@-@NAME@ Exec=@CMAKE_PROJECT_NAME@-@NAME@ -s %s %i %o -MimeType=voxel/cubeworld;voxel/binvox;voxel/magicavoxel;voxel/qubicle-binary;voxel/qubicle-tree;voxel/sandbox-voxedit +MimeType=application/cubeworld;application/binvox;application/magicavoxel;application/qubicle-binary;application/qubicle-tree;application/sandbox-voxedit diff --git a/contrib/installer/linux/voxel.mime b/contrib/installer/linux/voxel.mime index c6b9885e5..d6032cd85 100644 --- a/contrib/installer/linux/voxel.mime +++ b/contrib/installer/linux/voxel.mime @@ -7,27 +7,27 @@ --> - + Voxel model CubeWorld - + Voxel model binvox - + Voxel model MagicaVoxel - + Voxel model Qubicle binary - + Voxel model Qubicle tree - + Voxel model Sandbox VoxEdit diff --git a/debian/.gitignore b/debian/.gitignore new file mode 100644 index 000000000..a08412079 --- /dev/null +++ b/debian/.gitignore @@ -0,0 +1,2 @@ +/build +/install diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 000000000..44318f53b --- /dev/null +++ b/debian/changelog @@ -0,0 +1,42 @@ +vengi (0.0.0.2-1) unstable; urgency=low + + * VoxEdit: + * Static linked VC++ Runtime + * Extract voxels by color into own layers + * Updated tree and noise windows + * Implemented `thicken` console command + * Escape abort modifier action + * Added L-System panel + + * General: + * Fixed binvox header parsing + * Improved compilation speed + * Fixed compile errors with locally installed glm 0.9.9 + * Fixed setup-documentation errors + * Fixed shader pipeline rebuilds if included shader files were modified + * Improved palm tree generator + * Optimized mesh extraction for the world (streaming volumes) + * Added new voxel models + * (Re-)added Tracy profiler support and removed own imgui-based implementation + * Fixed writing of key bindings + * Improved compile speed and further removed the STL from a lot of places + * Updated all dependencies to their latest version + + * Server/Client: + * Added DBChunkPersister + * Built-in HTTP server to download the chunks + * Replaced ui for the client + + * Voxel rendering + * Implemented reflection for water surfaces + * Apply checkerboard pattern to voxel surfaces + * Up-scaling effect for new voxel chunks while they pop in + * Optimized rendering by not using one giant vbo + + -- Martin Gerhardy Wed, 6 May 2020 21:14:43 +0200 + +vengi (0.0.0.1-1) unstable; urgency=low + + * Initial release. + + -- Martin Gerhardy Sat, 8 Feb 2020 10:55:53 +0100 diff --git a/debian/compat b/debian/compat new file mode 100644 index 000000000..b4de39476 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +11 diff --git a/debian/control b/debian/control new file mode 100644 index 000000000..26b0af89a --- /dev/null +++ b/debian/control @@ -0,0 +1,46 @@ +Source: vengi +Section: graphics +Priority: optional +Maintainer: Martin Gerhardy +Build-Depends: cmake, debhelper (>=11~) +Standards-Version: 4.1.4 +Homepage: https://github.com/mgerhardy/engine + +Package: vengi-voxedit +Architecture: any +Multi-Arch: foreign +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: Voxel editor + Load voxel formats for several volumes. + Supported formats for loading are: + Magicvoxel vox + Qubicle qbt and qb + Sandbox VoxEdit vxm + binvox + CubeWorld cub + Supported formats for saving are: + vox, qbt, qb, cub + +Package: vengi-thumbnailer +Architecture: any +Multi-Arch: foreign +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: Thumbnailer for voxel models + Supported formats are: + Magicvoxel vox + Qubicle qbt and qb + Sandbox VoxEdit vxm + binvox + CubeWorld cub + +Package: vengi-server +Architecture: any +Multi-Arch: foreign +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: Voxel engine gameserver + +Package: vengi-client +Architecture: any +Multi-Arch: foreign +Depends: ${misc:Depends}, ${shlibs:Depends} +Description: Voxel engine client diff --git a/debian/copyright b/debian/copyright new file mode 100644 index 000000000..bb27611e7 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,25 @@ +The MIT License (MIT) + +Copyright (c) 2018 Martin Gerhardy + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + +Assets are released under CC BY-NC 3.0 + +https://creativecommons.org/licenses/by-nc/3.0/ diff --git a/debian/rules b/debian/rules new file mode 100755 index 000000000..49f4f5cac --- /dev/null +++ b/debian/rules @@ -0,0 +1,94 @@ +#!/usr/bin/make -f + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed + +ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + CMAKEFLAGS += -j$(NUMJOBS) +endif + +MAINVER := $(shell dpkg-parsechangelog | sed -ne 's/^Version: *\([^~-]*\).*/\1/p' ) +TMPDIR = /tmp/ +ORIGDIR = vengi_$(MAINVER).orig +ORIGTGZ = vengi_$(MAINVER).orig.tar.gz +DEBTGZ = vengi_$(MAINVER).debian.tar.gz + +../$(ORIGTGZ): + git archive HEAD | tar -x -C $(TMPDIR)/$(ORIGDIR) + -rm -rf $(TMPDIR)/$(ORIGDIR)/debian + cd $(TMPDIR) ; tar -zcf $(ORIGTGZ) $(ORIGDIR) ; cd $(CURDIR) + rm -rf $(TMPDIR)/$(ORIGDIR) + mv $(TMPDIR)/$(ORIGTGZ) $(CURDIR)/.. + +get-orig-source: ../$(ORIGTGZ) + +voxedit thumbnailer server client mapview: + dh_testdir + cmake -H. -Bdebian/build -DCMAKE_BUILD_TYPE=Release -DSANITIZE_FLAGS= -DPKGDATADIR=/usr/share/vengi-$@/ + cmake --build debian/build --target $@ $(CMAKEFLAGS) + cmake --install debian/build --component $@ --prefix debian/install/$@ + +build-arch: voxedit thumbnailer server client mapview + +build-indep: + +install: + +install-arch: build-arch + dh_testdir + dh_testroot + dh_prep + dh_installdirs + dh_install + +install-indep: build-indep + dh_testdir + dh_testroot + dh_prep + dh_installdirs + dh_install + +binary-indep: DH_OPTIONS=-i +binary-indep: install-indep + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installmime + dh_link + dh_compress + dh_fixperms + dh_installdeb + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-arch: DH_OPTIONS=-a +binary-arch: install-arch + dh_testdir + dh_testroot + dh_installchangelogs + dh_installdocs + dh_installexamples + dh_installmenu + dh_installmime + dh_installman + dh_link + dh_strip -a + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +clean: + dh_testdir + dh_testroot + dh_clean + +build: build-arch build-indep +binary: binary-indep binary-arch +.PHONY: build build-arch build-indep clean binary-indep binary-arch binary install diff --git a/debian/source/format b/debian/source/format new file mode 100644 index 000000000..163aaf8d8 --- /dev/null +++ b/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/debian/source/options b/debian/source/options new file mode 100644 index 000000000..b7bc1f2b7 --- /dev/null +++ b/debian/source/options @@ -0,0 +1 @@ +compression = "xz" diff --git a/debian/vengi-client.dirs b/debian/vengi-client.dirs new file mode 100644 index 000000000..5059f967f --- /dev/null +++ b/debian/vengi-client.dirs @@ -0,0 +1,2 @@ +usr/bin +usr/share/vengi-client diff --git a/debian/vengi-client.install b/debian/vengi-client.install new file mode 100644 index 000000000..f51d18cb5 --- /dev/null +++ b/debian/vengi-client.install @@ -0,0 +1 @@ +debian/install/client/* usr diff --git a/debian/vengi-server.dirs b/debian/vengi-server.dirs new file mode 100644 index 000000000..be17762f8 --- /dev/null +++ b/debian/vengi-server.dirs @@ -0,0 +1,2 @@ +usr/bin +usr/share/vengi-server diff --git a/debian/vengi-server.install b/debian/vengi-server.install new file mode 100644 index 000000000..8a3e88efd --- /dev/null +++ b/debian/vengi-server.install @@ -0,0 +1 @@ +debian/install/server/* usr diff --git a/debian/vengi-thumbnailer.dirs b/debian/vengi-thumbnailer.dirs new file mode 100644 index 000000000..1318a12e0 --- /dev/null +++ b/debian/vengi-thumbnailer.dirs @@ -0,0 +1,2 @@ +usr/bin +usr/share/vengi-thumbnailer diff --git a/debian/vengi-thumbnailer.install b/debian/vengi-thumbnailer.install new file mode 100644 index 000000000..af4f6191f --- /dev/null +++ b/debian/vengi-thumbnailer.install @@ -0,0 +1 @@ +debian/install/thumbnailer/* usr diff --git a/debian/vengi-voxedit.dirs b/debian/vengi-voxedit.dirs new file mode 100644 index 000000000..876bfeecc --- /dev/null +++ b/debian/vengi-voxedit.dirs @@ -0,0 +1,2 @@ +usr/bin +usr/share/vengi-voxedit diff --git a/debian/vengi-voxedit.install b/debian/vengi-voxedit.install new file mode 100644 index 000000000..615cc05ad --- /dev/null +++ b/debian/vengi-voxedit.install @@ -0,0 +1 @@ +debian/install/voxedit/* usr