diff --git a/README.md b/README.md index e9f5b6b..e8cea68 100644 --- a/README.md +++ b/README.md @@ -40,31 +40,63 @@ workdir/ └── poomer-bella-sine/ ``` -Download SDK for your OS and drag bella_engine_sdk into your workdir. On Windows rename unzipped folder by removing version ie bella_engine_sdk-24.6.0 -> bella_engine_sdk - -- [bella_engine_sdk MacOS](https://downloads.bellarender.com/bella_engine_sdk-24.6.0.dmg) -- [bella_engine_sdk Linux](https://downloads.bellarender.com/bella_engine_sdk-24.6.0.tar.gz) -- [bella_engine_sdk Win](https://downloads.bellarender.com/bella_engine_sdk-24.6.0.zip) - - - -# MacOS (tested) and Linux (untested) +## MacOS (kasm-aaa) +- [ ] Install Xcode ``` mkdir workdir cd workdir +curl -LO https://downloads.bellarender.com/bella_engine_sdk-24.6.0.dmg +hdiutil attach bella_engine_sdk-24.6.0.dmg +cp -R /Volumes/Bella\ Engine\ SDK\ 24.6.0/* . git clone https://github.com/oomer/oom.git git clone https://github.com/oomer/poomer-bella-sine.git cd poomer-bella-sine make all -j4 +bin/Darwin/release/poomer-bella-sine -r +open ./untitled.png ``` -# Windows (untested) +## Ubuntu Linux (kasm-bbb) ``` +sudo apt install -y build-essential +sudo apt install -y libx11-dev +sudo apt install -y libgl1-mesa-dev +sudo apt install -y libtool +sudo apt install -y cmake +sudo apt install -y pkg-config mkdir workdir cd workdir +curl -LO https://downloads.bellarender.com/bella_engine_sdk-24.6.0.tar.gz +tar -xvf bella_engine_sdk-24.6.0.tar.gz git clone https://github.com/oomer/oom.git git clone https://github.com/oomer/poomer-bella-sine.git cd poomer-bella-sine -msbuild poomer-bella-sine.vcxproj /p:Configuration=release /p:Platform=x64 /p:PlatformToolset=v143 +make all -j4 +bin/Linux/release/poomer-bella-sine -r +file ./untitled.png +``` + +## Windows (kasm-jay tested) +- [optioanl] Install https://git-scm.com + +- Download Visual Studio Community Edition 2022 +- Run VisualStudioSetup.exe +- Workload = [x] Desktop developemnt with C++ +- Individial components = [x] Git For Windows + +Run **x64 Native Tools Command Prompt for VS 2022** +``` +cd %USERPROFILE% +mkdir workdir\bella_engine_sdk +cd workdir\bella_engine_sdk +curl -LO https://downloads.bellarender.com/bella_engine_sdk-24.6.0.zip +tar -xf bella_engine_sdk-24.6.0.zip +cd .. +git clone https://github.com/oomer/oom.git +git clone https://github.com/oomer/poomer-bella-sine.git +cd poomer-bella-sine +msbuild poomer-bella-sine.vcxproj /p:Configuration=release /p:Platform=x64 /p:PlatformToolset=v143 +x64\release\poomer-bella-sine.exe -r +start ./untitled.png ``` diff --git a/makefile b/makefile index f3d2e7c..5a8675d 100644 --- a/makefile +++ b/makefile @@ -1,4 +1,3 @@ - BELLA_SDK_NAME = bella_engine_sdk EXECUTABLE_NAME = poomer-bella-sine PLATFORM = $(shell uname) @@ -24,10 +23,14 @@ ifeq ($(PLATFORM), Darwin) # Architecture flags ARCH_FLAGS = -arch arm64 -mmacosx-version-min=11.0 -isysroot $(MACOS_SDK_PATH) + # Library directory for weak linking + LIBDIR = /usr/local/lib + # Linking flags - Use multiple rpath entries to look in executable directory LINKER_FLAGS = $(ARCH_FLAGS) -framework Cocoa -framework IOKit -fvisibility=hidden -O5 \ -rpath @executable_path \ - -rpath . + -rpath . \ + -weak_library $(LIBDIR)/libvulkan.dylib #-rpath @loader_path \ #-Xlinker -rpath -Xlinker @executable_path @@ -43,8 +46,12 @@ else # Architecture flags ARCH_FLAGS = -m64 -D_FILE_OFFSET_BITS=64 - # Linking flags - LINKER_FLAGS = $(ARCH_FLAGS) -fvisibility=hidden -O3 -Wl,-rpath,'$$ORIGIN' -Wl,-rpath,'$$ORIGIN/lib' -weak_library $(LIBDIR)/libvulkan.dylib + # Library directory for weak linking + LIBDIR = /usr/lib/x86_64-linux-gnu + + # Linking flags - Linux weak linking equivalent + LINKER_FLAGS = $(ARCH_FLAGS) -fvisibility=hidden -O3 -Wl,-rpath,'$$ORIGIN' -Wl,-rpath,'$$ORIGIN/lib' \ + -Wl,--no-as-needed -L$(LIBDIR) -lvulkan # Platform-specific libraries #PLIST_LIB = -lplist diff --git a/poomer-bella-sine.vcxproj b/poomer-bella-sine.vcxproj index 66c05b8..a736569 100644 --- a/poomer-bella-sine.vcxproj +++ b/poomer-bella-sine.vcxproj @@ -48,6 +48,7 @@ Disabled Disabled ..\bella_engine_sdk\src;..\oom + stdcpp17 Console @@ -65,6 +66,7 @@ false NDEBUG;_CONSOLE;DL_USE_SHARED;NOMINMAX;WIN32_LEAN_AND_MEAN;NOGDI;NOUSER;%(PreprocessorDefinitions) ..\bella_engine_sdk\src;..\oom + stdcpp17 Console @@ -82,6 +84,7 @@ false _ALLOW_COMPILER_AND_STL_VERSION_MISMATCH;%(PreprocessorDefinitions) NoIPO + stdcpp17 false