Skip to content

Commit 336fa53

Browse files
committed
Bump version to 0.4.1
1 parent 9dba76c commit 336fa53

File tree

9 files changed

+71
-24
lines changed

9 files changed

+71
-24
lines changed

CHANGELOG.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ You can add additional user facing information if it's a major breaking change.
1414
```
1515
1616
Change types:
17-
- `✨ Major Features` for version-defining changes.
17+
- `✨ Major Changes` for version-defining changes.
1818
- `Added` for new features.
1919
- `Changed` for changes in existing functionality.
2020
- `Deprecated` for soon-to-be removed features.
@@ -30,7 +30,10 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/)
3030

3131
## Unreleased / Rolling Release
3232

33-
### ✨ Major Features
33+
## 0.4.1 - 2024-03-27
34+
35+
### ✨ Major Changes
36+
- ⚠ Alkahest is no longer compatible with Avvy's Alkgui. The features provided by Alkgui are now available in Alkahest itself.
3437
- Reworked the map loading mechanism to allow for maps to be loaded individually by @cohaereo
3538
- Added a map and activity browser by @cohaereo
3639
- Added a game installation detector by @cohaereo

Cargo.lock

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ tiger-parse = { version = "0.1.3", git = "https://github.com/v4nguard/tiger-pars
1515
] }
1616

1717
destiny-havok = { path = "./crates/destiny-havok" }
18-
destiny-pkg = "0.9.8"
18+
destiny-pkg = "0.9.9"
1919

2020
anyhow = { version = "1.0.71" }
2121
winit = { version = "0.28" }
@@ -89,12 +89,14 @@ build-time = "0.1.3"
8989
rustc-hash = "1.1.0"
9090
once_cell = "1.19.0"
9191
directories = "5.0.1"
92-
game-detector = "0.1.1"
92+
game-detector = "0.1.3"
93+
tracing-log = "0.2.0"
9394

9495
[features]
9596
default = ["discord_rpc"]
9697
tracy = []
97-
# Ensures all TFX opcodes are interpreted
98+
# Disable sorting the map list
99+
keep_map_order = []
98100
# TODO(cohae): This should be a runtime configuration setting?
99101
discord_rpc = ["dep:discord-rpc-client"]
100102

crates/alkahest-data/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ edition = "2021"
88
[dependencies]
99
alkahest-pm = { path = "../alkahest-pm" }
1010
binrw = "0.13.3"
11-
destiny-pkg = "0.9.8"
11+
destiny-pkg = "0.9.9"
1212
glam = { version = "0.25" }
1313
tiger-parse = { version = "0.1.3", git = "https://github.com/v4nguard/tiger-parse", features = [
1414
"check_types",

crates/alkahest-pm/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ edition = "2021"
77

88
[dependencies]
99
anyhow = "1.0.79"
10-
destiny-pkg = "0.9.8"
10+
destiny-pkg = "0.9.9"
1111

1212
lazy_static = "1.4.0"
1313
parking_lot = "0.12.1"

src/game_selector.rs

Lines changed: 31 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@ use winit::{
1414
dpi::PhysicalSize,
1515
event::{Event, WindowEvent},
1616
event_loop::{ControlFlow, EventLoop},
17-
platform::run_return::EventLoopExtRunReturn,
17+
platform::{run_return::EventLoopExtRunReturn, windows::WindowBuilderExtWindows},
1818
};
1919

2020
use crate::{
21-
icons::{ICON_CONTROLLER, ICON_MICROSOFT, ICON_STEAM},
21+
icons::{ICON_CONTROLLER, ICON_FOLDER_OPEN, ICON_MICROSOFT, ICON_STEAM},
2222
overlays::{
2323
big_button::BigButton,
2424
gui::{GuiManager, PreDrawResult},
@@ -29,11 +29,16 @@ use crate::{
2929

3030
/// Creates a temporary window with egui to select a game installation
3131
/// This function should not be called in another render loop, as it will hang until this function completes
32-
pub fn select_game_installation(event_loop: &mut EventLoop<()>) -> anyhow::Result<String> {
32+
pub fn select_game_installation(
33+
event_loop: &mut EventLoop<()>,
34+
icon: &winit::window::Icon,
35+
) -> anyhow::Result<String> {
3336
let window = winit::window::WindowBuilder::new()
3437
.with_title("Alkahest")
3538
.with_inner_size(PhysicalSize::new(320, 320))
3639
.with_min_inner_size(PhysicalSize::new(320, 480))
40+
.with_window_icon(Some(icon.clone()))
41+
.with_taskbar_icon(Some(icon.clone()))
3742
.build(event_loop)?;
3843

3944
let window = Arc::new(window);
@@ -124,15 +129,29 @@ pub fn select_game_installation(event_loop: &mut EventLoop<()>) -> anyhow::Resul
124129
}
125130
}
126131

127-
// if BigButton::new(ICON_FOLDER_OPEN, "Browse")
128-
// .full_width()
129-
// .ui(ui)
130-
// .clicked()
131-
// {
132-
// let dialog = native_dialog::FileDialog::new()
133-
// .set_title("Select Destiny 2 packages directory")
134-
// .show_open_single_dir()?;
135-
// }
132+
if BigButton::new(ICON_FOLDER_OPEN, "Browse")
133+
.full_width()
134+
.ui(ui)
135+
.clicked()
136+
{
137+
if let Ok(Some(path)) = native_dialog::FileDialog::new()
138+
.set_title("Select Destiny 2 packages directory")
139+
.show_open_single_dir() {
140+
if path.ends_with("packages") {
141+
selected_path = Ok(path.parent().unwrap().to_string_lossy().to_string());
142+
*control_flow = ControlFlow::Exit;
143+
} else if path.ends_with("Destiny 2") {
144+
// cohae: Idiot-proofing this a bit
145+
selected_path = Ok(path.to_string_lossy().to_string());
146+
*control_flow = ControlFlow::Exit;
147+
} else {
148+
native_dialog::MessageDialog::new()
149+
.set_title("Invalid directory")
150+
.set_text("The selected directory is not a packages directory. Please select the packages directory of your game installation.")
151+
.show_alert().ok();
152+
}
153+
}
154+
}
136155
});
137156

138157
PreDrawResult::Continue

src/main.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ use technique::Technique;
4343
use text::GlobalStringmap;
4444
use tiger_parse::PackageManagerExt;
4545
use tracing::level_filters::LevelFilter;
46+
use tracing_log::LogTracer;
4647
use tracing_subscriber::{layer::SubscriberExt, EnvFilter, Layer};
4748
use windows::Win32::{
4849
Foundation::DXGI_STATUS_OCCLUDED,
@@ -197,6 +198,7 @@ pub async fn main() -> anyhow::Result<()> {
197198
None
198199
};
199200

201+
LogTracer::init()?;
200202
tracing::subscriber::set_global_default(
201203
tracing_subscriber::registry()
202204
.with(tracy_layer)
@@ -227,7 +229,7 @@ pub async fn main() -> anyhow::Result<()> {
227229
PathBuf::from_str(&p).context("Invalid package directory")?
228230
} else {
229231
let path = PathBuf::from_str(
230-
&game_selector::select_game_installation(&mut event_loop)
232+
&game_selector::select_game_installation(&mut event_loop, &icon)
231233
.context("No game installation selected")?,
232234
)
233235
.unwrap();

src/map.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,9 @@ impl MapList {
184184
})
185185
.collect();
186186

187+
#[cfg(not(feature = "keep_map_order"))]
188+
self.maps.sort_by_key(|m| m.name.clone());
189+
187190
self.updated = true;
188191
self.current_map = 0;
189192
self.previous_map = 0;

src/overlays/menu.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,23 @@ impl Overlay for MenuBar {
222222

223223
ui.separator();
224224

225+
if ui
226+
.button("Change package directory")
227+
.on_hover_text("Will restart Alkahest")
228+
.clicked()
229+
{
230+
config::with_mut(|c| c.packages_directory = None);
231+
config::persist();
232+
233+
// Spawn the new process
234+
std::process::Command::new(std::env::current_exe().unwrap())
235+
.args(std::env::args().skip(1))
236+
.spawn()
237+
.expect("Failed to spawn the new alkahest process");
238+
239+
std::process::exit(0);
240+
}
241+
225242
if ui.button("Changelog").clicked() {
226243
self.changelog_open = true;
227244
ui.close_menu();

0 commit comments

Comments
 (0)