Skip to content

Commit

Permalink
Add links and identifiers for Löve 11.4 (#30)
Browse files Browse the repository at this point in the history
* Add Love 11.4

* Default version to latest stable

* Update download links for 11.4

* Update mod.rs for 11.4 matching

* Add 11.4 to build matrices

* Update README to latest stable 11.4
  • Loading branch information
martijndeb authored Oct 17, 2022
1 parent 12944ba commit 733b41b
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
asset_name: boon-linux-amd64
strategy:
matrix:
love: [11.2, 11.3, 0.10.2]
love: [11.2, 11.3, 11.4, 0.10.2]
steps:
- uses: actions/checkout@v2
- name: Download latest boon
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:
asset_name: boon-macos-amd64
strategy:
matrix:
love: [11.2, 11.3, 0.10.2]
love: [11.2, 11.3, 11.4, 0.10.2]
steps:
- uses: actions/checkout@v2
- name: Download latest boon
Expand Down Expand Up @@ -130,7 +130,7 @@ jobs:
asset_name: boon-windows-amd64
strategy:
matrix:
love: [11.2, 11.3, 0.10.2]
love: [11.2, 11.3, 11.4, 0.10.2]
steps:
- uses: actions/checkout@v2
- name: Download latest boon
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,8 @@ If you don't initialize boon, you can still build your project normally, but the
In order to build your project, you first need to download the versionof LÖVE that you are using for it.

```bash
# Will download LÖVE 11.3 for building
$ boon love download 11.3
# Will download LÖVE 11.4 for building
$ boon love download 11.4
```

### Building your project
Expand Down
3 changes: 3 additions & 0 deletions src/build/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ pub fn get_love_version_file_name(
bitness: Bitness,
) -> String {
match (version, platform, bitness) {
(LoveVersion::V11_4, Platform::Windows, Bitness::X64) => "love-11.4-win64",
(LoveVersion::V11_4, Platform::Windows, Bitness::X86) => "love-11.4-win32",

(LoveVersion::V11_3, Platform::Windows, Bitness::X64) => "love-11.3-win64",
(LoveVersion::V11_3, Platform::Windows, Bitness::X86) => "love-11.3-win32",

Expand Down
4 changes: 4 additions & 0 deletions src/download.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,10 @@ fn get_love_download_location(
) -> Result<LoveDownloadLocation> {
let release_location = "https://github.com/love2d/love/releases/download";
let (version_string, release_file_name) = match (version, platform, bitness) {
(LoveVersion::V11_4, Platform::Windows, Bitness::X64) => ("11.4", "love-11.4-win64.zip"),
(LoveVersion::V11_4, Platform::Windows, Bitness::X86) => ("11.4", "love-11.4-win32.zip"),
(LoveVersion::V11_4, Platform::MacOs, Bitness::X64) => ("11.4", "love-11.4-macos.zip"),

(LoveVersion::V11_3, Platform::Windows, Bitness::X64) => ("11.3", "love-11.3-win64.zip"),
(LoveVersion::V11_3, Platform::Windows, Bitness::X86) => ("11.3", "love-11.3-win32.zip"),
(LoveVersion::V11_3, Platform::MacOs, Bitness::X64) => ("11.3", "love-11.3-macos.zip"),
Expand Down
2 changes: 1 addition & 1 deletion src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ enum BoonOpt {
short,
help = "Specify which target version of LÖVE to build for",
possible_values=&LoveVersion::variants(),
default_value="11.3",
default_value="11.4",
)]
version: LoveVersion,
directory: String,
Expand Down
15 changes: 8 additions & 7 deletions src/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,16 @@ pub enum Bitness {
X64, // 64 bit
}

const LOVE_VERSIONS: [&str; 5] = ["11.3", "11.2", "11.1", "11.0", "0.10.2"];
const LOVE_VERSIONS: [&str; 6] = ["11.4", "11.3", "11.2", "11.1", "11.0", "0.10.2"];
/// Represents a specific version of LÖVE2D
#[derive(Copy, Clone, Debug, Primitive)]
pub enum LoveVersion {
V11_3 = 0,
V11_2 = 1,
V11_1 = 2,
V11_0 = 3,
V0_10_2 = 4,
V11_4 = 0,
V11_3 = 1,
V11_2 = 2,
V11_1 = 3,
V11_0 = 4,
V0_10_2 = 5,
}

/// File info about remote download
Expand Down Expand Up @@ -86,7 +87,7 @@ impl FromStr for LoveVersion {
}

impl LoveVersion {
pub const fn variants() -> [&'static str; 5] {
pub const fn variants() -> [&'static str; 6] {
LOVE_VERSIONS
}
}
Expand Down

0 comments on commit 733b41b

Please sign in to comment.