Fix desktop launch, app icons and keyboard parameter editing
This commit is contained in:
1 parent
8fa52c8e5e
commit
6dd202d277
45 files changed
+5993
-272
No files matched your search
@@ -19,6 +19,31 @@ cargo run --release -p solvecraft -- --sample # opens with a sample part
|
||||
`solvecraft design.solvecraft` opens a saved design. Windows builds cross-compile from Linux with
|
||||
`cargo xwin build --release --target x86_64-pc-windows-msvc -p solvecraft`.
|
||||
|
||||
### Linux Flatpak
|
||||
|
||||
Install Flatpak using your distribution's package manager. For an installation that receives
|
||||
updates, add Flathub for the required Freedesktop runtime and the SolidCraft application feed
|
||||
to the same user installation:
|
||||
|
||||
```sh
|
||||
flatpak remote-add --user --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo
|
||||
flatpak remote-add --user --if-not-exists solvecraft https://bherbruck.github.io/solidcraft/flatpak/solvecraft.flatpakrepo
|
||||
flatpak install --user solvecraft ai.storyteller.solvecraft
|
||||
flatpak run ai.storyteller.solvecraft
|
||||
```
|
||||
|
||||
The application ID and remote name retain their compatibility names. To update an existing
|
||||
remote that still uses the former website address, run
|
||||
`flatpak remote-modify --user --url=https://bherbruck.github.io/solidcraft/flatpak/repo/ solvecraft`
|
||||
and then `flatpak update --user`.
|
||||
|
||||
Alternatively, download the release's `.flatpak` file for your architecture and run
|
||||
`flatpak install --user ./solvecraft-VERSION-linux-ARCH.flatpak`. The bundle supplies the
|
||||
Flathub runtime repository address; installation still needs internet access to fetch any
|
||||
missing runtime. Launch with `flatpak run ai.storyteller.solvecraft`, rather than looking for
|
||||
a host `solvecraft` binary. Files chosen through Open/Save use the desktop file-chooser portal;
|
||||
command-line paths outside Documents may need a specific additional filesystem permission.
|
||||
|
||||
## Web
|
||||
|
||||
The same app runs in the browser: [open SolidCraft on the web](../app/) (`?sample` opens the sample
|
||||
|
||||
@@ -9,6 +9,12 @@ In the SOLID toolbar's CONFIGURE panel, click **Parameters** to open the user an
|
||||
parameter editor. The separate **Configurations** button opens the configuration table;
|
||||
**Configure** remains in the dropdown for configuring columns.
|
||||
|
||||
Press **Enter** in the new parameter's name, expression or comment field to add it.
|
||||
Valid entries return focus to the name field for the next parameter; invalid entries remain
|
||||
editable. In expression fields, **Up/Down** selects an autocomplete suggestion,
|
||||
**Enter/Tab** accepts it, and **Escape** dismisses the suggestions. Accepting a suggestion
|
||||
does not also submit the parameter.
|
||||
|
||||
Expressions are unit-aware: `2 * width + 5 mm`, `angle / 2`, `sqrt(area)`, `1 in + 3 mm`, using
|
||||
`+ - * / ^`, parentheses, `sin cos tan asin acos atan atan2 sqrt abs min max floor ceil round mod
|
||||
trunc` and unit conversion. A length where an angle is expected (or the other way round) is an
|
||||
|
||||
+90
@@ -0,0 +1,90 @@
|
||||
# SolidCraft with Nix
|
||||
|
||||
The flake supports `x86_64-linux` and `aarch64-linux`. Enable Nix's `nix-command`
|
||||
and `flakes` experimental features. The committed `flake.lock` pins nixpkgs and
|
||||
its Rust toolchain; package evaluation checks that compiler against the Rust
|
||||
floor in `Cargo.toml`.
|
||||
|
||||
## Run, build or install
|
||||
|
||||
Run the current app without installing it:
|
||||
|
||||
```sh
|
||||
nix run github:bherbruck/solidcraft#solidcraft -- --sample
|
||||
```
|
||||
|
||||
Inside a checkout, `nix run .` and `nix run .#solidcraft` launch the desktop app.
|
||||
`nix run .#cli -- --version` launches the CLI. The legacy `.#solvecraft` app name
|
||||
also works. These commands use the flake's exact wrapped binary, rather than an
|
||||
older executable already on your shell's `PATH`.
|
||||
|
||||
Build without installing:
|
||||
|
||||
```sh
|
||||
nix build github:bherbruck/solidcraft#solidcraft
|
||||
./result/bin/solidcraft --version
|
||||
./result/bin/solidcraft --sample
|
||||
```
|
||||
|
||||
The result contains `solidcraft`, the compatible `solvecraft` binary name, and
|
||||
`solvecraft-cli`. **Building does not install a desktop-menu entry.** For a user
|
||||
profile installation, run:
|
||||
|
||||
```sh
|
||||
nix profile install github:bherbruck/solidcraft#solidcraft
|
||||
solidcraft --sample
|
||||
```
|
||||
|
||||
This installs the SolidCraft desktop entry, MIME definition and generated icon
|
||||
sizes alongside the commands. NixOS/Home Manager can instead put the flake's
|
||||
`packages.${system}.solidcraft` in `environment.systemPackages`/`home.packages`.
|
||||
If a non-NixOS desktop does not discover profile-installed launchers, ensure that
|
||||
its session includes `~/.nix-profile/share` in `XDG_DATA_DIRS`, then log out and
|
||||
back in. The existing `ai.storyteller.solvecraft` desktop/application ID and
|
||||
`.solvecraft` design files remain compatible.
|
||||
|
||||
Check which executable a plain terminal command would run:
|
||||
|
||||
```sh
|
||||
type -a solidcraft solvecraft
|
||||
readlink -f "$(command -v solidcraft)"
|
||||
solidcraft --version
|
||||
nix run github:bherbruck/solidcraft#solidcraft -- --version
|
||||
```
|
||||
|
||||
An unrelated old `solvecraft` executable on `PATH` is not updated by `nix build`.
|
||||
Use the flake app or `./result/bin/solidcraft` to verify the package you just built.
|
||||
|
||||
## Graphics and file dialogs
|
||||
|
||||
The app wrapper includes Wayland, X11, xkbcommon, EGL, Vulkan-loader and D-Bus
|
||||
libraries. It exposes `/run/opengl-driver/lib` and
|
||||
`/run/opengl-driver/share` so NixOS's graphics drivers and Vulkan manifests are
|
||||
discoverable. Enable `hardware.graphics.enable = true` on NixOS and keep the
|
||||
system's driver stack consistent with the compositor. File pickers also need a
|
||||
working session D-Bus and the desktop's `xdg-desktop-portal` service.
|
||||
|
||||
On another distribution, graphics drivers outside the Nix store may need a
|
||||
matching [nixGL wrapper](https://github.com/nix-community/nixGL). Follow its
|
||||
GPU-specific instructions; a wrapper for a different driver is not a substitute.
|
||||
For Intel/Mesa, after building:
|
||||
|
||||
```sh
|
||||
nix run github:nix-community/nixGL#nixGLIntel -- ./result/bin/solidcraft --sample
|
||||
```
|
||||
|
||||
If a window is black, first verify that you launched the newly wrapped package
|
||||
and that your system exposes a functioning GPU driver. `WGPU_BACKEND=vulkan`
|
||||
selects Vulkan for diagnosis; a loader without a usable driver still cannot render.
|
||||
OpenGL rendering uses 1x anti-aliasing to avoid the multisampled black-frame failure.
|
||||
Vulkan and other backends keep the requested sample count; saved preferences are preserved.
|
||||
For older builds, including 0.3.0, set Anti-aliasing to 1x and restart when using OpenGL.
|
||||
If that window cannot show the settings dialog, edit only the `msaa` field to `1` in
|
||||
`~/.local/share/solvecraft/graphics.json`; preserve any other settings.
|
||||
|
||||
## Development shells
|
||||
|
||||
`nix develop` supplies runtime libraries and uses the Rust/C toolchain already on
|
||||
your `PATH`. `nix develop .#rust` supplies the pinned toolchain, C linker and
|
||||
`target/nix` build directory. Both retain the GUI and CLI's existing Cargo package
|
||||
names (`solvecraft`, `solvecraft-cli`).
|
||||
Reference in new issue
Block a user