Commit graph

5126 commits

Author SHA1 Message Date
Simon Hausmann
acea1da330 A bit of changelog polish 2021-11-24 08:57:57 +01:00
Simon Hausmann
f7f4797171 Include cargo-about info also in the non-windows packages
... by calling prepare_binary_package.sh on all platforms, but only
include the Qt license attribution where we bundle it.
2021-11-23 23:16:24 +01:00
Simon Hausmann
6547979b89 Remove unused parameters from packaging prep script 2021-11-23 23:16:24 +01:00
Olivier Goffart
47a4463abc Rename the sub component id to avoid error in the generated code with duplicated names 2021-11-23 12:03:03 +01:00
Olivier Goffart
7a88902d4e Fix once more the description of @image-url in the tutorial
PR #669 changed the wording, but the tutorial uses the sixtyfps! macro
for which that wording was fine.
Instead, be more explicit about chere the file is looked up in both situation
2021-11-23 11:18:02 +01:00
Olivier Goffart
865f574808 Fixup crater test 2021-11-23 11:18:02 +01:00
Simon Hausmann
fa14a80ea8 Fix text rendered blurry when using Qt
After commit becb4574c1 we'll
make sure not to set the plugin application attribute when initializing
the Qt backend. Unfortunately in the generated struct the NativeStyleMetrics field
is placed and initialized before the m_window. The Default::default() impl
calls `ensure_initialized()` with `from_qt_backend = false` because we don't
know what backend is being used. Since due to the ordering this is the first
call to `ensure_initialized()`, we'll end up setting the plugin application
attribute.

This patch fixes that by ensuring that the m_window field always comes first,
which is initialized with a call into the run-time library, which in turn
delegates to the backend. That'll be the Qt backend and we'll initialize
the application object correctly.
2021-11-23 11:05:02 +01:00
Simon Hausmann
3550362f0b Fix blurry test in the NSIS installer for the C++ package on Windows
Enable High-DPI as per https://gitlab.kitware.com/cmake/cmake/-/issues/17724
2021-11-23 10:18:50 +01:00
Olivier Goffart
4d6e7639f8
Update crater.yaml 2021-11-23 09:34:22 +01:00
Olivier Goffart
4757469558 Add a GitHub action workflow to test a bunch of dependent crates 2021-11-23 09:30:54 +01:00
Jared Moulton
799dbff366 Fix the description of where @image-url looks for files 2021-11-23 08:34:32 +01:00
Simon Hausmann
82c91f8df3 Switch CI to macos-11
macos-latest will soon advance to 11 anyway.
2021-11-22 21:00:04 +01:00
Simon Hausmann
8d86fca791 Work around bug in GH actions for the vs code extension build
Fold the vscode_extension.yaml file into nightly_snapshot.yaml to work around the fact
that the called workflow fails to spawn the jobs.
2021-11-22 19:52:54 +01:00
Olivier Goffart
7640540719 Another attempt to get CI action working
maybe GitHub is confused because publish is botrh an input and a step
2021-11-22 18:20:46 +01:00
Olivier Goffart
d2beb73404 CI: attempt to remove the vscode_extension_build from the nightly build
Looks like github action is having a bug
2021-11-22 18:11:53 +01:00
Olivier Goffart
80a3e856dd CI: fix warning: cargo-about is not in the tool cache 2021-11-22 18:03:44 +01:00
Olivier Goffart
3e3e98725f Fix build
apparently there was Some issue while rebasing
2021-11-22 17:57:08 +01:00
Olivier Goffart
20f41a681b MCU: Render line by line in a line buffer 2021-11-22 17:15:28 +01:00
Simon Hausmann
cd9db61545 Include the VS runtime dlls in the binary package
We bundle Qt and Qt needs the VC runtime DLLs. There are two options:
Find and locate vcredist.exe, include it in the NSIS installer and run
it. Alternatively, a cmake module exists to locates the DLLs and
install them.

This patch uses the latter option, for simplicity. When upstream ticket
https://gitlab.kitware.com/cmake/cmake/-/issues/17725 is implemented, we
could switch to the first option.

Note: This might include a few DLLs that Qt probably doesn't
need.
2021-11-22 16:04:09 +01:00
Simon Hausmann
2753186f3a Fix CI build
Comment out unused z field in the MCU renderer
2021-11-22 14:36:12 +01:00
Olivier Goffart
6a17ae3328 MCU: Dasic support for image drawing 2021-11-22 13:51:22 +01:00
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