first pass modernized build instructions, linux good, macos good, win fail

This commit is contained in:
Harvey Fong 2026-01-07 16:21:16 -07:00
parent 5e5e37de36
commit 3c6497ea90
4 changed files with 160 additions and 133 deletions

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2025 Harvey Fong
Copyright (c) 2026 Harvey Fong
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -5,18 +5,17 @@ PLATFORM = $(shell uname)
BUILD_TYPE ?= release# Default to release build if not specified
# Common paths
BELLA_SDK_PATH = ../bella_engine_sdk
RAYGUI_PATH = ../raygui
RAYLIB_PATH = ../raylib
BELLA_SDK_PATH = $(abspath ../bella_engine_sdk)
RAYGUI_PATH = $(abspath ../raygui)
RAYLIB_PATH = $(abspath ../raylib)
# Path to dynamic raylib library
RAYLIB_DYLIB_PATH = ../raylib/build/raylib
RAYLIB_DYLIB_PATH = $(abspath ../raylib/build/raylib)
OBJ_DIR = obj/$(PLATFORM)/$(BUILD_TYPE)
BIN_DIR = bin/$(PLATFORM)/$(BUILD_TYPE)
OUTPUT_FILE = $(BIN_DIR)/$(EXECUTABLE_NAME)
# Platform-specific configuration
ifeq ($(PLATFORM), Darwin)
# macOS configuration
SDK_LIB_EXT = dylib
SDK_LIB_FILE = lib$(BELLA_SDK_NAME).$(SDK_LIB_EXT)
# Dynamic raylib library
@ -150,14 +149,16 @@ $(OUTPUT_FILE): $(OBJECT_FILES)
@mkdir -p $(@D)
$(CXX) -o $@ $^ $(LINKER_FLAGS) $(LIB_PATHS) $(LIBRARIES)
@echo "Copying libraries to $(BIN_DIR)..."
@cp $(SDK_LIB_PATH)/$(SDK_LIB_FILE) $(BIN_DIR)/$(SDK_LIB_FILE)
# Copy raylib dylib files preserving symbolic links
# Copy bella and dl_usd_ms libraries to the binary directory
@cp -P $(SDK_LIB_PATH)/libbella_engine_sdk.$(SDK_LIB_EXT) $(BIN_DIR)/
@cp -P $(SDK_LIB_PATH)/libdl_usd_ms.$(SDK_LIB_EXT) $(BIN_DIR)/
ifeq ($(PLATFORM), Darwin)
@# Copy raylib dylib files preserving symbolic links
@cp -P $(RAYLIB_LIB_PATH)/libraylib.5.5.0.dylib $(BIN_DIR)/
@cp -P $(RAYLIB_LIB_PATH)/libraylib.550.dylib $(BIN_DIR)/
@cp -P $(RAYLIB_LIB_PATH)/libraylib.dylib $(BIN_DIR)/
else
@# Copy raylib shared library files for Linux
@cp $(RAYLIB_LIB_PATH)/$(RAYLIB_LIB_NAME) $(BIN_DIR)/
@ln -sf $(RAYLIB_LIB_NAME) $(BIN_DIR)/$(RAYLIB_LIB_LINK)
endif
@ -171,6 +172,7 @@ clean:
rm -f $(OBJ_DIR)/*.o
rm -f $(OUTPUT_FILE)
rm -f $(BIN_DIR)/$(SDK_LIB_FILE)
ifeq ($(PLATFORM), Darwin)
rm -f $(BIN_DIR)/libraylib*.dylib
else

147
README.md
View File

@ -13,82 +13,105 @@ workdir/
├── bella_engine_sdk/
├── raylib/
├── raygui/
└── poomer-raylib-bella_onimage/
├── poomer-raylib-bella_onimage/
└── cmake/ (macos)
```
# MacOS
# Ubuntu Linux x64
```
cd ~
mkdir workdir
cd workdir
curl -LO https://github.com/Kitware/CMake/releases/download/v3.31.6/cmake-3.31.6-macos-universal.dmg
open cmake-3.31.6-macos-universal.dmg
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/bella_engine_sdk .
git clone https://github.com/raysan5/raylib.git
mkdir -p raylib/build
cd raylib/build
/Applications/CMake.app/Contents/bin/cmake -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release ..
make -j4
cd ../..
sudo apt install -y build-essential git cmake mesa-vulkan-drivers libgl1 libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgl1-mesa-dev mesa-vulkan-drivers
mkdir workdir && cd workdir
mkdir raylib raygui poomer-raylib-bella_onimage
# Install Bella SDK
wget https://downloads.bellarender.com/bella_engine_sdk-25.3.0-linux.tar.gz
tar -xvf bella_engine_sdk-25.3.0-linux.tar.gz
# Build raylib
cd raylib
git clone https://github.com/raysan5/raylib.git .
cmake -B ./build -DBUILD_SHARED_LIBS=ON -DUSE_EXTERNAL_GLFW=OFF
cmake --build ./build -j$(nproc)
# Install raygui
cd ..
git clone https://github.com/raysan5/raygui.git
# Build poomer-raylib-bella_onimage
git clone https://git.indoodle.com/oomer/oom.git
git clone https://git.indoodle.com/oomer/poomer-raylib-bella_onimage.git
cd poomer-raylib-bella_onimage
make
git clone https://git.indoodle.com/oomer/poomer-raylib-bella_onimage.git .
make -j$(nproc)
bin/Linux/release/poomer-raylib-bella_onimage
```
## MacOS x64 and arm64
```
# Install xcode
xcode-select --install
mkdir workdir && cd workdir
mkdir cmake raylib raygui poomer-raylib-bella_onimage
# Install Bella SDK
curl -O https://downloads.bellarender.com/bella_engine_sdk-25.3.0-macos.zip
unzip bella_engine_sdk-25.3.0-macos.zip
# Build cmake
cd cmake
git clone https://github.com/Kitware/CMake.git .
./configure
make -j$(sysctl -n hw.ncpu)
# Build raylib
cd ../raylib
git clone https://github.com/raysan5/raylib.git .
../cmake/bin/cmake -B ./build -DBUILD_SHARED_LIBS=ON -DCMAKE_BUILD_TYPE=Release
../cmake/bin/cmake --build ./build -j$(sysctl -n hw.ncpu)
# Install raygui
cd ..
git clone https://github.com/raysan5/raygui.git
# Build poomer-raylib-bella_onimage
git clone https://git.indoodle.com/oomer/oom.git
cd ../poomer-raylib-bella_onimage
git clone https://git.indoodle.com/oomer/poomer-raylib-bella_onimage.git .
make -j$(sysctl -n hw.ncpu)
bin/Darwin/release/poomer-raylib-bella_onimage
```
# Linux
```
sudo apt install -y build-essential curl git cmake
sudo apt install -y libx11-dev
sudo apt install -y xorg-dev
cd ~
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/raysan5/raylib.git
mkdir -p raylib/build
cd raylib/build
cmake -DBUILD_SHARED_LIBS=ON -DUSE_EXTERNAL_GLFW=OFF ..
make -j4
cd ../..
git clone https://github.com/raysan5/raygui.git
git clone https://git.indoodle.com/oomer/oom.git
git clone https://git.indoodle.com/oomer/poomer-raylib-bella_onimage.git
cd poomer-raylib-bella_onimage
make
bin/Linux/release/poomer-raylib-bella_onimage -h
```
## Windows x64
- Download Visual Studio Community Edition
- Run VisualStudioSetup.exe
- Workload = [x] Desktop development with C++
- Individual components = [x] Git For Windows
# Windows
- Install Visual Studio Community 2022
- Add Desktop development with C++ workload
- Launch x64 Native tools Command Prompt for VS2022
#### x64 Native Tools for VS
```
cd %USERPROFILE%
mkdir workdir
cd workdir
mkdir bella_engine_sdk
cd 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/raysan5/raylib.git
mkdir workdir && cd workdir
mkdir raylib raygui poomer-raylib-bella_onimage
# Install Bella SDK
curl -O https://downloads.bellarender.com/bella_engine_sdk-25.3.0-win32.zip
tar -xf bella_engine_sdk-25.3.0-win32.zip
# Build raylib
cd raylib
mkdir build
cd build
cmake ..
msbuild raylib.sln /p:Configuration=Release
cd ../..
git clone https://github.com/raysan5/raylib.git .
cmake -B ./build
#cd build
#msbuild raylib.sln /p:Configuration=Release
cmake --build ./build --config Release -j%NUMBER_OF_PROCESSORS%
#Install raygui
cd ..
git clone https://github.com/raysan5/raygui.git
# Build poomer-raylib-bella_onimage
git clone https://git.indoodle.com/oomer/oom.git
git clone https://git.indoodle.com/oomer/poomer-raylib-bella_onimage.git
cd poomer-raylib-bella_onimage
msbuild poomer-raylib-bella_onimage.vcxproj /p:Configuration=release /p:Platform=x64 /p:PlatformToolset=v143
git clone https://git.indoodle.com/oomer/poomer-raylib-bella_onimage.git .
msbuild poomer-raylib-bella_onimage.vcxproj /p:Configuration=release
x64\release\poomer-raylib-bella_onimage.exe -h
```

View File

@ -19,13 +19,13 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='PseudoDebug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
@ -54,7 +54,7 @@
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalLibraryDirectories>lib;..\raylib\build\raylib\Release</AdditionalLibraryDirectories>
<AdditionalDependencies>bella_engine_sdk.lib;raylib.lib;Shlwapi.lib;vulkan-1.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>dl_usd_ms.lib;bella_engine_sdk.lib;raylib.lib;Shlwapi.lib;vulkan-1.lib;winmm.lib;%(AdditionalDependencies)</AdditionalDependencies>
<DelayLoadDLLs>vulkan-1.dll</DelayLoadDLLs>
</Link>
</ItemDefinitionGroup>
@ -95,6 +95,8 @@
<Command>echo Post-build event started &amp;
copy "$(ProjectDir)..\bella_engine_sdk\lib\bella_engine_sdk.dll" "$(TargetDir)" &amp;
echo bella_engine_sdk.dll copied &amp;
copy "$(ProjectDir)..\bella_engine_sdk\lib\dl_usd_ms.dll" "$(TargetDir)" &amp;
echo dl_usd_ms.dll copied &amp;
copy "$(ProjectDir)..\bella_engine_sdk\lib\dl_core.dll" "$(TargetDir)" &amp;
echo dl_core.dll copied &amp;
copy "$(ProjectDir)..\bella_engine_sdk\lib\dl_oidn_core.dll" "$(TargetDir)" &amp;