Skip to content

Commit

Permalink
WIP: Initial linux support using SDL (#136)
Browse files Browse the repository at this point in the history
* Initial linux support using SDL

* fixed link error and gitignore

* fix in working directory initialization (windows side)

* Added README_Linux and fixed a few compilation issues in ubuntu

* Rename main to main_Windows in Tests

* Better default renderering backend selector

* Added backlog terminal output on linux

* added asserts on all missing vulkan function call results

* added portable file dialogs

also small tests update and cleanup

* Added Editor compile target

* linux ci

* linux ci

* cmake update

* cmake update?

* cmake

* Editor_Windows fix

* build test

* make

* build tools?

* update

* ubuntu 20.04

* fix?

* cmake

* build

* build?

* package linux build

* updates, bump version

* backslash to forward slash, eof newlines, add portable-file-dialogs license

* xcopy needs backslash duh; update readme;

* copy fix

* updated readme

* readme update

* updated readme

* updated readme

* fix incorrect file encoding linux

* paint tool fix

* linux: add missing shaders

* packaging update

Co-authored-by: Turánszki János <[email protected]>
Co-authored-by: Turanszki Janos <[email protected]>
  • Loading branch information
3 people authored Oct 4, 2020
1 parent d3b18bc commit 3cd9e77
Show file tree
Hide file tree
Showing 61 changed files with 3,532 additions and 205 deletions.
145 changes: 110 additions & 35 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,51 +19,126 @@ jobs:
- name: Move binaries
shell: cmd
run: |
move BUILD\x64\Release\Editor_Windows\Editor_Windows.exe Editor
xcopy WickedEngine\dxcompiler.dll Editor
move BUILD\x64\Release\Editor_Windows\Editor_Windows.exe Editor\
xcopy WickedEngine\dxcompiler.dll Editor\
move BUILD\x64\Release\Tests\Tests.exe Tests
xcopy WickedEngine\dxcompiler.dll Tests
move BUILD\x64\Release\Tests\Tests.exe Tests\
xcopy WickedEngine\dxcompiler.dll Tests\
- name: Package Editor
uses: actions/upload-artifact@v2
with:
name: Editor (Windows x64)
path: |
WickedEngine\shaders\
WickedEngine\fonts\
images\
models\
scripts\
Documentation\
*.txt
*.md
Editor\*.exe
Editor\images\
Editor\sound\
Editor\*.ini
Editor\*.ico
Editor\*.lua
Editor\*.dll
WickedEngine/shaders/
WickedEngine/fonts/
images/
models/
scripts/
Documentation/
README.md
LICENSE.md
other_licenses.txt
features.txt
Editor/images/
Editor/sound/
Editor/*.ini
Editor/*.ico
Editor/*.lua
Editor/*.exe
Editor/*.dll
- name: Package Tests
uses: actions/upload-artifact@v2
with:
name: Tests (Windows x64)
path: |
WickedEngine\shaders\
WickedEngine\fonts\
images\
models\
scripts\
Documentation\
*.txt
*.md
Tests\*.exe
Tests\images\
Tests\sound\
Tests\*.ini
Tests\*.ico
Tests\*.lua
Tests\*.dll
Tests\*.ttf
WickedEngine/shaders/
WickedEngine/fonts/
images/
models/
scripts/
Documentation/
README.md
LICENSE.md
other_licenses.txt
features.txt
Tests/images/
Tests/sound/
Tests/*.ini
Tests/*.ico
Tests/*.lua
Tests/*.ttf
Tests/*.exe
Tests/*.dll
linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2

- name: Install dependencies
run: |
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.2.148-focal.list https://packages.lunarg.com/vulkan/1.2.148/lunarg-vulkan-1.2.148-focal.list
sudo apt update
sudo apt install vulkan-sdk
sudo apt install libsdl2-dev
- name: Build
run: |
mkdir build
cd build
cmake .. -DCMAKE_BUILD_TYPE=Release
make
- name: Move binaries
run: |
mv build/Editor/WickedEngineEditor Editor/
mv build/Tests/Tests Tests/
- name: Package Editor
uses: actions/upload-artifact@v2
with:
name: Editor (Ubuntu 20.04)
path: |
WickedEngine/shaders/
WickedEngine/fonts/
images/
models/
scripts/
Documentation/
README.md
LICENSE.md
other_licenses.txt
features.txt
Editor/images/
Editor/sound/
Editor/*.ini
Editor/*.ico
Editor/*.lua
Editor/WickedEngineEditor
- name: Package Tests
uses: actions/upload-artifact@v2
with:
name: Tests (Ubuntu 20.04)
path: |
WickedEngine/shaders/
WickedEngine/fonts/
images/
models/
scripts/
Documentation/
README.md
LICENSE.md
other_licenses.txt
features.txt
Tests/images/
Tests/sound/
Tests/*.ini
Tests/*.ico
Tests/*.lua
Tests/*.ttf
Tests/Tests
33 changes: 8 additions & 25 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
[Rr]elease/
x64/
build/
cmake-build-*/
bld/
[Bb]in/
[Oo]bj/
Expand Down Expand Up @@ -192,39 +193,21 @@ ModelManifest.xml
/WinRT/WickedEngine
/WickedEngine/WinRT
/WickedEngine/StoreTest
/WickedEngine/shaders
/WickedEngine/shaders/
/WickedEngine/Release_Store/WickedEngine.tlog
/WickedEngine/Release_RT
/WickedEngine/Debug_RT
/Debug_RT/WickedEngine
/WickedEngine/Debug_UWP
/WickedEngine/Scene/Sample/temp
/WickedEngine/nsight_profiler.cfg
/WickedEngine/Scene/Sample/nsight_profiler.cfg
/WickedEngine/Scene/Sponza/temp
/WickedEngine/Scene/Sponza/nsight_profiler.cfg
/WickedEngine/Scene/Sample/asd.wimf
/WickedEngine/models/Sample/temp
/WickedEngine/models/Sample/nsight_profiler.cfg
/WickedEngine/models/Sample/asd.wimf
/WickedEngine/models/Sponza/temp
/WickedEngine/models/Sponza/nsight_profiler.cfg
/WickedEngine/models/Sponza/dirlight.wimf
/WickedEngine/models/Sponza/radiance.wimf
/WickedEngine/models/Sponza/radiance.wiw
/WickedEngine/models/Sponza/reflections.wimf
/WickedEngine/models/Sample/asd.wiw
/WickedEngine/models/Sponza
/WickedEngine/models/Stormtrooper/temp/history0
/WickedEngine/models/Stormtrooper/temp
/.vs/WickedEngine/v15
/.vs/WickedEngine/v15
/.vs/WickedEngine/v15/Browse.VC.db
/WickedEngine/models/Stormtrooper/nsight_profiler.cfg
*.cfg
/WickedEngine/models/Sample/nosun.wiw
/WickedEngine/models/Sample/nosun.wimf
/.vs
/models/Sample/temp
/models/Emitter/temp
*.csv

# Intellij IDEs
.idea/

# Visual studio code project files
.vscode/
19 changes: 19 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
cmake_minimum_required(VERSION 3.7)

project(WickedEngine)

set(CMAKE_CXX_STANDARD 17)

if (WIN32)
set(PLATFORM "Windows")
add_compile_definitions(WIN32=1)
# add_compile_definitions(_WIN32=1) this is a given from the compiler
elseif(UNIX)
find_package(SDL2 REQUIRED)
set(PLATFORM "SDL2")
add_compile_definitions(SDL2=1)
endif()

add_subdirectory(WickedEngine)
add_subdirectory(Tests)
add_subdirectory(Editor)
2 changes: 1 addition & 1 deletion Editor/App.cpp → Editor/App_Windows.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include "stdafx.h"
#include "App.h"
#include "App_Windows.h"

#include <ppltasks.h>

Expand Down
File renamed without changes.
38 changes: 38 additions & 0 deletions Editor/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
find_package(Threads REQUIRED)

add_executable(WickedEngineEditor
main_${PLATFORM}.cpp
$<$<STREQUAL:${PLATFORM},Windows>:App_${PLATFORM}.cpp>
AnimationWindow.cpp
CameraWindow.cpp
DecalWindow.cpp
Editor.cpp
EmitterWindow.cpp
EnvProbeWindow.cpp
ForceFieldWindow.cpp
HairParticleWindow.cpp
IKWindow.cpp
LayerWindow.cpp
LightWindow.cpp
MaterialWindow.cpp
MeshWindow.cpp
ModelImporter_GLTF.cpp
ModelImporter_OBJ.cpp
NameWindow.cpp
ObjectWindow.cpp
PaintToolWindow.cpp
PostprocessWindow.cpp
RendererWindow.cpp
SoundWindow.cpp
SpringWindow.cpp
stdafx.cpp
TransformWindow.cpp
Translator.cpp
WeatherWindow.cpp
xatlas.cpp
)

target_link_libraries(WickedEngineEditor PUBLIC
WickedEngine
Threads::Threads
)
Loading

0 comments on commit 3cd9e77

Please sign in to comment.