+
Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

Ajour. General support. #759

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/commit_to_pr_body.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: Pull Request updated
jobs:
history:
name: Pull Request Body
runs-on: ubuntu-latest
runs-on: ubuntu-20.04 # https://github.com/actions/runner-images/issues/6697
if: startsWith(github.event.pull_request.head.ref, 'release/')
steps:
- name: Pull Request Body
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ name: Continuous-integration
jobs:
check:
name: Check
runs-on: ubuntu-latest
runs-on: ubuntu-20.04 # https://github.com/actions/runner-images/issues/6697
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
Expand All @@ -41,7 +41,7 @@ jobs:

test:
name: Test Suite
runs-on: ubuntu-latest
runs-on: ubuntu-20.04 # https://github.com/actions/runner-images/issues/6697
steps:
- uses: actions/checkout@v2
- name: Install dependencies
Expand Down Expand Up @@ -69,7 +69,7 @@ jobs:

fmt:
name: Rustfmt
runs-on: ubuntu-latest
runs-on: ubuntu-20.04 # https://github.com/actions/runner-images/issues/6697
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
Expand All @@ -85,7 +85,7 @@ jobs:

clippy:
name: Clippy
runs-on: ubuntu-latest
runs-on: ubuntu-20.04 # https://github.com/actions/runner-images/issues/6697
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
Expand All @@ -108,7 +108,7 @@ jobs:

poeditor:
name: POEditor
runs-on: ubuntu-latest
runs-on: ubuntu-20.04 # https://github.com/actions/runner-images/issues/6697
steps:
- uses: actions/checkout@v2
- name: Push terms to POEditor
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/markdown_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on: [push, pull_request]
jobs:
linting:
name: "Markdown linting"
runs-on: ubuntu-latest
runs-on: ubuntu-20.04 # https://github.com/actions/runner-images/issues/6697
steps:
- uses: actions/checkout@v2
name: Check out the code
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pull_poeditor_translations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: workflow_dispatch

jobs:
createPullRequest:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04 # https://github.com/actions/runner-images/issues/6697
steps:
- uses: actions/checkout@v2

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release_to_crates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
create-release:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04 # https://github.com/actions/runner-images/issues/6697
name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release_to_draft.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ jobs:
name: Create Release
outputs:
upload_url: ${{ steps.create-release.outputs.upload_url }}
runs-on: ubuntu-latest
runs-on: ubuntu-20.04 # https://github.com/actions/runner-images/issues/6697
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down Expand Up @@ -171,7 +171,7 @@ jobs:
asset_name: ajour-noselfupdate-macos.tar.gz
asset_type: application/gzip

runs-on: ubuntu-latest
runs-on: ubuntu-20.04 # https://github.com/actions/runner-images/issues/6697
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/security-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
- cron: '0 0 * * *'
jobs:
audit:
runs-on: ubuntu-latest
runs-on: ubuntu-20.04 # https://github.com/actions/runner-images/issues/6697
steps:
- uses: actions/checkout@v2
- uses: actions-rs/audit-check@v1
Expand Down
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@ and `Removed`.

## [Unreleased]

## [1.4.0] - 2022-12-18

### Added

- Support for WotLK.

### Removed

- Temporary removed support for CurseForge.

### Fixed

- Ajour now depends on another Ajour-Catalog.

## [1.3.2] - 2021-09-23

### Added
Expand Down
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "ajour"
description = "A World of Warcraft addon manager"
version = "1.3.2"
version = "1.4.0"
authors = ["Casper Rogild Storm"]
license = "GPL-3.0"
homepage = "https://github.com/ajour/ajour"
Expand All @@ -19,7 +19,7 @@ no-self-update = ["ajour-core/no-self-update"]
debug = ["iced/debug"]

[dependencies]
ajour-core = { version = "1.3.2", path = "crates/core", features=['gui'] }
ajour-core = { version = "1.4.0", path = "crates/core", features=['gui'] }
ajour-weak-auras = { version = "1.3.2", path = "crates/weak_auras" }
ajour-widgets = { version = "1.3.2", path = "crates/widgets" }

Expand Down
10 changes: 9 additions & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,15 @@ sudo apt install build-essential cmake libxft-dev libssl-dev libx11-dev libxkbco
If your system has extra dependencies, and they are not listed here please create
a [pull-request](https://github.com/ajour/ajour/pulls) or open a [issue](https://github.com/ajour/ajour/issues).

### Building
### Development

#### Linux / Windows / macOS

```sh
cargo run
```

### Building release

#### Linux / Windows

Expand Down
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

<div align="center">

## Ajour is no longer maintained. Please read https://github.com/ajour/ajour/issues/746.
Thank you all for the support, the feedback and for being an awesome community.

# Ajour

![Continuous integration](https://github.com/ajour/ajour/workflows/Continuous-integration/badge.svg)
Expand Down Expand Up @@ -56,7 +53,7 @@ respecting and open source. Ajour currently supports Windows, macOS and Linux.

- Addons will be parsed automatically and resolved from multiple repositories:
- [Tukui](https://www.tukui.org/)
- [CurseForge](https://www.curseforge.com/wow/addons)
- [CurseForge](https://www.curseforge.com/wow/addons) (temporary disabled)
- [WoWInterface](https://www.wowinterface.com/)
- [Hub](https://wowup.io/)
- Install new addons from the catalog or directly from a GitHub/GitLab URL
Expand All @@ -66,8 +63,7 @@ respecting and open source. Ajour currently supports Windows, macOS and Linux.
- Bulk addon update without any limitations
- Remove addons and their dependencies
- Ignore addons you don't want to update
- Supports both Retail, Classic Era, Classic Tbc, Ptr and Beta versions of
World of Warcraft
- Supports Retail, Classic Era, TBC, WotLK, PTR and Beta versions of WoW.
- 10+ handcrafted themes to choose between
- [Ability to add your own custom themes](#themes)
- Ability to backup your whole UI, including all settings from WTF
Expand Down
15 changes: 13 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
extern crate embed_resource;

fn main() {
#[cfg(windows)]
embed_resource::compile("resources/windows/res.rc");
let target_os = std::env::var("CARGO_CFG_TARGET_OS");
match target_os.as_ref().map(|x| &**x) {
Ok("windows") => {
embed_resource::compile("resources/windows/res.rc");
}
Ok("macos") => {
print!("cargo:rustc-env=MACOSX_DEPLOYMENT_TARGET=10.11")
}
Ok("linux") => {
// noop
}
tos => panic!("unknown target os {:?}!", tos),
}
}
2 changes: 1 addition & 1 deletion crates/core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
name = "ajour-core"
description = "Core library for Ajour"
version = "1.3.2"
version = "1.4.0"
authors = ["Casper Rogild Storm"]
license = "GPL-3.0"
homepage = "https://github.com/ajour/ajour"
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/bin/parse_addon_directory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fn main() {
let addon_cache = Some(Arc::new(Mutex::new(load_addon_cache().await.unwrap())));

let addons =
read_addon_directory(addon_cache, fingerprint_cache, &path, Flavor::ClassicTbc)
read_addon_directory(addon_cache, fingerprint_cache, &path, Flavor::ClassicWotlk)
.await
.unwrap();

Expand Down
3 changes: 2 additions & 1 deletion crates/core/src/catalog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ use chrono::prelude::*;
use isahc::AsyncReadResponseExt;
use serde::{Deserialize, Serialize};

const CATALOG_URL: &str = "https://raw.githubusercontent.com/ajour/catalog/main/catalog-0.2.0.json";
const CATALOG_URL: &str =
"https://raw.githubusercontent.com/ajour/ajour-catalog/main/catalog-0.3.0.json";

type Etag = Option<String>;

Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/config/addons.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ mod de {
}

map.insert(Flavor::Retail, ignored.clone());
map.insert(Flavor::ClassicTbc, ignored);
map.insert(Flavor::ClassicWotlk, ignored);

Ok(map)
}
Expand Down
2 changes: 1 addition & 1 deletion crates/core/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ impl std::fmt::Display for Language {
Language::Spanish => "Español",
Language::Swedish => "Svenska",
Language::Turkish => "Türkçe",
Language::Ukrainian => "Yкраїнська",
Language::Ukrainian => "Українська",
}
)
}
Expand Down
23 changes: 15 additions & 8 deletions crates/core/src/config/wow.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,19 +50,22 @@ pub enum Flavor {
alias = "bcc"
)]
ClassicTbc,
#[serde(alias = "wotlk")]
ClassicWotlk,
#[serde(alias = "ClassicPTR")]
ClassicPtr,
ClassicBeta,
}

impl Flavor {
pub const ALL: [Flavor; 8] = [
pub const ALL: [Flavor; 9] = [
Flavor::Retail,
Flavor::RetailPtr,
Flavor::RetailBeta,
Flavor::ClassicEra,
Flavor::ClassicEraPtr,
Flavor::ClassicTbc,
Flavor::ClassicWotlk,
Flavor::ClassicPtr,
Flavor::ClassicBeta,
];
Expand All @@ -71,9 +74,11 @@ impl Flavor {
pub(crate) fn curse_format(self) -> String {
match self {
Flavor::Retail | Flavor::RetailPtr | Flavor::RetailBeta => "wow_retail".to_owned(),
Flavor::ClassicTbc | Flavor::ClassicPtr | Flavor::ClassicBeta => {
"wow_burning_crusade".to_owned()
Flavor::ClassicWotlk | Flavor::ClassicPtr | Flavor::ClassicBeta => {
// Fixme. Fake value, as CurseForge is ignored
"wow_wotlk".to_owned()
}
Flavor::ClassicTbc => "wow_burning_crusade".to_owned(),
Flavor::ClassicEra | Flavor::ClassicEraPtr => "wow_classic".to_owned(),
}
}
Expand All @@ -82,9 +87,8 @@ impl Flavor {
pub(crate) fn hub_format(self) -> String {
match self {
Flavor::Retail | Flavor::RetailPtr | Flavor::RetailBeta => "retail".to_owned(),
Flavor::ClassicTbc | Flavor::ClassicPtr | Flavor::ClassicBeta => {
"burningCrusade".to_owned()
}
Flavor::ClassicWotlk | Flavor::ClassicPtr | Flavor::ClassicBeta => "wotlk".to_owned(),
Flavor::ClassicTbc => "burningCrusade".to_owned(),
Flavor::ClassicEra | Flavor::ClassicEraPtr => "classic".to_owned(),
}
}
Expand All @@ -93,7 +97,8 @@ impl Flavor {
pub fn base_flavor(self) -> Flavor {
match self {
Flavor::Retail | Flavor::RetailPtr | Flavor::RetailBeta => Flavor::Retail,
Flavor::ClassicTbc | Flavor::ClassicPtr | Flavor::ClassicBeta => Flavor::ClassicTbc,
Flavor::ClassicWotlk | Flavor::ClassicPtr | Flavor::ClassicBeta => Flavor::ClassicWotlk,
Flavor::ClassicTbc => Flavor::ClassicTbc,
Flavor::ClassicEra | Flavor::ClassicEraPtr => Flavor::ClassicEra,
}
}
Expand All @@ -106,7 +111,8 @@ impl Flavor {
Flavor::RetailBeta => "_beta_".to_owned(),
Flavor::ClassicEra => "_classic_era_".to_owned(),
Flavor::ClassicEraPtr => "_classic_era_ptr_".to_owned(),
Flavor::ClassicTbc => "_classic_".to_owned(),
Flavor::ClassicTbc => "_classic_tbc_".to_owned(), // Fake value. There is no Classic TBC
Flavor::ClassicWotlk => "_classic_".to_owned(),
Flavor::ClassicPtr => "_classic_ptr_".to_owned(),
Flavor::ClassicBeta => "_classic_beta_".to_owned(),
}
Expand All @@ -131,6 +137,7 @@ impl std::fmt::Display for Flavor {
Flavor::ClassicEra => "Classic Era",
Flavor::ClassicEraPtr => "Classic Era PTR",
Flavor::ClassicTbc => "Classic TBC",
Flavor::ClassicWotlk => "Classic WotLK",
Flavor::ClassicBeta => "Classic Beta",
Flavor::ClassicPtr => "Classic PTR",
}
Expand Down
3 changes: 2 additions & 1 deletion crates/core/src/parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ async fn parse_addon_folders(
Flavor::Retail => vec!["Mainline"],
Flavor::ClassicEra => vec!["Classic", "Vanilla"],
Flavor::ClassicTbc => vec!["BCC", "TBC"],
Flavor::ClassicWotlk => vec!["Wrath"],
_ => vec![],
};

Expand Down Expand Up @@ -1053,7 +1054,7 @@ static RE_PARSING_PATTERNS: Lazy<ParsingPatterns> = Lazy::new(|| {
ParsingPatterns {
extra_inclusion_regex: Regex::new(r#"(?i)^[^/\\]+[/\\]Bindings\.xml$"#).unwrap(),
initial_inclusion_regex: Regex::new(
r#"(?i)^([^/\\]+)[/\\]\1([-|_](mainline|bcc|tbc|classic|vanilla))?\.toc$"#,
r#"(?i)^([^/\\]+)[/\\]\1([-|_](mainline|wotlk|bcc|tbc|classic|vanilla))?\.toc$"#,
)
.unwrap(),
file_parsing_regex,
Expand Down
Loading
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载