Skip to content

Commit

Permalink
#1261 Restore Windows 7 compatibility for most parts of ReaLearn
Browse files Browse the repository at this point in the history
Helgobox App and the egui-based GUIs of the plug-in are still not Windows-7-compatible!
  • Loading branch information
helgoboss committed Dec 5, 2024
1 parent 07632e8 commit 87782c0
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 22 deletions.
26 changes: 13 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
include:
- artifact: windows-x86_64
os: windows-latest
toolchain-suffix: x86_64-pc-windows-msvc
toolchain: 1.77.2-x86_64-pc-windows-msvc
lib-file-name: helgobox.dll
extension-file-name: reaper_helgobox.dll
target: x86_64-pc-windows-msvc
Expand All @@ -24,7 +24,7 @@ jobs:
features: "playtime,egui,licensing"
- artifact: windows-i686
os: windows-latest
toolchain-suffix: i686-pc-windows-msvc
toolchain: 1.81.0-i686-pc-windows-msvc
lib-file-name: helgobox.dll
extension-file-name: reaper_helgobox.dll
target: i686-pc-windows-msvc
Expand All @@ -33,48 +33,48 @@ jobs:
features: "egui"
- artifact: macos-x86_64
os: macos-latest
toolchain-suffix: x86_64-apple-darwin
toolchain: 1.81.0-x86_64-apple-darwin
lib-file-name: libhelgobox.dylib
extension-file-name: libreaper_helgobox.dylib
target: x86_64-apple-darwin
use-cross: false
profile: release
profile: release-strip
features: "playtime,egui,licensing"
- artifact: macos-aarch64
os: macos-latest
toolchain-suffix: x86_64-apple-darwin
toolchain: 1.81.0-x86_64-apple-darwin
lib-file-name: libhelgobox.dylib
extension-file-name: libreaper_helgobox.dylib
target: aarch64-apple-darwin
use-cross: false
profile: release
profile: release-strip
features: "playtime,egui,licensing"
- artifact: linux-x86_64
os: ubuntu-20.04
toolchain-suffix: x86_64-unknown-linux-gnu
toolchain: 1.81.0-x86_64-unknown-linux-gnu
lib-file-name: libhelgobox.so
extension-file-name: "not-yet-supported"
target: x86_64-unknown-linux-gnu
use-cross: false
profile: release
profile: release-strip
features: ""
# - artifact: linux-aarch64
# os: ubuntu-22.04
# toolchain-suffix: x86_64-unknown-linux-gnu
# toolchain: 1.81.0-x86_64-unknown-linux-gnu
# lib-file-name: libhelgobox.so
# extension-file-name: ""
# target: aarch64-unknown-linux-gnu
# use-cross: true
# profile: release
# profile: release-strip
# features: ""
# - artifact: linux-armv7
# os: ubuntu-22.04
# toolchain-suffix: x86_64-unknown-linux-gnu
# toolchain: 1.81.0-x86_64-unknown-linux-gnu
# lib-file-name: libhelgobox.so
# extension-file-name: ""
# target: armv7-unknown-linux-gnueabihf
# use-cross: true
# profile: release
# profile: release-strip
# features: ""
env:
# This is relevant for macOS builds only (and only if not overridden).
Expand All @@ -96,7 +96,7 @@ jobs:
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.81.0-${{ matrix.toolchain-suffix }}
toolchain: ${{ matrix.toolchain }}
target: ${{ matrix.target }}
override: true
# Install OS dependencies (Linux/macOS only)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-i686.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.81.0-i686-pc-windows-msvc
toolchain: 1.77.2-i686-pc-windows-msvc
target: i686-pc-windows-msvc
override: true
- name: cargo build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/windows-x86_64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.81.0
toolchain: 1.77.2
override: true
- name: cargo check
uses: actions-rs/cargo@v1
Expand All @@ -57,7 +57,7 @@ jobs:
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: 1.81.0
toolchain: 1.77.2
override: true
- name: cargo build
uses: actions-rs/cargo@v1
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ On Windows, it's necessary to use the MSVC (Microsoft Visual Studio C++) toolcha
+
[source,shell]
----
rustup default 1.81.0-x86_64-pc-windows-msvc
rustup default 1.77.2-x86_64-pc-windows-msvc
----
. Download and install https://git-scm.com/download/win[Git for Windows]
. Clone the ReaLearn Git repository
Expand Down
17 changes: 15 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,22 @@ cached = "0.53.1"
imageproc = "0.25.0"

[profile.release]
# There's a long reasoning about those values in CONTRIBUTING.adoc
debug = 2
# Switching to "symbols" will reduce size even more but leads to useless stack traces when panicking

[profile.release-strip]
inherits = "release"
# We use this profile on Linux and macOS only. On Windows, we build with older Rust version 1.77.2
# in order to support Windows 7. This old version strips away too much due to an implementation
# error in rustc:
#
# "Prior to 1.79, this unintentionally disabled the generation of *.pdb files on MSVC, resulting
# in the absence of symbols."
# (https://doc.rust-lang.org/rustc/codegen-options/index.html#strip).
#
# Not stripping on Windows is okay because the PDB is a separate file anyway. We do the following
# mainly for macOS. There's a long reasoning about the concrete values in CONTRIBUTING.adoc.
# BTW, switching to "symbols" would reduce size even more but leads to useless stack traces when
# panicking.
strip = "debuginfo"
split-debuginfo = "packed"

Expand Down
2 changes: 1 addition & 1 deletion main/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Benjamin Klum <[email protected]>"]
edition = "2021"
build = "build.rs"
license = "GPL-3.0"
rust-version = "1.81.0"
rust-version = "1.77.2"
publish = false

[features]
Expand Down
2 changes: 1 addition & 1 deletion main/lib/helgoboss-learn
4 changes: 3 additions & 1 deletion main/src/domain/backbone.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,15 @@ use helgobox_api::persistence::{
};
use imageproc::definitions::{HasBlack, HasWhite};
use once_cell::sync::Lazy;
// Use once_cell::sync::Lazy instead of std::sync::LazyLock in order to be able to build with Rust 1.77.2 (to stay Win7-compatible)
use once_cell::sync::Lazy as LazyLock;
use palette::IntoColor;
use reaper_high::{Fx, Reaper};
use std::cell::{Cell, Ref, RefCell, RefMut};
use std::cmp::min;
use std::hash::Hash;
use std::rc::Rc;
use std::sync::{LazyLock, RwLock};
use std::sync::RwLock;
use std::time::{Duration, Instant};
use streamdeck::StreamDeck;
use strum::EnumCount;
Expand Down

0 comments on commit 87782c0

Please sign in to comment.