Thanks for sending it. We will take a look at it. Note that it may take a bit of time as we are trying to get Patch 4 and now NeoOffice 2.2.5 out the door in the next few weeks but we will look at it in our spare moments.
Hi-
Just wondering if you guys had gotten around to looking at the installer- I know your busy with updates, but I was just wondering.
I have only taken a cursory look at it as I have been swamped getting NeoOffice 2.2.5 released and NeoOffice 3.0 Early Access ready for release in November.
Maybe Ed can tell us if he has any time to take a look at it?
Joined: May 25, 2003 Posts: 4752 Location: Santa Barbara, CA
Posted: Mon Oct 06, 2008 10:00 pm Post subject:
Oh, my bad! I totally missed it! I have my mail filters configured in such a way that it routed it into the wrong box in my Mail client...many apologies!!
I think the approach looks great...if run a second time after a reboot or the like curl will see the download has completed and will just reopen the completed disk image.
Here's some initial feedback:
In the shell script phase we'll need to add in a "uname -p" check to branch out to PowerPC versus Intel download URLs. I can give a sample of this for you if you'd prefer...I've done it in makefiles quite a bit
Although it seems that it's using only standard actions, when I try to launch the prepackaged on 10.4 it crashes, or when open the application in Automator it complains that it was saved with a newer version and is missing resources (although all the three items seem fine to me). Any chance we could recreate the prepackaged on a 10.4 system? Then we could deploy to 10.4 and 10.5 without problems
Is it best to save to the Desktop? I don't know if it's possible to actually redirect to the Downloads folder...I think that wasn't standard behaviour until 10.5. Is that true? If so, then Desktop it is! Desktop is better than /tmp since the temp directories would get cleaned out across reboots, which is probably not what you want.
Dunno if this is "helpful" or "annoying"...perhaps install the app as a login item? E.g. install it as the first step, then remove it as a login item after the curl. That way if the machine is shut down or restarted the download would recommence on next login. That might be overkill. I'm just wondering as to how to trap potential error codes and then display a warning to the user they need to relaunch to re-start the download. I very well may be missing a step in the workflow, however.
All of the above said, I think it's definitely a great help for users who are afraid of the terminal for entering the curl command and mounting the resulting disk image similar to how Safari will do it. I think I may just be expanding too much in my thoughts on the above
Is the feedback helpful? Too picky? Expanding the concept too much?
[*]Is it best to save to the Desktop? I don't know if it's possible to actually redirect to the Downloads folder...I think that wasn't standard behaviour until 10.5. Is that true? If so, then Desktop it is! Desktop is better than /tmp since the temp directories would get cleaned out across reboots, which is probably not what you want.
The OS has had a downloads folder, well, since the advent of InternetConfig. It just didn't have a "standard" one until 10.5 (and if you change what is set as the downloads folder in 10.5, well-behaved applications still use your folder instead of hard-coding to ~/Downloads).
I can't remember if AppleScript on 10.4 includes "path to downloads folder" or if that's only on 10.5, but if so you could use AppleScript to query the downloads folder (and then convert that to a quoted form POSIX path).
Among LaunchServices's many failings is the fact that it lacks a command-line tool to meaningfully read or manipulate the LS database and Internet Config settings.... I'm not sure if you can reliably get a human-readable home page out of reading the InternetConfig prefs themselves.
Smokey _________________ "[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Sorry- but I have virtually no experience with 'uname -p', however I am a quick learner, so if you show me some samples I should catch on fairly quickly (hopefully )
I can recreate the workflow with an older version of Automator- that is no problem.
About the desktop, if you look at the cURL script that you provide on the site- it automatically is set to save to the Desktop. I never thought to change it because I viewed it as as easier- especially to the masses who may not have the Downloads folder easily accessible, etc., but the Desktop is right there and kind of hard to miss.
I think it would be a bad idea to install this as a login item- generally in the case of a reboot or shutdown the user should know to open the installer again- otherwise they don't want to download NeoOffice that badly
These are my thoughts on what you said, so if you tell me what you think- then I can get started right away!
Sorry- but I have virtually no experience with 'uname -p', however I am a quick learner, so if you show me some samples I should catch on fairly quickly (hopefully )
Like the command on the website, "uname" is a Terminal command. So, when you execute "uname -p" in a Terminal, it will output either "i386" or "powerpc". If you get "i386", download the .dmg file with "Intel" in the name. If you get "powerpc", download the .dmg file with "PowerPC" in the name.
Hope that helps.
rab777hp wrote:
About the desktop, if you look at the cURL script that you provide on the site- it automatically is set to save to the Desktop. I never thought to change it because I viewed it as as easier- especially to the masses who may not have the Downloads folder easily accessible, etc., but the Desktop is right there and kind of hard to miss.
I think it would be a bad idea to install this as a login item- generally in the case of a reboot or shutdown the user should know to open the installer again- otherwise they don't want to download NeoOffice that badly
The OS has had a downloads folder, well, since the advent of InternetConfig. It just didn't have a "standard" one until 10.5 (and if you change what is set as the downloads folder in 10.5, well-behaved applications still use your folder instead of hard-coding to ~/Downloads).
I can't remember if AppleScript on 10.4 includes "path to downloads folder" or if that's only on 10.5, but if so you could use AppleScript to query the downloads folder (and then convert that to a quoted form POSIX path).
Haha
On 10.5, that just returns the path to the Downloads folder (that is, ~/Downloads, the one everyone can find by guessing) rather than the default downloads folder specified by the OS So much for well-behaved
Beyond that, your point about the Desktop being unmissable is reasonable, though I'd make sure that you indicate somewhere (in the documentation, or in a dialogue in the app, or even just in the filename ["Download NeoOffice to the Desktop" or something]) that the download will end up on the Desktop, since otherwise I'd really expect any app to download to my downloads folder and it would be hard for me to find something on my Desktop that I wasn't expecting there
Smokey _________________ "[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Joined: May 25, 2003 Posts: 4752 Location: Santa Barbara, CA
Posted: Wed Oct 08, 2008 11:15 pm Post subject:
Yeah I hear the thoughts on both just going to the Desktop and against doing the login item...sounds fine to me
I notice you're using the bash shell in the Run Shell Script action. Here's a guide on if statements in bash.
To use the uname stuff, add a line to the top of the shell script section like this:
Code:
if [ "`/usr/bin/uname -p`" == "powerpc" ]; then THEURL="http://www.neooffice.org/neojava/en/mirrors.php?file=NeoOffice-2.2.4-PowerPC.dmg&curl=NeoOffice-2.2.4-PowerPC.dmg"; else THEURL="http://www.neooffice.org/neojava/en/mirrors.php?file=NeoOffice-2.2.4-Intel.dmg&curl=NeoOffice-2.2.4-Intel.dmg"; fi
That's all one line That sets the shell variable THEURL to point to either the PowerPC or the Intel image as appropriate.
Next we'll add another line and variable to set the name of the output image:
Code:
if [ "`/usr/bin/uname -p`" == "powerpc" ]; then THEDMG="NeoOffice-2.2.4-PowerPC.dmg"; else THEDMG="NeoOffice-2.2.4-Intel.dmg"; fi
Now change the curl to proceed off of those but without generating any text output. This will be important in the last step:
Now, we add a new final line to the Run Shell Script phase to dump out the path to the downloaded image:
Code:
echo -n "~/Desktop/$THEDMG"
That final step is important...notice that now the option being downloaded is potentially two different names...it's not fixed, so this means we have to change step 2 of the workflow. We can't use Get Specified Finder Items in a 10.4 compatible workflow...Automator variables don't exist until 10.5 Since we no longer can assume a fixed name for the downloaded file we can't use Get Specified Finder Items to locate the disk image.
So...we added the "echo" to the Run Shell Script phase so its outlet will be the path to the file so we can feed it into the next action. Unfortunately, there are no built-in conversions that will take Text and convert it into a File/Folder type for further Finder Automator actions. We need to do this conversion manually.
Replace step 2 with a "Run AppleScript" action. We'll write an AppleScript snippet to do our conversion from a path to a file object. Here's the code:
Code:
on run {input, parameters}
set T to (input as text)
set theAlias to (POSIX file T)
return {(theAlias as alias)}
end run
For the curious, what this is doing is changing the single line path into a single element list of aliases that is returned on the outlet. This is the type corresponding to "Files/Folders" and can be used with any action taking that type as an inlet.
There might be a typo here and there in the above, but I think that should be enough to get things working.
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