Skip to content

Commit 99574a7

Browse files
authored
Merge pull request #34 from auyer/new-installation-button
New installation button
2 parents c519e2e + e52cb97 commit 99574a7

File tree

4 files changed

+39
-5
lines changed

4 files changed

+39
-5
lines changed

.github/workflows/publish.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,16 @@ jobs:
7575
file_glob: true
7676
draft: true
7777

78+
- name: Upload installer script
79+
uses: svenstaro/upload-release-action@v2
80+
with:
81+
repo_token: ${{ secrets.GITHUB_TOKEN }}
82+
file: 'protonup-rs-install.desktop'
83+
tag: v${{ env.CURRENT_VERSION }}
84+
overwrite: true
85+
file_glob: true
86+
draft: true
87+
7888
- name: Run cargo publish binary
7989
env:
8090
# This can help you tagging the github repository

README.md

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,31 @@ Options:
3131

3232
---
3333

34-
## Installing:
34+
## Installing
3535

36-
### In one line:
36+
### Clickable download (Steam Deck Friendly)
37+
38+
- download .decktop file
39+
- run it
40+
- open a new terminal window to run `protonup-rs`
41+
42+
<h3 align="center">
43+
<a name="download button" href="https://github.com/auyer/protonup-rs/releases/latest/download/protonup-rs-install.desktop">Click Here to Download installer</a>
44+
</h3>
45+
46+
> **NOTE**: This will download a simple ".desktop" file that will download the pre-compiled binary from release, decompress it, place it in "$HOME/.local/bin/", and add this folder to your PATH.
47+
48+
### In one line
49+
50+
Does the same as the installer above, but from the command line
3751

3852
```bash
39-
wget https://github.com/auyer/Protonup-rs/releases/latest/download/protonup-rs-linux-amd64.tar.gz -O - | tar -xz && zenity --password | sudo -S mv protonup-rs /usr/bin/
53+
sh -c 'if curl -S -s -L -O --output-dir /tmp/ --connect-timeout 60 https://github.com/auyer/Protonup-rs/releases/latest/download/protonup-rs-linux-amd64.tar.gz ; then tar -xvzf /tmp/protonup-rs-linux-amd64.tar.gz -C /tmp/ && mv /tmp/protonup-rs ${HOME}/.local/bin/ && [[ "$SHELL" == *"bash"* ]] && [ "$SHELL" = "/bin/bash" ] && echo "export PATH=\"$PATH:${HOME}/.local/bin\"" >> ${HOME}/.bashrc || ([ "$SHELL" = "/bin/zsh" ] && echo "export PATH=\"$PATH:${HOME}/.local/bin\"" >> ${HOME}/.zshrc ) && rm /tmp/protonup-rs-linux-amd64.tar.gz; else echo "Something went wrong, please report this if it is a bug"; read; fi'
4054
```
4155

4256
This assumes `/usr/bin` is in your path. You may change this to any other location (in your path `echo $PATH`).
4357

44-
### Or manually:
58+
### Or manually
4559

4660
Get the latest binary:
4761
[Download link](https://github.com/auyer/Protonup-rs/releases/latest/download/protonup-rs-linux-amd64.zip)

protonup-rs-install.desktop

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/usr/bin/env xdg-open
2+
[Desktop Entry]
3+
Name=Install Protonup-rs
4+
Exec=sh -c 'rm -f /tmp/protonup-rs-linux-amd64.tar.gz; if curl -S -s -L -O --output-dir /tmp/ --connect-timeout 60 https://github.com/auyer/Protonup-rs/releases/latest/download/protonup-rs-linux-amd64.tar.gz ; then tar -xvzf /tmp/protonup-rs-linux-amd64.tar.gz -C /tmp/ && mv /tmp/protonup-rs ${HOME}/.local/bin/ && [[ "$SHELL" == *"bash"* ]] && [ "$SHELL" = "/bin/bash" ] && echo "export PATH=\"$PATH:${HOME}/.local/bin\"" >> ${HOME}/.bashrc || ([ "$SHELL" = "/bin/zsh" ] && echo "export PATH=\"$PATH:${HOME}/.local/bin\"" >> ${HOME}/.zshrc ) && rm /tmp/protonup-rs-linux-amd64.tar.gz; else echo "Something went wrong, please report this if it is a bug"; read; fi'
5+
Icon=steamdeck-gaming-return
6+
Terminal=true
7+
Type=Application
8+
StartupNotify=false

protonup-rs/src/download.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,9 @@ pub async fn run_quick_downloads(force: bool) -> Result<Vec<Release>> {
173173
let found_apps = apps::list_installed_apps().await;
174174
if found_apps.is_empty() {
175175
println!("No apps found. Please install at least one app before using this feature.");
176-
return Err(anyhow!("No apps found. Please install at least one app before using this feature."));
176+
return Err(anyhow!(
177+
"No apps found. Please install at least one app before using this feature."
178+
));
177179
}
178180
println!(
179181
"Found the following apps: {}",

0 commit comments

Comments
 (0)