Giter Club home page Giter Club logo

zap's Introduction

zap Zap

⚡️ Zap

The delightful package manager for AppImages
Report bug · Request feature

forthebadge made-with-go

Mentioned in Awesome AppImage

GitHub followers GitHub stars

Zap Installing Firefox

Looking for the older Zap v1 (Python) implementation? Head over to v1 branch.

Getting Started ✨

Automated Installation

For installing zap you can use our little bash script.

The installer requires curl, grep jq and wget (optional). Please make sure you have it installed.

For system-wide installation (needs sudo)

curl https://raw.githubusercontent.com/srevinsaju/zap/main/install.sh | sudo bash -s

Note: Always Check bash scripts before running as sudo. You can feel free to check out install.sh, it's safe.

For local installation run

curl https://raw.githubusercontent.com/srevinsaju/zap/main/install.sh | bash -s

Manual Installation

For system-wide installation (needs sudo)

sudo wget https://github.com/srevinsaju/zap/releases/download/continuous/zap-amd64 -O /usr/local/bin/zap
sudo chmod +x /usr/local/bin/zap
zap --help

For local installation, (requires ~/.local/bin to be on $PATH)

mkdir -p ~/.local/bin
wget https://github.com/srevinsaju/zap/releases/download/continuous/zap-amd64 -O ~/.local/bin/zap
chmod +x ~/.local/bin/zap
zap --help

NOTE: Replace amd64 with your machine architecture. Supported architectures are listed in the release page

Installing AppImages

All AppImages from the AppImage Catalog and AppImage catalog v2 can be installed using zap with their registered name.

zap install element

will ask you the version of element you would like to install + download them and do all the hard work of integrating into your system, i.e creating desktop files, etc.

You can also install appimages from GitHub releases

zap install --github --from vscodium/vscodium

will put some options which will let you choose the best version for your system.

It is also possible to install AppImage from URLs

zap install --from https://f.sed.lol/wow.AppImage wow

To integrate a locally downloaded AppImage,

zap install libresprite ~/Downloads/Libresprite-x86_64.AppImage

... or using the file:// protocol

zap install --from file:///home/username/Downloads/My_Super_Cool-x86_64.AppImage name_of_the_app_here

here, name_of_the_app_here specifies the name of the application. This name will be used as a unique identification of the AppImage, by zap, in its internal database.

Updating AppImages 🔄

AppImages can be optionally, automatically updated using the zapd, but to achieve this manually, you need to

zap update firefox

This will make use of the update information embedded within the appimage, which if exists, will be used to 'delta-update' the latest version, by downloading "only" the parts which have changed.

For those AppImages not supporting delta updates, you can still do

zap install zoom

to install the latest version of Zoom.

Upgrade 🚀

zap also supports updating all the apps together using appimage-update.

zap upgrade

Configuration ⚙️

It is possible to interactively configure zap. All you need to do is

zap init

And answer all the questions that would follow.

Daemon 🏃

zapd is a Zap AppImage daemon which periodically checks for updates.

zap daemon --install

This will install a systemd service in the local (user) level, which will spawn zap daemon which auto-updates the AppImages.

To run the daemon (sync), do

zap daemon

Support 💸

All Pull Requests are welcome.

If you are a non-coder or was inspired by this small project, I would be glad if you would 🌟 this repository, and spread the word with your friends and foes 😄

Credits 🙏

This project has been possible with the help and support provided by the AppImage community. Thanks to the detailed responses I received from mentors at AppImage's freenode channel.

License ⚖️

MIT License

Copyright (c) 2020-23 Srevin Saju, and other zap contributors

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

zap's People

Contributors

cypherpunksamurai avatar imgbotapp avatar patrikhl avatar ratogabriel avatar srevinsaju avatar sreyasaju avatar zyrouge avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

zap's Issues

isn't integrating AppImages in Plasma 5.21.5

on Fedora 33 (KDE) Zap (both v1 and v2) worked entirely as expected.
on Fedora 34 or 35 (also KDE), Zap will recognise GitHub links fine, download AppImages from them fine but won't integrate them to the system. They DO get downloaded to .local/share/zap/v2 but won't show up in Application Dashboard or KDE's [default] Application Launcher.

(not working is Build: v2.2.1.2.ga7365d2 1642277046)

bottles: this app does not provide any candidate for installation

I'm trying to install Bottles via Zap as a possible alternative to Flatpak.

I don't prefer how Flatpak keeps everything in a sandbox as it makes it much harder to manage everything for me, and disk usage is much higher than using standard system libraries. Zap being closest to a user-level non-sandboxed package manager makes it easier for me in general.

However, whenever I put in the command
zap install bottles
as it tells me to both after searching the package with Zap, or on the official Bottles website, I get the error
[FATAL] 2022/04/04 16:22:28 main.main:main.go:163 this app does not provide any candidate for installation

Is there something I'm doing wrong with Zap?

Thanks in advance.

system-wide installation not behaving as expected

Current behaviour by sudo zap install

  • Installs into /usr/local/bin
  • Symlinks AppImages into /root/.local/bin
  • Not sure where it tries to puts the .desktop, but a find tells me it fails to put it anywhere

Expected behaviour

  • Installs into /usr/local/bin
  • Symlinks AppImages into /usr/local/bin
  • Puts .desktop into /usr/share/applications
  • Puts icons in /usr/share/icons

The current implications of system-wide installation is that zap can used by any user but apps can't be installed system-wide. Zap should automatically switch to system-wide installation of the app when invoked with sudo. A --user flag will be used for user installation or the default could be user installation introducing the --system flag

zap --version
Zap version Build:v2.2.1.6.gdc5b7ff 1646814234

[FR] Hooks

Hooks would work really well in extending this package manager and would make any wanted features relatively easy to implement just given hooks, look at something like pacman's hook system

Icons missing in the Application Library/Launcher

Icons still missng after logout+login with every installed app.
I also tried to restart gnome-shell and update-desktop-database ~/.local/share/applications but nothing helps.

OS Pop!_OS 21.10
DE GNOME 40.5

Installed AppImages:
Krita
WowUp
bottles

Previously I was using an AppImageLauncher and icons were showing up.

Make zap install command more user friendly

As of now, zap has three modes of installation
1)

zap install inkscape  # gets the results from appimage.github.io
zap install --from file:///path/to/downloaded.AppImage downloaded-appimage  # installs the appimage from a local file or URL
zap install --github --from=srevinsaju/Firefox-AppImage firefox  # fetches the latest release from github and installs it

We might want to automatically infer the type of Installation source, for example, automatically figuring out if the path provided is a local file, or when to search in github,

For example

zap install srevinsaju/Firefox-AppImage

may be considered as a better command than what was mentioned in (3)

Or,

zap install ./firefox.AppImage

should probably automatically detect that the installation needs to be done from a local file.

zap search results do not start at $1 (input str) -- found package, did not install

OK I admit, the search function confused me at first. I think I figured it out, but then it morphed into a separate issue

Result:

zap search str results in following output:

  Archipelago                                ┌────────────────────────────────────────────┐
  Archipel                                   │ AKASHA                                     │
  ArcadeManager                              │ submitted by AkashaProject                 │
  App_Outlet                                 │ Akasha platform                            │
  AppImageUpdate                             │                                            │
  AppImagePool                               │ - GitHub: AkashaProject/Community          │
  Apla                                       │ - Download: https://github.com/AkashaProj..│
  Aphelion_Wallet                            │                                            │
  AnzeigenChef                               │                                            │
  Antares                                    │                                            │
  Another_Redis_Desktop_Manager              │                                            │
  AnimaShooter                               │                                            │
  AngularConsole                             │                                            │
  Anchor                                     │                                            │
  AnaVis                                     │                                            │
  Altus                                      │                                            │
  Altitude                                   │                                            │
  Alduin                                     │                                            │
  Airspaces                                  │                                            │
  Agora                                      │                                            │
  Advanced_Rest_Client                       │                                            │
  Addaps                                     │                                            │
  ATSDB                                      │                                            │
  ARAnyM                                     │                                            │
  APK_Editor_Studio                          │                                            │
  ANT_Downloader                             │                                            │
> AKASHA                                     │                                            │
  1220/1220                                  │                                            │
>                 

Real world test: was searching for syncthingtray - results did not even start with s.

Pressing beyond this point results in blank page

Expected result

zap search str to bring up results starting with str

Noticing:

If I start typing a string at the prompt, it appears to filter results. Maybe this is what I was supposed to do to begin with? Wasn't apparent from help menu (maybe add little blurb "search zap index - brings up search menu" ?)

Additional (aka ultimately the "real issue"):

I was able to find Syncthing_Tray app image. Zap told me to:

Install it by
zap install syncthing_tray
avery@endpoint-bob:~/bin> zap install syncthing_tray
[FATAL] 2022/01/04 11:08:36 main.main:main.go:163 could not find any releases

Case-sensitivity doesn't appear to be the issue:

 zap install Syncthing_Tray
[FATAL] 2022/01/04 11:12:46 main.main:main.go:163 this app does not provide any candidate for installation

Environment:

Using zap appimage downloaded from Github Releases, self-updated.

zap --version
Zap version Build:v2.2.1.1.gb8ed330 1640723566

uname -a && cat /etc/os-release 
Linux endpoint-bob 5.3.18-59.37-default #1 SMP Mon Nov 22 12:29:04 UTC 2021 (d10168e) x86_64 x86_64 x86_64 GNU/Linux
NAME="openSUSE Leap"
VERSION="15.3"
ID="opensuse-leap"
ID_LIKE="suse opensuse"
VERSION_ID="15.3"
PRETTY_NAME="openSUSE Leap 15.3"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:leap:15.3"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"

Shells: 
Tried both zsh and bash

Note: My installation is about as vanilla as they come - btrfs root with separate ext4 /home partition, all on LVM, zap is installed to ~/bin (chmod +x)

avery@endpoint-bob:~/bin> ls -la
total 10692
drwxr-xr-x  2 avery users     4096 Jan  4 11:02 .
drwx--x--x 45 avery users     4096 Jan  4 11:01 ..
-rwxr-xr-x  1 avery users 10940416 Jan  4 11:02 zap

can not install inkscape

$ zap install inkscape
[FATAL] 2021/09/28 15:20:09 main.main:main.go:159 this app does not provide any candidate for installation

Linux Distro:
Linux 5.12.19-1-MANJARO

Zap version :
Zap version Build:v2.2.0.34.gd67886f 1632061753

Update from .appimage file or URL

There are situations when we don't have a clear github repo (different releases other than appimage) such as neovim.
It would be great if we can

zap update nvim --from https://.../nvim.appimage

or

zap install nvim --from https://.../nvim.appimage --update

Now if I want to update an existing app, I have to remove it first, then run the installation again.
Hope this feature will be possible.
Thanks for great app!

Missing icons in application launcher

For some reason the icons in the application launcher aren't showing up, even though they're properly referenced in their desktop files without issue. The icons are also present under the hicolor directory. I'm on KDE Plasma 5.22.5.

I tried reloading the application launcher using kbuildsycoca5 without success.

Missing icons in KDE's Application Launcher

Fishshell incompatible

Seems like the tool does not play well with fishshell.

> curl -fsSL https://git.io/zapinit | sh
Creating ~/.zap
 Downloading the latest 🗲 Zap Release
~. 100%[=============>]  22,28M  2,61MB/s    in 18s
Adding zap to PATH
 🗲 Zap  is installed

  • Join our chat on  Discord : https://discord.gg/Yv7KC68
  • Found an issue? Report it now on  GitHub  @ https://github.com/srevinsaju/zap/issues
  • Have questions? Hope on to  #Appimage  on IRC freenode
  .net

Try it now by running  zap  on your terminal
Have fun!
> zap
Failed to execute process '~/.local/bin/zap'. Reason:
exec: Exec format error
The file '~/.local/bin/zap' is marked as an executable but could not be run by the operating system.

New logo for zap?

The zap logo is old and cumbersome. I am looking for a cool logo. Interested in seeing new designs

Install local AppImages

I was looking for a method to integrate (install) an AppImage already downloaded on my PC (and which does not offer a direct link to the .AppImage file), I searched in the zap help and in the Readme but I could not find anything about it.

After some tests and resignations I tried to use the file:// protocol with the --from parameter and I saw that it works:

zap install gravit file:///home/mirko/Downloads/GravitDesigne.AppImage

I don't know if this is wanted or not but it could be very useful to have it officially.

Github install fails with ImHex

$ zap install --github --from WerWolv/ImHex

? Choose a release v1.16.2
panic: runtime error: index out of range [0] with length 0

goroutine 1 [running]:
github.com/srevinsaju/zap/index.GitHubSurveyUserReleases(0x7ffda5e74b40, 0x5, 0x7ffda5e74b40, 0x5, 0x7ffda5e74b38, 0xd, 0x1, 0x2, 0xc00016a1e1, 0x2b, ...)
        /home/runner/work/zap/zap/index/github.go:82 +0xc7c
github.com/srevinsaju/zap/appimage.Install(0x7ffda5e74b40, 0x5, 0x7ffda5e74b40, 0x5, 0x7ffda5e74b38, 0xd, 0x1, 0x2, 0xc00016a1e1, 0x2b, ...)
        /home/runner/work/zap/zap/appimage/utils.go:70 +0x1e3e
main.installAppImageCliContextWrapper(0xc0000c70c0, 0x7, 0xc)
        /home/runner/work/zap/zap/cli.go:46 +0x278
github.com/urfave/cli/v2.(*Command).Run(0xc0000d8c60, 0xc0000c6d40, 0x0, 0x0)
        /home/runner/go/pkg/mod/github.com/urfave/cli/[email protected]/command.go:163 +0x4ed
github.com/urfave/cli/v2.(*App).RunContext(0xc00009f520, 0xb2cc60, 0xc0000b4070, 0xc0000bc000, 0x5, 0x5, 0x0, 0x0)
        /home/runner/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:313 +0x81f
github.com/urfave/cli/v2.(*App).Run(...)
        /home/runner/go/pkg/mod/github.com/urfave/cli/[email protected]/app.go:224
main.main()
        /home/runner/work/zap/zap/main.go:157 +0xdfd

Feature request: Extend search filter to look in description text.

Currently when you filter your search, it only looks for the patterns in the name of the file, not the description. This will cause applications to not show up when looking for something generic.

For example, I wanted to explore sql clients available as appimage. It listed only 6
Screenshot from 2021-11-09 09-22-46

But There is a Beekeeper_Studio which didn't show up because it doesn't have sql in its name, only in its description.

Screenshot from 2021-11-09 09-26-38

There are a few other sql clients which even though is available in your listed, doesn't show up when filtered because their name does not contain the keyword.

My feature request is to maybe add an option for extended search which will allow you to keep the speed of the first search, but then ask user if they want a deeper search, which will then perform a full text search on the description ( or all the metadata associated with the appimage ) .

Zap not fully integrating in Mint Cinnamon 20.3 (una)/5.2.7 + v1 branch downloads blank AppImage + v1 script failure

I'm losing my mind here. Zap is not fully integrating into the desktop in Mint.
(inxi output)
inxi -Fxz System: Kernel: 5.4.0-100-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Cinnamon 5.2.7 Distro: Linux Mint 20.3 Una base: Ubuntu 20.04 focal Machine: Type: Laptop System: Insyde product: CherryTrail v: N/A serial: <filter> Mobo: Insyde model: Cherry Trail CR v: Type2 - Board Version serial: <filter> UEFI: INSYDE v: M1106.V024 date: 09/20/2016 Battery: ID-1: axp288_fuel_gauge charge: 100% condition: N/A model: N/A status: Full CPU: Topology: Quad Core model: Intel Atom x5-Z8350 bits: 64 type: MCP arch: Airmont rev: 4 L2 cache: 1024 KiB flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 11520 Speed: 480 MHz min/max: 480/1920 MHz Core speeds (MHz): 1: 480 2: 480 3: 1797 4: 1793 Graphics: Device-1: Intel Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Integrated Graphics driver: i915 v: kernel bus ID: 00:02.0 Display: x11 server: X.Org 1.20.13 driver: modesetting unloaded: fbdev,vesa resolution: 1366x768~60Hz OpenGL: renderer: Mesa DRI Intel HD Graphics (CHV) v: 4.6 Mesa 21.2.6 direct render: Yes Audio: Device-1: Intel Atom/Celeron/Pentium Processor x5-E8000/J3xxx/N3xxx Series Imaging Unit driver: intel_atomisp2_pm v: kernel bus ID: 00:03.0 Sound Server: ALSA v: k5.4.0-100-generic Network: Message: No Device data found. IF-ID-1: docker0 state: down mac: <filter> IF-ID-2: wlan0 state: up mac: <filter> Drives: Local Storage: total: 57.62 GiB used: 17.95 GiB (31.1%) ID-1: /dev/mmcblk0 model: NCard size: 57.62 GiB Partition: ID-1: / size: 55.00 GiB used: 17.16 GiB (31.2%) fs: ext4 dev: /dev/dm-0 ID-2: swap-1 size: 976.0 MiB used: 802.1 MiB (82.2%) fs: swap dev: /dev/dm-1 Sensors: System Temperatures: cpu: 63.0 C mobo: N/A Fan Speeds (RPM): N/A Info: Processes: 250 Uptime: 15h 19m Memory: 1.83 GiB used: 1.01 GiB (55.3%) Init: systemd runlevel: 5 Compilers: gcc: 9.3.0 Shell: bash v: 5.0.17 inxi: 3.0.38

I decided to have a go at creating a bash script to have zap partially integrate the appimage then finish the integration including creating a .desktop to include the link with the proper icon in the menu.
My issues with this with the current build are that printf and expects are not cooperating because of the interactive configuration module included with the current build (namely zap -init). I'd provide the horror show that is the autoexpects output, but it's about 20 pages worth of untranslatable symbols interspersed with the expects text and sends.
Ideally, I could have fixed this with v1, however when I download the v1 AppImage according to the instructions on that branch, it fails, and when I download the branch manually, it downloads a blank appimage. I didn't notice the blank appimage until I tried using the install script to associate zap with the appimage input. Here's the associated outputs.

This can't be run sudo. It doesn't require going into root, but it fails as user (and we have to be root for the bash file), so lets try. Done: result:

--2022-02-27 08:23:26--  https://git.io/zapinit
Resolving git.io (git.io)... 52.204.242.176, 18.205.36.100, 54.162.128.250, ...
Connecting to git.io (git.io)|52.204.242.176|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github.com/srevinsaju/zap/raw/master/tools/install.sh [following]
--2022-02-27 08:23:27--  https://github.com/srevinsaju/zap/raw/master/tools/install.sh
Resolving github.com (github.com)... 140.82.113.3
Connecting to github.com (github.com)|140.82.113.3|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2022-02-27 08:23:27 ERROR 404: Not Found.

Ok, well let's find a way around this then. How about we call that address manually with wget?

#wget -O /root/.zap/install_zap.sh https://github.com/srevinsaju/zap/raw/master/tools/install.sh
--2022-02-27 08:34:59--  https://github.com/srevinsaju/zap/raw/master/tools/install.sh
Resolving github.com (github.com)... 140.82.114.3
Connecting to github.com (github.com)|140.82.114.3|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2022-02-27 08:34:59 ERROR 404: Not Found.

Ok, what about the raw address you have listed? (notice it's quoted instead of marked as code, we'll get back to this)

#wget -O /root/.zap/install_zap.sh https://raw.githubusercontent.com/srevinsaju/zap/master/tools/install.sh
--2022-02-27 08:35:54-- https://raw.githubusercontent.com/srevinsaju/zap/master/tools/install.sh
Resolving raw.githubusercontent.com (raw.githubusercontent.com)... 185.199.108.133, 185.199.111.133, 185.199.109.133, ...
Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|185.199.108.133|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2869 (2.8K) [text/plain]
Saving to: ‘/root/.zap/install_zap.sh’

/root/.zap/install_ 100%[===================>] 2.80K --.-KB/s in 0.001s

2022-02-27 08:35:54 (3.78 MB/s) - ‘/root/.zap/install_zap.sh’ saved [2869/2869]

SUCCESS! Now let's run our install. (still as root)

#~/.zap# bash install_zap.sh
Creating /root/.zap
 Downloading the latest 🗲 Zap Release 

#zap --help

Command 'zap' not found, but can be installed with:

apt install dvb-apps        # version 1.1.1+rev1500-1.2, or
apt install libxbase64-bin  # version 3.1.2-13build1

Well that's definitely not right. Ok, let's check the bash file.
Long story short, there are several issues I have. First, echo "#!/bin/bash" > "zap" resolves as an attempted bash. Usually, just to make sure, i do echo -n "#" > "zap" echo -n "!" >> "zap" echo "/bin/bash" >> "zap" . However, we aren't receiving an error, so there's something between "downloading" and echo. My guess is that missing fi on line 46 where your elif for curl starts, but let's just install manually, which I did and i get this.

#zap
#zap --help
#

repeat ad nauseam.

so, lets check out that zap appimage that got downloaded
I opened the properties, it's listed as Size: 0bytes. Obviously, that's not an appimage...it's not anything really. Now back to that quote instead of code....

/root/.zap/install_ 100%[===================>] 2.80K --.-KB/s in 0.001s

I notice I got a progress bar and knew what was happening the whole time. I know you're trying to make things clean with -q --show-progress, but I feel like knowing what's going on with a script, having output for people to send, is more important. It's a personal preference, but when people tell me to re-do a command that they quieted, it really irks me. But here it is anyway.

# wget -O ~/.zap/zapv1.AppImage https://github.com/srevinsaju/zap/releases/download/continuous/zap-x86_64.AppImage
--2022-02-27 09:32:56--  https://github.com/srevinsaju/zap/releases/download/continuous/zap-x86_64.AppImage
Resolving github.com (github.com)... 140.82.113.3
Connecting to github.com (github.com)|140.82.113.3|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2022-02-27 09:32:57 ERROR 404: Not Found.

So, here's where I ask, please....please bring the config arguments back instead of removing them for init. I mean, init is nice, keep init, but just bring back config. In fact, there are several configuration tools that would be nice to have back, appdata, get-md5, show (maybe make the browser opening optional though). But that's not as important. My intent here is to add some compatibility with calls from a bash script so that people can work around any incompatibilities in the system. Can I just zap init before I run my bash? Of course, but then really, that's not true automation and I will spend 1000 years writing an automation script to save 5 seconds.

I hope this is ample info to solve the current issues with v1 if you're still updating there, and maybe I'll get some feature updates out of this, but either way, thanks for making zap, I just wish it worked for me.

Q: Package to AppImage

Is it possible to get a package and convert it into an AppImage on the fly? seems like on appimagehub some stuff gets outdated pretty quickly.

Automatic Installation failure: Illegal option -o pipefail

I tried running the automatic installer but this part here caused it to automatically end:

set -euo pipefail

with error

sh: 8: set: Illegal option -o pipefail

I couldn't find the root of this issue, however the manual installation worked perfectly.

zap install krita / this app does not provide any candidate for installation

zap search krita

Krita by 
<p>Krita is the full-featured digital art studio.</p>
<p>It is perfect for sketching and painting, and presents an end–to–end solution for creating digital painting files from scratch by masters.</p>
<p>Krita is a great choice for creating concept art, comics, textures for rendering and matte paintings. Krita supports many colorspaces like RGB and CMYK
      at 8 and 16 bits integer channels, as well as 16 and 32 bits floating point channels.</p>
<p>Have fun painting with the advanced brush engines, amazing filters and many handy features that make Krita enormously productive.</p>

Install it by
zap install krita

zap install krita

[FATAL] 2022/01/20 19:54:47 main.main:main.go:163 this app does not provide any candidate for installation

zap upgrade updates to already installed version and removes it

Zap version: Zap version Build:v2.2.1.1.gb8ed330 1640723566

Whenever I update my appimages using zap upgrade, I get the version selection screen, and when I try to install a version that is already installed (installed version is already the newest), it tries to UpdateInPlace and removes the version it tries to install and gives the Error:
[FATAL] 2022/01/10 17:32:55 github.com/srevinsaju/zap/appimage.UpdateInPlace:utils.go:350 Failed to resolve symlink to /home/USER/.local/bin. E: lstat /home/USER/Applications/DevHub-0.102.0.AppImage: no such file or directory
Downgrading and upgrading gets the app back.

improvements when installing from local file

It seems there is a bug when the passed file is copied into $HOME/.local/share/zap/v2/: it gets renamed as the passed appname instead of keeping its original name.

e.g.:
zap install -from file://duckstation-qt.AppImage duckstation

creates a file named $HOME/.local/share/zap/v2/duckstation (without any extension).

Also i think it would be nice to have an easier syntax to install local files like:
zap install duckstation-qt.AppImage duckstation

Even better, the appname 2nd arg could also be auto-guessed with some string manipulations and confirmed interactively by the user before the actual installation:

$ zap install duckstation-qt.AppImage
? Confirm guessed name? duckstation-qt 
? Proceed? (y/N)

Custom xdg-protocol integration.

I'm not sure if this non expected behavior has something to do with "zap" or is an issue of the AppImage I'm trying to install but either way ill describe the issue in case it can help improve zap or anyone else's experience.

  1. Common description:
    The AppImage I'm installing needs to register an xdg-protocol. "zap" does it correctly by adding MimeType=x-scheme-handler/pie;x-scheme-handler/pie; to the .desktop file under ~/.local/share/applications. However the app won't use the protocol, in order to fix this issue I:
    1. Remove the duplicated entry so the file remains like this: MimeType=x-scheme-handler/pie;.
    2. Add the following line to "mimeapps.list" file:
    [Default Applications]
    x-scheme-handler/pie=http-desktop.desktop
    
    1. Launch and use the application as expected.
  2. Runtime environment information:
    1. OS: Arch Linux.
    2. ZAP Version: Zap version Build:v2.2.1.1.gb8ed330 1640723566.
  3. Expected behavior:
    "zap" Registers the xdg-protocol properly under the .desktop and mimeapps.list files.

Feature Request: Show download URL in the description.

Currently the description has following content,

Name of Appimage, 
submitted by <User>
<description if provided> else blank

Which means information provided in the description is the only source of information on the application. If information is badly worded, misguided or just absent, user have no easy way to know more about the app.

Example of bad source of information:
Screenshot from 2021-11-09 10-06-08

The first page of google search for spectrum will show information about cable company. Searching spectrum appimage showed the spectron electron js testing framework for me. I agree this is the worst case scenario where developers put fancy taglines instead of clearly telling what application is ( this is a deprecated chat app which is now archived as read-only. ).

It is same problem with the appimagehub website too, but at least on the website, I could click the link to go to the repo and explore what it is.

Request:
If it is possible, can we display url for homepage, or where the appimage will be downloaded from, so that we as a user know what will be installed. Currently while downloading, we don't even know what version will be installed unless it is provided in the description by the builder. All other metadata will depend on what is provided by the actual app maintainer, but at the very least, download url can still be displayed by package manager.

Benifits:

  • Most of the Appimages are community build. Which means some may get outdated while there are other community appimage available which is more up-to-date, or there are multiple people giving appimage of same application. If a download url is provided, user can know which appimage will be installed, they can choose to look up some other community build if they feel like they have a better or use build provided someone they have used in past and hence trust more.

  • A lot of appimages listed doesn't have enough information in the description ( some doesn't have description at all ). If a url is provided, vigilant user will have something to go on. They can use that url as starting point to find out more about the application such as features or capabilities, and search for alternatives. Even if it is just a download url, it would help to make a more informed decision.

Desktop integration of appimage from Github repo error

Tried to install https://github.com/kapitainsky/RcloneBrowser from zap, downloaded and installed correctly but desktop integration failed.

100% Downloaded https://github.com/kapitainsky/RcloneBrowser/releases/download/1.8.0/rclone-browser-1.8.0-a0b66c6-linux-x86_64.AppImage from kapitainsky
Configuring...
Integrating with desktop...
Traceback (most recent call last):
  File "PyInstaller/loader/pyiboot01_bootstrap.py", line 144, in __init__
  File "ctypes/__init__.py", line 373, in __init__
OSError: libpcre.so.1: cannot open shared object file: No such file or directory

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "test.py", line 1, in <module>
  File "click/core.py", line 829, in __call__
  File "click/core.py", line 782, in main
  File "click/core.py", line 1259, in invoke
  File "click/core.py", line 1066, in invoke
  File "click/core.py", line 610, in invoke
  File "zap/cli.py", line 232, in install_gh
  File "zap/zap.py", line 360, in install
  File "zap/libappimage/libappimage.py", line 31, in __init__
  File "PyInstaller/loader/pyiboot01_bootstrap.py", line 146, in __init__
__main__.PyInstallerImportError: Failed to load dynlib/dll '/tmp/.mount_zap-x88hwZaH/usr/local/lib/libappimage.so'. Most probably this dynlib/dll was not found when the application was frozen.
[631963] Failed to execute script test

Reading desktop file failed open /tmp/zap580409459/

Hi,

Thank you for your package manager app. Today i installed keepassxc through zap.

zap install --github --from keepassxreboot/keepassxc
and this is the result:

? Choose a release 2.6.6
Downloading KeePassXC-2.6.6-x86_64.AppImage of size 35 MB. 
? Proceed? Yes
Downloading keepassxc
[i]:  100% [====================] (10.308 MB/s)        
[WARN]  2022/02/06 16:36:33 Reading desktop file failed open /tmp/zap580409459/squashfs-root/org.keepassxc.KeePassXC.desktop: no such file or directory
keepassxc installed successfully ✨

I'm using Debian bullseye.
As you can see, keepassxc was installed but the desktop file was not found.

How can i solve this issue?

Thank you for your time

Fabio

Minor bug & Feature Request

I gotta say it really is a delightful application

First of all I would like to address a bug
after zap remove package the symlink in ~/.local/bin is not deleted.As a result,when the application is installed again the symlink is not placed,outputing [ FATAL ] ...... symlink dir/X.AppImage ~/.local/bin/X exists and so the application doesn't open
steps to produce:
zap install qpdf install the latest
zap remove qpdf
zap install qpdf install anything except the latest ( it just has to be different version each time)
I have also noticed that this error doesn't occur when the appimage name is not suffixed by its version,for example neovim gets installed as nvim.appimage no matter what version and this error doesn't occur

EDIT : Installing appimages from local file works :)
zap install --from file://X nameOfApp

Updating apps installed by zap install --github --from x/Y
I get that I can update those by running the same command again,but for that I would have to look up the repo location again.
An easy fix would be to save the location of Y as github.com/x/Y so when I want to install/update it again I can just run
zap install Y
but of course if the appimage contains zsync for update it isn't required,but at this moment most appimages doesnt have that

On a side note,libappimage should be listed as a dependency

Support for AppImages hosted on Github.com

Hi, afaik currently zap downloads AppImages from appimage.github.io

However github.com allows to host AppImages, even with check sums. For example, VSCodium (which is not included in appimage.github.io) releases AppImage and AppImage.zsync files:

...
codium_1.67.2-1652920424_armhf.deb.sha256
VSCodium-1.67.2-1652920338.glibc2.17-x86_64.AppImage
VSCodium-1.67.2-1652920338.glibc2.17-x86_64.AppImage.sha1
VSCodium-1.67.2-1652920338.glibc2.17-x86_64.AppImage.sha256
VSCodium-1.67.2-1652920338.glibc2.17-x86_64.AppImage.zsync
VSCodium-1.67.2-1652920338.glibc2.17-x86_64.AppImage.zsync.sha1
VSCodium-1.67.2-1652920338.glibc2.17-x86_64.AppImage.zsync.sha256
VSCodium-darwin-arm64-1.67.2.zip
VSCodium-darwin-arm64-1.67.2.zip.sha1
VSCodium-darwin-arm64-1.67.2.zip.sha256
VSCodium-darwin-x64-1.67.2.zip
...

How could it work?
zap install and zap search could search for the package on github.com and offer AppImage files of different github users sorted by number of stars. This does not need package repository and this does not need caching because github allows to make 10 request per minute for unauthenticated users. If Github.com changes API rates, zap could route requests to a server which could forward them to github.com and cache them. Or it could allow users to enter their Github credentials.

One advantage is that software publishers do not need to publish AppImages on their websites or submit them to package repositories such as appimage.github.io. One Github.com integration could make available many AppImages in zap.

Another advantage is that the community does not need to specially verify or process AppImages files because it already has reputation based on number of Github.com stars of the project and this helps users to decide what software they want to install.

Github.com offers build services, so in the future it could be very feasible to build AppImages automatically for many open-source projects and Github could be known as THE most popular release platform with API access. This could make AppImage ecosystem really big and AppImage files very accessible and widespread. Github.com also allows free private repositories, so even non-open-source software publishers could possibly release and host binaries wrapped as AppImages.

Summary
The traditional model has three parties:
a. Software maker (ex. company owning Firefox*)
b. Software publisher (ex. Debian or appimage.github.io)
c. Software user (you or me)

With zap and Github.com integration the model has just two parties:
a. Software maker (ex. company owning Firefox*)
b. Software user (you or me)

*yes, Firefox does not use Github.com... yet!

Edit: This would also solve issues like this: #62

In the future, zap could make integration not only with Github.com but also Bitbucket and other popular build/release/host platforms with API access. As stated above, zap team can create server as a cache layer if the platforms decide to make their API too limited.

The user story behing AppImage is:

"As a user, I want to download an application from the original author, and run it on my Linux desktop system just like I would do with a Windows or Mac application."
https://appimage.org/

From user perspective, successful software discovery nowadays relies on SSL and manual domain verification (with the help of SEO ranking).
Command line utility zap acts just like AppImage search engine, replacing the need to open web browser by users.
Ultimatelly, it is not about the quality of software repositories - it is all about how well search engines / zap will discover and sort/rank search results.

yet another symlink problem

[WARN] .. symlink pathTozapdir/icons/zap-X.png .../icons/hicolor/.../zap-X.png : file exists

upon inspecting ../icons/hicolor/..zap-X.png I see that it has created a folder named zap-X.png instead of a symlink, which I confirmed did not exist before

Discussion - default args / wrapper script

Hey,
Just wondering if anyone's figured an approach to this.
I want to set up some default args to be passed to an AppImage, always, whether by the .desktop or by the cli link.
(specifically, the appimage is an Electron bundle so I want to pass --enable-features=UseOzonePlatform --ozone-platform=wayland).

To do this for a system util, I would make a sh wrapper in /usr/local/bin like

#!/bin/sh
exec /usr/bin/real_exe --my-args "$@"

Because zap only uses my ~/.local/bin dir, I'm unsure how best to do this - if I overwrite the bin/appimage link with a script, it will get (I guess?) clobbered when zap updates next. But I'm not sure of a better solution. Ideas?

Ideas to make zap a package manager that did the one job

Linux distributions and package managers are not generally very advanced. There is NIX (or Guix) which is step in better direction I think and it solves dependency problems but the CLI usability is bad and it does not support multiple versions of software in simple commands. Possibly, the concept is flawed, hmhm.

Also, in general, users trust software they run (that it will work, that it will not try to hack their machine, ...). So why to add more trusted maintainers and/or trusted infrastructure to the distribution process? (How one man could have hacked every Mac developer (73% of them, anyway)).

Also, does anybody think that maintainers or distributors can effectively check thousands or hundreds of thousands of source code lines for security bugs / backdoor / malware or masked security bugs / masked backdoor / masked malware? No. So in general, every software that is run by user is trusted by the user. Secure distribution system should decrease the number of trusted actors or trusted systems to 1 (just the system of a software producer) and/or pay for audits with money or time (reproducible builds as part of audits).

AppImage is a nice concept because it solved dependencies issues and zap looks like the missing manager to it.

one job

From average user perspective or from ain't nobody got time for that perspective, user wants to:
a) install the most recent version of a package (stable, nightly, lts, ...)
b) install specific version of a package (v5.0.1, v17.4.2, ...)
c) install multiple versions of a package
d) install the same version of a package multiple times (multiple installations)
e) update package to a specific version
f) update all packages to most recent versions
g) skip automatic updates of some packages
h) remove a package
i) manage default package easily (PATH)

What should hold true:
j) dependencies are solved for good
k) update of a package does not affect dependencies of other packages
l) as many as possible operations are instant/fast
m) if ambiguous state or unclear action, ask
n) allow to force action or force yes to asking

CLI examples (ideas/draft)

lpm (theoretical last package manager)

lpm fetch // loads repositories and other remote data (like 'apt update')
lpm package-install firefox // install most recent firefox
lpm package-install firefox krita php nodejs // install multiple packages
lpm package-install [email protected] // install specific version of firefox
lpm package-install firefox --disable-updates // install most recent firefox and disables updates
lpm package-update firefox // update default firefox to most recent version
lpm package-update firefox krita php nodejs // update multiple default packages
lpm package-update firefox --force // update default firefox to most recent version, force update
lpm package-update [email protected] // update [email protected] to most recent version
lpm package-update firefox->[email protected] // update default firefox to specific version
lpm package-update [email protected]>[email protected] // update firefox of specific version to specific version
lpm package-update firefox->[email protected] [email protected]>[email protected] // update multiple packages to specific versions
lpm package-update // update all packages to most recent versions
lpm package-config firefox --disable-updates // disable updates of default firefox
lpm package-config firefox --enable-updates // enable updates of default firefox
lpm package-config [email protected] --make-default // make [email protected] the default package (sets PATH)
lpm package-search firefox --fulltext|--exact|--regex // search remote firefox in fulltext, exact or regex mode
lpm package-locate firefox --fulltext|--exact|--regex // locate local firefox in fulltext, exact or regex mode

// short versions for professionals or speed
lpm pi firefox
lpm pu firefox
lpm pc firefox --md
lpm pc firefox --du
lpm pc firefox --eu
lpm ps firefox
lpm pl firefox

// advanced usage for professional use or mass updates
lpm package-install firefox --new-instance // install new installation/instance of most recent firefox
lpm package-update firefox[id:2] // update firefox installation/instance with id 2 to most recent version
lpm package-update firefox[id:2|id:5] // update firefox installation/instance with id 2 or id 5 (both) to most recent version
lpm package-update firefox[h:b4ac3b80a84a8916d0628b25a70cacbc4b61f07dcf28591a0a1588615c28c1d5] // update firefox installation/instance with the hash to most recent version
lpm package-update firefox[sh:b4ac3] // update firefox installation/instance with short hash b4ac3 to most recent version
lpm package-update firefox[v:70.0.0] // update firefox installation/instance with version 70.0.0 to most recent version
lpm package-update firefox[v:70.0.0,sh:b4ac3] // update firefox installation/instance with version 70.0.0 and short hash b4ac3 to most recent version (only if the installation with hash b4ac3 is 70.0.0)

// maybe it could support <,=,> operators or ^,~,- operators like operators in semantic versioning https://docs.npmjs.com/about-semantic-versioning

The real issue is package availability and authenticity.

  1. Do many companies package their software in appimages?
  2. Is there a way to verify authenticity of appimage?
  3. Is there a way to verify authenticity of the original software which was wrapped to appimage by random community member or distributor?

If companies publish hash sum of every appimage file (or software wrapped in the appimage) and URL of the hash sum (ex. sha512) located at their site with SSL then this is solved without any distribution certificates. Trusted/source-verified package manager (like zap) just checks the hash sum at the URL and compares the hash with locally computed hash of the appimage (or software wrapped in the appimage).
URLs to hashes can be stored online in GIT or community maintained websites. But the process of comparing hashes must be transparent and it has to actually show the source URL of the hash (ex. firefox.org/releases/...) because GIT or community website can not be verified easily and/or every time and can be hacked any time - see this incident.

So, the question is - how to convince companies to publish hash sums for their appimages (or software wrapped in the appimage)? This should be easier than to convince them to provide enough bandwidth to download appimage packages. Appimage packages could be distributed by whatever unsecured systems (ex. non-SSL sites, whatever malwared package repositories) and it would be OK because the hash verification would just work at the user machine.

Here is a proposal of file standard which allows batch downloads of hashes. The idea of appimages is one app = one file. That means one app = one file = one hash. The format is very simple so it is easy to compose and parse by programmers and easy to read by other humans.

# this is a comment
# one file of hashes for one package
# one line (ending \n or \r or combination) = one record
# every record (line) has its version, currently v1
# format v1 is five words separated by one space:
#format_version file_name package_version hash_function hash_of_file
# package_version format is not defined, recommended format is semver (x.y.z) https://semver.org/
# processing party is responsible for detection and handling of version format (no list of formats in v1)
# package_version format should be consistent across records (lines)
# words with spaces must be wrapped in double quotes ""
# empty lines are allowed
# extension is not defined, recommended is .txt
# hash functions are arbitrary but should be SHA-2 (sha256, sha512) or BLAKE2 or another secure and widely available hash functions
# hash_of_file should be hexadecimal string if that is the conventional format of the used hash function
# hash_of_file should be lowercase if letter case does not change hash value
# all words except file_name must contain only 7-bit ASCII characters which as valid in file names in currently supported Linux and macOS and Windows
# file_name must contain only UTF-8 characters which as valid in file names in currently supported Linux and macOS and Windows
# double quote (") is not allowed in any word (allowed only as word wrapper)
# examples:

v1 appimage_filename_whatever.appimage ver3.6 sha512 32cc3e9b2a03d4e4a4875c427f723b7873d991334b3ef92118fd8e75e4f22d8d01b885276e55f8f3e61c6db2f3644f21ed52a7f73485176c92c123ed5c9ccf07
v1 program_v4.5.6_no_extension v6.0.1-dev sha256 c032d47970e81adad5e0eb6dd6351465a7afa8e388df1524ae79aff3406a21e4
v1 "program with spaces" 4.2.8 sha256 9bda22014bdfb1bc8ccec988e77f281c6f5bdfa4a0b3fb90a77f353cfc67f241
v1 "program with spaces" "5.6.9 dev" sha256 2bd1a722fab45ae34f90485dafc0ea2c0f0326fc74a9180523efc9a6127482a5

Not saved option: Do you want to integrate AppImages by default?

Hi, nice package! I want to configure zap to ask for AppImages integration. When I run zap init and answer ask to question Do you want to integrate AppImages by default? then it has no effect when installing firefox_esr, no asking. firefox_esr.desktop file is created, so integration works.

When I run zap init again then yes is selected again.

OS: PureOS 10 (Debian based)
zap installed without sudo

apps not workign under wayland ?

whenever i run an app under wayland i got this error

Failed to execute: 'desktop'
Error: 'Failed t execute child 
process "desktop" (No such file 
or directory)'

I have multiple of apps installed under zap and none of theme is working, it is probably a problem with environmental variable, any way to fix it ?

Add GitLab API support

Zap requires GitLab API support to detect the latest appimage releases. This can be used to fetch the download URL to the releases, and also download popular apps which are having their source code and daily builds on GitLab, for example Inkscape.

Related Issues: #38

Tasks:

  • Implement a GitLab API Index Wrapper for Zap, similar to how GitHub API Wrapper is built.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.