Commit graph

5155 commits

Author SHA1 Message Date
Olivier Goffart
5c9c5c2748 WIP: work on the MCU rendering engine 2021-11-22 13:51:22 +01:00
Tobias Hunger
8b30849f7e compilerlib: Add tests for linear_gradient and image_url
Add two simple tests to make sure we do not exidentally break the
alternative spelling for linear-gradient and image-url.
2021-11-22 13:21:17 +01:00
Tobias Hunger
37a2ad5b0f compilerlib: Fix an assert triggered by linear_gradient
Allow both documented spellings of linear_gradient in the debug_assert.
2021-11-22 13:21:17 +01:00
Simon Hausmann
d91510bb8a Prospective fix for input handling for vscode extension build
When the workflow is triggered via workflow_call, the input
is in different variables unfortunately. Try to use the same trick as in
sixtyfps_tool_binary.yaml.
2021-11-22 11:39:09 +01:00
Simon Hausmann
d3d81a6c94
Prospective fix for missing vs code extension build jobs
Try using a different name for the internal job
2021-11-20 12:44:57 +01:00
Simon Hausmann
3674a14e07 Minor cleanup
Rename the viewer binary yaml file to tool, as it's not only for the viewer anymore.
2021-11-20 12:13:14 +01:00
Simon Hausmann
23021e182c
Simplify snapshot build structure
Always build the vs code extension, the regular CI should be the guard in the future and this needs condition somehow doesn’t work (never triggers despite all green)
2021-11-20 11:52:52 +01:00
Simon Hausmann
f33fae4753
Make the vs code extension build in snapshot when the demos worked
The publish job is just mechanical
2021-11-20 08:22:18 +01:00
Simon Hausmann
5889a33337
Fix GH action string literal syntax 2021-11-19 23:17:03 +01:00
Simon Hausmann
d657f4cff6
Prospective fix for snapshot build publishing despite the false input
It appears that boolean inputs are just strings
2021-11-19 23:14:58 +01:00
Simon Hausmann
cfb1ca41e3 Build the sixtyfps-viewer and the -lsp binary with the same workflow
This requires adding Cargo features to the lsp in order to be able to
make a build that doesn't use the GL backend. In theory --features
sixtyfps-interpreter/backend-qt could be used to opt into Qt, but
there's no way of turning off the gl backend AFAIK - hence the features
in the lsp.
2021-11-19 17:56:04 +01:00
Simon Hausmann
0db0373fd1 Integrate the vs code nightly extension build into the snapshot workflow 2021-11-19 17:56:04 +01:00
Simon Hausmann
f7ebdb7fb2 Add a new snapshot workflow for all binaries
This splits the docs and wasm workflows into shared files, that will be
called (for QA purposes) from ci.yaml as well as from nightly_snapshot
(for publishing).

The viewer build is also triggered by the snapshot workflow.
2021-11-19 17:56:04 +01:00
Olivier Goffart
a40885b39e MCI: small changes required to run an (empty) windows for the compiled printerdemo 2021-11-19 16:03:38 +01:00
Olivier Goffart
3534f3bd4c Disable texture embedding with wasm
We can't support it with the interpreter, and the compiler running on wasm
is only used for the interpreter.
And this cause compilation issue because some dependencies enable features
that breaks the build
2021-11-19 15:54:45 +01:00
Olivier Goffart
d1cae710df preprocess the images at compile time
For the MCU port, we need to proccess the image to save them in the binary
in a convenient format.
This patch start this work by trying to anaylyze what format should an image
be using, and saving it as a texture in the binary.

The current graphical backend and the C++ frontend are not yet supported
2021-11-19 15:54:45 +01:00
Simon Hausmann
d539d4be79 Naive implementation of the window background item for the simulator 2021-11-19 15:02:52 +01:00
Simon Hausmann
abb423ed33 Initial commit for a new software rendering backend for use in MCUs
This adds the skeleton, including a winit driven simulator window
and a dummy ItemRenderer implementation.
2021-11-19 15:02:52 +01:00
Simon Hausmann
8f940a446e Make it possible to opt out of the default rendering backend selection
The default backend does not select any features or backends by default
on the Cargo.toml feature level. And with this change it also doesn't do
that anymore based on the target platform.

That means if the rust api crate is built with default-features = false,
no backend will be selected and the user has to take care of backend
initialization through other means.

The feature defaults, generally, are in the rust API crate, the
interpreter crate and C++ CMakeLists.txt. The latter triggers a cargo
build of sixtyfps-cpp with --no-default-features. However the cpp_test
job in the CI doesn't build sixtyfps-cpp with CMake but instead calls
cargo directly. Therefore the defaults are now also coded in the
sixtyfps-cpp Cargo.toml, to ensure that *a* rendering backend is chosen
(since the cfg.target bit is gone).
2021-11-19 15:02:52 +01:00
Simon Hausmann
231d46bd69 Add placeholder workflows to faciliate development in a branch
The objective is to split up the workflows, which requires the existence
of the *new* workflow files in the master branch in order to trigger
test builds in a branch.
2021-11-19 14:00:25 +01:00
Tobias Hunger
d3542c825f compilerlib: Report failure on unterminated escape sequence
Co-authored-by: Olivier Goffart <olivier@woboq.com>
2021-11-19 13:03:40 +01:00
Tobias Hunger
a488a79d8e compilerlib: Report failure on unterminated escape sequence
Co-authored-by: Olivier Goffart <olivier@woboq.com>
2021-11-19 13:03:40 +01:00
Tobias Hunger
46f291edff Update sixtyfps_compiler/lexer.rs
Be more clever about finding the next start of character.

Co-authored-by: Olivier Goffart <olivier@woboq.com>
2021-11-19 13:03:40 +01:00
Tobias Hunger
bd1d820862 compilerlib: Fix panic when parsing "\ޱ 2021-11-19 13:03:40 +01:00
Tobias Hunger
5f2f82fd57 compilerlib: Fix panic when parsing "\ 2021-11-19 13:03:40 +01:00
Tobias Hunger
36c7aa85f8 compilerlib: Fix panic when parsing /** 2021-11-19 13:03:40 +01:00
Olivier Goffart
f138887857 QPainter and QBrush are now exposed by qttypes 0.2.5 2021-11-19 12:43:47 +01:00
Olivier Goffart
921f5675d6 Put the licenses in the C++ binary package
Note that this also change the path names to "licenses" in the viewer package
2021-11-18 19:20:25 +01:00
Simon Hausmann
7f61d99734 Fix C++ examples not launching out of the box on Windows when using multi-config generator
We copy the sixtyfps_cpp.dll into the bin directory where the examples
are, but that needs to be a Debug/ or Release/ sub-directory in case of
a multi-config generator.
2021-11-18 11:40:45 +01:00
Olivier Goffart
6bf224c9de Bump version of strum 2021-11-18 11:16:24 +01:00
Olivier Goffart
2681c24813 Disable caching of Qt 6 on Windows again
Somehow the cache is empty otherwise
2021-11-18 10:23:06 +01:00
Simon Hausmann
234b95554f Prospective fix for unnecessary cargo build when running cpack
Run the `package` target with `--config Release` just like the previous
build.
2021-11-18 10:23:06 +01:00
Olivier Goffart
7c34e7f27f C++ packages: Move the Qt plugins in the right directory 2021-11-18 10:23:06 +01:00
Olivier Goffart
1bde79e884 Fix native widgets with C++ on windows
The function that expose the vtable was not exported because the declare_item_vtable
expanded to a `#[cfg(feature = "ffi")]` with the intention to be the ffi feature
of the corelib crate. But when this macro is used from the qt backend, the ffi
feature was not set
2021-11-18 10:23:06 +01:00
Olivier Goffart
cd14e1d70c Move the NativeButtonVTable in the right module 2021-11-18 10:23:06 +01:00
Olivier Goffart
6cfb18b5d7 Fix warnings in the tests in release
The maybe-uninitialized warning triggers while we know from what
we are testing that it is meant to be initialized
2021-11-18 10:23:06 +01:00
Olivier Goffart
c5de0e6260 Update .github/workflows/ci.yaml
Co-authored-by: Simon Hausmann <simon.hausmann@sixtyfps.io>
2021-11-18 10:23:06 +01:00
Olivier Goffart
8757193253 Update to Qt6 for the C++ packages
(excepted on Linux)
2021-11-18 10:23:06 +01:00
Olivier Goffart
304ca3b62f C++ package: Bundle the Qt binary in the binary package 2021-11-18 10:23:06 +01:00
Olivier Goffart
24ed7155b7 CI: build C++ packages in release mode 2021-11-18 10:23:06 +01:00
Olivier Goffart
44118556c3 cpack: Only generate one package (the tar.gz one) 2021-11-18 10:23:06 +01:00
unc0
54ae34f9fb Set MSVC to use UTF-8 character sets on c++ source files,
so it won't throw error on `u"string"` when running in
other codepage, for example cp936.
Ref: https://docs.microsoft.com/en-us/cpp/build/reference/utf-8-set-source-and-executable-character-sets-to-utf-8
2021-11-17 19:35:12 +01:00
Olivier Goffart
73e753f091 sixtyfps-interpreter test: use the fluent style
because the native style can't run in tests because it cannot draw from
different threads
2021-11-17 14:09:55 +01:00
Olivier Goffart
2bf3e00a35 Make sure sixtyfps-interpreter tests are run with the testing backend
Because the Qt backend don't support being run in threads and the tests are
in threads and in parallel
2021-11-17 09:55:18 +01:00
Olivier Goffart
becb4574c1 Qt backend: don't set Qt::AA_PluginApplication when using the backend
Otherwise Qt won't set the hidpi mode on windows, for example
2021-11-17 09:05:24 +01:00
Olivier Goffart
40a6f3e740 Polish the Native Spinbox: There is a line edit that need to be drawn inside 2021-11-17 08:44:08 +01:00
Olivier Goffart
238ae33fe6 Remove a presumably useless file
We have no memory of why this file is needed. Let's remove it
2021-11-16 18:01:28 +01:00
Olivier Goffart
7bf3fd2871 Fix invalid CMake package on windows because of missing IMPORTED_IMPLIB 2021-11-16 17:06:27 +01:00
Olivier Goffart
8a3b064b58 cmake: have the style as a cmake cache variable 2021-11-16 17:06:15 +01:00
Olivier Goffart
c3baef1f64 Compiler: Add a --style option
So we will be able to set the style from the command line args in addition
to the env variable
2021-11-16 17:06:15 +01:00