Feature #48

Solution to updates on non-win systems

Added by Jan Dolinár over 9 years ago. Updated about 9 years ago.

Status:ApprovedStart date:04/18/2010
Priority:HighDue date:
Assignee:Iñaki Zabala% Done:

100%

Category:-Spent time:-
Target version:-

Description

As described and discussed in great length in forum (http://www.ultimatepp.org/forum/index.php?t=msg&goto=26255) TheIDE doesn't update the sources located in /home. This was overlooked for a long time since most of the developers use svn, but it is really bad behavior from the beginners point of view. In last month I have seen at least 3 issues reported that were caused by non-updated sources. I am feeling quite ashamed every time when I have to explain that there is a giant design hole like this and that I know about it since about a year ago and it still isn't fixed :-/

I already proposed a solution, implemented it and I am happily using it for couple of months, but nobody else seemed to care about this. I attach a diff with all the changes, even with documentation. I am well aware it is a big change and I would like to have at least two or three people check and test it, before it gets into the svn. Maybe creating branch for this wouldn't be a bad idea, what do you think, Mirek?

ide.diff Magnifier (2.19 MB) Jan Dolinár, 03/23/2011 07:09 PM

History

#1 Updated by Miroslav Fidler over 9 years ago

I like it.

I only have some quick questions:

- this is invoked the first time theide is launched, right? or perhaps by some menu item in setup?
- it is possible to avoid this at all and do manual setup, right?
- would it be possible to use it in Win32 as well?

Mirek

#2 Updated by Miroslav Fidler over 9 years ago

  • Assignee changed from Miroslav Fidler to Jan Dolinár

#3 Updated by Jan Dolinár over 9 years ago

  • Assignee changed from Jan Dolinár to Miroslav Fidler

- this is invoked the first time theide is launched, right? or perhaps by some menu item in setup?

Yes, both. Theide detects existence of the configuration file at startup and if it is not present, the installer is invoked. The settings can be change later in Setup menu > Source management.

- it is possible to avoid this at all and do manual setup, right?

Yes, of course. Selecting the "manual" mode results in no actions and also disables the periodic checks for updates.

- would it be possible to use it in Win32 as well?

I left it disabled in win32 because there is currently no system that would be upgrading the system-wide copy of sources (which doesn't even exist :) ), so there was no need to implement this. But if you wish to change the philosophy of "installer-rewrites-everything" to something better, it should be very simple to modify this to work in win as well.

Honza

#4 Updated by Miroslav Fidler over 9 years ago

  • Assignee changed from Miroslav Fidler to Jan Dolinár

One last thing: checking for changes at 15 min intervals is IMO quite obtrusive. Maybe once a day in single theide instance would be better?

#5 Updated by Jan Dolinár over 9 years ago

  • Assignee changed from Jan Dolinár to Miroslav Fidler

I agree that checking SVN every 15 minutes is overkill, but on the other hand if it is setup to just look at /usr/share/upp, 15 minutes is IMHO just right. Actually, it is probably a good idea to make it configurable :-) And make the default 1 day for svn and 15 min for /usr/share/upp, what do you think? I will try to do it tonight, it should be simple.

Also I tried to make it as inobtrusive as possible, there are no crazy pop-ups anywhere, just one icon on toolbar changes to indicate availability of new sources ;-)

#6 Updated by Jan Dolinár over 9 years ago

  • File deleted (ide.diff)

#7 Updated by Jan Dolinár over 9 years ago

I added the setting for periodicity of update checks into the installation wizard. It is possible to set periodic checks plus checking when theide starts (on background of course, so the user doesn't have to wait). The default setting is to check only when theide starts.

There is one known bug: the periodic checks count from the start of theide, so if you set periodicity of one day, you have to keep theide running at least 24 hour straight to see something happen... I plan to solve this in close future by making the timers bit more clever and storing the timestamp of last check.

#8 Updated by Miroslav Fidler over 9 years ago

OK, please proceed with commit :)

#9 Updated by Jan Dolinár over 9 years ago

Miroslav Fidler wrote:

OK, please proceed with commit :)

If I remember correctly I don't have access rights to usvn, only to ide. Feel free to commit it yourself or grant me the access ;)

#10 Updated by Miroslav Fidler over 9 years ago

  • Assignee changed from Miroslav Fidler to Jan Dolinár

usvn is in @ide group, so I believe you should have them. If not, it is something to resolve. (I mean, please try :)

#11 Updated by Jan Dolinár over 9 years ago

  • Status changed from In Progress to Ready for QA
  • % Done changed from 0 to 90

You were right, I had the accessm just didn't know about it :)

Anyone, please report any bugs, typos, or unexpected behavior. I want as much feedback from you as possible to make this really useful and user friendly! ;)

#12 Updated by Miroslav Fidler over 9 years ago

  • Assignee changed from Jan Dolinár to Iñaki Zabala
  • % Done changed from 90 to 100

#13 Updated by Miroslav Fidler over 9 years ago

Just a minor complaint: ide.h was Win32 incompatible - you should have enclosed SrcUpdater stuff with "#ifdef PLATFORM_POSIX"
(it is now fixed...)

#14 Updated by Jan Dolinár over 9 years ago

Oups, I'm sorry for that, I did test it on windows some time ago, but forgot to try the last version. Thank you for fixing it.

#15 Updated by Jan Dolinár over 9 years ago

I just added the persistent behavior for the periodic update check timer. It should now behave more like average user expects: If you close theide and reopen it before check should be performed, it behaves as if theide was never closed. If you open theide after the check was due, it performs it right away. The overall idea is to check as often as possible while keeping the minimal time between two checks as specified in the settings.

#16 Updated by Miroslav Fidler about 9 years ago

  • Status changed from Ready for QA to Approved

Also available in: Atom PDF