Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
e999d53
Bump to Arbor v0.9.0.
thorstenhater Aug 31, 2023
7f3f20f
Bump completed
thorstenhater Aug 31, 2023
bbb78d4
Merge remote-tracking branch 'hater/v0.9.0' into v0.9.0
thorstenhater Aug 2, 2024
f23d9f3
Bump to Arbor v0.9.0. complete
thorstenhater Aug 2, 2024
13c6e8f
Update to arbor/master (0.10.0)
thorstenhater Aug 5, 2024
6de3292
Wayland.
thorstenhater Aug 27, 2024
60f5506
Arch?
thorstenhater Aug 27, 2024
2affca1
?
thorstenhater Aug 27, 2024
d7e67d9
Test?
thorstenhater Aug 27, 2024
fda2246
Bump OS and compiler.
thorstenhater Aug 27, 2024
84a66cf
haswell?
thorstenhater Aug 27, 2024
5badbbe
FUSE?
thorstenhater Aug 27, 2024
5d1dd22
CVE.
thorstenhater Sep 9, 2024
4281517
Get ready for v0.11
thorstenhater Mar 10, 2025
297cd2e
Fix ini, add last case to swc-inter
thorstenhater Mar 10, 2025
763166a
Bump CI
thorstenhater Mar 10, 2025
a00efce
Bump clang
thorstenhater Mar 12, 2025
ee2d55f
LTO?
thorstenhater Mar 12, 2025
2103e5b
Bump dependencies
thorstenhater Apr 24, 2025
2bd099f
ditch old Macos
thorstenhater Apr 24, 2025
cba9275
upload dmg
thorstenhater Apr 24, 2025
f04440e
avoid conflict
thorstenhater Apr 24, 2025
01580f2
avoid conflict even harder
thorstenhater Apr 25, 2025
4e8ae0f
Give up on MacOS 13
thorstenhater Apr 25, 2025
d4d63af
Fix bugs in the MacOS bundle.
thorstenhater Apr 25, 2025
0363418
Merge remote-tracking branch 'origin/main' into v0.11.0
thorstenhater Apr 25, 2025
e89474b
Update Readme, fix code for Ubuntu
thorstenhater Sep 23, 2025
5f57fc1
fetch v0.12
thorstenhater Apr 20, 2026
af398e3
bump to v0.12.0
thorstenhater Apr 20, 2026
0cf4d08
update versions
thorstenhater Apr 20, 2026
4a1587e
install newer cmake
thorstenhater Apr 20, 2026
b99f6b8
fetch v0.12.1
thorstenhater Apr 22, 2026
ac1dd38
Cmake
thorstenhater Apr 22, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 14 additions & 6 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,13 @@ jobs:
strategy:
matrix:
config:
- {
- {
name: "Ubuntu GCC",
os: "ubuntu-24.04",
cc: "gcc-14",
cxx: "g++-14"
}
- {
- {
name: "Ubuntu Clang",
os: "ubuntu-24.04",
cc: "clang-18",
Expand All @@ -35,10 +35,14 @@ jobs:
bld_dir: build_dir
steps:
- name: "Clone w/ submodules"
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: "recursive"
- name: Set up cmake
uses: jwlawson/actions-setup-cmake@v2.2
with:
cmake-version: 4.0.x
- name: Update apt
run: sudo apt update
- name: Install missing packages
Expand Down Expand Up @@ -66,7 +70,7 @@ jobs:
- name: Delete Linuxdeploy
if: ${{ startsWith(matrix.config.cc, 'gcc') }}
run: rm -f ./linuxdeploy-x86_64.AppImage
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
if: ${{ startsWith(matrix.config.cc, 'gcc') }}
with:
name: linux appimage
Expand Down Expand Up @@ -94,10 +98,14 @@ jobs:
CXX: ${{ matrix.config.cxx }}
steps:
- name: "Clone w/ submodules"
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: "recursive"
- name: Set up cmake
uses: jwlawson/actions-setup-cmake@v2.2
with:
cmake-version: 4.0.x
- name: Check config
run: |
$CC --version
Expand All @@ -106,7 +114,7 @@ jobs:
run: cmake -S . -B build -DCMAKE_CXX_COMPILER=$CXX -DCMAKE_C_COMPILER=$CC -DARBORGUI_BUILD_BUNDLE=ON
- name: Build
run: cmake --build build -j 2 --target package
- uses: actions/upload-artifact@v4
- uses: actions/upload-artifact@v7
with:
name: arbor-gui-${{ matrix.config.os }}
path: build/*.dmg
14 changes: 7 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
config:
- {
name: "Ubuntu",
os: "ubuntu-22.04",
cc: "gcc-12",
cxx: "g++-12"
os: "ubuntu-24.04",
cc: "gcc-14",
cxx: "g++-14"
}
fail-fast: false
env:
Expand All @@ -26,7 +26,7 @@ jobs:
bld_dir: build_dir
steps:
- name: "Clone w/ submodules"
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: "recursive"
Expand Down Expand Up @@ -64,7 +64,7 @@ jobs:
config:
- {
name: "MacOS",
os: "macos-12",
os: "macos-4",
cc: "clang",
cxx: "clang++"
}
Expand All @@ -73,7 +73,7 @@ jobs:
CXX: ${{ matrix.config.cxx }}
steps:
- name: "Clone w/ submodules"
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: "recursive"
Expand Down Expand Up @@ -103,7 +103,7 @@ jobs:
- name: Move and rename dmg
run: mv */*.dmg arbor-gui.dmg
- name: "Clone w/ submodules"
uses: actions/checkout@v4
uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: "recursive"
Expand Down
2 changes: 1 addition & 1 deletion 3rd-party/arbor
Submodule arbor updated 344 files
64 changes: 47 additions & 17 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
cmake_minimum_required(VERSION 3.27)
cmake_minimum_required(VERSION 4.0.0)

find_package(Git)

project(the-arbor-gui
VERSION 0.11.1
VERSION 0.11.2
LANGUAGES C CXX)

set(EXPORT_COMPILE_COMMANDS ON)
Expand Down Expand Up @@ -186,22 +186,53 @@ if(ARBORGUI_BUILD_BUNDLE)

set(ARBORGUI_ICON arbor.icns)
set(ARBORGUI_ICON_PATH ${CMAKE_SOURCE_DIR}/images/${ARBORGUI_ICON})
set_source_files_properties(${ARBORGUI_ICON} PROPERTIES MACOSX_PACKAGE_LOCATION Resources)

add_executable(arbor-gui MACOSX_BUNDLE ${ARBORGUI_ICON_PATH} ${gui_srcs} $<TARGET_OBJECTS:imgui>)
set_target_properties(arbor-gui PROPERTIES MACOSX_BUNDLE_ICONFILE ${ARBORGUI_ICON})
set(arbgui_resources)
set_source_files_properties(${CMAKE_SOURCE_DIR}/imgui.ini
PROPERTIES
MACOSX_PACKAGE_LOCATION Resources)
list(APPEND arbgui_resources ${CMAKE_SOURCE_DIR}/imgui.ini)

file(GLOB_RECURSE shaders ${CMAKE_SOURCE_DIR}/glsl/*/*.glsl)
foreach(SHADER_FILE ${shaders})
list(APPEND arbgui_resources ${SHADER_FILE})
file(RELATIVE_PATH SHADER_REL ${CMAKE_SOURCE_DIR}/glsl ${SHADER_FILE})
get_filename_component(SHADER_DIR ${SHADER_REL} DIRECTORY)
set_source_files_properties(${SHADER_FILE}
PROPERTIES
MACOSX_PACKAGE_LOCATION Resources/glsl/${SHADER_DIR})
endforeach()

file(GLOB_RECURSE fonts ${CMAKE_SOURCE_DIR}/fonts/*/*.ttf)
foreach(FONT_FILE ${fonts})
list(APPEND arbgui_resources ${FONT_FILE})
file(RELATIVE_PATH FONT_REL ${CMAKE_SOURCE_DIR}/fonts ${FONT_FILE})
get_filename_component(FONT_DIR ${FONT_REL} DIRECTORY)
set_source_files_properties(${FONT_FILE}
PROPERTIES
MACOSX_PACKAGE_LOCATION Resources/fonts/${FONT_DIR})
endforeach()

set_source_files_properties(${CMAKE_SOURCE_DIR}/images/arbor.icns
PROPERTIES
MACOSX_PACKAGE_LOCATION Resources)

add_executable(arbor-gui MACOSX_BUNDLE ${gui_srcs} $<TARGET_OBJECTS:imgui> ${arbgui_resources} ${CMAKE_SOURCE_DIR}/images/arbor.icns)
set_target_properties(arbor-gui
PROPERTIES
BUNDLE True
MACOSX_BUNDLE_BUNDLE_NAME ${PROJECT_NAME}
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_BUNDLE_ICONFILE ${ARBORGUI_ICON}
MACOSX_BUNDLE_INFO_STRING "A GUI for Arbor"
RESOURCE ${arbgui_resources})
target_compile_definitions(arbor-gui PUBLIC FMT_HEADER_ONLY)
target_include_directories(arbor-gui PRIVATE src ${CMAKE_CURRENT_BINARY_DIR})
target_link_libraries(arbor-gui PRIVATE ${ARBORGUI_LIBS} arbor arborio glbinding glfw arbor-gui-deps)

install(TARGETS arbor-gui
BUNDLE DESTINATION . COMPONENT Runtime
RUNTIME DESTINATION bin COMPONENT Runtime)

install(FILES ${ARBORGUI_ICON_PATH} DESTINATION ${resource_path})
install(FILES default.ini DESTINATION ${resource_path} RENAME imgui.ini)
install(DIRECTORY glsl DESTINATION ${resource_path})
install(DIRECTORY fonts DESTINATION ${resource_path})
BUNDLE DESTINATION . COMPONENT Runtime
RUNTIME DESTINATION bin COMPONENT Runtime)

set(CPACK_BINARY_DRAGNDROP ON)
set(CPACK_GENERATOR "DragNDrop")
Expand All @@ -221,8 +252,7 @@ else()
# Set icon on output
if (APPLE)
add_custom_command(TARGET arbor-gui POST_BUILD
COMMAND sh ${CMAKE_SOURCE_DIR}/scripts/set-osx-icon.sh ${CMAKE_SOURCE_DIR}/images/arbor.png ${CMAKE_CURRENT_BINARY_DIR}/arbor-gui
DEPENDS ${CMAKE_SOURCE_DIR}/scripts/set-osx-icon.sh ${CMAKE_SOURCE_DIR}/images/arbor.png)
COMMAND sh ${CMAKE_SOURCE_DIR}/scripts/set-osx-icon.sh ${CMAKE_SOURCE_DIR}/images/arbor.png ${CMAKE_CURRENT_BINARY_DIR}/arbor-gui)
endif()
if (CMAKE_SYSTEM MATCHES "Linux")
install(FILES ${CMAKE_SOURCE_DIR}/images/arbor.png DESTINATION ${CMAKE_INSTALL_FULL_DATAROOTDIR}/icons/hicolor/256x256/apps/)
Expand All @@ -237,7 +267,7 @@ else()
endif()

# install resources
install(DIRECTORY glsl DESTINATION ${resource_path})
install(DIRECTORY fonts DESTINATION ${resource_path})
install(FILES default.ini DESTINATION ${resource_path} RENAME imgui.ini)
install(DIRECTORY glsl DESTINATION ${resource_path})
install(DIRECTORY fonts DESTINATION ${resource_path})
install(FILES imgui.ini DESTINATION ${resource_path})
endif()
25 changes: 5 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,31 +120,16 @@ Next, follow the platform specific instructions.
``` bash
sudo apt update
sudo apt install build-essential libssl-dev \
libxml2-dev libxrandr-dev libxinerama-dev \
libxrandr-dev libxinerama-dev \
libxcursor-dev libxi-dev libglu1-mesa-dev \
freeglut3-dev mesa-common-dev gcc-10 g++-10
freeglut3-dev mesa-common-dev gcc g++ \
libglfw3 cmake pkg-config xorg-dev libwayland-dev
```
If your cmake version is less than 3.18, you will need to update it
as well
``` bash
cmake --version
3.16 # default on Ubunte 20.04 LTS
# if pip is present
pip install --update cmake
```
2. Add GCC10 as alternative to GCC and select it:
``` bash
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10
```
Use `gcc --version` to confirm it is now version 10. If not you will
need to run `sudo update-alternatives --config gcc` (and its analog for
`g++`) and manually select the right number.

3. Install Arbor GUI
```bash
cmake ..
sudo make install -j 4
make
sudo make install
```

## Windows (WSL2)
Expand Down
File renamed without changes.
8 changes: 5 additions & 3 deletions src/gui_state.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

#include <cmath>
#include <string>
#include <numeric>

#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
Expand Down Expand Up @@ -380,7 +381,7 @@ namespace {
}

inline void gui_cell_context_menu(gui_state& state) {
if (ImGui::BeginPopupContextWindow()) {
if (ImGui::BeginPopupContextWindow("cell-ctx-window", ImGuiPopupFlags_MouseButtonRight)) {
ImGui::Text("%s Camera", icon_camera);
{
with_indent indent{};
Expand Down Expand Up @@ -469,7 +470,7 @@ namespace {
vs.zoom = std::clamp(vs.zoom + delta_zoom, 1.0f, 45.0f);
}
}

gui_cell_context_menu(state);
//
static float t_last = 0.0;
float t_now = glfwGetTime();
Expand Down Expand Up @@ -1078,7 +1079,8 @@ void gui_state::deserialize(const std::filesystem::path& fn) {
auto cat = split_off(raw, "::");
if (raw.empty()) log_error("Need 'catalogue::name', got 'name'.");
auto name = split_off(raw, "/");
auto values = t.values();
auto values = std::unordered_map<std::string, double>{};
for (const auto& [k, v]: t.values()) values[k] = v;
for (;raw.size();) {
auto val = split_off(raw, ",");
auto key = split_off(val, "=");
Expand Down
5 changes: 5 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ int main(int, char**) {
Window window{};
gui_state state{};

// show at least once.
window.begin_frame();
state.gui();
window.end_frame();

for (;window.running() && !state.shutdown_requested;) {
if (!window.visible()) {
log_debug("Pausing for events.");
Expand Down
4 changes: 2 additions & 2 deletions src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ std::filesystem::path get_resource_path(const std::filesystem::path& fn) {
CFURLRef appUrlRef = CFBundleCopyBundleURL( CFBundleGetMainBundle() );
CFStringRef macPath = CFURLCopyFileSystemPath( appUrlRef, kCFURLPOSIXPathStyle );
CFStringEncoding encodingMethod = CFStringGetSystemEncoding();
const char* path = CFStringGetCStringPtr(macPath, encodingMethod);
auto path = std::string(CFStringGetCStringPtr(macPath, encodingMethod));
CFRelease(appUrlRef);
CFRelease(macPath);
return std::filesystem::path{path} / "Contents/Resources" / fn;
#endif
}

void log_init() {
spdlog::set_level(spdlog::level::info);
spdlog::set_level(spdlog::level::debug);
}


Expand Down
2 changes: 2 additions & 0 deletions src/window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ Window::Window() {
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 1);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_OPENGL_FORWARD_COMPAT, 1);
glfwWindowHint(GLFW_FOCUSED, 1);
glfwWindowHint(GLFW_VISIBLE, 1);
glsl_version = "#version 410";
handle = glfwCreateWindow(1280, 720, "arbor-gui", NULL, NULL);
if (handle == nullptr) log_fatal("Failed to obtain window");
Expand Down