!Apps autoupdate and more
Paolo Fabio Zaino (28) 1882 posts |
This thread is from here: https://www.riscosopen.org/forum/forums/1/topics/17696?page=2#posts-142418 The whole messages subthread replicated here: Rick said:
Paolo said:
Steve Pampling replied:
Gavin Wraith added:
Paolo replied to Steve:
Rick added:
Paolo added:
And Gavin Wraith replied:
|
Paolo Fabio Zaino (28) 1882 posts |
@ Gavin
That’s what !PackMan uses, (if you have !PackMan installed) you’ll find yours in: !Boot.Resources.!Packages <----
True. !PackMan uses a centralized mechanism to move Apps from one location to another, so yes, it’s no longer as simple as regular RISC OS. However, it doesn’t needs to be this convoluted: Having a Module that handles the registry one can provide a simple command that updates the Package position when the Package !Boot is read by the Filer, something like:
If this is executed by the !App !Boot and !Run, you’re good with the Registry AND moving Apps around RISC OS style. |
Matthew Phillips (473) 721 posts |
This could get messy if the user has several older versions of an application lying about and does not boot the latest version when the machine starts. Then whichever has been “seen” first could become the registered location. |
Paolo Fabio Zaino (28) 1882 posts |
True, any central registry can have issues. However, in that specific use-case, it would be messy anyway with an app that tries to autoupdate: for instance, the user runs the outdated app and it will try to update itself. So, if the goal is to keep older versions around, then one should make sure to comment out that line in the !Boot file, in which case this becomes easier to handle than having all the older version constantly trying to update (and not way to stop this). Given that it’s not a must have, it’s a choice of the App developer and still allow the user to disable it, I think it works in both contexts. No? So, another way could be: In !Boot
In the !Run
But again, every single solution will not be absolutely perfect for all possible use cases. Jay Miner always said: Engineering is the art of compromise. So, IMHO, it all boils down to what works on most use cases. HTH |
Paul Sprangers (346) 524 posts |
This thread inspired me to add a simple update mechanism to one of my programs, by means of an update button in the Info window. It checks for a new version and will load it automatically if there is one. The heavy burden however, is that I now shall have to write new versions. |
Paolo Fabio Zaino (28) 1882 posts |
XD |
Theo Markettos (89) 919 posts |
I don’t have strong opinions on any of the ideas here, but just to note that the core of the packaging system that PackMan uses is a library called LibPkg . PackMan is one example of a frontend for the library (there used to be another frontend called !RiscPkg, now abandoned). So if somebody wanted to write another way to manage the existing package DB but with a different interface from the PackMan frontend, then that would be feasible by making your own app that uses the LibPkg API. Hence a putative ‘PkgSystem_CheckForUpdate’ could cooperate with the system that already exists, if that was desirable. |
Paolo Fabio Zaino (28) 1882 posts |
Hey Theo,
Thanks, I already started to have a look at LibPkg. I am perfectly happy with !PacMan, however, IMHO, we do need also CLI based version of it (for many reasons). So, I started to work on building my own “CLI !PackMan”. So far, my most limiting factor has been the very little free time I have for RO, so not sure if and when it’ll be available, but I do have perfectly building module written in GCC C++ that is using LibPkg and that is awesome :) – My “ideal” plan is to add it as a component of my DME, so, as soon as “testable” it will just appear on !PackMan and in the DME core. If the PkgSystem would be finished, indeed could be used as you mention and from any App. I also wish to be able to build it for old systems (like the Archimedes as well, I know this may sound heresy on here, but many have asked if it was possible to have !PackMan like on the old HW, so if it would be possible it would be a great plus).
IMHO, it’s very desireable and it would be awesome if we could build a package manager that runs on all systems and RO releases and, again, I am totally happy with the RiscPkg format. Obviously others can have different opinions on the matter. This is where I am at (so far): - The module is already fully linked to !LibPkg |
Theo Markettos (89) 919 posts |
That looks promising. I agree having a command line tool makes a number of operations a lot easier, especially ‘just install this long list of packages please’. It’s also handy when building software, because you can just tell somebody ‘pkg install libx liby libz’ to get the dependencies and they all arrive in one go, rather than a lot of clicking. (One thing that annoys me about setting up a new Windows machine is the amount of clicking you need to do to work installers. I just want to say ’here’s a list of software, go ahead and install it for me please, I’ll come back in half an hour’. Yes I know there’s now WinGet and various enterprisey things, which rather proves the point). Having it as plumbing so that apps can update themselves, without having to go through the PackMan UI but still keeping them in sync with it, sounds like an interesting idea. One nice thing is that the repository format is easy to create, so if you want to make a personal repository, eg for testing, or to distribute updates on DVD or flash media if you wanted, then that’s possible too. I think it might be challenging to fit into a 4MB machine given it’s C++, but maybe… And I agree that provisioning such machines (and emulators) with modern software is annoying, and being able to just pull down a list of software would be handy. I suspect some of it won’t run due to memory limitations, but maybe you just need a curated feed of packages for that. One thing to bear in mind is that LibPkg and PackMan have co-evolved so, when you get to the point of having something stable, it’s worth thinking about how to keep them built so they don’t get out of sync with different LibPkg versions (eg if the DB format changes or similar). |
Rick Murray (539) 13840 posts |
Well, you have to accept the terms. And when that’s done, a button to click to dismiss the installer. You know, once you’ve given it a pat on the back for not choking on (some random completely irrelevant thing). But don’t forget before you do that, there’s a tick box to autorun the program when you quit the installer, plus maybe another to open the release notes in Notepad. And maybe yet another to pop up the manual. Some installers have a silent mode where a single command will perform a complete default installation with no clicking, but it will often do so by answering Yes to everything, so if there’s crapware included…
I don’t think progress ought to risk being held back due to the whimsy of supporting a thirty two year old machine that is quite restricted compared to modern machines (in both hardware and firmware). |
Andrew Conroy (370) 740 posts |
Don’t forget the installers that say “Click ‘Finish’ to continue starting the install”! Are we starting, continuing or finishing? Make up your mind! |
David Gee (1833) 268 posts |
@Rick, you’ve forgotten clicking the authorisation to install it with admin packages. And if it’s not very common you might have to convince your anti-virus program that it’s OK — Norton regards the current Ovation Pro for Windows installer as suffering from "WS.Reputation1”. Not that Macs are any easier nowadays, unless you’re installing from the AppStore. |
Rick Murray (539) 13840 posts |
That’s not a real virus or infection. Crowd sourcing is what gave us Boaty McBoatface, so maybe Norton should be using heuristics (does anything in here do stuff a virus might do) rather than trying to crowdsource it, because that absolutely doesn’t mean it is safe, it just means lots of people have (or in this case have not) tried to run this thing. |
Rick Murray (539) 13840 posts |
A quick Google suggests that Norton, rather than prompting the user for what to do, will treat a low reputation the same as an actual virus detection – namely tossing the file into quarantine and deleting the original. Is this your experience? Is Norton really that broken? I have Avast on my PC, but since it’s an old XP box, the “get an extra year” thing goes into an endless loop; but I’m not that worried as the machine is router firewall blocked from external sites; I don’t trust Norton, not after seeing how much pain a friend went through trying to uninstall it. |
Doug Webb (190) 1180 posts |
It also does the same with Arculator and promptly bins a lot of the install files. Since installing Norton on a number of PC’s here they have noticably slowed down particularly on getting to a usable desktop. Norton also rather helpfully keeps nudging you on a regular basis, despite me saying do things in the background, to take action to “fix” your PC rather than do it quietly as no doubt they want you to be impressed by it working to find all these issues. So yes it is broken but at least I get it “free” from my ISP. |
Colin Ferris (399) 1814 posts |
I tried copying Win Ovation pro over from a dead win machine to a fresh machine – didn’t work :-( |
Rick Murray (539) 13840 posts |
Windows doesn’t work like that. Did you also copy dependencies (DLLs)? I don’t recall if/what OPWin uses as I’ve not looked. Did you copy the registry entries? Not just the ones for the program, but also the ones to associate the program with Windows (like what to do with .dpd files). This sort of guff is why they use installers over there… |
Colin Ferris (399) 1814 posts |
I copied OAK Draw over that way – and that seemed to work with Win 10. Someone here said that the oak installer didn’t work on Win 10. |
Chris Hughes (2123) 336 posts |
As Win Ovation Pro is now free , as is the RISC OS version. It probably easier to just download the latest version and use the installer for the Windows version. Note you might need to install as an Admin. I don’t think OPro for Windows uses the registry. |
DownUnderROUser (1587) 127 posts |
Norton has been banned on all machines i have built, sold or used since the 90s – terrible software. Have been using Emsisoft Anti-Malware for a number of years on the Windows workstations – not free but not intrusive, resource hungry, etc. Can also remote manage seats for other machines which is good for family etc. |
DownUnderROUser (1587) 127 posts |
@Fabio – PkgMod sounds good – would be great to use it group update selected packages. Would also be cool if could list select a series of packages for initial installation (could be extended to custom roll one’s own distribution) |
Theo Markettos (89) 919 posts |
In honour of bikesheds everywhere, I’d suggest renaming the commands to PkgInstall, PkgList, Pkg… as it’s nicer to type ‘PkgInstall fooapp’ rather than ‘PkgModInstall fooapp’. In the way Powershell likes to talk about it, ‘PkgInstall’ is a verb (plus an object), while PkgModInstall is a verb combined with the name of the thing providing the service, making a mixed metaphor. You could look at the kind of ‘verbs’ that different package managers use, as I think there is quite a bit of commonality between them. If everyone calls their verb ‘install’, there’s not much advantage in having yours be ‘fetch’ or ‘provision’. It would just be RISC OS being different purely to make it more work for everyone, which is something we surely don’t need any more of. |
Rick Murray (539) 13840 posts |
There should be the verbs:
Oh, and:
|
Paolo Fabio Zaino (28) 1882 posts |
@ DownUnderROUser
Thanks
Yes, the update command, in theory can be used for group updates.
In theory that should be possible, given RiscPkg supports groups. But I haven’t seen anything yet that allows a Package to belong to 2 different groups (for example), which would be needed to create an “Initial Installation” group. However, for everything “Initial Installation/Configuration”, I have been modelling a tool I called “!FirstBoot”, which is a combination of the Installer mentioned on my original post + PkgMod. And yes, it can install groups of Apps for a user that has no clue about RISC OS, but the groups in !FirstBoot are not related to the RiscPkg groups JFYI. The whole !FirstBoot process is a mix between the old Apple macOS 9 initial configuration and soemthing like CentOS installation (where, after configured a bunch of things, a user can select what groups of Apps and tools to install on a vanilla RISC OS). Also !FirstBoot is in slow progresses, so don’t expect anything anytime soon and, beside, both the Installer and !FirstBoot need PkgMod done and working first, so… |
Steve Pampling (1551) 8170 posts |
Do they have assigned gender? |