Skip to content
Merged

GUI #13

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
8768be7
Started work on GUI
olback Nov 27, 2019
d220077
start app
olback Nov 28, 2019
cd1bdf0
make sure libglib2.0-dev is installed
olback Nov 28, 2019
63e6209
make sure gtk-3.0-dev is installed
olback Nov 28, 2019
f54d7b0
sudo
olback Nov 28, 2019
e077701
install glib
olback Nov 28, 2019
75c20aa
Make sure gtk+3 is installed
olback Nov 28, 2019
f603619
fix windows build
olback Nov 28, 2019
8fe04f1
install glib and gtk for windows builds
olback Nov 28, 2019
4f0d218
apt update
olback Nov 28, 2019
b6bacf2
custom docker image
olback Nov 29, 2019
f2f8cc4
specify version
olback Nov 29, 2019
5518566
????
olback Nov 29, 2019
b764611
exuse me?
olback Nov 29, 2019
251829e
change crt2 path
olback Nov 29, 2019
d54cda8
skip crt2 stuff
olback Nov 29, 2019
2417a49
rust backtrace
olback Nov 29, 2019
4c68dab
dbug stuff
olback Nov 29, 2019
f9123fb
debug stuff x2
olback Nov 29, 2019
5befc80
panic with usefull message
olback Nov 29, 2019
3d4d8ba
closure takes one arg
olback Nov 29, 2019
6bb2a98
match instead of unwrap
olback Nov 29, 2019
852de8f
use custom image for linux builds
olback Nov 29, 2019
5624821
add fmt test
olback Nov 29, 2019
c4739e0
[skip ci] update action name
olback Nov 29, 2019
2cabb76
update cargo cache versions
olback Nov 29, 2019
cc9ded2
windows rc, windows dist package
olback Nov 29, 2019
2187e5e
fix paths
olback Nov 29, 2019
1c073f9
remove ls, recursive zip
olback Nov 29, 2019
d3b336c
refactor windows dist stuff
olback Nov 30, 2019
ed16b9f
test rc file
olback Nov 30, 2019
ab59cc6
fix windows resource
olback Nov 30, 2019
75beaec
refactor tools
olback Nov 30, 2019
917d0ed
fix dlls
olback Nov 30, 2019
ab699d4
fix dlls x2
olback Nov 30, 2019
0bf1077
disable rustfmt step
olback Dec 1, 2019
5acd608
more ui
olback Dec 1, 2019
bfa8d08
windows?
olback Dec 2, 2019
d07abc1
fix ci config
olback Dec 2, 2019
4a1c66b
fix ci config?
olback Dec 2, 2019
5cf7c34
change funding
olback Dec 3, 2019
c23bd59
windows signing scripts
olback Dec 3, 2019
0923d38
windows signing
olback Dec 3, 2019
79d0fd1
fix missing dlls
olback Dec 3, 2019
cd2af86
fix dlls attempt 2
olback Dec 3, 2019
5e61f38
get all dlls
olback Dec 3, 2019
0616470
[skip ci] remove quotes
olback Dec 3, 2019
87ffbd3
update ui stuff
olback Dec 4, 2019
5816958
ui functionality
olback Dec 4, 2019
912a5d9
remove stray dialog
olback Dec 5, 2019
5abdeca
only build releases on master
olback Dec 5, 2019
0922e01
[skip ci] Cargo workspace
olback Dec 8, 2019
bb28120
[skip ci] cli-auth behind feature
olback Dec 8, 2019
0d1bd48
ll-lib -> ll-core
olback Dec 9, 2019
ccb0f72
[skip ci] refactor
olback Dec 9, 2019
0a9265c
start layout rework
olback Dec 10, 2019
7021ece
more main window stuff
olback Dec 10, 2019
2e7d571
ui rework done
olback Dec 11, 2019
1e022d7
Merge pull request #14 from olback/gtk-guidelines
olback Dec 11, 2019
240a58d
[skip ci] Choose folder stuff
olback Dec 12, 2019
cc94dd6
[skip ci] don't accept focus
olback Dec 12, 2019
0276b3b
[skip ci] make cli options a feature
olback Dec 12, 2019
841e209
[skip ci] ui backend work
olback Dec 13, 2019
a21f6c3
remove imports
olback Dec 13, 2019
41e7997
[skip ci] save config
olback Dec 14, 2019
e1fdf7b
update gtk + basics working
olback Dec 16, 2019
096ffac
logging works
olback Dec 17, 2019
e0700fc
[skip ci] stop watcher on exit, clean up
olback Dec 17, 2019
2c24b36
tweaks
olback Dec 17, 2019
147382a
disable unimplemented stuff
olback Dec 17, 2019
8245062
cleanup
olback Dec 17, 2019
ab7252f
fix linux build
olback Dec 17, 2019
8ba65ac
change to version 2 to allow local testing
olback Dec 17, 2019
ba74b01
ci config for local testing
olback Dec 17, 2019
ab4abc4
debug
olback Dec 17, 2019
230a64d
[skip ci] no idea what's going on...
olback Dec 17, 2019
ec86812
warning/error channel
olback Dec 18, 2019
10d6eba
added cli.yml/glade format checks
olback Dec 19, 2019
6de09be
dont create empty folders
olback Dec 19, 2019
3873f16
add support for 3d #15
olback Dec 19, 2019
1277542
add checks, fix linux config
olback Dec 19, 2019
b506c89
fix cargo args
olback Dec 19, 2019
f9873a9
remove old commands
olback Dec 19, 2019
ec560a4
fix syntax error
olback Dec 19, 2019
f76befc
fix windows build
olback Dec 19, 2019
3e50180
fix syntax error
olback Dec 19, 2019
4da66dc
0.2.0-rc0
olback Jun 6, 2020
a0aba3a
macos ci fix
olback Jun 6, 2020
c701696
fix ci attempt 2
olback Jun 6, 2020
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
235 changes: 99 additions & 136 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,104 +1,61 @@
# version: 2.1

version: 2

jobs:
linux:
fmt:
docker:
- image: circleci/rust:latest

steps:
- checkout

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

# - run:
# name: Install Rust Stable
# command: rustup toolchain install stable
checks:
docker:
- image: circleci/node:latest

- run:
name: Use Stable as Default
command: rustup default stable
steps:
- checkout

- run:
name: Show Version
command: |
rustc --version --verbose
rustup --version
cargo --version --verbose
- restore_cache:
name: Restore Deploy Node Cache
key: checks-cache-{{ checksum "checks/package.json" }}-{{ checksum "checks/package-lock.json" }}

- run:
name: Build Binary
command: cargo build --release --target=x86_64-unknown-linux-gnu
name: Install dependencies
command: |
cd checks
npm install

- save_cache:
name: Save Linux Rust Cache
key: cargo-cache-linux-{{ checksum "Cargo.lock" }}-{{ checksum "Cargo.toml" }}
name: Save Node Cache
key: checks-cache-{{ checksum "checks/package.json" }}-{{ checksum "checks/package-lock.json" }}
paths:
- "~/.cargo/"
- "~/.rustup/"
- "./target/"
- "/usr/local/cargo"

- run:
name: "Generate hash file"
command: "cd target/x86_64-unknown-linux-gnu/release && sha256sum library-loader > library-loader.sha256"

- run:
name: "Verify hash"
command: "cd target/x86_64-unknown-linux-gnu/release && sha256sum -c library-loader.sha256"
- "./checks/node_modules"

- run:
name: "Show hash"
command: "cd target/x86_64-unknown-linux-gnu/release && cat library-loader.sha256"
name: Run checks
command: ./tools/run_checks.sh

- save_cache:
name: Save Linux Build Cache
key: ll-linux-dist-{{ .Environment.CIRCLE_SHA1 }}
paths:
- "./target/x86_64-unknown-linux-gnu/release/library-loader"
- "./target/x86_64-unknown-linux-gnu/release/library-loader.sha256"

# - store_artifacts:
# name: Store Build
# path: "./target/x86_64-unknown-linux-gnu/release/library-loader"
# destination: "/linux/library-loader"

# - store_artifacts:
# name: Store Build Checksum
# path: "./target/x86_64-unknown-linux-gnu/release/library-loader.sha256"
# destination: "/linux/library-loader.sha256"

windows:
build_linux:
docker:
- image: circleci/rust:latest
- image: olback/rust-gtk-linux:latest

steps:
- checkout

- run:
name: Change Permissions for Cargo Cache
command: |
if [ -d "/usr/local/cargo" ]; then
sudo chown -R circleci:circleci /usr/local/cargo
fi
- restore_cache:
name: Restore Windows Rust Cache
key: cargo-cache-windows-{{ checksum "Cargo.lock" }}-{{ checksum "Cargo.toml" }}

- run:
name: Install Rust Stable
command: rustup toolchain install stable
name: Restore Linux Rust Cache
key: cargo-cache-linux-v2-{{ checksum "Cargo.lock" }}-{{ checksum "Cargo.toml" }}

- run:
name: Use Stable as Default
command: rustup default stable
# Not needed
# - run:
# name: Use Stable as Default
# command: rustup default stable

- run:
name: Show Version
Expand All @@ -107,66 +64,87 @@ jobs:
rustup --version
cargo --version --verbose

- run:
name: Install mingw-w64
command: sudo apt install mingw-w64 -y

- run:
name: Install the stable-x86_64-pc-windows-gnu toolchain
command: rustup toolchain install stable-x86_64-pc-windows-gnu

- run:
name: Install rust-std for target x86_64-pc-windows-gnu
command: rustup component add rust-std --target=x86_64-pc-windows-gnu

- run:
name: Copy a working version of crt2.o into the rust toolchain
command: |
export CRT2="/usr/local/rustup/toolchains/stable-x86_64-unknown-linux-gnu/lib/rustlib/x86_64-pc-windows-gnu/lib/crt2.o"
sudo mv $CRT2 "$CRT2.bak"
sudo cp /usr/x86_64-w64-mingw32/lib/crt2.o $CRT2

- run:
name: Build Binary
command: cargo build --release --target=x86_64-pc-windows-gnu
command: |
if [ $CIRCLE_BRANCH = "master" ]; then
cd ll-gui && cargo build --release --target=x86_64-unknown-linux-gnu && cd ..
cd ll-cli && cargo build --release --target=x86_64-unknown-linux-gnu && cd ..
else
cd ll-gui && cargo build --target=x86_64-unknown-linux-gnu && cd ..
cd ll-cli && cargo build --target=x86_64-unknown-linux-gnu && cd ..
fi

- save_cache:
name: Save Windows Rust Cache
key: cargo-cache-windows-{{ checksum "Cargo.lock" }}-{{ checksum "Cargo.toml" }}
name: Save Linux Rust Cache
key: cargo-cache-linux-v2-{{ checksum "Cargo.lock" }}-{{ checksum "Cargo.toml" }}
paths:
- "~/.cargo/"
- "~/.rustup/"
- "./target/"
- "/usr/local/cargo"

- run:
name: "Generate hash file"
command: "cd target/x86_64-pc-windows-gnu/release && sha256sum library-loader.exe > library-loader.exe.sha256"
name: Make dist
command: |
mkdir -p dist/linux
if [ $CIRCLE_BRANCH = "master" ]; then
cp target/x86_64-unknown-linux-gnu/release/library-loader-gui dist/linux/
cp target/x86_64-unknown-linux-gnu/release/library-loader-cli dist/linux/
else
cp target/x86_64-unknown-linux-gnu/debug/library-loader-gui dist/linux/
cp target/x86_64-unknown-linux-gnu/debug/library-loader-cli dist/linux/
fi

- run:
name: Generate hashes
command: |
cd dist/linux
sha256sum library-loader-gui > library-loader-gui.sha256
sha256sum library-loader-cli > library-loader-cli.sha256

- run:
name: "Verify hash"
command: "cd target/x86_64-pc-windows-gnu/release && sha256sum -c library-loader.exe.sha256"
name: Verify hashes
command: |
cd dist/linux
sha256sum -c library-loader-gui.sha256
sha256sum -c library-loader-cli.sha256

- run:
name: "Show hash"
command: "cd target/x86_64-pc-windows-gnu/release && cat library-loader.exe.sha256"
name: Show hashes
command: |
cd dist/linux
cat library-loader-gui.sha256
cat library-loader-cli.sha256

- save_cache:
name: Save Windows Build
key: ll-windows-dist-{{ .Environment.CIRCLE_SHA1 }}
name: Save Linux Build Cache
key: ll-linux-dist-{{ .Environment.CIRCLE_SHA1 }}
paths:
- "./target/x86_64-pc-windows-gnu/release/library-loader.exe"
- "./target/x86_64-pc-windows-gnu/release/library-loader.exe.sha256"
- "./dist/linux/library-loader-gui"
- "./dist/linux/library-loader-cli"
- "./dist/linux/library-loader-gui.sha256"
- "./dist/linux/library-loader-cli.sha256"

- store_artifacts:
name: Store GUI Build
path: "./dist/linux/library-loader-gui"
destination: "/linux/library-loader-gui"

- store_artifacts:
name: Store CLI Build
path: "./dist/linux/library-loader-cli"
destination: "/linux/library-loader-cli"

# - store_artifacts:
# name: Store Build
# path: "./target/x86_64-pc-windows-gnu/release/library-loader.exe"
# destination: "/windows/library-loader.exe"
- store_artifacts:
name: Store GUI Build Hash
path: "./dist/linux/library-loader-gui.sha256"
destination: "/linux/library-loader-gui.sha256"

- store_artifacts:
name: Store CLI Build Hash
path: "./dist/linux/library-loader-cli.sha256"
destination: "/linux/library-loader-cli.sha256"

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

deploy:
docker:
Expand All @@ -193,52 +171,37 @@ jobs:
name: Restore Linux Build
key: ll-linux-dist-{{ .Environment.CIRCLE_SHA1 }}

- restore_cache:
name: Restore Windows Build
key: ll-windows-dist-{{ .Environment.CIRCLE_SHA1 }}

- store_artifacts:
name: Store Build
name: Store Linux Build
path: "./target/x86_64-unknown-linux-gnu/release/library-loader"
destination: "/linux/library-loader"

- store_artifacts:
name: Store Build Checksum
name: Store Linux Build Checksum
path: "./target/x86_64-unknown-linux-gnu/release/library-loader.sha256"
destination: "/linux/library-loader.sha256"

- store_artifacts:
name: Store Build
path: "./target/x86_64-pc-windows-gnu/release/library-loader.exe"
destination: "/windows/library-loader.exe"

- store_artifacts:
name: Store Build Checksum
path: "./target/x86_64-pc-windows-gnu/release/library-loader.exe.sha256"
destination: "/windows/library-loader.exe.sha256"

- run:
name: Deploy
command: node .circleci/deploy/deploy.js


workflows:
version: 2
build:
jobs:
- linux
- windows
# - fmt
- build_linux
- request_deploy:
type: approval
requires:
- linux
- windows
- build_linux
filters:
branches:
only: master
- deploy:
requires:
- linux
- windows
- build_linux
- request_deploy
filters:
branches:
Expand Down
9 changes: 4 additions & 5 deletions .circleci/deploy/deploy.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,10 @@ const gh = {

const files = [
// Linux files
new File('./target/x86_64-unknown-linux-gnu/release/library-loader'),
new File('./target/x86_64-unknown-linux-gnu/release/library-loader.sha256'),
// Windows files
new File('./target/x86_64-pc-windows-gnu/release/library-loader.exe'),
new File('./target/x86_64-pc-windows-gnu/release/library-loader.exe.sha256')
new File('./target/x86_64-unknown-linux-gnu/release/library-loader-cli'),
new File('./target/x86_64-unknown-linux-gnu/release/library-loader-cli.sha256'),
new File('./target/x86_64-unknown-linux-gnu/release/library-loader-gui'),
new File('./target/x86_64-unknown-linux-gnu/release/library-loader-gui.sha256')
];

let cargoToml = fs.readFileSync('Cargo.toml', 'utf8').toString().split('\n');
Expand Down
23 changes: 0 additions & 23 deletions .circleci/windows.txt

This file was deleted.

2 changes: 1 addition & 1 deletion .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1 +1 @@
custom: "https://paypal.me/olback"
github: olback
14 changes: 12 additions & 2 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,28 @@ name: MacOS Build
on: [push]

jobs:
build:
macos_build:

runs-on: macos-latest

steps:
- uses: actions/checkout@v1
- name: Install glib
run: brew install glib
- name: Install gtk3
run: brew install gtk+3
- name: Install latest stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
working-directory: ./ll-cli
with:
command: build
args: --release --all-features
args: --release --bin library-loader-cli
- uses: actions-rs/cargo@v1
working-directory: ./ll-gui
with:
command: build
args: --release --bin library-loader-gui
Loading