Commit graph

176 commits

Author SHA1 Message Date
Simon Hausmann
9c8b0a613b C++: Strip host suffix from package name if there's no host dependent content 2024-08-30 10:25:49 +02:00
Olivier Goffart
30c98deecd C++: use PROJECT_VERSION for the CPACK version 2024-08-29 14:12:42 +02:00
Simon Hausmann
069b157143 Unify Slint project version in CMake build 2024-08-29 11:23:09 +02:00
Simon Hausmann
90b2058e49 Make it possible to configure a CMake build with the slint-compiler to be downloaded at app configure time 2024-08-29 11:23:09 +02:00
Simon Hausmann
5d03d6e1bd Simplify slint-compiler import location logic in SlintConfig.cmake.in
Instead of detecting the suffix, just copy across the corrosion-determined file name.

Amends 13975d9def
2024-08-25 21:05:55 +02:00
Simon Hausmann
e488a36487 C++: For freestanding builds, default to the fluent style
Freestanding implies the lack of windowing system presence and therefore the choice of say Cupertino when building on macOS is not good.

Fluent isn't quite a great choice right now either, as it's not very touch friendly, but it's a compromise :)
2024-08-23 13:25:50 +02:00
Simon Hausmann
327e0d8d95
Fix C++ package names when not cross compiling 2024-08-22 20:15:41 +02:00
Simon Hausmann
d413fd5217
Build binary MCU packages as tarballs (#5900)
This includes xtensa for s3, esp riscv targets, as well as thumbv7
for STM32.

Co-authored-by: Olivier Goffart <olivier.goffart@slint.dev>
2024-08-22 16:16:55 +02:00
Simon Hausmann
d78354f01b
Initial import of STM32 Platform Integration (#5892)
This is a head-only library for now.
2024-08-22 15:55:01 +02:00
ogoffart
4dd7d96a28 Bump version number to 1.8.0 2024-08-15 12:44:46 +00:00
ogoffart
bbf7edc5a3 Bump version number to 1.7.2 2024-08-09 09:52:17 +00:00
ogoffart
aa25e3cd44 Bump version number to 1.7.1 2024-07-23 12:05:34 +00:00
Simon Hausmann
bc1ada20bd Revert "C++: Enable software renderer by default"
This reverts commit 42571bbddb.

The line-by-line renderer doesn't compile with xcode 15.4,
and TestWindowAdapter doesn't compile with gcc 10 in the linux CI.
2024-07-10 22:39:20 +02:00
Simon Hausmann
42571bbddb
C++: Enable software renderer by default
It's also enabled by default in the rust crates and the tools.
2024-07-10 22:19:20 +02:00
Simon Hausmann
6d79ca1a05 Document the SLINT_FEATURE_XXX pre-processor variables
and sync them with the existing features.
2024-07-04 13:39:13 +02:00
Simon Hausmann
964de46c51 C++: Make the system testing feature automatically enable debug info
While we haven't settled on the debug info feature and are
merely controlling it via environment variable, setting that can be very hard - especially when using Yocto.

To make life easier, let's do in C++ what we can't easily do for Rust but would like to:

When enabling system testing, automatically emit the necessary debug info, by setting the environment variable when calling the compiler.

This is done by adding SLINT_ENABLED_FEATURES and SLINT_DISABLED_FEATURES properties
on the Slint::Slint target that - as lists - export the list of features and their status.

This way we can compile Slint in once place and safely in the CMake code running in application
scope check about the available features.
2024-07-04 13:39:13 +02:00
Simon Hausmann
4591ad8d57 Add plumbing for system testing 2024-06-13 04:03:17 -07:00
ogoffart
3a6e34ba45 Bump version number to 1.7.0 2024-06-04 20:34:29 +00:00
Aurindam Jana
3523e86359
Simplify commercial license (#3063)
Base the commercial license on the Royalty-free license adding clauses pertaining to the fees.
2024-05-31 14:06:17 +02:00
Aurindam Jana
9a3aa265d5
Update Royalty-free license (#5257)
Add clarification that Application may not expose Slint APIs.
2024-05-31 10:53:19 +02:00
Olivier Goffart
6a15a1d69a Janitor: upgrade corrosion 2024-05-02 18:43:47 +02:00
Olivier Goffart
475ced0a62 C++ testing API: Intreoduce the ElementHandle 2024-04-22 11:28:12 +02:00
Simon Hausmann
98a34e5d9b Fix Windows C++ binary package file name (attempt 4)
CPACK_SYSTEM_NAME is not defined until including CPack.cmake, which
has to happen last. So do it by hand.
2024-04-17 07:16:44 +02:00
Simon Hausmann
35605af303 Fix Windows C++ binary package file name (attempt 3)
CPACK_SYSTEM_NAME is what we used before, and that has the win64 suffix
that the prepare_release job in nightly_snapshot.yaml expects. Also
fixed the docs to add the missing MSVC suffix that's new.
2024-04-16 17:50:59 +02:00
Simon Hausmann
20431b41bb C++: Fix build with nightly Rust
Cargo disallows dashes in library target names (lib.name in Cargo.toml), but when not set it uses
the package name. That meant that dashes snuck in and https://github.com/rust-lang/cargo/pull/12783 fixes that.

The targets Corrosion creates correspond to the library name, so after that change it's slint_cpp.

To make this work with stable cargo, explicitly switch lib.name to slint_cpp.
2024-04-16 15:59:43 +02:00
Simon Hausmann
613eb90029 Windows: Fix package generation
The version number is not set, so the package name would end up as
Slint-cpp---MSVC.exe. Instead, just append the MSVC suffix, as
suggested by Olivier.

Amends cacc13343f
2024-04-16 10:02:09 +02:00
Aurindam Jana
0cfeec1a31
Update Slint Community License (#4994)
Updated the version from 1.1 to 1.2 
Renamed the header to "Slint Royalty-free Desktop, Mobile, and Web Applications License"
Added definition of "Mobile Application" and grant of right
Moved "Limitations" to 3rd section and "License Conditions - Attributions" to 2nd section
Added flexibility to choose between showing "MadeWithSlint" as a dialog/splash screen or on a public webpage
Moved the para on copyright notices to section under "Limitations"
2024-04-15 15:18:55 +02:00
Simon Hausmann
cacc13343f
Clarify the Windows C++ package compiler dependency (#5053)
Add a -MSVC suffix to our binary package (and prepare for future MinGW build)

cc #5052
2024-04-15 08:28:19 +02:00
Olivier Goffart
fd4dcfc128
Update MSRV to 1.73
A MSRV update is required to update the image crate to 0.25, otherwise
we get link error that are ficed in newer version.
Also other dependency update such as env_logger needs a newer MSRV.

Update to 1.73 because it has functions like `with_borrow` on thread
storage which we already actually use in some platform.

This is also the last release before the the drop of macOs < 10.12
in Rust 1.74
2024-03-27 09:04:31 +01:00
ogoffart
6bf40989d9 Bump version number to 1.6.0 2024-03-27 07:49:22 +00:00
ogoffart
20c570ab1d Bump version number to 1.5.1 2024-03-18 08:55:01 +00:00
Simon Hausmann
76ac137438 Fix build against esp32-p4
- Bump esp-backtrace for esp32-p4 support, which removes the uart feature and delegates to esp-println
- Added esp-println dependency
- Add mapping for ESP32P4 and other risc-v esp-idf targets to the corresponding rust target triplet.
  Unfortunately there's no generic pattern like for xtensa, as can be seen on
  https://github.com/esp-rs/esp-idf-sys?tab=readme-ov-file#examples
2024-03-11 17:49:15 +01:00
ogoffart
a0eed4e58e Bump version number to 1.5.0 2024-02-20 17:33:11 +00:00
Olivier Goffart
9b094251b8 C++: only enable the qt backend by default on Linux 2024-02-07 15:20:03 +01:00
ogoffart
fec2b961db Bump version number to 1.4.1 2024-02-01 09:12:42 +00:00
Olivier Goffart
5a43f3b8af Janitor: dependency updates 2024-01-22 12:36:32 +01:00
Simon Hausmann
7a295d1b75 Bump Corrosion
Fixes #2508
2024-01-17 18:08:59 +01:00
Simon Hausmann
c1841fdfbe Add support for compiling the linuxkms backend without libseat support 2023-12-11 17:36:17 +01:00
ogoffart
b081c489d6 Bump version number to 1.4.0 2023-12-11 11:21:37 +00:00
Tobias Hunger
a24190924b cmake-lint: cargo-feature is not a valid identifier in CMake
cmake-lint reports that `cargo-feature` is not a valid identifier. Change
it to `cargo_feature` instead, even though this seems to work anyway.
2023-12-04 17:07:09 +01:00
Tobias Hunger
3b7e79958a cpp: Make Timer available to other FFI-exported types
We have a nice FFI-compatible wrapper areound rust timers in C++, so
allow to use that in other types exported to C++.

This also makes sure the rust and C++ side agree on the size of the
type, with the nice side effect that the rust Timer now uses half as
much space now as it did before.
2023-12-01 18:47:00 +01:00
Simon Hausmann
4b4a7d6ff2 Remove Qt from the C++ packages on Windows and macOS
Commit 79b70782b4 was supposed to do this.

- Remove now unused Qt license file bunding from prepare_binary_package.sh
- Remove CMake Qt bundling option
2023-12-01 14:48:07 +01:00
ogoffart
b9255ab8e2 Bump version number to 1.3.2 2023-12-01 08:05:15 +00:00
Olivier Goffart
583322be56 Update corrosion 2023-11-30 08:29:35 +01:00
Olivier Goffart
b903c60a3a Upgrade corrosion 2023-11-23 09:34:27 +01:00
ogoffart
0a5bf6c37b Bump version number to 1.3.1 2023-11-23 07:47:07 +00:00
Simon Hausmann
f5c3908b7e Fix build of Skia renderer in Yocto for armhf
As per commit 69feb7f0f40cc8dc4ca52777cf87a4c879d4b953 in meta-slint and
others, the Skia build is tricky because clang needs to be indirectly
and carefully instructed where gcc headers are located. In the Yocto
recipes, we go through lengths to set CLANGCC/CLANGXX correctly so that
the --target matches the triplet sub-directories in
recipe-sysroot/usr/lib and recipe-sysroot/usr/include/c++/$ver/ .

For aarch64 it's simple, there's usually just aarch64-$distro-linux, but
for example for armv7-$distro-linux-gnueabihf magic has to come
together: The gcc install dir is typically
recipe-sysroot/usr/lib/arm-$distro-linux-gnueabi (note the v7 and hf
absence). That means that's what --target needs to be when invoking
clang. But now the `hf` suffix is gone, which means clang relies on for
example -mfloat-abi=hard to avoid the use of gnu soft-float stubs. All
that's meticulously prepared in the Yocto recipe and placed for easy
consumption in CLANGCC/CLANGCXX environment variables. Therefore, when
those environment variables are set, don't overwrite them in
CORROSION_ENVIRONMENT_VARIABLES.when those environment variables are
set, don't overwrite them in CORROSION_ENVIRONMENT_VARIABLES.
2023-10-10 15:25:42 +02:00
Olivier Goffart
b88a3caacd swrenderer: Put the rotation feature behind a freature gate
We're not ready to make the API public as we want to have the API as
part of the Window rather than part of the renderer
2023-10-09 18:07:23 +02:00
Simon Hausmann
231dbd5695 Revert "Revert "Improve file type for SLINT_COMPILER cmake cache variable""
This reverts commit 292f487815.

Olivier had the brilliant idea of preceeding the path with a slash
on the Yocto side, so we can go back to the correct "type".
2023-10-06 14:56:28 +02:00
Simon Hausmann
292f487815 Revert "Improve file type for SLINT_COMPILER cmake cache variable"
This reverts commit 0773e51d92.

By the SLINT_COMPILER being a `FILEPATH`, cmake will convert any
relative path to an absolute path. That's not wanted for the Yocto
build, because there we pass
'$ENV{OECORE_NATIVE_SYSROOT}/usr/bin/slint-compiler', so that
the path is resolved dynamically against the environment variable that
the Yocto SDK sets.

CMake would convert this to an absolute path that points into the build
directory, i.e. it would be /home/blah/foo/\$ENV{...}
2023-10-06 13:05:30 +02:00