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

Add a flag to auto-accept dialogs if triggered with --standalone-update-dialog #18

Closed
luzpaz opened this issue Nov 3, 2019 · 19 comments

Comments

@luzpaz
Copy link

luzpaz commented Nov 3, 2019

It would be nice to have the ability to invoke AppImageUpdater from the CLI and pass the AppImage that you want it to update.
Usecase:
$ ./AppImageUpdater.AppImage FreeCAD_0.19-18614.AppImage

Bonus: add a flag that automatically quits AppImageUpdater after it successfully completes its task.

@luzpaz
Copy link
Author

luzpaz commented Nov 3, 2019

Sorry, didn't notice the --standalone-update-dialog

@antony-jr
Copy link
Owner

antony-jr commented Nov 3, 2019

it was not documented on purpose. It was used privately by the program to update AppImages with root access. But I guess you can use it if you want. It does not have the name fix in it though.(for now)

@luzpaz
Copy link
Author

luzpaz commented Nov 3, 2019

Is it possible to add flags that will bypass the dialogs ?

@antony-jr
Copy link
Owner

Is it possible to add flags that will bypass the dialogs ?

Yes we can. You can actually do that in the settings of the main Application but the standalone dialog box does not respect that so we would definitely need a flag from the command line. I'm busy right now, So this is gonna take some time.

@luzpaz luzpaz changed the title Ability to invoke an update from the CLI Add a flag to auto-accept dialogs if triggered with --standalone-update-dialog Nov 4, 2019
@luzpaz
Copy link
Author

luzpaz commented Nov 4, 2019

No rush. Thanks!

@probonopd
Copy link
Contributor

probonopd commented Nov 10, 2019

I was about to ask for the exact same thing. Would be greatly appreciated! 👍

  • One mode where one can launch AppImageUpdater with an AppImage as its argument so that the changelog dialog shows -- I learn here that this actually is already implemented with --standalone-update-dialog
  • Another mode where one can launch AppImageUpdater with an AppImage as its argument so that the update directly starts with no further things to click

In both modes, there should no desktop notifications and no status bar plugin/widget, and AppImageUpdater should quit after the updating is done.

Thank you.

@antony-jr
Copy link
Owner

Okay the latest build has the following options,

[antonyjr@Liz AppImages]$ ./AppImageUpdater-7420c48-x86_64.AppImage --help
Usage: ./AppImageUpdater-7420c48-x86_64.AppImage [options]
A Simple Program to Update the AppImage format using Zsync Algorithm.

Options:
  -h, --help                                 Displays this help.
  -v, --version                              Displays version information.
  --minimized                                Start the Application minimized.
  --noconfirm, -n                            Automatically accept all
                                             confirmations in standalone mode.
  --silent, -s                               Show minimum number of dialogs in
                                             standalone mode.
  --standalone-update-dialog, -d <AppImage>  Update a <AppImage> with nothing
                                             but a AppImageUpdater update
                                             dialog.

Is this okay with y'all?

In both modes, there should no desktop notifications and no status bar plugin/widget, and AppImageUpdater should quit after the updating is done.

By default it does the above mentioned. I think you did not close the previous applications properly(Clicking on the 'X' in the title bar will not close it, you have to click on the exit button in the application). In the past the application did not implement the context menu for the tray icon so I think you were not able to close it, but now its been implemented, you should force kill any previous version that are running in the background and try the new one.

@probonopd
Copy link
Contributor

probonopd commented Nov 10, 2019

Thanks for implementing. Graet work 👍

Question: Which of these can/cannot be used together?

  --noconfirm, -n                            Automatically accept all
                                             confirmations in standalone mode.
  --silent, -s                               Show minimum number of dialogs in
                                             standalone mode.
  --standalone-update-dialog, -d <AppImage>  Update a <AppImage> with nothing
                                             but a AppImageUpdater update
                                             dialog.

From experimenting, the combination -n -d implements

Another mode where one can launch AppImageUpdater with an AppImage as its argument so that the update directly starts with no further things to click

Maybe it could be clarified in the help text.

Thank you very much for this.

@luzpaz
Copy link
Author

luzpaz commented Nov 10, 2019

I understood -d to be an alternate short form of --standalone-update-dialog. I'm on mobile right now so I can't test.

@probonopd
Copy link
Contributor

Yes it was my mistake, edited above.

@probonopd
Copy link
Contributor

Maybe there should also be a way to suppress this dialog:

Update completed successfully for AppImageUpdater-9b4000e-x86_64.AppImage, the new version is saved at '/home/me/test/AppImageUpdater-7420c48-x86_64-revised-on-2019-11-10T13-36-37.AppImage', do you want to open it?

@luzpaz
Copy link
Author

luzpaz commented Nov 10, 2019

can there be an -s-like option for the CLI ? where the debug log output is suppressed ? Should I open a new ticket for that?

@probonopd
Copy link
Contributor

probonopd commented Nov 10, 2019

Actually I think the output should only be shown on the command line if requested with --verbose or --debug... except for errors.

@antony-jr
Copy link
Owner

Maybe there should also be a way to suppress this dialog:

Update completed successfully for AppImageUpdater-9b4000e-x86_64.AppImage, the new version is saved at '/home/me/test/AppImageUpdater-7420c48-x86_64-revised-on-2019-11-10T13-36-37.AppImage', do you want to open it?

@probonopd Then how can you know if a update is completed successfully, Do you want a command line tool? If so why can't you use a command line tool like the official one?

Question: Which of these can/cannot be used together?

You can use all the things together. -n for no confirm. -s to show minimum no. of dialogs. -d to give the actual AppImage to update.

When using -s, No progress dialog will be shown and No checking for update dialog will be shown. But error dialogs and final update notification will be shown(that is the update completed dialog).

When using -n, Only the confirmation dialog will be auto accepted but all other dialogs will be shown normally.

can there be an -s-like option for the CLI ? where the debug log output is suppressed ? Should I open a new ticket for that?

@luzpaz Yep. I think so too. I will add a verbose mode and hide all logs by default as suggested.

If you want a CLI tool then I can make a separate one for that which is much better at displaying information CLI friendly. Do you want a command line tool?

@luzpaz
Copy link
Author

luzpaz commented Nov 10, 2019

a CLI tool would be awesome, yes

@probonopd
Copy link
Contributor

Personally I was not looking for a command line tool, I am trying to integrate the updater with an experimental version of appimaged that I am re-writing from scratch in Go (Golang). It can update AppImages by right-clicking on them, and I want to invoke AppImageUpdater. But now I can do that, so it's fine.

@probonopd
Copy link
Contributor

probonopd commented Nov 11, 2019

I am using -n -d <...>. If the AppImage cannot be updated due to an error, then unfortunately no error dialog is shown in some cases.

In other cases it does show the dialog:

Actually it shows more than one dialog for just one AppImage:

If the AppImage is already the newest version, then an information is shown.

@luzpaz luzpaz mentioned this issue Nov 24, 2019
@antony-jr
Copy link
Owner

I am using -n -d <...>. If the AppImage cannot be updated due to an error, then unfortunately no error dialog is shown in some cases.

Try the latest version, it should be fixed.

No we have new usage options,

Options:
  -h, --help                                 Displays this help.
  -v, --version                              Displays version information.
  --minimized                                Start the Application minimized.
  --noconfirm, -n                            Automatically accept all
                                             confirmations in standalone mode.
  --silent, -s                               Show minimum number of dialogs in
                                             standalone mode.
  --show-checking-for-update-dialog, -c      Show Checking for update dialog in
                                             standalone mode.
  --standalone-update-dialog, -d <AppImage>  Update a <AppImage> with nothing
                                             but a AppImageUpdater update
                                             dialog.

Now the 'checking for update dialog' will not be shown unless you explicitly mention the -c option.

So Use,

-s - To hide the progress dialog.
-d - To give the path to appimage
-c - To Show the Checking for Update dialog, avoid this option if you don't want to show it.
-n - Do not show the update available dialog(i.e The change log window) and say yes to install update

@probonopd is this okay?

@probonopd
Copy link
Contributor

Perfect 👍

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

No branches or pull requests

3 participants