Commit graph

144 commits

Author SHA1 Message Date
Olivier Goffart
8b02568b4b Refactor the cmake C++ build 2020-10-07 11:40:34 +02:00
Simon Hausmann
c39674ae4a Fix license header check 2020-10-06 22:03:11 +02:00
Simon Hausmann
958f6d2d3c Fix license header check again
After renaming the webpack config files
2020-10-05 16:52:23 +02:00
Simon Hausmann
79150a9b20 Apply the same license (check) as for .js files 2020-10-05 16:06:14 +02:00
Simon Hausmann
30f2be7a22 Fix license check 2020-10-05 15:26:29 +02:00
Simon Hausmann
5695e251b7 Fix wasm builds
We're running into https://github.com/parcel-bundler/parcel/issues/1573
so switch back to webpack.
2020-10-05 11:29:40 +02:00
Simon Hausmann
7c4ec36442 Rework Cargo.toml license checking
Switch back to toml_edit for the Cargo.toml check, as that makes it easy
to also apply fixes -- the formatting is preserved.

This also removes the indirect serde_derive dependency that may be
causing problems on macOS sometimes.

Also, now that the cargo test doesn't trigger a build anymore, the use
of toml_edit here should not cause the problem mentioned in commit
ab89fcb69a anymore -- fingers crossed.
2020-09-07 20:38:04 +02:00
Olivier Goffart
5682b7c989 The rust.yaml file was renamed 2020-09-07 14:25:00 +02:00
Simon Hausmann
800b9d5b15 Fix license header check for css/html templates for C++ docs 2020-09-04 11:50:45 +02:00
Simon Hausmann
f4958abba5 Simplify C++ docs build directory setup
Symlink the _static directory instead.
2020-09-04 11:30:51 +02:00
Simon Hausmann
4fbb24e804 Print a message of success when the license check completes 2020-09-02 17:19:47 +02:00
Simon Hausmann
7d7fb4a2b7 Fix license check 2020-09-02 17:18:48 +02:00
Simon Hausmann
fd9aea97eb Fix markdown table rendering in C++ docs
This reverts commit 0bb904e10a and
re-introduces the markdown table support extension. The resulting table
by default is too wide in the "responsive" read-the-docs theme, but with
a CSS tweak it becomes readable.

Markdown tables are much easier to deal with and this way we can also
include references within the tables.
2020-09-02 17:06:41 +02:00
Simon Hausmann
65ff715fbc Make C++ documentation generation an xtask
Tear it out of the CMakeLists.txt and instead run it via

    cargo xtask cppdocs

This allows the build_and_test step in the CI to only run cmake for the
library/header related bits and the docs_and_demos step to only generate
docs and not require a full host build of the library (as cargo xtask
cmake would otherwise do).
2020-09-01 17:03:55 +02:00
Olivier Goffart
60201b9c7b Update dependencies 2020-08-31 17:38:22 +02:00
Olivier Goffart
6d41b1981d Move the Qt style to a new backend: the Qt backend
Currently the Qt backend still redirect everything to the GL backend,
but the goal is to use QPainter and QWindow

This also adds a "default" backend, whose goal is to select the proper
backend at compile time
2020-08-31 17:26:04 +02:00
Olivier Goffart
65acdd78b0 Use xtask to generate the headers instead of build.rs of each lib
Fixes #14
2020-08-27 11:50:09 +02:00
Olivier Goffart
58cdaeb8dd Update license header to mention that commertial option are available 2020-08-26 13:23:42 +02:00
Simon Hausmann
2fa953ce8a Fix license check with symlinked directories
Skip them :-)
2020-08-25 14:57:33 +02:00
Simon Hausmann
e9685c5851 Improve C++ documentation shell
Doxygen's markdown support can't quite deal with the Github flavor,
the language reference looks terrible.

So instead, this change switches to using Sphinx,
with two extensions that call Doxygen for us and allow including markdown.

The result is a read-the-docs themed sphinx site that includes search even
in the language reference.
2020-08-24 17:07:04 +02:00
Olivier Goffart
7dd335282c The crate package name of the GL backend was renamed 2020-08-24 16:52:20 +02:00
Olivier Goffart
ea1f215367 Some polishinbg of the .toml files
- Give all the sixtyfps-* create a 0.0.1 version
 - Make sure that the internal dependences are using the exact same version
   (so "=0.0.1")
 - Add the description/homepage/repository fields in the .toml files
 - Set publish=false  to crates that are not meant to be published on crates.io
2020-08-24 16:28:11 +02:00
Simon Hausmann
9a355a2bb4 Ignore the cargo workspace from the license check 2020-08-24 13:46:09 +02:00
Simon Hausmann
e0147bdb5d Exclude the Doxygen config file from the license check
It's mostly generated by Doxygen anyway
2020-08-24 13:46:09 +02:00
Simon Hausmann
5c275c94d9 license check: Fix --show-all when there are errors
When an error was seen, terminate the process with a non-zero exit code
2020-08-24 13:45:44 +02:00
Simon Hausmann
7cdaacf32e Fix license check directory handling
Always check all files in the repo, regardless from where the check is called.
2020-08-24 13:45:27 +02:00
Olivier Goffart
dcf5e63203 Put the shebang before the license header 2020-08-24 12:28:02 +02:00
Simon Hausmann
b9bcf01019 Exclude const-field-offset from the license check
This is in fact a third-party crate slightly forked
2020-08-18 13:59:31 +02:00
Simon Hausmann
ab89fcb69a Use a different toml parser
Mysteriously, depending on toml_edit gives strange (reproducible) cargo
doc test errors due to "changed" dependencies. There must be some
"cross" dependency between this and the run-time library perhaps that
ends up with a recompilation somewhere. Switch to cargo-toml2 just for
reading Cargo.toml -- unfortunately the fixing doesn't work as it
reformats the entire fail (and errors out). But since most files are
changed this might be okay for now.
2020-08-18 13:07:32 +02:00
Simon Hausmann
7f1d9f5252 Commit correct license tags to Cargo.toml
For now that's GPL-3.0 only, but this can be changed :-)
2020-08-18 10:12:59 +02:00
Simon Hausmann
a6546aa55f Check the license field in Cargo.toml 2020-08-18 10:12:37 +02:00
Simon Hausmann
2823f32692 Apply license headers to all non-binary/non-json sources 2020-08-17 17:55:20 +02:00
Simon Hausmann
a89cc39d0c Add xtask for checking license headers 2020-08-17 17:55:20 +02:00
Olivier Goffart
54f81d4d29 C++ Only link against the backend library
For some raison, not all symbols gets exported,
add some dummy code which seems to do the trick
2020-06-17 18:38:47 +02:00
Simon Hausmann
afd7319ae5 Rename corelib to sixtyfps_corelib
This is consistent with the other packages and since corelib is now also
a cdylib, libsixtyfps_corelib.so looks much better than libcorelib.so
:-)
2020-06-09 13:27:18 +02:00
Simon Hausmann
547a732e33 Fix rebuild issues, part 10523
By setting RUSTFLAGS in the Cargo config we run into the situation that
when doing a host build, all rust files are compiled with the flags,
including build.rs. When cross-compiling, build.rs is not build with the
RUSTFLAGS specified. That makes kind of sense, but it also means that
all the build scripts are always recompiled when switching between a
target and a host build - and that applies to *all* packages, including
dependencies.

So short of a better solution, this patch removes the need to set
RUSTFLAGS. It was used to extract the system library dependencies for
the static library we'd create. Instead we're now building two shared
libraries and are linking against them. They contain the rust library
twice, so that's not really a desirable final state either, but
productivity wins right now :-)

It might make sense to go back to creating *one* shared library through
a dedicated crate and -- since 'pub extern "C"' functions are not
transitively exported, it may require re-exporting them by hand or using
some clever build trick perhaps.
2020-06-09 13:08:59 +02:00
Olivier Goffart
0553ab8b1a Use env::var_os instead of env::var
For the unliekly case in which the git repository is checked out in a directory
that cannot be represented with unicode
2020-06-05 13:45:37 +02:00
Simon Hausmann
31da762245 Complete compilation and running of .60 to mapped c++ tests
* Fix text-file-busy error when running the binary by replacing the use
  of named temp file with simply using the input source file and the
  extension replaced. A scope guard make sure to also delete the binary.
* Fix hard-coded library dependencies by sharing code with the cmake
  xtask that needs the same list.
2020-06-05 13:30:13 +02:00
Simon Hausmann
fef5004780 Fix repeated rebuilds
Don't try to determine the native libs dependency *and* the artifact
collection in one go by setting RUSTFLAGS, as that causes everything to
be rebuilt over and over again.

Instead, go back to invoking rustc once to determine the native libs
dependencies.
2020-06-04 19:25:44 +02:00
Simon Hausmann
5d2b5f7e4c Simplify cmake xtask
Call cargo only once by building the target package (gl renderer) right
away and passing the RUSTFLAGS to get the native library dependency.

Suggested by Olivier :)
2020-06-04 17:52:26 +02:00
Simon Hausmann
45879a4e04 Add an install option to the cmake xtask to run cmake --install 2020-06-04 15:29:19 +02:00
Simon Hausmann
a4da4de8c8 Add the ability to specify an install prefix for the cmake xtask build 2020-06-04 15:29:19 +02:00
Simon Hausmann
c5001703d4 Build the cmake module for our runtime as xtask, part 2
This is done by calling cargo with json output to build the libraries,
collect the .a files, extract the native libraries needed for final
linkage and pass all that to a CMake project that cobbles together the
.a files into a propery cmake target with include paths, etc.
2020-06-04 15:29:19 +02:00
Simon Hausmann
8a2a7ae8cb Add a boilerplate for the xtask concept
This shall provide a task to build the cmake module.
2020-06-04 15:29:19 +02:00