Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test brew fltk #67

Closed
wants to merge 8 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 3 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,9 @@ jobs:
freeglut \
libpng \
meson \
ninja
brew install --cask xquartz
ninja \
fltk
# brew install --cask xquartz
cd /opt/homebrew/opt/llvm/bin
#ln -s clang++ clang++-19
PATH=/opt/homebrew/opt/llvm/bin:$PATH
Expand Down
9 changes: 1 addition & 8 deletions MILESTONES.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
General overview of upcoming features.
For past releases please check in [here](./docs/releases/).

## 0.1.1-alpha

- [x] Complete the build/install process
- [x] Docker image
- [x] Flatpak building pipeline
- [x] Prepare pipeline for github actions

## 0.1.3

- [x] Move all components to the revised codegen format
- [ ] New getters and setters design (and updated schemas).
- [ ] Implement flex, grid, scroll & pack via codegen.
- [ ] Tidy up the XML caching
Expand All @@ -18,7 +12,6 @@ For past releases please check in [here](./docs/releases/).

## 0.1.5

- [x] Move all components to the codegen format
- [x] Support for script modules
- [ ] Full support for getters and setters
- [x] Final implementation of the static xml builder (now external dependency)
Expand Down
75 changes: 19 additions & 56 deletions RELEASE.md
Original file line number Diff line number Diff line change
@@ -1,64 +1,27 @@
## v0.1.1-alpha
## v0.1.3-alpha

This first alpha release is not meant to be usable in real-world scenarios, and documentation will not be there yet for the most part.
The main objective is to implement & test most of the pipelines needed to:
This second alpha release is still not usable in real-world scenarios, yet some simple and somewhat useful demos should be achievable.

- build `vs`
- install it
- the generation of its flatpak image
The main objectives for this release are:

Still, `vs` is somewhat usable as a technical preview.
For now, the building pipeline is not well documented, and it can be hard to replicate.
Also, installing it on most distributions might cause issues with your past or future dependencies.
Still, you should be able to try it out via flatpak and the docker image provided by @andy5995.
I am seeking feedback, so you are very welcome to test it along!

For reference, you can check what is the [intended scope](./README.md) of this project in terms of future developments and expected features.
The [milestone](./docs/milestones.md) page also contains some related information.
- To improve the build system moving it to a separate repo.
- To introduce a wider range of fltk widgets.
- Complete the revised code-generation of widgets
- Better serialization/de-serialization of XML props & revised getters/setters

### What's new?

This is what has been implemented so far (and some missing feature for context):

- Basic CLI features for the command `vs`. These are not expected to change for quite a while.
- Code generation infrastructure for fltk components and derived schemas.
- Infrastructure to handle the user sqlite database with proper schemas and migration.
- A small set of components from fltk being exposed, like buttons, labels, windows etc.
- Several features of `vs` exposed as XML elements:
- [x] `mixin`
- [x] embedded `script`
- [ ] embedded `policies`
- [x] `namespace`
- [x] `import`
- [x] `use`
- [ ] caching directives
- [ ] dynamic data
- Basic XML builder (no full caching, no multithreading)
- Templating engine for vs components. Integration is complete, but there is ongoing work tracked in a [separate repo](https://github.com/KaruroChori/vs-templ)
- Embedded scripts:
- Support for `c` via tcc
- [x] Modules
- [x] Callbacks
- [x] Props
- [ ] Computed
- [x] Dispatcher
- [ ] Setters/getters
- [ ] FFI to external libraries
- [x] Debug interface
- Support for `js` via quickjs
- [ ] Modules
- [x] Callbacks
- [x] Props
- [ ] Computed
- [ ] Dispatcher
- [ ] Setters/getters
- [ ] FFI to external libraries
- [x] Debug interface
- Very early and limited c bindings for `vs.fltk`, mostly for testing purposes.
- A simple in-memory caching for files, compiled scripts & parsed XML trees.
The more complex sqlite cache is yet to be implemented in code.
- An early (partial) implementation of policies and coarse-grained flags as a temporary stopgap.
- Install process mostly implemented in meson (the pre-build codegen step will stay in typescript).
- Functional flatpak build
- A docker image for development
- Initial CI integrations
- [ ] Improvements to the build system

- [ ] migration of distribution-related features to [external repo]()
- [ ] fix linking to follow https://github.com/KaruroChori/vs-fltk/issues/63
- [ ] debian and arch packages are now supported
- [ ] install script can be now be safely used

- [ ] New widgets & improvements

- [ ] Updated code-gen

- [ ] Updated core features
1 change: 0 additions & 1 deletion bindings/native/include/stub.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#pragma once
#include "vs.h"
char* itoa(int value, char* result, int base);

void* vs_set_env(void* ptr);
5 changes: 4 additions & 1 deletion bindings/native/include/vs.h
Original file line number Diff line number Diff line change
Expand Up @@ -104,4 +104,7 @@ extern void vs_debug(const char* key, const char* value);
#define $cb(x) void* __EXPORT_CB__##x = x;
#define $plotter(x) void* __EXPORT_DRW_##x = x;
#define $field vs_field_t MAKE_UNIQUE_VARIABLE_NAME(__EXPORT_FIELD_)=
#define $fn(x) void* __EXPORT_UKN_##x = x;
#define $fn(x) void* __EXPORT_UKN_##x = x;

//Extra functions
char* itoa(int value, char* result, int base);
26 changes: 0 additions & 26 deletions bindings/native/src/stub.c
Original file line number Diff line number Diff line change
@@ -1,31 +1,5 @@
#include <stub.h>

char* itoa(int value, char* result, int base) {
// check that the base if valid
if (base < 2 || base > 36) { *result = '\0'; return result; }

char* ptr = result, *ptr1 = result, tmp_char;
int tmp_value;

do {
tmp_value = value;
value /= base;
*ptr++ = "zyxwvutsrqponmlkjihgfedcba9876543210123456789abcdefghijklmnopqrstuvwxyz" [35 + (tmp_value - value * base)];
} while ( value );

// Apply negative sign
if (tmp_value < 0) *ptr++ = '-';
*ptr-- = '\0';

// Reverse the string
while(ptr1 < ptr) {
tmp_char = *ptr;
*ptr--= *ptr1;
*ptr1++ = tmp_char;
}
return result;
}

node_t vs_self = 0;

void* vs_set_env(void* ptr){
Expand Down
Loading
Loading