-
Notifications
You must be signed in to change notification settings - Fork 481
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: enable unwinding on Windows release builds (#2286)
- Loading branch information
Showing
9 changed files
with
38 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -96,15 +96,15 @@ jobs: | |
uses: mozilla-actions/[email protected] | ||
|
||
- name: Build | ||
run: cargo build --release --locked --target ${{ matrix.target }} | ||
run: cargo build --profile release-windows --locked --target ${{ matrix.target }} | ||
|
||
- name: Pack artifact | ||
env: | ||
TARGET_NAME: yazi-${{ matrix.target }} | ||
run: | | ||
New-Item -ItemType Directory -Path ${env:TARGET_NAME} | ||
Copy-Item -Path "target\${{ matrix.target }}\release\ya.exe" -Destination ${env:TARGET_NAME} | ||
Copy-Item -Path "target\${{ matrix.target }}\release\yazi.exe" -Destination ${env:TARGET_NAME} | ||
Copy-Item -Path "target\${{ matrix.target }}\release-windows\ya.exe" -Destination ${env:TARGET_NAME} | ||
Copy-Item -Path "target\${{ matrix.target }}\release-windows\yazi.exe" -Destination ${env:TARGET_NAME} | ||
Copy-Item -Path "yazi-boot\completions" -Destination ${env:TARGET_NAME} -Recurse | ||
Copy-Item -Path "README.md", "LICENSE" -Destination ${env:TARGET_NAME} | ||
Compress-Archive -Path ${env:TARGET_NAME} -DestinationPath "${env:TARGET_NAME}.zip" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
use std::{env::var_os, error::Error}; | ||
|
||
fn main() -> Result<(), Box<dyn Error>> { | ||
if var_os("CARGO_CFG_TARGET_FAMILY").unwrap() != "windows" | ||
|| var_os("PROFILE").unwrap() != "release" | ||
{ | ||
return Ok(()); | ||
} | ||
|
||
panic!( | ||
"Unwinding must be enabled for Windows. Please use `cargo build --profile release-windows --locked` instead to build Yazi." | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
#[cfg(unix)] | ||
use mlua::{Function, Lua}; | ||
|
||
use super::Utils; | ||
|