other: Windows compilation stuff (#222)
Some Windows compilation/deploy stuff. Mostly just a catch-all for some chores.
This commit is contained in:
parent
33b37bb5ac
commit
54a35d632e
|
@ -1,8 +1,8 @@
|
|||
[target.x86_64-pc-windows-msvc]
|
||||
rustflags = ["-Ctarget-feature=+crt-static"]
|
||||
rustflags = ["-C", "target-feature=+crt-static"]
|
||||
|
||||
[target.i686-pc-windows-msvc]
|
||||
rustflags = ["-Ctarget-feature=+crt-static"]
|
||||
rustflags = ["-C", "target-feature=+crt-static"]
|
||||
|
||||
[target.armv7-unknown-linux-gnueabihf]
|
||||
linker = "arm-linux-gnueabihf-gcc"
|
|
@ -29,7 +29,7 @@ _If relevant, please provide information on:_
|
|||
|
||||
**System Info:**
|
||||
|
||||
_Information about your system specifically (in case I have to replicate your system via VM):_
|
||||
_Information about your system specifically (sometimes this matters...):_
|
||||
|
||||
- _Total RAM:_
|
||||
|
||||
|
@ -39,6 +39,8 @@ _Information about your system specifically (in case I have to replicate your sy
|
|||
|
||||
**bottom version (use `btm -V`):**
|
||||
|
||||
**Rust version (if building yourself):**
|
||||
|
||||
## Additional context
|
||||
|
||||
_If anything hasn't been covered by the above categories, state it down here:_
|
||||
|
|
75
.travis.yml
75
.travis.yml
|
@ -1,5 +1,4 @@
|
|||
language: rust
|
||||
cache: cargo
|
||||
notifications:
|
||||
email:
|
||||
on_success: never
|
||||
|
@ -37,10 +36,12 @@ matrix:
|
|||
env: TARGET=x86_64-unknown-linux-musl
|
||||
arch: amd64
|
||||
rust: stable
|
||||
- os: linux
|
||||
env: TARGET=x86_64-unknown-linux-musl
|
||||
|
||||
# Windows GNU
|
||||
- os: windows
|
||||
env: TARGET=x86_64-pc-windows-gnu
|
||||
arch: amd64
|
||||
rust: beta
|
||||
rust: stable
|
||||
|
||||
# ARM stuff (skip beta for now, see https://github.com/rust-lang/rust/issues/62896)
|
||||
- os: linux
|
||||
|
@ -75,17 +76,18 @@ branches:
|
|||
- master
|
||||
- /^\d+\.\d+(\.\d+)?(-\S*)?$/
|
||||
|
||||
cache: cargo
|
||||
|
||||
before_install:
|
||||
- export RUST_BACKTRACE=1
|
||||
- |
|
||||
if [[ $TRAVIS_OS_NAME == "windows" ]]; then
|
||||
if [[ -n $TRAVIS_TAG ]]; then
|
||||
powershell Install-WindowsFeature Net-Framework-Core;
|
||||
choco install -y wixtoolset;
|
||||
export PATH=$PATH:"/c/Program Files (x86)/WiX Toolset v3.11/bin";
|
||||
choco install zip;
|
||||
rustup target add i686-pc-windows-msvc;
|
||||
fi
|
||||
if [[ $TRAVIS_OS_NAME == "windows" && -n $TRAVIS_TAG ]]; then
|
||||
echo "Pre-installing deploy dependencies for Windows...";
|
||||
powershell Install-WindowsFeature Net-Framework-Core;
|
||||
choco install -y wixtoolset;
|
||||
export PATH=$PATH:"/c/Program Files (x86)/WiX Toolset v3.11/bin";
|
||||
choco install zip;
|
||||
rustup target add i686-pc-windows-msvc;
|
||||
fi
|
||||
|
||||
before_script:
|
||||
|
@ -117,9 +119,8 @@ before_deploy:
|
|||
- |
|
||||
echo "Building release..."
|
||||
if [[ $TRAVIS_OS_NAME == "windows" ]]; then
|
||||
|
||||
echo "Building Windows 64-bit...";
|
||||
cargo build --release --target x86_64-pc-windows-msvc;
|
||||
cargo build --release --target $TARGET;
|
||||
local target_dir=$(ls target/release/build/bottom-*/out/rg.bash | head -n1 | xargs dirname)
|
||||
cp -r $target_dir completions
|
||||
mv "./target/x86_64-pc-windows-msvc/release/btm" "btm.exe";
|
||||
|
@ -128,31 +129,33 @@ before_deploy:
|
|||
rm "btm.exe"
|
||||
rm -r "completions"
|
||||
|
||||
echo "Building Windows 32-bit...";
|
||||
cargo clean;
|
||||
cargo build --release --target i686-pc-windows-msvc;
|
||||
local target_dir=$(ls target/release/build/bottom-*/out/rg.bash | head -n1 | xargs dirname)
|
||||
cp -r $target_dir completions
|
||||
mv "./target/i686-pc-windows-msvc/release/btm" "btm.exe";
|
||||
strip "btm.exe"
|
||||
zip -r bottom_i686-pc-windows-msvc.zip "btm.exe" "completions";
|
||||
rm "btm.exe"
|
||||
rm -r "completions"
|
||||
if [[ $TARGET == "x86_64-pc-windows-msvc" ]]; then
|
||||
echo "Building Windows 32-bit...";
|
||||
cargo clean;
|
||||
cargo build --release --target i686-pc-windows-msvc;
|
||||
local target_dir=$(ls target/release/build/bottom-*/out/rg.bash | head -n1 | xargs dirname)
|
||||
cp -r $target_dir completions
|
||||
mv "./target/i686-pc-windows-msvc/release/btm" "btm.exe";
|
||||
strip "btm.exe"
|
||||
zip -r bottom_i686-pc-windows-msvc.zip "btm.exe" "completions";
|
||||
rm "btm.exe"
|
||||
rm -r "completions"
|
||||
|
||||
echo "Building choco template...";
|
||||
python "./deployment/windows/choco/choco_packager.py" "bottom_i686-pc-windows-msvc.zip" "bottom_x86_64-pc-windows-msvc.zip" $TRAVIS_TAG "./deployment/windows/choco/bottom.nuspec.template" "./deployment/windows/choco/chocolateyinstall.ps1.template" "./deployment/windows/choco/bottom.nuspec" "./deployment/windows/choco/tools/chocolateyinstall.ps1" "./deployment/windows/choco/tools/";
|
||||
cd "./deployment/windows/choco/"
|
||||
zip -r choco.zip "bottom.nuspec" "tools/";
|
||||
cd "../../../";
|
||||
mv "./deployment/windows/choco/choco.zip" "./choco.zip"
|
||||
echo "Building choco template...";
|
||||
python "./deployment/windows/choco/choco_packager.py" "bottom_i686-pc-windows-msvc.zip" "bottom_x86_64-pc-windows-msvc.zip" $TRAVIS_TAG "./deployment/windows/choco/bottom.nuspec.template" "./deployment/windows/choco/chocolateyinstall.ps1.template" "./deployment/windows/choco/bottom.nuspec" "./deployment/windows/choco/tools/chocolateyinstall.ps1" "./deployment/windows/choco/tools/";
|
||||
cd "./deployment/windows/choco/"
|
||||
zip -r choco.zip "bottom.nuspec" "tools/";
|
||||
cd "../../../";
|
||||
mv "./deployment/windows/choco/choco.zip" "./choco.zip"
|
||||
|
||||
echo "Building msi file...";
|
||||
cargo install cargo-wix;
|
||||
cargo wix init;
|
||||
cargo wix;
|
||||
echo "Building msi file...";
|
||||
cargo install cargo-wix;
|
||||
cargo wix init;
|
||||
cargo wix;
|
||||
|
||||
echo "Building winget template...";
|
||||
python "./deployment/packager.py" $TRAVIS_TAG "./deployment/windows/winget/winget.yaml.template" "$TRAVIS_TAG.yaml" "SHA256" "./bottom_x86_64_installer.msi";
|
||||
echo "Building winget template...";
|
||||
python "./deployment/packager.py" $TRAVIS_TAG "./deployment/windows/winget/winget.yaml.template" "$TRAVIS_TAG.yaml" "SHA256" "./bottom_x86_64_installer.msi";
|
||||
fi
|
||||
|
||||
echo "Done Windows pre-deploy!";
|
||||
else
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
"Ungrouped",
|
||||
"WASD",
|
||||
"Wojnarowski",
|
||||
"aarch",
|
||||
"andys",
|
||||
"armhf",
|
||||
"armv",
|
||||
|
|
|
@ -41,6 +41,10 @@ This is a nuspec. It mostly adheres to https://docs.nuget.org/create/Nuspec-Refe
|
|||
To use, run `btm` in a terminal.
|
||||
|
||||
For more [documentation and usage](https://github.com/ClementTsang/bottom/blob/master/README.md), see the [official repo](https://github.com/ClementTsang/bottom).
|
||||
|
||||
|
||||
**Note**
|
||||
This currently depends on Visual C++ Redistributable for Visual Studio 2015 https://chocolatey.org/packages/vcredist2015.
|
||||
</description>
|
||||
<releaseNotes>https://github.com/ClementTsang/bottom/releases/tag/$version/</releaseNotes>
|
||||
</metadata>
|
||||
|
|
Loading…
Reference in New Issue