Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

This website is an archive and is no longer active
NeoOffice announcements have moved to the NeoOffice News website


Support
· Forums
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


  
NeoOffice :: View topic - Shorten/reduce 15-step Upgrade/Install workflow
Shorten/reduce 15-step Upgrade/Install workflow
 
   NeoOffice Forum Index -> NeoOffice New Feature Requests
View previous topic :: View next topic  

Do you agree or disagree that this would be a good improvement?
strongly agree
50%
 50%  [ 1 ]
agree
50%
 50%  [ 1 ]
don't care
0%
 0%  [ 0 ]
disagree
0%
 0%  [ 0 ]
strongly disagree
0%
 0%  [ 0 ]
Total Votes : 2

Author Message
djpimley
The Anomaly
(earlier version)


Joined: Jun 11, 2006
Posts: 481
Location: Great Britain

PostPosted: Tue Jan 24, 2012 5:17 pm    Post subject:

sardisson wrote:
I think the spinner should go away when the progress bar is showing

I agree.
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Tue Jan 24, 2012 6:09 pm    Post subject:

djpimley wrote:
sardisson wrote:
I think the spinner should go away when the progress bar is showing

I agree.


I will try to make that change in the next test patch when I rework the actual download code to use libcurl.

Also in the next test patch I am planning to replace using the "/usr/bin/open" command with the "/usr/bin/hdiutil" command to mount the downloaded .dmg file. By using the /usr/bin/hdiutil command, I can verify that the .dmg file can actually be opened and, if not, redownload or display an error dialog.

Patrick
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Wed Feb 01, 2012 11:31 am    Post subject:

FYI. I have added resumable downloading to the new patch download window. With the latest test patch, you should be able to click press the Cancel button and then, if you try to redownload the same file, the download will resume where the last download of the same file failed or was cancelled.

Note: this resumable download only works reliably when downloading files from one of the neooffice.org mirrors. If you navigate to the NeoOffice 3.1.2 download page and download that version from one of our mirrors, resumable downloads will not work with about half of our mirrors.

Some implementation details for those who are curious: while I had planned to use libcurl to handle resuming previously cancelled or failed downloads, I found that avoiding collisions between the native NSURLDownload download threads and the libcurl download threads would be difficult and error prone so I implemented the resumable downloads using Mac OS X's native NSURLDownload class.

Not surprisingly, getting NSURLDownload to work reliably was no easy task. It works great if a site requires no login like our patch downloads and free older version downloads. However, most of the work involved in adding resumable downloads was in getting the NSURLDownload class to work with our main installer download which requires a login. Apparently, Safari does not use NSURLDownload and uses custom code to handle resumable downloads. Sad

Like the last test patch, to test out my latest changes you will need to do the following steps:

1. Download and install the following test patch:

Intel:
http://joe.neooffice.org/test/NeoOffice-3.2.1-Patch-3-Test-3-Intel.dmg

2. Download the following "versionrc" file to your Desktop by pasting the following command in a Terminal window and pressing the Return key. This file will be used to fool NeoOffice to act as if you have not installed the latest official patch:

Code:
cd ~/Desktop ; curl -O http://joe.neooffice.org/test/versionrc


3. In the Finder, right-click or Control-click on the NeoOffice application and in the popup menu that appears, select the "Show Package Contents". Then, navigation into NeoOffice's "Contents/MacOS" subfolder. Drag the "versionrc" file that you downloaded into step 2 into this subfolder. You will be prompted to replace the file and then to authenticate that you are a Mac OS X administrator.

4. If step 3 succeeds, select NeoOffice's Help :: Check for Updates menu. the dialog that appears should say that NeoOffice 3.2.1 Patch 3 is available. Press the Download button and you should see the patch download page running in a floating window similar to the NeoOffice Mobile floating window and the patch should be automatically downloaded to your Downloads folder.

Patrick
Back to top
djpimley
The Anomaly
(earlier version)


Joined: Jun 11, 2006
Posts: 481
Location: Great Britain

PostPosted: Wed Feb 01, 2012 2:47 pm    Post subject:

Tested with success. I clicked the download button and NO detected that I had the file in my Downloads folder already (from the previous test I did.) I deleted that file and relaunched NO, did a partial download and cancelled, quit. Relaunched NO and resumed the download. The download completed and mounted.
Back to top
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Wed Feb 01, 2012 3:07 pm    Post subject:

:sigh:

I had a whole long reply typed out and "delete = back" just ate it because I wasn't focused in the textarea when I thought I was.

The feature, however, is really slick! Smile

I successfully stopped (by pressing the Cancel button) and resumed (by pressing the Back button, and by starting fresh from the "Check for Updates…" menu item) several times, and each time the download was successfully resumed from the correct spot. I also tested with a completely downloaded .dmg in the Downloads folder, and there was no downloading, only (re-)mounting of the .dmg.

Only using the spinner for non-determinate operations looks good. It's much less crowded now during real downloads.

One thing I noticed, which I'm not sure if it's a problem or not: closing the floating window with a download in progress doesn't cancel the download. I'm not sure what people's expectations are (I'm not sure what my expectations are, TBH), but I just wanted to note it.

I don't have a bad network available to really stress-test the resuming (I think we need Oscar for that Wink ), but it seems to work really well here Very Happy

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Wed Feb 01, 2012 4:22 pm    Post subject:

sardisson wrote:
One thing I noticed, which I'm not sure if it's a problem or not: closing the floating window with a download in progress doesn't cancel the download. I'm not sure what people's expectations are (I'm not sure what my expectations are, TBH), but I just wanted to note it.


I think cancelling downloads when the window is closed is a good idea. I can also easily add that in the NeoOffice Mobile window as well.

My next step is to open the downloaded .dmg file using the "hdiutil" command so that I can detect any errors in the downloaded bytes. I will include your idea and use of the "hdiutil" command in my next test patch.

Patrick
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Wed Feb 08, 2012 4:55 pm    Post subject:

FYI. I have uploaded a new test patch that implements opening of downloaded .dmg files using the "hdiutil" command. With this change, the .dmg will now silently appear on the desktop without any Mac OS X dialogs appearing. This change isn't very visually different than before, but this change allows the our code to find the path to the .pkg directory that will need to be installed when I implement running the installer on the next NeoOffice restart.

In this test patch I have also streamlined the patch installer itself by have the installer skip the "readme" and "license" panels. Skipping these panels removes 3 button clicks and since the user will have already clicked through these panels in the main installer, I felt that there wasn't much harm in removing them. If people like this streamlined patch installer, I will make the same changes to the language pack installers in the next version of NeoOffice.

The streamlining of the patch installer is likely going to be important as I found that running the Mac OS X command line installer is not likely going to work. The reason is not technical but is, instead, a visual issue. I found that while the command line installer does generate some parseable output, the user won't see any of the output so we would have to create a GUI application to authenticate the user and display the installation status. Essentially, we would have to write a GUI application that would like very similar to the existing patch installer so streamlining the patch installer and running the patch installer in GUI mode seems like the rational direction to take at this point.

Like the last test patch, to test out my latest changes you will need to do the following steps:

1. Download and install the following test patch:

Intel:
http://sally.neooffice.org/test/NeoOffice-3.2.1-Patch-3-Test-4-Intel.dmg

2. Download the following "versionrc" file to your Desktop by pasting the following command in a Terminal window and pressing the Return key. This file will be used to fool NeoOffice to act as if you have not installed the latest official patch:

Code:
cd ~/Desktop ; curl -O http://sally.neooffice.org/test/versionrc


3. In the Finder, right-click or Control-click on the NeoOffice application and in the popup menu that appears, select the "Show Package Contents". Then, navigation into NeoOffice's "Contents/MacOS" subfolder. Drag the "versionrc" file that you downloaded into step 2 into this subfolder. You will be prompted to replace the file and then to authenticate that you are a Mac OS X administrator.

4. If step 3 succeeds, select NeoOffice's Help :: Check for Updates menu. the dialog that appears should say that NeoOffice 3.2.1 Patch 3 is available. Press the Download button and you should see the patch download page running in a floating window similar to the NeoOffice Mobile floating window and the patch should be automatically downloaded to your Downloads folder.

Patrick
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Thu Feb 09, 2012 11:08 am    Post subject:

So now that the our code is able to directly managing the opening of the download .dmg file and verify that the .dmg was mountable and, if so, find the .pkg folder inside the .dmg file, I can now implement running the installer in the .pkg folder.

I think that the workflow is a bit rough right now so I wanted to get feedback on some of the changes I was thinking of putting in the next test patch:

1. After a successful download, close the download window and display a modal dialog that asks if the user wants to install the update now or later. If now, NeoOffice will invoke the same code as as the Quit menu and if the user does not cancel the quitting process, NeoOffice will shutdown and restart.

2. On restart, the same .dmg management code will be used to located the .dmg file's installer and, if the installer can still be found, launch the installer.

3. Once the installer is finished or the user has quit the installer, NeoOffice launches normally.

Am I missing anything or are there some small changes that anyone thinks would make the update process smoother than what is in the latest patch or in what I am proposing to do next?

Patrick
Back to top
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Thu Feb 09, 2012 1:47 pm    Post subject:

pluby wrote:
If people like this streamlined patch installer, I will make the same changes to the language pack installers in the next version of NeoOffice.

YES! YES! YES! (I say this without even having tested the new installer; that's always been one of my least favorite things about installing new versions, all the clicking through the same stuff over again in the language packs.)

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Thu Feb 09, 2012 3:02 pm    Post subject:

pluby wrote:
1. After a successful download, close the download window and display a modal dialog that asks if the user wants to install the update now or later. If now, NeoOffice will invoke the same code as as the Quit menu and if the user does not cancel the quitting process, NeoOffice will shutdown and restart.

I was going to ask if you could also close the OOo update window at this point, but it looks like the latest patch already does this Smile

pluby wrote:
2. On restart, the same .dmg management code will be used to located the .dmg file's installer and, if the installer can still be found, launch the installer.

3. Once the installer is finished or the user has quit the installer, NeoOffice launches normally.

This is the part that's going to be the trickiest UI/UE-wise, I think, particularly in the case where the user had previously said "Not Now" after downloading the update.

As I understand the process (is this right?), on restart, NeoOffice will load normally, mount the .dmg and initiate the install process, and then quit so that the install process can proceed (because right now nothing will install if Neo is running), and, once the install process is finished, launch Neo again automatically. (Will it launch automatically for all types of installs, or just automated patch installs? E.g., if langpacks use the same installer going forward, I'd like to be able to install multiple languages without having to wait for Neo to launch and then quit it between installing each language.)

What happens in the event that the user said "Not Now" after downloading the patch, quit later after finishing some work, and the next day opens NeoOffice by double-clicking a document(s) (or drag to the Dock, or command-line, or whatever), not remembering that this next launch was going to be a non-working-session launch that runs the installer. Since this is the next restart, the patch installer is going to get launched, Neo is going to be quit, then updated, and then relaunched…what about the documents the user was opening? Will they be remembered properly and reopened by the automatic relaunch?

Those are the general questions that come to mind about step 2/3 right now, based on my understanding of how the process is going to work.

Oh, and yes, Patch-3-Test-4 worked as expected with the switch to hdiutil; the dmg was successfully mounted without the "mounting" UI Smile

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Thu Feb 09, 2012 11:12 pm    Post subject:

sardisson wrote:
As I understand the process (is this right?), on restart, NeoOffice will load normally, mount the .dmg and initiate the install process, and then quit so that the install process can proceed (because right now nothing will install if Neo is running), and, once the install process is finished, launch Neo again automatically. (Will it launch automatically for all types of installs, or just automated patch installs? E.g., if langpacks use the same installer going forward, I'd like to be able to install multiple languages without having to wait for Neo to launch and then quit it between installing each language.)

What happens in the event that the user said "Not Now" after downloading the patch, quit later after finishing some work, and the next day opens NeoOffice by double-clicking a document(s) (or drag to the Dock, or command-line, or whatever), not remembering that this next launch was going to be a non-working-session launch that runs the installer. Since this is the next restart, the patch installer is going to get launched, Neo is going to be quit, then updated, and then relaunched…what about the documents the user was opening? Will they be remembered properly and reopened by the automatic relaunch?


You have identified some very important scenarios. It is pretty straightforward handling the case where the user selects the "install now" option. I would create a small terminal command that NeoOffice executes and it waits for its parent process (NeoOffice) to quit. It then reads the file containing a list of .dmg files that is kept in the NeoOffice preferences folder and mounts each .dmg and invokes each installer in each .dmg in the list.

Unfortunately, the scenarios in your post are making it clear to me that when the user selects the "install later" option and restarts NeoOffice sometime in the future, forcing the user to wait for the installers to run could cause a lot of irritation and/or inconvenience for our users.

I have been grappling with how to handle these "install later" issues for some time and, to be honest, I had not come up with any approach that really handled any of the scenarios in your post very smoothly. So today I tried to take a fresh look at what possible approaches are available to us and after focusing on the scenarios in your post, I now think that the smoothest approach would be to not run the installer immediately upon relaunch.

How would the installers get run if the user selects the "installer later" option and we don't run the installers immediately upon relaunch? The answer is that we would wait until after NeoOffice has finished normal launch and loaded documents triggered by any native open document events. At that point, the patch check module gets initialized and in that initialization code we can look for the file with the list of downloaded .dmg files. If there are any .dmg files listed in that file and those files exist, we can display the same "install now or later?" dialog that the user saw when they originally downloaded the .dmg files.

My thinking is that by waiting until after the normal NeoOffice launch process completes, the user is more likely to select the "install now" option. But if they really need to get some work done now, having the "install later" option there so the user can defer installation until the next relaunch of NeoOffice will cause a lot fewer angry users.

Does that sound like a reasonable way to smoothly handle the "install later" scenarios that you identified?

As for how the terminal command that runs the installers will work, there are some other issues. Running multiple installers in - a patch, a language pack, and a full installer - can be done. However, the order in which they run is unpredictable since the Mac OS X installer tool will only let one installer proceed at a time and that may not necessarily be in the same order as the installers were launched.

I am not worried about errors when multiple installers run since I can probably implement some code to detect which items are regular installers so that I can run only those in one pass and defer patches and language packs. This would be necessary since the main installers launch NeoOffice. The question is do we really need to automatically launch NeoOffice after running a group of patch and/or language pack installers? Or is it safer to let the user decide if and when to relaunch after installation completes?

Patrick
Back to top
djpimley
The Anomaly
(earlier version)


Joined: Jun 11, 2006
Posts: 481
Location: Great Britain

PostPosted: Fri Feb 10, 2012 2:41 pm    Post subject:

pluby wrote:
Does that sound like a reasonable way to smoothly handle the "install later" scenarios that you identified?

That seems good to me. Another plus point of your suggestion is that doing this will present a more consistent UI to the user (in all scenarios they will see a familiar "install now or later?" dialog.)
Back to top
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Fri Feb 10, 2012 3:25 pm    Post subject:

pluby wrote:
My thinking is that by waiting until after the normal NeoOffice launch process completes, the user is more likely to select the "install now" option. But if they really need to get some work done now, having the "install later" option there so the user can defer installation until the next relaunch of NeoOffice will cause a lot fewer angry users.

Does that sound like a reasonable way to smoothly handle the "install later" scenarios that you identified?

Yes, that sounds good.

pluby wrote:
The question is do we really need to automatically launch NeoOffice after running a group of patch and/or language pack installers? Or is it safer to let the user decide if and when to relaunch after installation completes?

At least in the case where the user previously chose "Not Now" and quit Neo, then launched Neo again (the next day, or whatever) and let Neo apply the patch, it's reasonable to assume the user wanted NeoOffice running.

In the "Install Now" case, most other (non-Apple) applications that alert you to updates while the app is running and let you install them right now also default to relaunching the app after the update is installed.

So I think that after applying a patch, user expectations are probably to relaunch.

In terms of langpacks, I guess, thinking more about it, most users probably don't apply multiple langpacks, and when they do apply a langpack, they probably expect to get right to work with that language now working. I don't know about admins doing deployments and such, but they already have to deal with the main NeoOffice binary installer launching Neo after installation, so they're used to it, and unless they're installing multiple langpacks too, it's not going to be a lot more of a pain.

So, maybe, for now, just make langpacks act 100% the same as patches, and see if it ends up bothering anyone else. With langpacks now going to skip several screens, it's probably going to be break-even for me with relaunching, and I'm ok with break-even instead of lost time Wink

Smkey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
ovvldc
Captain Naiobi


Joined: Sep 13, 2004
Posts: 2352
Location: Zürich, CH

PostPosted: Fri Feb 10, 2012 4:06 pm    Post subject:

Another option may be to allow the user to start the update on closing NeoOffice. Basically same process, but ask on exit, rather than or (in addition to) start. Windows 7 does this, applying patches either when the user wants or on shutdown.

Also, I wonder if it is possible to make the patch check before loading documents, and saving those documents for opening at relaunch if the user selects 'install now'. If you do want to upgrade at once, opening the documents is a waste of time.

_________________
"What do you think of Western Civilization?"
"I think it would be a good idea!"
- Mohandas Karamchand Gandhi
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Sat Feb 11, 2012 10:19 am    Post subject:

sardisson wrote:
So, maybe, for now, just make langpacks act 100% the same as patches, and see if it ends up bothering anyone else. With langpacks now going to skip several screens, it's probably going to be break-even for me with relaunching, and I'm ok with break-even instead of lost time Wink


Having the patches and language packs launch NeoOffice is very easy to implement (I just need to copy a few Terminal commands from the main installer) and we can even rebuild the NeoOffice 3.2.1 language packs so that all of the latest version's installers relaunch after installation.

Also, having NeoOffice be launched from within the patch and language patch installers is a lot more reliable way ensure relaunch. The reason is that we would use the /usr/bin/open command (or its NSWorkspace class equivalent) to launch the installer and since both of those return immediately and do not wait until the installer tool finishes the installation, trying to monitor when the installation is done is likely to be hacky and unreliable.

ovvldc wrote:
Another option may be to allow the user to start the update on closing NeoOffice. Basically same process, but ask on exit, rather than or (in addition to) start. Windows 7 does this, applying patches either when the user wants or on shutdown.

Also, I wonder if it is possible to make the patch check before loading documents, and saving those documents for opening at relaunch if the user selects 'install now'. If you do want to upgrade at once, opening the documents is a waste of time.


Unfortunately, moving the patch checking earlier in the startup has the same problem as doing it immediately upon startup. Since Apple's open document events do not get received by NeoOffice until windows start appearing on the screen, the NeoOffice code will not know what open document events trigger launching if we move the patch checking earlier in the startup process.

However, I really like the idea of running the installer after quitting NeoOffice. I have confirmed that the patch checking module can get notifying when the user wants to quit NeoOffice and, if the user had selected the "install after quitting" option earlier, we could put a dialog with "do you want to install the update now?" option. If the user clicks the "yes" button, we run the installer. The "no" button is there for when they are logging out of or shutting down their Mac and running the installer would prevent doing that.

The one question that I have about running after quitting NeoOffice is will it be too weird to have NeoOffice relaunch after the installer runs? Hopefully relaunch is no big deal but I ask the question because there is no way to turn off the relaunch behavior in the installer that we need to add to implement the approach that Smokey suggested.

sardisson wrote:
....I don't know about admins doing deployments and such, but they already have to deal with the main NeoOffice binary installer launching Neo after installation, so they're used to it, and unless they're installing multiple langpacks too, it's not going to be a lot more of a pain.


For those who have to maintain many Macs, I highly recommend that they look at using Mac OS X's "installer" Terminal command. When our installer is run using the installer Terminal command, NeoOffice does not launch at the end of installation. Also, IT staff can use the installer Terminal command to install system updates if they download the system update .dmg file form Apple's support site. They can even put the NeoOffice and/or system update .dmg files on a remote volume and either manually or an /etc/periodic script use the "hdiutil" command to mount the .dmg file and the installer command to run the installer in each .dmg file.

Patrick
Back to top
Display posts from previous:   
   NeoOffice Forum Index -> NeoOffice New Feature Requests All times are GMT - 7 Hours
Goto page Previous  1, 2, 3, 4, 5  Next
Page 3 of 5

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.