hrydgard / ppsspp

A PSP emulator for Android, Windows, Mac and Linux, written in C++. Want to contribute? Join us on Discord at https://discord.gg/5NJB6dD or just send pull requests / issues. For discussion use the forums at forums.ppsspp.org.
https://www.ppsspp.org
Other
11.36k stars 2.18k forks source link

Auto-update Feature #10002

Open tilkinsc opened 7 years ago

tilkinsc commented 7 years ago

It seems like a good time to have an auto-update feature, at least for windows and linux. I specifically like the latest dev builds.

It should be eventually implemented.

hrydgard commented 7 years ago

This is a big and complex issue, and you should be able to choose if you want to only get major versions or every little update, and maybe something in between.

Pushing far into the future :)

TehPlayer14 commented 7 years ago

And some update may break some games...

tilkinsc commented 7 years ago

Ofc @Michal1324 that is the point of major and minor and dev builds that @hrydgard brought up.

hrydgard commented 6 years ago

Citra has added this recently, we might want to take a look at their approach.

https://citra-emu.org/entry/introducing-automatic-updates/

ghost commented 6 years ago

Dolphin recently added an auto update option. I think PPSSPP definitely needs one as well.

tilkinsc commented 6 years ago

I actually want to bring up that updates should be optional and PPSSPP shouldn't destroy previous versions. A simple button on the main screen and a ping to the current version server is all that is really needed. Automation of the unpacking of the files is too simple to not be able script it up in 5 minutes(via batch) I guess and storing away last version is simple. Especially if 7z is installed. It may take a double process trick though to overwrite the executable.

You could add the 7zip dependency to do this - my favorite (and the best) super lightweight zipper 256KB windows 7 archive file. All you need is the archive library (.a) and headers and all should run well. It is licensed under GNU LGPL and a part of it is public domain. Makes file transferring and storing easier and transferabler.

gcc -O2 -g0 -Wall -c *.c
ar rcs -o 7zip.a *.o
*collect .a and .h*

However, there is a CPP version, too which requires a bit more brainwork. Really, C should be sufficient enough to embed it into the application. Then use the simple API to compress or decompress. Opinions are opinions.

tl;dr use 7zip, ping server for version, alert if can update by subtle texture change (circle with gold dot or fully translucent filled), click to update

  1. download current version
  2. uses 7z to extract files
  3. migrate files elsewhere after compression
  4. replace old files
  5. buy ppsspp gold to support ppsspp
hrydgard commented 6 years ago

On Android we already have semi-forced automatic updates because that's the only option available on Play Store..

tilkinsc commented 6 years ago

in app updates are possible... but I doubt it would be worth changing on specifically android.

cascardian commented 3 years ago

This is an old issue, but I just wanted to add that once this happens, there should probably be an option to exclude the /flash0/font/ files from updates, because people who have the official font files (or custom ones they like, really) might not want to have them replaced.

unknownbrackets commented 3 years ago

Put your official font files in PSP/flash0, not in assets. This is the right place for them and they'll never get overwritten there.

-[Unknown]

BParks21 commented 2 years ago

If this is implemented can it work without the installer version? It would be nice for it to work with the portable Windows version.

Tyestor commented 1 year ago

List of emulators off the top of my head that have an auto-update feature:

Duckstation PCSX2 RPCS3 Vita3K mGBA Dolphin Ryujinx

It's time.

BParks21 commented 1 year ago

Please, and if so allow the portable version to auto update as well!

hrydgard commented 1 year ago

It's obviously something I've wanted to do for a long time, but just doing it on one platform (Windows) is gonna be a lot of work. Then additional work for the others.

First need to research which solution to use, there are a bunch. Then probably replacing our current installer, and then there's a lot of testing to make sure it works both on traditional installed and "portable" installs. Basicallly requires blocking off a week or so, realistically - and I'm struggling to prioritize that against work that actually improves gameplay.

I do intend to do this of course.

tilkinsc commented 1 year ago

So there are a couple ways to approach this.

1: use a script installer like nsis which allows you to set up directories and such and already has the stack flushed out for you. The msi generated has compressed files to install and has uninstall support for windows. This is very click intensive and is long since frowned upon by many people. This isn't portable between all the supported applications. 2: integrate it directly into ppsspp. This is very portable. It allows you to dodge updating directly through the play store and family. For manual installations, its going to be a godsend (those who degoogle their shit). Ideally you'd just crc the files and replace those mismatched. You may also want ability to regenerate config files and focus on keeping ppsspp self contained, which is not very linux friendly, but tbh should be as a ppa or however apt works to upload to debain or whatever. Then its updated with the OS which can be undesirable. So I would recommend throwing everything in /usr/local/{bin,lib} and doing drop in for generated .so's because with -soname argument to g++ you are to name it so the version is there.

hrydgard commented 1 year ago

Planning to look into this for 1.16, at least for Windows and potentially on Mac.

Valtekken commented 1 year ago

I'd also like this feature, I usually just open all my emulators once per day to have them autoupdate in case there are updates so this would fit naturally in that process

TehPlayer14 commented 9 months ago

I myself without having auto update, I find myself having multiple PPSSPP versions for compatibility reasons in case something breaks, and updater as I stated would be welcome

And no, this isn't the only emulator I keep several versions of