Skip to content

Commit

Permalink
Remove x86_64-pc-windows-gnu
Browse files Browse the repository at this point in the history
  • Loading branch information
lbeder committed Feb 15, 2024
1 parent dbd837e commit cc0dc89
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 57 deletions.
26 changes: 0 additions & 26 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,32 +113,6 @@ CROSS_COMPILE=x86_64-linux-musl- cargo build --target=x86_64-unknown-linux-musl
cargo build --target=x86_64-unknown-linux-musl
```

### For Windows

In order to get stuff working later, use the `nightly` branch of Rust:

```sh
rustup override set nightly
```

Install the standard Windows target on a Mac (note, that the opposite is currently impossible):

```sh
rustup target add x86_64-pc-windows-gnu
```

Use `homebrew` to install mingw-w64:

```sh
brew install mingw-w64
```

Now you can build it:

```sh
cargo build --release --target=x86_64-pc-windows-gnu
```

## Examples

Let's try to derive the key for the password `secret`, using the salt `saltsaltsaltsalt`:
Expand Down
12 changes: 5 additions & 7 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env sh -e
#!/usr/bin/env sh
set -e

VERSION=$(cargo pkgid | cut -d# -f2 | cut -d: -f2)

Expand All @@ -11,18 +12,15 @@ cargo clippy --all-targets --all-features -- -D warnings
echo "Running tests..."
cargo test --release

echo "Building v${VERSION} for Mac OS arm64..."
echo "Building v${VERSION} for Mac OS ARM64..."
cargo build --release --target=aarch64-apple-darwin

echo "Building v${VERSION} for Mac OS..."
echo "Building v${VERSION} for Mac OS x64..."
cargo build --release --target=x86_64-apple-darwin

echo "Building v${VERSION} for Linux AMD64..."
export CC_x86_64_unknown_linux_musl=x86_64-unknown-linux-musl-gcc
export CXX_x86_64_unknown_linux_musl=x86_64-unknown-linux-musl-g++
export AR_x86_64_unknown_linux_musl=x86_64-unknown-linux-musl-ar
export CARGO_TARGET_X86_64_UNKNOWN_LINUX_MUSL_LINKER=x86_64-unknown-linux-musl-gcc
CROSS_COMPILE=x86_64-linux-musl- cargo build --release --target=x86_64-unknown-linux-musl

echo "Building v${VERSION} for Windows x64..."
cargo build --release --target=x86_64-pc-windows-gnu
cargo build --release --target=x86_64-unknown-linux-musl
26 changes: 2 additions & 24 deletions release.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/usr/bin/env sh -e
#!/usr/bin/env sh
set -e

VERSION=$(cargo pkgid | cut -d# -f2 | cut -d: -f2)

Expand Down Expand Up @@ -33,15 +34,6 @@ tar zcvf ${LINUX_AMD64_RELEASE} target/x86_64-unknown-linux-musl/release/slowkey
LINUX_AMD64_RELEASE_SHA512=$(shasum -a512 ${LINUX_AMD64_RELEASE})
gpg --output ${LINUX_AMD64_RELEASE_SIG} --detach-sig ${LINUX_AMD64_RELEASE}

echo "Creating v${VERSION} bundle for Windows x64..."
WINDOWS_X64_TARGET="slowkey-${VERSION}-windows-amd64.tgz"
WINDOWS_X64_TARGET_SIG=${WINDOWS_X64_TARGET}.sig
WINDOWS_X64_RELEASE="target/${WINDOWS_X64_TARGET}"
WINDOWS_X64_RELEASE_SIG=${WINDOWS_X64_RELEASE}.sig
tar zcvf ${WINDOWS_X64_RELEASE} target/x86_64-pc-windows-gnu/release/slowkey.exe
WINDOWS_X64_RELEASE_SHA512=$(shasum -a512 ${WINDOWS_X64_RELEASE})
gpg --output ${WINDOWS_X64_RELEASE_SIG} --detach-sig ${WINDOWS_X64_RELEASE}

RELEASE_NOTES="target/release.md"
echo "Preparing release notes..."

Expand Down Expand Up @@ -90,18 +82,4 @@ Verify the digital signature:
gpg --verify ${LINUX_AMD64_TARGET_SIG} ${LINUX_AMD64_TARGET}
\`\`\`
## Windows x64
Calculate the SHA512:
\`\`\`sh
shasum -a512 ${WINDOWS_X64_RELEASE} ${WINDOWS_X64_RELEASE_SHA512}
\`\`\`
Verify the digital signature:
\`\`\`sh
gpg --verify ${WINDOWS_X64_TARGET_SIG} ${WINDOWS_X64_TARGET}
\`\`\`
EOF

0 comments on commit cc0dc89

Please sign in to comment.