Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .branding
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
https://github.com/Keavon/graphite-branded-assets/archive/f8b02e68c92f5bbd27626bdd7a51102303b70a40.tar.gz
d06fd7b79fa9b7509c23072fa56745415fdc6eb98575d15214b0acc47ea4dd42
4 changes: 2 additions & 2 deletions .github/workflows/build-dev-and-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ jobs:
with:
node-version: "latest"

- name: 🚧 Install Node dependencies
- name: 🚧 Install build dependencies
run: |
cd frontend
npm ci
npm run setup

- name: 🦀 Install the latest Rust
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ jobs:
with:
node-version: "latest"

- name: 🚧 Install Node dependencies
- name: 🚧 Install build dependencies
run: |
cd frontend
npm ci
npm run setup

- name: 🦀 Install the latest Rust
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/comment-!build-commands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,10 @@ jobs:
with:
node-version: "latest"

- name: 🚧 Install Node dependencies
- name: 🚧 Install build dependencies
run: |
cd frontend
npm ci
npm run setup

- name: 🦀 Install the latest Rust
run: |
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
branding/
target/
result/
*.spv
Expand Down
33 changes: 30 additions & 3 deletions .nix/pkgs/graphite.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,22 @@
}:

let
brandingTar = pkgs.fetchurl (
let
lockContent = builtins.readFile "${info.src}/.branding";
lines = builtins.filter (s: s != [ ]) (builtins.split "\n" lockContent);
url = builtins.elemAt lines 0;
hash = builtins.elemAt lines 1;
in
{
url = url;
sha256 = hash;
}
);
branding = pkgs.runCommand "${info.pname}-branding" { } ''
mkdir -p $out
tar -xvf ${brandingTar} -C $out --strip-components 1
'';
resourcesCommon = {
pname = "${info.pname}-resources";
inherit (info) version src;
Expand All @@ -32,7 +48,7 @@ let
npmDeps = pkgs.fetchNpmDeps {
inherit (info) pname version;
src = "${info.src}/frontend";
hash = "sha256-UWuJpKNYj2Xn34rpMDZ75pzMYUOLQjPeGuJ/QlPbX9A=";
hash = "sha256-D8VCNK+Ca3gxO+5wriBn8FszG8/x8n/zM6/MPo9E2j4=";
};

npmRoot = "frontend";
Expand All @@ -41,11 +57,17 @@ let

nativeBuildInputs = tools.frontend ++ [ pkgs.npmHooks.npmConfigHook ];

prePatch = ''
mkdir branding
cp -r ${branding}/* branding
cp ${info.src}/.branding branding/.branding
'';

buildPhase = ''
export HOME="$TMPDIR"

pushd frontend
npm run build-native${if dev then "-dev" else ""}
npm run native:build-${if dev then "dev" else "production"}
popd
'';

Expand Down Expand Up @@ -89,6 +111,11 @@ deps.crane.lib.buildPackage (
{ }
);

postUnpack = ''
mkdir ./branding
cp -r ${branding}/* ./branding
'';

installPhase = ''
mkdir -p $out/bin
cp target/${if dev then "debug" else "release"}/graphite $out/bin/graphite
Expand All @@ -97,7 +124,7 @@ deps.crane.lib.buildPackage (
cp $src/desktop/assets/*.desktop $out/share/applications/

mkdir -p $out/share/icons/hicolor/scalable/apps
cp $src/desktop/assets/graphite-icon-color.svg $out/share/icons/hicolor/scalable/apps/
cp ${branding}/app-icons/graphite.svg $out/share/icons/hicolor/scalable/apps/
'';

postFixup = ''
Expand Down
Binary file removed desktop/assets/graphite-icon-color.ico
Binary file not shown.
Binary file removed desktop/assets/graphite-icon-color.png
Binary file not shown.
9 changes: 0 additions & 9 deletions desktop/assets/graphite-icon-color.svg

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Comment=Open-source vector & raster graphics editor. Featuring node based proced
Exec=graphite
Terminal=false
Type=Application
Icon=graphite-icon-color
Icon=graphite
Categories=Graphics;VectorGraphics;RasterGraphics;
Keywords=graphite;editor;vector;raster;procedural;design;
StartupWMClass=rs.graphite.GraphiteEditor
StartupWMClass=rs.graphite.Graphite
2 changes: 1 addition & 1 deletion desktop/bundle/src/mac.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use std::path::{Path, PathBuf};

use crate::common::*;

const APP_ID: &str = "rs.graphite.GraphiteEditor";
const APP_ID: &str = "rs.graphite.Graphite";

const PACKAGE: &str = "graphite-desktop-platform-mac";
const HELPER_BIN: &str = "graphite-desktop-platform-mac-helper";
Expand Down
2 changes: 1 addition & 1 deletion desktop/platform/win/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ fn main() {
#[cfg(target_os = "windows")]
{
let mut res = winres::WindowsResource::new();
res.set_icon("../../assets/graphite-icon-color.ico");
res.set_icon("../../../branding/app-icons/graphite.ico");
res.compile().expect("Failed to compile Windows resources");
}
}
2 changes: 1 addition & 1 deletion desktop/src/consts.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pub(crate) const APP_NAME: &str = "Graphite";
pub(crate) const APP_ID: &str = "rs.graphite.GraphiteEditor";
pub(crate) const APP_ID: &str = "rs.graphite.Graphite";

pub(crate) const APP_DIRECTORY_NAME: &str = "graphite-editor";
pub(crate) const APP_STATE_FILE_NAME: &str = "state.ron";
Expand Down
5 changes: 0 additions & 5 deletions frontend/assets/LICENSE.md

This file was deleted.

11 changes: 0 additions & 11 deletions frontend/assets/graphics/graphite-logotype-solid.svg

This file was deleted.

4 changes: 0 additions & 4 deletions frontend/assets/icon-12px-solid/add.svg

This file was deleted.

3 changes: 0 additions & 3 deletions frontend/assets/icon-12px-solid/checkmark.svg

This file was deleted.

3 changes: 0 additions & 3 deletions frontend/assets/icon-12px-solid/clipped.svg

This file was deleted.

3 changes: 0 additions & 3 deletions frontend/assets/icon-12px-solid/close-x.svg

This file was deleted.

3 changes: 0 additions & 3 deletions frontend/assets/icon-12px-solid/delay.svg

This file was deleted.

3 changes: 0 additions & 3 deletions frontend/assets/icon-12px-solid/dot.svg

This file was deleted.

3 changes: 0 additions & 3 deletions frontend/assets/icon-12px-solid/dropdown-arrow.svg

This file was deleted.

3 changes: 0 additions & 3 deletions frontend/assets/icon-12px-solid/edit-12px.svg

This file was deleted.

2 changes: 0 additions & 2 deletions frontend/assets/icon-12px-solid/empty-12px.svg

This file was deleted.

3 changes: 0 additions & 3 deletions frontend/assets/icon-12px-solid/failure.svg

This file was deleted.

6 changes: 0 additions & 6 deletions frontend/assets/icon-12px-solid/fullscreen-enter.svg

This file was deleted.

6 changes: 0 additions & 6 deletions frontend/assets/icon-12px-solid/fullscreen-exit.svg

This file was deleted.

Loading