Skip to content

Commit d19c7ff

Browse files
authored
Merge branch 'master' into add-median-filter-blur
2 parents 9a6beef + 3f532e4 commit d19c7ff

File tree

274 files changed

+1226
-2090
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

274 files changed

+1226
-2090
lines changed

.branding

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
https://github.com/Keavon/graphite-branded-assets/archive/f8b02e68c92f5bbd27626bdd7a51102303b70a40.tar.gz
2+
d06fd7b79fa9b7509c23072fa56745415fdc6eb98575d15214b0acc47ea4dd42

.github/workflows/build-dev-and-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ jobs:
3434
with:
3535
node-version: "latest"
3636

37-
- name: 🚧 Install Node dependencies
37+
- name: 🚧 Install build dependencies
3838
run: |
3939
cd frontend
40-
npm ci
40+
npm run setup
4141
4242
- name: 🦀 Install the latest Rust
4343
run: |

.github/workflows/build-production.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,10 @@ jobs:
3232
with:
3333
node-version: "latest"
3434

35-
- name: 🚧 Install Node dependencies
35+
- name: 🚧 Install build dependencies
3636
run: |
3737
cd frontend
38-
npm ci
38+
npm run setup
3939
4040
- name: 🦀 Install the latest Rust
4141
run: |

.github/workflows/comment-!build-commands.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ jobs:
5959
with:
6060
node-version: "latest"
6161

62-
- name: 🚧 Install Node dependencies
62+
- name: 🚧 Install build dependencies
6363
run: |
6464
cd frontend
65-
npm ci
65+
npm run setup
6666
6767
- name: 🦀 Install the latest Rust
6868
run: |

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
branding/
12
target/
23
result/
34
*.spv

.nix/pkgs/graphite.nix

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,22 @@
1414
}:
1515

1616
let
17+
brandingTar = pkgs.fetchurl (
18+
let
19+
lockContent = builtins.readFile "${info.src}/.branding";
20+
lines = builtins.filter (s: s != [ ]) (builtins.split "\n" lockContent);
21+
url = builtins.elemAt lines 0;
22+
hash = builtins.elemAt lines 1;
23+
in
24+
{
25+
url = url;
26+
sha256 = hash;
27+
}
28+
);
29+
branding = pkgs.runCommand "${info.pname}-branding" { } ''
30+
mkdir -p $out
31+
tar -xvf ${brandingTar} -C $out --strip-components 1
32+
'';
1733
resourcesCommon = {
1834
pname = "${info.pname}-resources";
1935
inherit (info) version src;
@@ -32,7 +48,7 @@ let
3248
npmDeps = pkgs.fetchNpmDeps {
3349
inherit (info) pname version;
3450
src = "${info.src}/frontend";
35-
hash = "sha256-UWuJpKNYj2Xn34rpMDZ75pzMYUOLQjPeGuJ/QlPbX9A=";
51+
hash = "sha256-D8VCNK+Ca3gxO+5wriBn8FszG8/x8n/zM6/MPo9E2j4=";
3652
};
3753

3854
npmRoot = "frontend";
@@ -41,11 +57,17 @@ let
4157

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

60+
prePatch = ''
61+
mkdir branding
62+
cp -r ${branding}/* branding
63+
cp ${info.src}/.branding branding/.branding
64+
'';
65+
4466
buildPhase = ''
4567
export HOME="$TMPDIR"
4668
4769
pushd frontend
48-
npm run build-native${if dev then "-dev" else ""}
70+
npm run native:build-${if dev then "dev" else "production"}
4971
popd
5072
'';
5173

@@ -89,6 +111,11 @@ deps.crane.lib.buildPackage (
89111
{ }
90112
);
91113

114+
postUnpack = ''
115+
mkdir ./branding
116+
cp -r ${branding}/* ./branding
117+
'';
118+
92119
installPhase = ''
93120
mkdir -p $out/bin
94121
cp target/${if dev then "debug" else "release"}/graphite $out/bin/graphite
@@ -97,7 +124,7 @@ deps.crane.lib.buildPackage (
97124
cp $src/desktop/assets/*.desktop $out/share/applications/
98125
99126
mkdir -p $out/share/icons/hicolor/scalable/apps
100-
cp $src/desktop/assets/graphite-icon-color.svg $out/share/icons/hicolor/scalable/apps/
127+
cp ${branding}/app-icons/graphite.svg $out/share/icons/hicolor/scalable/apps/
101128
'';
102129

103130
postFixup = ''
-310 KB
Binary file not shown.
-84.1 KB
Binary file not shown.

desktop/assets/graphite-icon-color.svg

Lines changed: 0 additions & 9 deletions
This file was deleted.

desktop/assets/rs.graphite.GraphiteEditor.desktop renamed to desktop/assets/rs.graphite.Graphite.desktop

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Comment=Open-source vector & raster graphics editor. Featuring node based proced
55
Exec=graphite
66
Terminal=false
77
Type=Application
8-
Icon=graphite-icon-color
8+
Icon=graphite
99
Categories=Graphics;VectorGraphics;RasterGraphics;
1010
Keywords=graphite;editor;vector;raster;procedural;design;
11-
StartupWMClass=rs.graphite.GraphiteEditor
11+
StartupWMClass=rs.graphite.Graphite

0 commit comments

Comments
 (0)