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

Windows support #25

Closed
WyvernIXTL opened this issue May 28, 2024 · 6 comments · Fixed by #26
Closed

Windows support #25

WyvernIXTL opened this issue May 28, 2024 · 6 comments · Fixed by #26
Labels
enhancement New feature or request

Comments

@WyvernIXTL
Copy link
Contributor

WyvernIXTL commented May 28, 2024

Even though this program is compatible with windows,

  1. There is no binary release for windows.
  2. The config location in readme is not valid for windows:

dirs readme gives me:

dirs::config_dir();
// Lin: Some(/home/alice/.config)
// Win: Some(C:\Users\Alice\AppData\Roaming)
// Mac: Some(/Users/Alice/Library/Application Support)

The location should be reflected in the readme: ~/AppData/Roaming/tenere/config.toml.

@pythops pythops added the enhancement New feature or request label May 28, 2024
@pythops
Copy link
Owner

pythops commented May 28, 2024

Sure, PRs are welcome :)

@WyvernIXTL
Copy link
Contributor Author

I am using in my project the taiki-e/upload-rust-binary-action.

Would that work for you too?
(Without hash maybe 😆 )

@pythops
Copy link
Owner

pythops commented May 29, 2024

I am using the softprops/action-gh-release already in the CI so there is no need to change it.
maybe you can just add another step to cross compile to windows platform. something like this

      - name: Build for Windows
        if: matrix.os == 'ubuntu-latest'
        run: |
          just build-release-windows
          cp target/x86_64-pc-windows-msvc/release/tenere tenere-x86_64-pc-windows-msvc

and in the Justfile, you can add the target

build-release-windows:
    @cargo build --release --target=x86_64-pc-windows-msvc

@WyvernIXTL
Copy link
Contributor Author

I am wondering why you not do something like:

build:
   strategy:
      matrix:
        include:
          - target: aarch64-unknown-linux-gnu
            os: ubuntu-latest
          - target: x86_64-unknown-linux-gnu
            os: ubuntu-latest
          - target: aarch64-apple-darwin
            os: macos-latest
          - target: x86_64-apple-darwin
            os: macos-latest
         runs-on: ${{ matrix.os }}

Then you do per build
rustup target add ${{ matrix.target }}

and just compile it with
cargo b -r --target ${{ matrix.target }} --out-dir ./

Creating the release note can be put into another task and uploading should work in the matrix.

@pythops
Copy link
Owner

pythops commented May 29, 2024

Good idea. If it works why not, let's refactor it :)

@WyvernIXTL
Copy link
Contributor Author

I'll work on it on weekend.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants