make windows used c++17 via vxcproj, reworked command line build notes on all platforms, changed osx only --weak-library param in makefile for linux

This commit is contained in:
Harvey Fong 2025-06-10 23:22:01 -06:00
parent 7eb6632397
commit b5513b9d91
3 changed files with 57 additions and 15 deletions

View File

@ -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
```

View File

@ -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

View File

@ -48,6 +48,7 @@
<Optimization>Disabled</Optimization>
<InlineFunctionExpansion>Disabled</InlineFunctionExpansion>
<AdditionalIncludeDirectories>..\bella_engine_sdk\src;..\oom</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
@ -65,6 +66,7 @@
<SDLCheck>false</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;DL_USE_SHARED;NOMINMAX;WIN32_LEAN_AND_MEAN;NOGDI;NOUSER;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\bella_engine_sdk\src;..\oom</AdditionalIncludeDirectories>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
@ -82,6 +84,7 @@
<RuntimeTypeInfo>false</RuntimeTypeInfo>
<PreprocessorDefinitions>_ALLOW_COMPILER_AND_STL_VERSION_MISMATCH;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<InterproceduralOptimization>NoIPO</InterproceduralOptimization>
<LanguageStandard>stdcpp17</LanguageStandard>
</ClCompile>
<Link>
<InterproceduralOptimization>false</InterproceduralOptimization>