SDK for building cross-platform desktop apps in ANSI-C

Overview

NAppGUI

Cross-Platform C SDK. Build portable desktop applications for Windows, macOS and Linux, using just C.

NAppGUI Stack

Quick start in Windows

Prerequisites

Open the Developer Command Prompt

(from C:\)

// Clone the NAppGUI repo
git clone --depth 1 https://github.com/frang75/nappgui_src.git nappgui_sdk

// Create a build directory
mkdir nappgui_build
cd nappgui_build

// Generate the Visual Studio Solution
cmake -G "Visual Studio 16 2019" ../nappgui_sdk/src

// Build the examples
msbuild NAppGUI.sln

// Run examples in 'demo' and 'howto' folders
.\demo\die\Debug\Die.exe
.\demo\bricks\Debug\Bricks.exe
.\demo\products\Debug\Products.exe
.\howto\col2dhello\Debug\Col2dHello.exe
.\howto\guihello\Debug\GuiHello.exe
...

Running demo project in Windows

Quick start in macOS

Prerequisites

Open the Terminal

(from your home dir ~/)

// Clone the NAppGUI repo
git clone --depth 1 https://github.com/frang75/nappgui_src.git nappgui_sdk

// Create a build directory
mkdir nappgui_build
cd nappgui_build

// Generate the Xcode project
cmake -G "Xcode" ../nappgui_sdk/src

// Build the examples
xcodebuild

// Run examples in 'demo' and 'howto' folders
./demo/die/Debug/Die.app/Contents/MacOS/Die
./demo/bricks/Debug/Bricks.app/Contents/MacOS/Bricks
./demo/products/Debug/Products.app/Contents/MacOS/Products
./howto/col2dhello/Debug/Col2dHello.app/Contents/MacOS/Col2dHello
./howto/guihello/Debug/GuiHello.app/Contents/MacOS/GuiHello
...

Running demo project in macOS

Quick start in Linux

Prerequisites

// Development tools
sudo apt-get install gcc
sudo apt-get install g++
sudo apt-get install git
sudo apt-get install make
sudo apt-get install cmake

// Development libraries
sudo apt-get install libgtk-3-dev
sudo apt-get install libglu1-mesa-dev freeglut3-dev mesa-common-dev
sudo apt-get install libcurl4-openssl-dev

Open the Terminal

(from your home dir ~/)

// Clone the NAppGUI repo
git clone --depth 1 https://github.com/frang75/nappgui_src.git nappgui_sdk

// Create a build directory
mkdir nappgui_build
cd nappgui_build

// Generate the Makefiles
cmake -G "Unix Makefiles" ../nappgui_sdk/src

// Build the examples
make

// Run examples in 'demo' and 'howto' folders
./demo/die/Debug/Die
./demo/bricks/Debug/Bricks
./demo/products/Debug/Products
./howto/col2dhello/Debug/Col2dHello
./howto/guihello/Debug/GuiHello
...

Running demo project in Linux

More info

Issues
  • [BUG] gifs are not played on linux

    [BUG] gifs are not played on linux

    https://user-images.githubusercontent.com/51754973/158998704-7f902b87-d582-4395-b90d-7d07c83aaac7.mp4

    tested on linux mint and arch linux. this is the binary that is downloaded here:https://nappgui.com/en/download/download.html I also compiled the library on my system with gcc 11 and it has the same issue.

    bug 
    opened by mohad12211 5
  • Build errors with CMake >= 3.21.2

    Build errors with CMake >= 3.21.2

    Hello! I'm excited to try this library out, but can't get the demos to build on my macOS system.

    I followed the macOS quick start instructions here. First, I get the CMake output as shown in this gist. Looks fine aside from the upfront warning about the CMake version (I'm using the latest 3.21.2).

    Then, running xcodebuild, I get the output in this other gist, with the first error shown on line 615.

    Error seems to emanate from draw2d_osx.ixx.

    Unfortunately, I'm not much of a macOS developer, so I'm not sure how one would even go about correcting this! (I guess I need to learn 😄)

    Thanks for any help on this!

    bug 
    opened by TheMartianObserver 4
  • fseek, ftell?

    fseek, ftell?

    From my point of view it's a very good idea to also include basic features in NAppGUI usually found in the C standard library to avoid compiler/platform dependencies.

    But I didn't find fseek nor ftell (or similar functionality), neither in Osbs nor in Core. Can you give me a hint please how I'm supposed to set a file position using NAppGUI?

    enhancement 
    opened by rochus-keller 2
  • Not able to make the Xcode project

    Not able to make the Xcode project

    Hi there... trying quickly I get this error:

    MBP:nappgui_build oldes$ cmake -G "Xcode" ../nappgui_sdk/src
    -- The C compiler identification is AppleClang 11.0.0.11000033
    -- The CXX compiler identification is AppleClang 11.0.0.11000033
    -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang
    -- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -- works
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - failed
    -- Detecting C compile features
    -- Detecting C compile features - failed
    -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++
    -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -- broken
    CMake Error at /usr/local/Cellar/cmake/3.9.5/share/cmake/Modules/CMakeTestCXXCompiler.cmake:44 (message):
      The C++ compiler
      "/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++"
      is not able to compile a simple test program.
    
      It fails with the following output:
    
       Change Dir: /Users/oldes/GIT/nappgui_build/CMakeFiles/CMakeTmp
    
      
    
      Run Build Command:"/usr/bin/xcodebuild" "-project"
      "CMAKE_TRY_COMPILE.xcodeproj" "build" "-target" "cmTC_cb4fb"
      "-configuration" "Debug"
    
      note: Using new build system
    
      2021-09-09 23:00:33.422 xcodebuild[33634:1747991] unable to create build
      operation: Error Domain=com.apple.xcbuild Code=1 "unknown error while
      handling message: missingTarget(guid:
      "1aba590e2e5c6a1873bb5978a646d793204a9ea3f8464f305b840440404ef12c")"
      UserInfo={NSLocalizedDescription=unknown error while handling message:
      missingTarget(guid:
      "1aba590e2e5c6a1873bb5978a646d793204a9ea3f8464f305b840440404ef12c")}
    
      
    
      ** BUILD FAILED **
    
    MBP:nappgui_build oldes$ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ --version
    Apple clang version 11.0.0 (clang-1100.0.33.8)
    Target: x86_64-apple-darwin18.7.0
    Thread model: posix
    InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
    
    MBP:nappgui_build oldes$ xcodebuild -version
    Xcode 11.0
    Build version 11A420a
    
    opened by Oldes 2
  • Fix xcode compiling big sur binary for catalina with Xcode <= 12.4

    Fix xcode compiling big sur binary for catalina with Xcode <= 12.4

    Hi

    This project looks truly incredible! i am baffled how you only have 195 stars, when that's said, thanks for making nappgui ❤️

    I stumbled upon this minor issue while building the project on macOS Catalina. Apple has gotten less consistent when it comes to removing support for Xcode, ie. not only at major increments... as such you can actually use Xcode 12 on Catalina up to 12.4, which this PR reflects.

    The "sw_vers" command has existed for all of mac os x lifetime, so it should be compatible with all mac os versions nappgui supports

    opened by MrStevns 1
  • Simplify warning suppression enable Ninja on WIN32

    Simplify warning suppression enable Ninja on WIN32

    I propose changing the visual C++ warnings into a CMAKE list for easier maintenance. A side effect of this is that Ninja builds for CI can be integrated.

    Documentation for the Ninja build

    // Batch build using Ninja build tool (VS 2022)
    // Generate the build
    cmake -DCMAKE_VS_PLATFORM_TOOLSET=v143 -G "Ninja" ../nappgui_sdk/src
    
    // Build the examples
    ninja
    
    opened by g8kig 0
  • Dynamically unloading GUI elements

    Dynamically unloading GUI elements

    Hello,

    I'm working on a application that requires some dynamic UI behavior. In the context of this application this means adding and removing (not hiding but outright destroying) arbitrary GUI elements to a existing (and visible) window.

    Looking at the documentation and going through the examples I haven't found a way to achieve this.

    Is this something that is doable?

    Thank you!

    opened by kicsyromy 1
  • TableView

    TableView

    Hi,

    I am looking to port a java application to nappgui, but the main part of the program has a table that has editable elements. I was wondering the status / progress of the TableView code and what all needs done before its functional. I have no problems contributing time and code to make it work either.

    Thanks

    enhancement work-in-progress 
    opened by devilsclaw 3
  • Applications not sized correctly Ubuntu 18.04.

    Applications not sized correctly Ubuntu 18.04.

    For example the hello demo app only displays the title bar. Build from source is successful. I am surprised the application can not be resized/maximised either. Otherwise nice job Screenshot from 2022-04-10 18 57 11 Screenshot from 2022-04-10 18 57 50 !

    bug 
    opened by g8kig 10
  • C++ wrapper and some notes

    C++ wrapper and some notes

    Nice project! I was experimenting with the examples and started writing some C++ wrapper classes, similar to WTL (http://wtl.sourceforge.net/)

    I have a fork with my changes and a new hello world C++ example: https://github.com/ragsaq/nappgui_src

    My suggestions are:

    • try and refactor the CMakeLists.txt so that the includes use #include <header> instead of #include "header"
    • try and get the library included in vcpkg: https://github.com/microsoft/vcpkg
    • put all includes in a nappgui folder, to avoid conflicts: #include <nappgui/gui.hxx>
    • use editorconfig (https://editorconfig.org/) or clang-format. some of the files have mixed tabs/spaces. it would help to keep it consistent and would help contributors to use the same style.

    once the library is included in vcpkg my C++ wrappers would integrate better (right now, I just copied the headers to the same folders)

    the hello world example I did compiles to around the same size to the C API. each class just stores a pointer, so it's cheap to copy by value and wrap existing pointers/interface with the C API.

    enhancement 
    opened by ragsaq 1
Releases(v1.2.3)
  • v1.2.3(Jun 5, 2022)

    Features

    • Linux ARM64 build support.
    • Build support for "AppleClang" compiler ID.

    Bug corrections

    • TextView rich text working on macOS
    • Solved compile warnings with macOS SDK 12.0
    Source code(tar.gz)
    Source code(zip)
  • v1.2.2(Apr 30, 2022)

    Features

    • GCC11 Ubuntu 22.04 support.

    Bug corrections

    • GTK3 issues in older versions (Ubuntu 12, 14, 16)
    • Proc deadlock in Win32 'bproc_read_close'
    Source code(tar.gz)
    Source code(zip)
  • v1.2.1(Apr 9, 2022)

    New API functions

    • buffer_const()
    • buffer_with_data()
    • heap_leaks()
    • heap_stats()
    • bfile_pos()
    • bfile_seek()
    • layout_dbind_update()
    • evbind_modify()
    • evbind_object()
    • r2d_centerf()

    Features

    • VisualStudio 2022 support.
    • Xcode 13 macOS Monterey support.

    Improvements

    • Containers 'const' treatment (Arrays, Sets).
    • Linux Gtk3/Curl/Pthread package dependencies management.
    • GUI data binding implementation and docs: https://nappgui.com/en/gui/gbind.html.

    Bug corrections

    • GIF animations in GTK/Linux.
    Source code(tar.gz)
    Source code(zip)
  • v1.2.0(Oct 16, 2021)

Owner
Francisco García Collado
Lead developer at NAppGUI Cross-Platform C SDK.
Francisco García Collado
The Gecko SDK (GSDK) combines all Silicon Labs 32-bit IoT product software development kits (SDKs) based on Gecko Platform into a single, integrated SDK.

Silicon Labs Gecko SDK (GSDK) The Gecko SDK (GSDK) combines Silicon Labs wireless software development kits (SDKs) and Gecko Platform into a single, i

Silicon Labs 95 Jul 2, 2022
This plugin allows Flutter desktop apps to defines system tray.

tray_manager This plugin allows Flutter desktop apps to defines system tray. tray_manager Platform Support Quick Start Installation ⚠️ Linux requireme

LeanFlutter 79 Jun 25, 2022
This plugin allows Flutter desktop apps to Auto launch on startup / login.

This plugin allows Flutter desktop apps to Auto launch on startup / login.

LeanFlutter 28 Jun 18, 2022
This plugin allows Flutter desktop apps to defines system/inapp wide hotkey (i.e. shortcut).

hotkey_manager This plugin allows Flutter desktop apps to defines system/inapp wide hotkey (i.e. shortcut). hotkey_manager Platform Support Quick Star

LeanFlutter 61 Jun 16, 2022
A set of very empty header files that can be used when building apps with Cosmopolitan

cosmo-include A set of very empty header files that can be used when building apps with Cosmopolitan Why? When you build an application with Cosmopoli

null 18 May 9, 2022
A framework for building native Windows apps with React.

React Native for Windows Build native Windows apps with React. See the official React Native website for an introduction to React Native. React Native

Microsoft 14.8k Jun 25, 2022
Appupdater is a C++ cross-platform framework to update desktop software (gitlab mirror)

appupdater is a C++ cross-platform framework to update desktop software. How it works Framework checks the URL you specified for info about versions a

Ronzhin Mikhail 1 Jan 8, 2022
A framework for building Mobile cross-platform UI

Weex A framework for building Mobile cross-platform UI. Distribution Support Android 4.1 (API 16), iOS 9.0+ and WebKit 534.30+. platform status Androi

Alibaba 17.9k Jun 26, 2022
POCO C++ Libraries are powerful cross-platform C++ libraries for building network

The POCO C++ Libraries are powerful cross-platform C++ libraries for building network- and internet-based applications that run on desktop, server, mobile, IoT, and embedded systems.

POCO C++ Libraries 6.2k Jul 2, 2022
First open-source Geometry Dash cross-platform Modding SDK

BoolkaSDK First open-source Geometry Dash cross-platform Modding SDK Requirements CMake 3.21 Android NDK r23 LLVM x86 Java and ApkTool Building Open C

null 6 Jun 9, 2022
The Raspberry Pi Pico SDK (henceforth the SDK) provides the headers, libraries and build system necessary

The Raspberry Pi Pico SDK (henceforth the SDK) provides the headers, libraries and build system necessary to write programs for the RP2040-based devices such as the Raspberry Pi Pico in C, C++ or assembly language.

Raspberry Pi 1.5k Jul 2, 2022
Run statically-compiled WebAssembly apps on any embedded platform

embedded-wasm-apps Run native, statically-compiled apps on any platform, using WebAssembly. Examples include AssemblyScript, Rust, C/C++, TinyGo, Zig,

Wasm3 Labs 99 Jun 22, 2022
The Leap Motion cross-format, cross-platform declarative serialization library

Introduction to LeapSerial LeapSerial is a cross-format, declarative, serialization and deserialization library written and maintained by Leap Motion.

Leap Motion (Ultraleap) 15 Jan 17, 2022
A cross platform shader language with multi-threaded offline compilation or platform shader source code generation

A cross platform shader language with multi-threaded offline compilation or platform shader source code generation. Output json reflection info and c++ header with your shaders structs, fx-like techniques and compile time branch evaluation via (uber-shader) "permutations".

Alex Dixon 273 Jun 10, 2022
Semantic version library written in ANSI C

semver.c Semantic version v2.0 parser and render written in ANSI C with zero dependencies. Features Standard compliant (otherwise, open an issue) Vers

Tom 169 May 16, 2022
Espressif ESP32 implementation of ANSI-ESTA E1.11 DMX-512A

This library allows for transmitting and receiving ANSI-ESTA E1.11 DMX-512A using an Espressif ESP32. It provides control and analysis of the packet configuration and allows the user to read synchronously or asynchronously from the DMX bus. This library also includes tools for data error-checking to safely process DMX commands.

null 72 Jul 3, 2022
ASMotor is a portable and generic assembler engine and development system written in ANSI C99

ASMotor is a portable and generic assembler engine and development system written in ANSI C99 and licensed under the GNU Public License v3. The package consists of the assembler, the librarian and the linker. It can be used as either a cross or native development system.

null 40 Jun 24, 2022
My ANSI C solutions for Advent of Code.

ansi-adventure My optimized ANSI C solutions for Advent of Code. I tried favoring speed and performance the most here than most advent of code repos.

2 Dec 12, 2021
an implementation of the ansi c standard library that makes sense when ur stoned, tired, or otherwise inebriated

eli5 c stdlib an implementation of the ansi* c standard library that makes sense when ur stoned, tired, or otherwise inebriated * apparently this (htt

Ellen Körbes 7 Oct 13, 2021