From b7690af06e313caf7a0ce1ae01ce0a308ac55a74 Mon Sep 17 00:00:00 2001 From: oDinZu WenKi Date: Fri, 23 Feb 2024 19:56:36 -0500 Subject: [PATCH 1/2] update dev requirements --- README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 0d0b0f3..f0c1569 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ This is a Drogon Content Management System(CMS). - Lightning Fast Architecture - Headless CMS Ready for Site Generators - Lightweight Reverse Proxy Security -- Database Ready +- Database Ready for SQLite3 & PostgreSQL - Custom API Configurations - C Package Manager (CPM) - Excellent Documentation @@ -70,6 +70,7 @@ Transfer/sec: 21.24MB ### Developer Dependency Requirements * GCC (GNU C/C++ Compiler) >= 13.2.1 +* SQLite3 >= 3.43.1 or PostgreSQL >= 15.1 * CMake >= 3.28 * Drogon >= 1.9.1 [SEE REQUIREMENTS] * Pkg-Config >= 1.8.1 -- 2.25.1 From 65da95ffa0caa9d94b18da8ddf1b5384195e6634 Mon Sep 17 00:00:00 2001 From: oDinZu WenKi Date: Sat, 24 Feb 2024 23:07:32 -0500 Subject: [PATCH 2/2] update README --- CMakeLists.txt | 5 +++-- README.md | 20 +++++++++++--------- src/base.c | 3 --- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b4dc6ce..e4a4253 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,7 @@ # and oldest tested versions of CMake. This will ensure # you pick up the best policies. cmake_minimum_required(VERSION 3.1...3.28) +file(GLOB_RECURSE SOURCES RELATIVE ${CMAKE_SOURCE_DIR} "src/*.c") # If you set any CMAKE_ variables, that can go here. # (But usually don't do this, except maybe for C++ standard) @@ -55,7 +56,7 @@ project( ) # Adding something we can run - Output name matches target name -add_executable(DrogonCMS src/base.c) +add_executable(DrogonCMS ${SOURCES}) #=============================================================================== # Setting compilation flags for various compilers and build types: @@ -154,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 drogon source code locally +# Include vendor source code locally add_subdirectory(vendors/api-server/) add_subdirectory(vendors/simple-reverse-proxy/) diff --git a/README.md b/README.md index f0c1569..ae209f2 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ This is a Drogon Content Management System(CMS). - Lightning Fast Architecture - Headless CMS Ready for Site Generators - Lightweight Reverse Proxy Security -- Database Ready for SQLite3 & PostgreSQL +- Database Ready for SQLite3 & PostgreSQL 15 - Custom API Configurations - C Package Manager (CPM) - Excellent Documentation @@ -53,7 +53,7 @@ Requests/sec: 115151.94 Transfer/sec: 78.74MB ``` -### Getting a json token with web sockets and drogon proxy on 2 IO threads. +### Getting a JSON token with web sockets and Drogon proxy on 2 IO threads. ``` wrk -c200 -d5 -t2 ws://localhost:8088/get-token Running 5s test @ ws://localhost:8088/get-token @@ -70,21 +70,21 @@ Transfer/sec: 21.24MB ### Developer Dependency Requirements * GCC (GNU C/C++ Compiler) >= 13.2.1 -* SQLite3 >= 3.43.1 or PostgreSQL >= 15.1 +* PostgreSQL >= 15.1(*Priority*) or SQLite3(*Default*) >= 3.43.1 [SEE 3RD PARTY SITE DEPENDENCIES] * CMake >= 3.28 -* Drogon >= 1.9.1 [SEE REQUIREMENTS] +* Drogon >= 1.9.1 [SEE 3RD PARTY SITE DEPENDENCIES] * Pkg-Config >= 1.8.1 * Gtk4 >= 4.0 * Adwaita >= 1.3.5 * OpenSSL >= 3.1.2 -* *Optional* PostgreSQL Database(*Default*) >= 2.39 -* *Optional* Cambalache >= 0.14 (Gtk4 Editor) [SEE REQUIREMENTS] +* *Optional* Cambalache >= 0.14 (Gtk4 Editor) [SEE 3RD PARTY SITE DEPENDENCIES] * *Optional* Geany IDE >= 1.38 * CLI Experience +* Git/Github Experience *Note: This has been built and tested on Arch Linux* -### Steps to Build DrogonCMS from Source Code +### 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` @@ -94,7 +94,7 @@ Transfer/sec: 21.24MB ### Requirements -Drogon framework compile/build dependencies. +*Drogon* framework compile/build dependencies. * Drogon >= 1.9.1 https://github.com/drogonframework/drogon/wiki/ENG-02-Installation#System-Preparation-Examples ### Recommendations @@ -107,7 +107,7 @@ An optional recommendation is Geany IDE. ### IDE build commands via Geany `Build -> Set Build Commands` -#### This is what my build commands look like in Geany IDE with **GNU Automake Tools**. +#### This is what my build commands look like in *Geany IDE* with **GNU Automake Tools**. | Name | Command | Working Directory | | ----------- | ------------------ | -------------------------------------------------------------------- | @@ -155,5 +155,7 @@ oDinZu WenKi(Charles) https://liberapay.com/oDinZu/ * GObject Documentation https://docs.gtk.org/gobject/index.html * GTK 4 Demos https://gitlab.gnome.org/GNOME/gtk/-/tree/main/demos * GTK 4 Documentation https://docs.gtk.org/gtk4/ +* PostgreSQL 15 Documentation https://www.postgresql.org/docs/15/index.html +* SQLite3 Documentation https://www.sqlite.org/capi3ref.html *Notice: We focus implementation with the C programming language and only add various features of C ++ code.* diff --git a/src/base.c b/src/base.c index 8c8e9ff..2c152c2 100644 --- a/src/base.c +++ b/src/base.c @@ -10,7 +10,6 @@ # License: GPL-3.0 # Version: 0.0.1 - # This is Free Software released under GPL-3.0. Any misuse of this software # will be followed up with GPL enforcement via Software Freedom Law Center: # https://www.softwarefreedom.org/ @@ -46,7 +45,6 @@ static GtkWidget *register_button; Functions */ - /* Compare password entries for admin registration confirmation */ static void update_register_button(GObject *object, @@ -105,7 +103,6 @@ activate(GtkApplication *app, g_object_unref(builder); } - /* Main program begins here */ -- 2.25.1