Alexie: "Does anybody has written a Gambas project, which can auto-update itself from a website (e.g. download gz/tar or git/svn) and restart itself?"
What I've done is a class that reads information from a web page on the internet. This website contains information about the program version and download location. The class compares the version of the program that is running and there is a web page showing a message if you need to upgrade and where the upgrade link source code: http://jsbsan.blogspot.com.es/2011/10/updaterayo-nueva-clase-up-poder-buscar.html example web page: http://seguimientodeapuestas.blogspot.com.es/2014/05/turbopdf.html Best regards Julio 2014-08-25 7:21 GMT+02:00 Alexie <uale...@gmail.com>: > To jump in the auto-update, but now from application side ... Does anybody > has written a Gambas project, which can auto-update itself from a website > (e.g. download gz/tar or git/svn) and restart itself? > > > > > 2014-08-24 22:36 GMT+02:00 Willy Raets <wi...@earthshipbelgium.be>: > > > On zo, 2014-08-24 at 15:12 -0400, Kevin Fishburne wrote: > > > On 08/23/2014 09:22 AM, Willy Raets wrote: > > > > On vr, 2014-08-22 at 19:51 -0400, Kevin Fishburne wrote: > > > >> In the interest of accessibility to a stable version of the GAMBAS > > > >> runtime without requiring users to add a PPA or drop to the command > > > >> line, I think it may be useful to add an "auto-update" feature or > > > >> equivalent. > > > >> > > > >> Currently users have three ways to install GAMBAS: (1) Install from > > > >> their distro's package manager, (2) add the stable or daily PPA, and > > (3) > > > >> compile from source. Users who will be using GAMBAS to program will > > have > > > >> no trouble using any of these methods. Users who simply need the > > runtime > > > >> to use a GAMBAS application however may require a dead-simple > method, > > as > > > >> they could in theory be the mythical Grandmother. > > > >> > > > >> Another problem is that the specific build of GAMBAS packaged with > > many > > > >> distros is outdated or unstable. I can create a GAMBAS application > > using > > > >> the stable PPA, create an installation package, distribute it, and > > users > > > >> who install it may not be able to run the program because their > > distro's > > > >> GAMBAS build is too old. > > > > I run into the same problems, distributing my applications to simple > > > > users is a hell, becuase of outdated Gambas packages in the official > > > > repositories. > > > > > > > >> I don't know the best solution to these problems, though I can think > > of > > > >> some possibilities: > > > >> > > > >> Add an option when creating an installation package to prompt the > user > > > >> to install dependencies from the stable PPA or from source. When the > > > >> user begins to install the package, a script will be run that > prompts > > > >> them if they'd like to install updated runtime dependencies with the > > > >> default answer being Yes. Whether the PPA or sources are used > depends > > on > > > >> the option chosen when building the installation package. > > > > This is a bit of a chicken/egg situation. > > > > Example: > > > > You build a package in say 3.5.4 and it then should have some way to > > > > latest stable PPA. > > > > > > > > Say you run it on Ubuntu 12.04 running Gambas 3.1.1. > > > > Your 3.5.4 package will be aborted because of 3.5 dependency, so even > > > > the adding newer PPA wouldn't run!! > > > > > > > > What would be needed is a Gambas application written in 3.1.x named > > > > GambasUpdater for example that simply adds the stable repo to the > > > > sources.list and run an apt-get update. > > > > > > > > After this you should be able to install 3.5.x packages. > > > > But now you only tackled Ubuntu and Ubuntu based distro's > > > > > > > > For Debian the application would need to add jessie repo to > > sources.list > > > > and a Preferences file to make it work. > > > > > > > > I have been thinking about writing such an application so at least > > > > Ubuntu and Debain Gambas 3.5.x packages can be installed, as long as > > the > > > > user first installs the application GambasUpdate. Time constrains > have > > > > kept me from doing so > > > > > > > > For other distro's (rpm based ones) I have no clue. > > > > But if I know what repos and how to add a repo on fedora, mageia, > > > > opensuse and such, it could all be done in one app. > > > > > > > > User selects distro he is running and next a recent Gambas repo gets > > > > added to their system, that is about all that would be needed. > > > > > > That is an interesting solution, although that assumes GAMBAS is > already > > 1. installed on a user's system. > > > My suggestion was to have the GAMBAS > > > Installation Package (Project, Make, Installation Package) procedure, > > > which will already be targeting a specific distribution, add a script > to > > > the .deb files to optionally add the PPA and update the repositories so > > > the updated dependencies will be installed instead of the stock distro > > > packages. I don't know much about the Debian package structure, but > > > surely it supports running pre/post scripts? > > > > I wonder if when the package installer detects a dependency on Gambas > > 3.5, but no repo is available, it will abort the install. So I wonder if > > pre install scripts would be even run?! > > > > > The user would open the > > > .deb, click the Install button, a script would be run to add the PPA, > > > update the package list, then the .deb would install normally but with > > > access to the updated PPA dependencies. The only thing the user may be > > > required to do is enter their password and press Enter on the PPA > > > prompt, and we may be able to suppress the latter. > > > > > > >> Another possibility is to have an option when creating an > installation > > > >> package that includes the runtime dependencies of the dev's build > > > >> environment. Instead of the package pulling dependencies from the > > target > > > >> system's repositories it would simply use the included packages. I > > know > > > >> that's not the Linux or GAMBAS way, but it's better than using old > > > >> GAMBAS packages in the user's repositories that may not work at all. > > > >> Remember, these solutions are for users that either don't know or > > don't > > > >> want to know the "right" way to do things, they just want to run the > > > >> program. > > > >> > > > >> Yet another possibility is to have an option when creating an > > > >> installation package that would cause the execution of the installed > > > >> application itself to check the installed runtime dependencies (if > > any) > > > >> against the stable PPA's runtime dependencies and prompt the user to > > > >> update if there is a discrepancy. It could even add the PPA, install > > the > > > >> dependencies, then remove the PPA. > > > >> > > > >> Solutions requiring the automatic compilation from source would be > > more > > > >> difficult, as the target environment would need to be set up with > > build > > > >> tools first. Solutions adding a PPA would be easier assuming the > > target > > > >> environment's distribution version was supported by the PPA. I don't > > > >> know how reliable the solution including the developer's runtime > > > >> dependencies would be. > > > >> > > > >> IMHO for GAMBAS to properly dominate the world, installing a GAMBAS > > > >> program really should be as easy as double-clicking a .deb/.rpm and > > > >> clicking Next, Next, etc. So, is this a problem worth solving, and > if > > > >> so, what does everything think the best solution would be? > > > >> > > > > I think it is worth solving and the best option would be that we get > > > > more recent Gambas versions in the official repositories. > > > > > > While that's the "proper" solution, based on the past it seems to be an > > > elusive goal. From what I've seen, the repository maintainers seem to > > > operate on a different time scale than normal people. > > > > > > > The second best option is writing the GambasUpdate application in an > > > > older Gambas 3.1, so that this can be installed using the outdated > > > > official repositories and next when run update to a non official repo > > > > running the latest Gambas. > > > > > > > > > > I like this idea, however its Achilles' heel is that the user needs > > > GAMBAS to update GAMBAS (chicken and egg as you mentioned). > > > > So maybe we need a GambasUpdater written in C++. No Gambas needed. > > > > This could be a good solution as C++ should be available in all distro > > repositories. And it would have to be a one click install of the C++ > > GambasUpdater. > > > > But I'm no C++ developer. > > > > > > > Is there a > > > way to have GAMBAS placed into a single .deb or .rpm package? > > > > None that I am aware of. > > > > > The user > > > could simply download and execute a single file to have the latest > > > stable build, no PPA fiddling necessary. Whatever script is used to > > > generate the PPA .debs could run an additional script to place GAMBAS > > > into a single .deb, allowing the user to (1) install GAMBAS in a > > > familiar way (download then open) and (2) run a GAMBAS application in a > > > familiar way (download then open). > > > > > > I plan on releasing a game in the next couple of months on Steam and > GOG > > > (made with GAMBAS, obviously), so its functionality in this respect is > > > about to be tested by fire. > > > > > > > -- > > Kind regards, > > > > Willy (aka gbWilly) > > > > http://gambasshowcase.org/ > > http://howtogambas.org > > http://gambos.org > > > > > > > > > > > > > > > ------------------------------------------------------------------------------ > > Slashdot TV. > > Video for Nerds. Stuff that matters. > > http://tv.slashdot.org/ > > _______________________________________________ > > Gambas-user mailing list > > Gambas-user@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/gambas-user > > > > ------------------------------------------------------------------------------ > Slashdot TV. > Video for Nerds. Stuff that matters. > http://tv.slashdot.org/ > _______________________________________________ > Gambas-user mailing list > Gambas-user@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/gambas-user > ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ Gambas-user mailing list Gambas-user@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/gambas-user