mirror of
https://github.com/an-anime-team/an-anime-game-launcher.git
synced 2024-11-24 05:46:17 +03:00
feat: list missing dependencies on non-standard distros
Hello NixOS!
This commit is contained in:
parent
d8a43562f8
commit
19d1deead8
8 changed files with 64 additions and 49 deletions
8
.idea/.gitignore
vendored
Normal file
8
.idea/.gitignore
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
# Editor-based HTTP Client requests
|
||||
/httpRequests/
|
||||
# Datasource local storage ignored files
|
||||
/dataSources/
|
||||
/dataSources.local.xml
|
11
.idea/an-anime-game-launcher.iml
Normal file
11
.idea/an-anime-game-launcher.iml
Normal file
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="EMPTY_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
8
.idea/modules.xml
Normal file
8
.idea/modules.xml
Normal file
|
@ -0,0 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/an-anime-game-launcher.iml" filepath="$PROJECT_DIR$/.idea/an-anime-game-launcher.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
6
.idea/vcs.xml
Normal file
6
.idea/vcs.xml
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
9
.vscode/extensions.json
vendored
9
.vscode/extensions.json
vendored
|
@ -1,9 +0,0 @@
|
|||
{
|
||||
"recommendations": [
|
||||
"vivaxy.vscode-conventional-commits",
|
||||
"gruntfuggly.todo-tree",
|
||||
"rust-lang.rust-analyzer",
|
||||
"bungcip.better-toml",
|
||||
"serayuzgur.crates"
|
||||
]
|
||||
}
|
26
.vscode/launch.json
vendored
26
.vscode/launch.json
vendored
|
@ -1,26 +0,0 @@
|
|||
{
|
||||
// Use IntelliSense to learn about possible attributes.
|
||||
// Hover to view descriptions of existing attributes.
|
||||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"type": "lldb",
|
||||
"request": "launch",
|
||||
"name": "Debug",
|
||||
"cargo": {
|
||||
"args": [
|
||||
"build",
|
||||
"--bin=anime-game-launcher",
|
||||
"--package=anime-game-launcher"
|
||||
],
|
||||
"filter": {
|
||||
"name": "anime-game-launcher",
|
||||
"kind": "bin"
|
||||
}
|
||||
},
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}"
|
||||
}
|
||||
]
|
||||
}
|
10
.vscode/settings.json
vendored
10
.vscode/settings.json
vendored
|
@ -1,10 +0,0 @@
|
|||
{
|
||||
"conventionalCommits.scopes": [
|
||||
"tracing",
|
||||
"core",
|
||||
"ui",
|
||||
"i18n"
|
||||
],
|
||||
"editor.tabCompletion": "on",
|
||||
"diffEditor.codeLens": true
|
||||
}
|
|
@ -10,7 +10,8 @@ use super::main::FirstRunAppMsg;
|
|||
pub struct DependenciesApp {
|
||||
show_arch: bool,
|
||||
show_debian: bool,
|
||||
show_fedora: bool
|
||||
show_fedora: bool,
|
||||
show_list: bool
|
||||
}
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
|
@ -21,9 +22,9 @@ pub enum DependenciesAppMsg {
|
|||
|
||||
#[relm4::component(async, pub)]
|
||||
impl SimpleAsyncComponent for DependenciesApp {
|
||||
type Init = ();
|
||||
type Input = DependenciesAppMsg;
|
||||
type Output = FirstRunAppMsg;
|
||||
type Init = ();
|
||||
|
||||
view! {
|
||||
adw::PreferencesPage {
|
||||
|
@ -104,6 +105,28 @@ impl SimpleAsyncComponent for DependenciesApp {
|
|||
set_text: "sudo dnf install git xdelta p7zip",
|
||||
set_editable: false
|
||||
}
|
||||
},
|
||||
|
||||
gtk::Box {
|
||||
set_orientation: gtk::Orientation::Vertical,
|
||||
set_spacing: 16,
|
||||
|
||||
#[watch]
|
||||
set_visible: model.show_list,
|
||||
|
||||
adw::PreferencesGroup {
|
||||
adw::ActionRow {
|
||||
set_title: "git"
|
||||
},
|
||||
|
||||
adw::ActionRow {
|
||||
set_title: "xdelta3"
|
||||
},
|
||||
|
||||
adw::ActionRow {
|
||||
set_title: "p7zip"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -138,7 +161,7 @@ impl SimpleAsyncComponent for DependenciesApp {
|
|||
async fn init(_init: Self::Init, root: Self::Root, _sender: AsyncComponentSender<Self>) -> AsyncComponentParts<Self> {
|
||||
let distro = whatadistro::identify();
|
||||
|
||||
let model = Self {
|
||||
let mut model = Self {
|
||||
show_arch: match &distro {
|
||||
Some(distro) => distro.is_similar("arch"),
|
||||
None => false
|
||||
|
@ -152,9 +175,13 @@ impl SimpleAsyncComponent for DependenciesApp {
|
|||
show_fedora: match &distro {
|
||||
Some(distro) => distro.is_similar("fedora"),
|
||||
None => false
|
||||
}
|
||||
},
|
||||
|
||||
show_list: false
|
||||
};
|
||||
|
||||
model.show_list = !model.show_arch && !model.show_debian && !model.show_fedora;
|
||||
|
||||
let widgets = view_output!();
|
||||
|
||||
AsyncComponentParts { model, widgets }
|
||||
|
|
Loading…
Reference in a new issue