Skip to content

Commit 01fa2d7

Browse files
authored
GUI (#13)
* Started work on GUI * start app * make sure libglib2.0-dev is installed * make sure gtk-3.0-dev is installed * sudo * install glib * Make sure gtk+3 is installed * fix windows build * install glib and gtk for windows builds * apt update * custom docker image * specify version * ???? * exuse me? * change crt2 path * skip crt2 stuff * rust backtrace * dbug stuff * debug stuff x2 * panic with usefull message * closure takes one arg * match instead of unwrap * use custom image for linux builds * add fmt test * [skip ci] update action name * update cargo cache versions * windows rc, windows dist package * fix paths * remove ls, recursive zip * refactor windows dist stuff * test rc file * fix windows resource * refactor tools * fix dlls * fix dlls x2 * disable rustfmt step * more ui * windows? * fix ci config * fix ci config? * change funding * windows signing scripts * windows signing * fix missing dlls * fix dlls attempt 2 * get all dlls * [skip ci] remove quotes * update ui stuff * ui functionality * remove stray dialog * only build releases on master * [skip ci] Cargo workspace * [skip ci] cli-auth behind feature * ll-lib -> ll-core * [skip ci] refactor * start layout rework * more main window stuff * ui rework done * [skip ci] Choose folder stuff * [skip ci] don't accept focus * [skip ci] make cli options a feature * [skip ci] ui backend work * remove imports * [skip ci] save config * update gtk + basics working * logging works * [skip ci] stop watcher on exit, clean up * tweaks * disable unimplemented stuff * cleanup * fix linux build * change to version 2 to allow local testing * ci config for local testing * debug * [skip ci] no idea what's going on... * warning/error channel * added cli.yml/glade format checks * dont create empty folders * add support for 3d #15 * add checks, fix linux config * fix cargo args * remove old commands * fix syntax error * fix windows build * fix syntax error * 0.2.0-rc0 * macos ci fix * fix ci attempt 2
1 parent b664687 commit 01fa2d7

Some content is hidden

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

97 files changed

+6053
-653
lines changed

.circleci/config.yml

Lines changed: 99 additions & 136 deletions
Original file line numberDiff line numberDiff line change
@@ -1,104 +1,61 @@
1+
# version: 2.1
2+
13
version: 2
24

35
jobs:
4-
linux:
6+
fmt:
57
docker:
68
- image: circleci/rust:latest
79

810
steps:
911
- checkout
1012

1113
- run:
12-
name: Change Permissions for Cargo Cache
13-
command: |
14-
if [ -d "/usr/local/cargo" ]; then
15-
sudo chown -R circleci:circleci /usr/local/cargo
16-
fi
17-
- restore_cache:
18-
name: Restore Linux Rust Cache
19-
key: cargo-cache-linux-{{ checksum "Cargo.lock" }}-{{ checksum "Cargo.toml" }}
14+
name: "Check formatting"
15+
command: rustfmt --check **/**.rs
2016

21-
# - run:
22-
# name: Install Rust Stable
23-
# command: rustup toolchain install stable
17+
checks:
18+
docker:
19+
- image: circleci/node:latest
2420

25-
- run:
26-
name: Use Stable as Default
27-
command: rustup default stable
21+
steps:
22+
- checkout
2823

29-
- run:
30-
name: Show Version
31-
command: |
32-
rustc --version --verbose
33-
rustup --version
34-
cargo --version --verbose
24+
- restore_cache:
25+
name: Restore Deploy Node Cache
26+
key: checks-cache-{{ checksum "checks/package.json" }}-{{ checksum "checks/package-lock.json" }}
3527

3628
- run:
37-
name: Build Binary
38-
command: cargo build --release --target=x86_64-unknown-linux-gnu
29+
name: Install dependencies
30+
command: |
31+
cd checks
32+
npm install
3933
4034
- save_cache:
41-
name: Save Linux Rust Cache
42-
key: cargo-cache-linux-{{ checksum "Cargo.lock" }}-{{ checksum "Cargo.toml" }}
35+
name: Save Node Cache
36+
key: checks-cache-{{ checksum "checks/package.json" }}-{{ checksum "checks/package-lock.json" }}
4337
paths:
44-
- "~/.cargo/"
45-
- "~/.rustup/"
46-
- "./target/"
47-
- "/usr/local/cargo"
48-
49-
- run:
50-
name: "Generate hash file"
51-
command: "cd target/x86_64-unknown-linux-gnu/release && sha256sum library-loader > library-loader.sha256"
52-
53-
- run:
54-
name: "Verify hash"
55-
command: "cd target/x86_64-unknown-linux-gnu/release && sha256sum -c library-loader.sha256"
38+
- "./checks/node_modules"
5639

5740
- run:
58-
name: "Show hash"
59-
command: "cd target/x86_64-unknown-linux-gnu/release && cat library-loader.sha256"
41+
name: Run checks
42+
command: ./tools/run_checks.sh
6043

61-
- save_cache:
62-
name: Save Linux Build Cache
63-
key: ll-linux-dist-{{ .Environment.CIRCLE_SHA1 }}
64-
paths:
65-
- "./target/x86_64-unknown-linux-gnu/release/library-loader"
66-
- "./target/x86_64-unknown-linux-gnu/release/library-loader.sha256"
67-
68-
# - store_artifacts:
69-
# name: Store Build
70-
# path: "./target/x86_64-unknown-linux-gnu/release/library-loader"
71-
# destination: "/linux/library-loader"
72-
73-
# - store_artifacts:
74-
# name: Store Build Checksum
75-
# path: "./target/x86_64-unknown-linux-gnu/release/library-loader.sha256"
76-
# destination: "/linux/library-loader.sha256"
77-
78-
windows:
44+
build_linux:
7945
docker:
80-
- image: circleci/rust:latest
46+
- image: olback/rust-gtk-linux:latest
8147

8248
steps:
8349
- checkout
8450

85-
- run:
86-
name: Change Permissions for Cargo Cache
87-
command: |
88-
if [ -d "/usr/local/cargo" ]; then
89-
sudo chown -R circleci:circleci /usr/local/cargo
90-
fi
9151
- restore_cache:
92-
name: Restore Windows Rust Cache
93-
key: cargo-cache-windows-{{ checksum "Cargo.lock" }}-{{ checksum "Cargo.toml" }}
94-
95-
- run:
96-
name: Install Rust Stable
97-
command: rustup toolchain install stable
52+
name: Restore Linux Rust Cache
53+
key: cargo-cache-linux-v2-{{ checksum "Cargo.lock" }}-{{ checksum "Cargo.toml" }}
9854

99-
- run:
100-
name: Use Stable as Default
101-
command: rustup default stable
55+
# Not needed
56+
# - run:
57+
# name: Use Stable as Default
58+
# command: rustup default stable
10259

10360
- run:
10461
name: Show Version
@@ -107,66 +64,87 @@ jobs:
10764
rustup --version
10865
cargo --version --verbose
10966
110-
- run:
111-
name: Install mingw-w64
112-
command: sudo apt install mingw-w64 -y
113-
114-
- run:
115-
name: Install the stable-x86_64-pc-windows-gnu toolchain
116-
command: rustup toolchain install stable-x86_64-pc-windows-gnu
117-
118-
- run:
119-
name: Install rust-std for target x86_64-pc-windows-gnu
120-
command: rustup component add rust-std --target=x86_64-pc-windows-gnu
121-
122-
- run:
123-
name: Copy a working version of crt2.o into the rust toolchain
124-
command: |
125-
export CRT2="/usr/local/rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/crt2.o"
126-
sudo mv $CRT2 "$CRT2.bak"
127-
sudo cp /usr/x86_64-w64-mingw32/lib/crt2.o $CRT2
128-
12967
- run:
13068
name: Build Binary
131-
command: cargo build --release --target=x86_64-pc-windows-gnu
69+
command: |
70+
if [ $CIRCLE_BRANCH = "master" ]; then
71+
cd ll-gui && cargo build --release --target=x86_64-unknown-linux-gnu && cd ..
72+
cd ll-cli && cargo build --release --target=x86_64-unknown-linux-gnu && cd ..
73+
else
74+
cd ll-gui && cargo build --target=x86_64-unknown-linux-gnu && cd ..
75+
cd ll-cli && cargo build --target=x86_64-unknown-linux-gnu && cd ..
76+
fi
13277
13378
- save_cache:
134-
name: Save Windows Rust Cache
135-
key: cargo-cache-windows-{{ checksum "Cargo.lock" }}-{{ checksum "Cargo.toml" }}
79+
name: Save Linux Rust Cache
80+
key: cargo-cache-linux-v2-{{ checksum "Cargo.lock" }}-{{ checksum "Cargo.toml" }}
13681
paths:
13782
- "~/.cargo/"
13883
- "~/.rustup/"
13984
- "./target/"
140-
- "/usr/local/cargo"
14185

14286
- run:
143-
name: "Generate hash file"
144-
command: "cd target/x86_64-pc-windows-gnu/release && sha256sum library-loader.exe > library-loader.exe.sha256"
87+
name: Make dist
88+
command: |
89+
mkdir -p dist/linux
90+
if [ $CIRCLE_BRANCH = "master" ]; then
91+
cp target/x86_64-unknown-linux-gnu/release/library-loader-gui dist/linux/
92+
cp target/x86_64-unknown-linux-gnu/release/library-loader-cli dist/linux/
93+
else
94+
cp target/x86_64-unknown-linux-gnu/debug/library-loader-gui dist/linux/
95+
cp target/x86_64-unknown-linux-gnu/debug/library-loader-cli dist/linux/
96+
fi
97+
98+
- run:
99+
name: Generate hashes
100+
command: |
101+
cd dist/linux
102+
sha256sum library-loader-gui > library-loader-gui.sha256
103+
sha256sum library-loader-cli > library-loader-cli.sha256
145104
146105
- run:
147-
name: "Verify hash"
148-
command: "cd target/x86_64-pc-windows-gnu/release && sha256sum -c library-loader.exe.sha256"
106+
name: Verify hashes
107+
command: |
108+
cd dist/linux
109+
sha256sum -c library-loader-gui.sha256
110+
sha256sum -c library-loader-cli.sha256
149111
150112
- run:
151-
name: "Show hash"
152-
command: "cd target/x86_64-pc-windows-gnu/release && cat library-loader.exe.sha256"
113+
name: Show hashes
114+
command: |
115+
cd dist/linux
116+
cat library-loader-gui.sha256
117+
cat library-loader-cli.sha256
153118
154119
- save_cache:
155-
name: Save Windows Build
156-
key: ll-windows-dist-{{ .Environment.CIRCLE_SHA1 }}
120+
name: Save Linux Build Cache
121+
key: ll-linux-dist-{{ .Environment.CIRCLE_SHA1 }}
157122
paths:
158-
- "./target/x86_64-pc-windows-gnu/release/library-loader.exe"
159-
- "./target/x86_64-pc-windows-gnu/release/library-loader.exe.sha256"
123+
- "./dist/linux/library-loader-gui"
124+
- "./dist/linux/library-loader-cli"
125+
- "./dist/linux/library-loader-gui.sha256"
126+
- "./dist/linux/library-loader-cli.sha256"
127+
128+
- store_artifacts:
129+
name: Store GUI Build
130+
path: "./dist/linux/library-loader-gui"
131+
destination: "/linux/library-loader-gui"
132+
133+
- store_artifacts:
134+
name: Store CLI Build
135+
path: "./dist/linux/library-loader-cli"
136+
destination: "/linux/library-loader-cli"
160137

161-
# - store_artifacts:
162-
# name: Store Build
163-
# path: "./target/x86_64-pc-windows-gnu/release/library-loader.exe"
164-
# destination: "/windows/library-loader.exe"
138+
- store_artifacts:
139+
name: Store GUI Build Hash
140+
path: "./dist/linux/library-loader-gui.sha256"
141+
destination: "/linux/library-loader-gui.sha256"
142+
143+
- store_artifacts:
144+
name: Store CLI Build Hash
145+
path: "./dist/linux/library-loader-cli.sha256"
146+
destination: "/linux/library-loader-cli.sha256"
165147

166-
# - store_artifacts:
167-
# name: Store Build Checksum
168-
# path: "./target/x86_64-pc-windows-gnu/release/library-loader.exe.sha256"
169-
# destination: "/windows/library-loader.exe.sha256"
170148

171149
deploy:
172150
docker:
@@ -193,52 +171,37 @@ jobs:
193171
name: Restore Linux Build
194172
key: ll-linux-dist-{{ .Environment.CIRCLE_SHA1 }}
195173

196-
- restore_cache:
197-
name: Restore Windows Build
198-
key: ll-windows-dist-{{ .Environment.CIRCLE_SHA1 }}
199-
200174
- store_artifacts:
201-
name: Store Build
175+
name: Store Linux Build
202176
path: "./target/x86_64-unknown-linux-gnu/release/library-loader"
203177
destination: "/linux/library-loader"
204178

205179
- store_artifacts:
206-
name: Store Build Checksum
180+
name: Store Linux Build Checksum
207181
path: "./target/x86_64-unknown-linux-gnu/release/library-loader.sha256"
208182
destination: "/linux/library-loader.sha256"
209183

210-
- store_artifacts:
211-
name: Store Build
212-
path: "./target/x86_64-pc-windows-gnu/release/library-loader.exe"
213-
destination: "/windows/library-loader.exe"
214-
215-
- store_artifacts:
216-
name: Store Build Checksum
217-
path: "./target/x86_64-pc-windows-gnu/release/library-loader.exe.sha256"
218-
destination: "/windows/library-loader.exe.sha256"
219-
220184
- run:
221185
name: Deploy
222186
command: node .circleci/deploy/deploy.js
223187

188+
224189
workflows:
225190
version: 2
226191
build:
227192
jobs:
228-
- linux
229-
- windows
193+
# - fmt
194+
- build_linux
230195
- request_deploy:
231196
type: approval
232197
requires:
233-
- linux
234-
- windows
198+
- build_linux
235199
filters:
236200
branches:
237201
only: master
238202
- deploy:
239203
requires:
240-
- linux
241-
- windows
204+
- build_linux
242205
- request_deploy
243206
filters:
244207
branches:

.circleci/deploy/deploy.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,10 @@ const gh = {
2222

2323
const files = [
2424
// Linux files
25-
new File('./target/x86_64-unknown-linux-gnu/release/library-loader'),
26-
new File('./target/x86_64-unknown-linux-gnu/release/library-loader.sha256'),
27-
// Windows files
28-
new File('./target/x86_64-pc-windows-gnu/release/library-loader.exe'),
29-
new File('./target/x86_64-pc-windows-gnu/release/library-loader.exe.sha256')
25+
new File('./target/x86_64-unknown-linux-gnu/release/library-loader-cli'),
26+
new File('./target/x86_64-unknown-linux-gnu/release/library-loader-cli.sha256'),
27+
new File('./target/x86_64-unknown-linux-gnu/release/library-loader-gui'),
28+
new File('./target/x86_64-unknown-linux-gnu/release/library-loader-gui.sha256')
3029
];
3130

3231
let cargoToml = fs.readFileSync('Cargo.toml', 'utf8').toString().split('\n');

.circleci/windows.txt

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

.github/workflows/macos.yml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,28 @@ name: MacOS Build
33
on: [push]
44

55
jobs:
6-
build:
6+
macos_build:
77

88
runs-on: macos-latest
99

1010
steps:
1111
- uses: actions/checkout@v1
12+
- name: Install glib
13+
run: brew install glib
14+
- name: Install gtk3
15+
run: brew install gtk+3
1216
- name: Install latest stable
1317
uses: actions-rs/toolchain@v1
1418
with:
1519
toolchain: stable
1620
override: true
1721
- uses: actions-rs/cargo@v1
22+
working-directory: ./ll-cli
1823
with:
1924
command: build
20-
args: --release --all-features
25+
args: --release --bin library-loader-cli
26+
- uses: actions-rs/cargo@v1
27+
working-directory: ./ll-gui
28+
with:
29+
command: build
30+
args: --release --bin library-loader-gui

0 commit comments

Comments
 (0)