Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEATURE] Option to install Flatpak during installation #43

Closed
kerbyyy opened this issue Jul 23, 2024 · 8 comments · Fixed by #48
Closed

[FEATURE] Option to install Flatpak during installation #43

kerbyyy opened this issue Jul 23, 2024 · 8 comments · Fixed by #48
Assignees
Labels
enhancement New feature or request

Comments

@kerbyyy
Copy link

kerbyyy commented Jul 23, 2024

Is your feature request related to a problem? Please describe.
It's not really a problem, but it would be nice to have an option to whether or not install Flatpak as well.

Describe the solution you'd like
During installation, the user can choose if they want to install Flatpak support or not.

@kerbyyy kerbyyy added the enhancement New feature or request label Jul 23, 2024
@mylinuxforwork
Copy link
Owner

Thanks for your request. Which flatpack apps are you using and are importing for you? On Arch you can install nearly all apps as aur with yay or paru.

@mylinuxforwork mylinuxforwork added the to be confirmed Issue is currently under review and has not been released label Jul 23, 2024
@kerbyyy
Copy link
Author

kerbyyy commented Jul 23, 2024

Yes, it's true that most apps are already available in the AUR, but sometimes I use an app from the AUR just to discover they're buggy or even worse, outdated. Some of the common apps I use with Flatpak are Viber, and Modrinth (a Minecraft Launcher). I think having it as an option would be a nice little addition for us people who use some Flatpak from time to time.

@mylinuxforwork
Copy link
Owner

OK. Will add it to the installer.

@mylinuxforwork mylinuxforwork linked a pull request Jul 24, 2024 that will close this issue
@mylinuxforwork mylinuxforwork removed the to be confirmed Issue is currently under review and has not been released label Jul 24, 2024
@mylinuxforwork
Copy link
Owner

@kerbyyy Merged into main release. Please run the installer again.

@bknightInfo
Copy link

bknightInfo commented Jul 25, 2024

Hi @mylinuxforwork

As discussed on discord this is how I implemented my Flatpak solution

functions

_isInstalledFlatpak() {
    package="$1";
    check="$(flatpak list --columns="application" | grep "${package} ")";
    if [ -n "${check}" ] ; then
        echo 0; #'0' means 'true' in Bash
        return; #true
    fi;
    echo 1; #'1' means 'false' in Bash
    return; #false
}
_installPackagesFlatpak() {
     toInstall=();
    for pkg; do
        sudo flatpak install -y flathub "${pkg[@]}";
        if [[ $(_isInstalledFlatpak "${pkg}") == 0 ]]; then
            echo ":: ${pkg} is installed.";
            toInstall+=("${pkg}");
            continue;
        fi;
    done;

    sudo flatpak install -y flathub "${toInstall[@]}";
}

control script

echo -e "$CNT - Installing flatpaks, this may take a while..."
_installPackagesFlatpak "${packagesFlatpak[@]}";

not sure how this compares to your script

@mylinuxforwork
Copy link
Owner

Looks great. Let me check...

@mylinuxforwork
Copy link
Owner

@bknightInfo I just added the (optional) installation of flatpak to the installer.

sudo pacman -S flatpak

Your functions are flatpak installation utilities. I will add both to the library.sh for the installer and the scripts.sh for the hook and post installation scripts.

@mylinuxforwork
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants