- If you're adding new svg assets or anything styled with particular colours, check that it looks good in both light and dark modes! Use the environment variables
ADW_DEBUG_COLOR_SCHEME=prefer-dark
andADW_DEBUG_COLOR_SCHEME=prefer-light
.
This is a bit of a process to setup initially, but the DX is great once all the pieces are in place. Here's how I do it:
-
Install xwin:
$ cargo install xwin
-
Download the Windows SDKs and put them in
~/cross/windows-kits/xwin
. I put them here so I can use them from other projects.$ mkdir -p ~/cross/windows-kits $ cd ~/cross/windows-kits ~/cross/windows-kits $ xwin --accept-license splat --output xwin
-
Build a copy of the gtk4 libs on a Windows machine using the
tangara-companion
branch of my fork of gvsbuild. There are some circular dependencies between some of the projects in the gtk4 stack, so you'll need to run the build a few times in a specific order. Here's what I find works:> poetry run gvsbuild build --build-dir gtk-build gtk4 > poetry run gvsbuild build --build-dir gtk-build librsvg > poetry run gvsbuild build --build-dir gtk-build --clean-built cairo gtk4 > poetry run gvsbuild build --build-dir gtk-build libadwaita
-
Install InnoSetup in your Wine environment. This will install to
C:\Program Files (x86)\Inno Setup 6
, which is currently hardcoded by the build script. We'll automate this at some point. -
You're ready to run the build!
$ script/build-windows
-
Clone osxcross and follow the instructions to download an Xcode SDK from Apple
$ git clone https://github.com/tpoechtrager/osxcross
-
Build the macOS cross kits with osxcross:
osxcross $ export SDK_VERSION=14 osxcross $ export TARGET_DIR=~/cross/macos-kits/osxcross osxcross $ ./build.sh osxcross $ ./build_compiler_rt.sh
Follow the instructions given by
build_compiler.rt
to install the files to clang. You can also run the subsequent step under thebwrap
tool bind mounting the right dirs in place instead of copying random stuff into your /usr prefix. -
Build a copy of the gtk4 libs using the
macos
branch of my gtk-builder tool.gtk-builder $ export TARGET_DIR=~/cross/macos-kits/gtk/x86_64 gtk-builder $ export RECIPE=macos-cross gtk-builder $ export RECIPE_ARCH=x86_64 gtk-builder $ ./build all
-
You're ready to run the build!
$ script/build-macos