Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support installation on Windows #42

Merged
merged 2 commits into from
Jul 23, 2020
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
35 changes: 35 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,38 @@ jobs:
asset_name: dijo-x86_64-apple
tag: ${{ github.ref }}
overwrite: true

build-windows:
runs-on: windows-latest

steps:
- name: Checkout
uses: actions/checkout@v1
- name: Cache Rust dependencies
uses: actions/[email protected]
with:
path: target
key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.OS }}-build-
- name: Install latest rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: beta
target: x86_64-pc-windows-msvc
default: true
override: true

- name: Build for windows
run: |
cargo build --all --release
strip target/release/dijo

- name: Upload binaries to release
uses: svenstaro/upload-release-action@v1-release
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/dijo
asset_name: dijo-x86_64-windows
tag: ${{ github.ref }}
overwrite: true
180 changes: 136 additions & 44 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ notify = "4.0"
[dependencies.cursive]
version = "0.15"
default-features = false
features = ["termion-backend"]
features = ["crossterm-backend"]

[dependencies.chrono]
version = "0.4"
Expand Down
4 changes: 2 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use crate::command::{open_command_window, Command};
use crate::utils::{load_configuration_file, AppConfig};

use clap::{App as ClapApp, Arg};
use cursive::termion;
use cursive::crossterm;
use cursive::views::{LinearLayout, NamedView};
use lazy_static::lazy_static;

Expand Down Expand Up @@ -62,7 +62,7 @@ fn main() {
println!("{}", h);
}
} else {
let mut s = termion().unwrap();
let mut s = crossterm().unwrap();
let app = App::load_state();
let layout = NamedView::new(
"Frame",
Expand Down