From 8273ba0217cd3c843591e05fabcf0532e920b463 Mon Sep 17 00:00:00 2001 From: oDinZu WenKi Date: Mon, 11 Nov 2024 16:15:29 -0800 Subject: [PATCH] Add development documentation and update Cambalache version --- CMakeLists.txt | 2 +- DEV_README.md | 89 ++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 4 +-- 3 files changed, 92 insertions(+), 3 deletions(-) create mode 100644 DEV_README.md diff --git a/CMakeLists.txt b/CMakeLists.txt index e4a4253..9f9fa49 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -155,7 +155,7 @@ include_directories(${GTK4_INCLUDE_DIRS} ${ADW_INCLUDE_DIRS}) link_directories(${GTK4_LIBRARY_DIRS} ${ADW_LIBRARY_DIRS}) add_definitions(${GTK4_CFLAGS_OTHER} ${ADW_CFLAGS_OTHER}) -# Include vendor source code locally +# Include vendor source code locally/manually add_subdirectory(vendors/api-server/) add_subdirectory(vendors/simple-reverse-proxy/) diff --git a/DEV_README.md b/DEV_README.md new file mode 100644 index 0000000..c94896a --- /dev/null +++ b/DEV_README.md @@ -0,0 +1,89 @@ +# DEVELOPER JOURNAL +# V1.0.0 + +# The Design Flow/Pattern of the GTK4/C Application + + +# Cambalche Update, Configure & Meson Install Instructions: + +So, instructions that worked for me on Arch Linux if you want to manually build/install Cambalache v0.93. + + +0. `git clone https://gitlab.gnome.org/jpu/cambalache.git && cd cambalache` +1. `meson setup --wipe --prefix=~/.local _build .` +2. `ninja -C _build install` + +3. Update `~/.bashrc paths` + +``` +# Add paths for Cambalache app +export PYTHONPATH=~/.local/lib/python3.12/site-packages/ +export GI_TYPELIB_PATH=~/.local/lib/girepository-1.0/ +export LD_LIBRARY_PATH=~/.local/lib/ +``` + +4. *Optional* Add `~/.local/bin` to $PATH via `~/.bashrc` profile directly +``` +# Then, export and append .local/bin PATH to PATHS for launching Cambalache application +export PATH=/home/username/.local/bin:$PATH +EXIT and SAVE the .bashrc file +``` +4a. In the terminal/CLI, refresh .bashrc profile +`source ~/.bashrc` + +4b. Launch Cambalache via terminal (CLI) +`cambalache` + +Note 1: You also may need to copy libs over from local `./_build/cambalache/private` directory to `/home/username/.local/lib`. + +### The specific files I copied + +* CambalachePrivate-3.0.gir +* CambalachePrivate-3.0.typelib +* CambalachePrivate-4.0.gir +* CambalachePrivate-4.0.typelib +* libcambalacheprivate-3.so.p (DIR) +* libcambalacheprivate-4.so.p (DIR) + +# Steps to Build *DrogonCMS* from Source Code + +0. Clone the repository `git clone https://git.sharpetronics.com/sharpetronics/DrogonCMS` and `cd DrogonCMS/` +1. *optional* checkout correct branch e.g. `git checkout drogonCMS-cmake` +2. Run `cmake -D CMAKE_BUILD_TYPE=Release .` +3. Then, to build the executable, we do `cmake --build .` +4. Run the app with `./DrogonCMS` + +## Developer Requirements + +*Drogon* framework compile/build dependencies. +* Drogon >= 1.9.1 https://github.com/drogonframework/drogon/wiki/ENG-02-Installation#System-Preparation-Examples + +## Developer Recommendations + +A GTK4 editor is a recommended tool for this project; all UI's and project files **.cmb** are stored in `./src/ui/`. +* Cambalache >= 0.93 https://gitlab.gnome.org/jpu/cambalache + +An optional recommendation is Geany IDE. +* Geany IDE https://www.geany.org/ + +## IDE build commands via Geany `Build -> Set Build Commands` + +### This is what my build commands look like in *Geany IDE* with **GNU Automake Tools**. + +| Name | Command | Working Directory | +| ----------- | ------------------ | -------------------------------------------------------------------- | +| Configure | ../configure | /home/username/Desktop/Local-Development/cplusplus/drogon-dash/build | +| AutoReconf | autoreconf -vi | /home/username/Desktop/Local-Development/cplusplus/drogon-dash | +| Make | make | /home/username/Desktop/Local-Development/cplusplus/drogon-dash/build | +| Run | ./drogon_dashboard | /home/username/Desktop/Local-Development/cplusplus/drogon-dash/build | +| Make Bins | make dist | /home/username/Desktop/Local-Development/cplusplus/drogon-dash/build | + +### This is what my build commands look like in Geany IDE with **BSD CMake Tools**. + +| Name | Command | Working Directory | +| ----------- | ------------------ | -------------------------------------------------------------------- | +| Configure | cmake -D CMAKE_BUILD_TYPE=Release | /home/username/Desktop/Local-Development/cplusplus/DrogonCMS/ | +| Build | cmake --build . | /home/username/Desktop/Local-Development/cplusplus/DrogonCMS | +| Run GUI | ./DrogonCMS | /home/username/Desktop/Local-Development/cplusplus/DrogonCMS/ | +| Run API | ./DrogonCMS-API-Server | /home/username/Desktop/Local-Development/cplusplus/DrogonCMS/vendors/api-server/ | +| Install | cmake --install | /home/username/Desktop/Local-Development/cplusplus/DrogonCMS/ | diff --git a/README.md b/README.md index ae209f2..5aca9ca 100644 --- a/README.md +++ b/README.md @@ -77,7 +77,7 @@ Transfer/sec: 21.24MB * Gtk4 >= 4.0 * Adwaita >= 1.3.5 * OpenSSL >= 3.1.2 -* *Optional* Cambalache >= 0.14 (Gtk4 Editor) [SEE 3RD PARTY SITE DEPENDENCIES] +* *Optional* Cambalache >= 0.93 (Gtk4 Editor) [SEE 3RD PARTY SITE DEPENDENCIES] * *Optional* Geany IDE >= 1.38 * CLI Experience * Git/Github Experience @@ -100,7 +100,7 @@ Transfer/sec: 21.24MB ### Recommendations A GTK4 editor is a recommended tool for this project; all UI's and project files **.cmb** are stored in `./src/ui/`. -* Cambalache >= 0.14 https://gitlab.gnome.org/jpu/cambalache +* Cambalache >= 0.93 https://gitlab.gnome.org/jpu/cambalache An optional recommendation is Geany IDE. * Geany IDE https://www.geany.org/ -- 2.25.1