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 - Neooffice in universal binaries, one question more
Neooffice in universal binaries, one question more
 
   NeoOffice Forum Index -> NeoOffice Development
View previous topic :: View next topic  
Author Message
ovvldc
Captain Naiobi


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

PostPosted: Fri Aug 22, 2008 8:43 am    Post subject:

Just wondering: is it possible to install a NeoOffice Intel and a NeoOffice PPC and make a proxy icon in the Applications folder?

One that does nothing more than pass on the fact that it is being started on, or the file that it dropped on it, to another application.

You'd get a brief bouncing of two icons, but that would be the end of your inconvenience. Just thinking laterally here.

Best wishes,
Oscar

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


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Fri Aug 22, 2008 9:05 am    Post subject:

yoxi wrote:
I can think of various scripting solutions (that would rename the processor-appropriate version to NeoOffice the first time someone launches it, for example)

Easier would be a stub AppleScript app that checks the arch of the machine and launches the appropriate copy, and then just sit the stub app in the Dock.

The other problem with the multiple-apps scenario is the LaunchServices is very fickle about which copy of an application that it will set as the default to open docs by double-click, etc. It may end up preferring the Intel version on PPC Macs Razz

That, too, can be worked around; you can just copy the relevant sections of the NeoOffice Info.plist into the plist of your stub app and make sure that the stub app is installed after the actual NeoOffice apps (LaunchServices should prefer the last-installed app that claims it can handle a document type).

I'm not sure how often oihenart visits the forum, but you might send him a Private Message (many users have the trinity configured to email them on receipt of a PM) and see if he has any tips; he's been dealing with this problem in his schools for a couple of years now.

Smokey

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


Joined: Sep 07, 2004
Posts: 1799
Location: Dawlish, Devon

PostPosted: Fri Aug 22, 2008 9:51 am    Post subject:

I was thinking that the best way to avoid any LaunchServices palaver would be to have a stub app Called NeoOffice, which deletes the un-needed app the first time it's run, renames the needed one to NeoOffice, launches it, sets it to 'keep in the dock' and then deletes itself Smile. So after that, you've just got the right one for the job there, until the next clone update. This would be pretty much invisible to the user (it'd add a second or 2 to the first ever launch time). Is that workable?

- padmavyuha
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Fri Aug 22, 2008 10:17 am    Post subject:

yoxi wrote:
I was thinking that the best way to avoid any LaunchServices palaver would be to have a stub app Called NeoOffice, which deletes the un-needed app the first time it's run, renames the needed one to NeoOffice, launches it, sets it to 'keep in the dock' and then deletes itself Smile. So after that, you've just got the right one for the job there, until the next clone update. This would be pretty much invisible to the user (it'd add a second or 2 to the first ever launch time). Is that workable?


This gives me an idea. Install the Intel and PowerPC versions of NeoOffice and bury them in a subfolder of the /Applications folder. Then, add the following shell script lines to the /etc/rc.local file. This file gets executed by the root user at boot time and this command will make a /Applications/NeoOffice.app softlink to the correct installation depending on your machine type for all users on a machine. If the /etc/rc.local file will be on the Carbon Copy Cloner image, each machine that you clone to will get this script automatically.

Code:
if [ ! -d "/Applications/NeoOffice.app" ] ; then
  if [ `/usr/bin/uname -p` = "powerpc" ] ; then
    /bin/ln -sf "/path/to/PowerPC/NeoOffice.app" \
      "/Applications/NeoOffice.app"
  else
    /bin/ln -sf "/path/to/Intel/NeoOffice.app" \
      "/Applications/NeoOffice.app"
  fi
fi


Patrick
Back to top
JT
Red Pill


Joined: Aug 21, 2008
Posts: 6

PostPosted: Fri Aug 22, 2008 10:45 am    Post subject:

Thanks yoxi, ovvldc, and sardisson for the Applescript ideas. As outlined by the three of you it sounds like it might be quite a workable solution.

I should be able to deal with LaunchServices issues by manually assigning doc opening prefs through the Get Info and Open With prefs.

I'm dealing with Active Directory issues at the moment, but we haven't rolled out our image yet, so I try putting a script together and see how it works.

Thanks again!

BTW, sorry if my previous post got a little long and ranty-- beginning of the year is always a bit stressful.
Back to top
MacRat
Sake Horner
Sake Horner


Joined: Mar 02, 2006
Posts: 364
Location: Earth

PostPosted: Fri Aug 22, 2008 10:55 am    Post subject:

Note that the smart administration process would be to maintain separate images for PPC and Intel.

It's not a good idea to try to keep a single image for different platforms.

You're going to start running into software that will no longer be supported on PPC.

You're also going to have the issue that Mac OS 10.6 will be Intel only which once again supports the need to keep separate platform specific images.
Back to top
JT
Red Pill


Joined: Aug 21, 2008
Posts: 6

PostPosted: Fri Aug 22, 2008 11:23 am    Post subject:

Intriguing ideas yoxi and pluby! I'm a bit out of my element with the shell script stuff, but I started to poke around and see what I could implement.

First I copied the following heiarchy of files to the Applications folder on the master image:

> Neoresources
>>Intel
>>> Neooffice.app
>>PPC
>>>Neoofffice.app

Then I tried to find my rc.local file. After "cd" and "ls"ing my way around in Terminal I found that my etc directory contains rc.common and rc.netboot but not rc.local. So I assume I need to create my own rc.local file in etc, but when I tried guessing my way into an editor I ran into the limits of my scant Terminal abilities. "jove" apparently isn't an editor that comes with OS X. Very Happy

Sorry for being so ignorant-- how do I use an editor to create an rc.local file under Leopard?
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Fri Aug 22, 2008 11:33 am    Post subject:

JT wrote:
Then I tried to find my rc.local file. After "cd" and "ls"ing my way around in Terminal I found that my etc directory contains rc.common and rc.netboot but not rc.local. So I assume I need to create my own rc.local file in etc, but when I tried guessing my way into an editor I ran into the limits of my scant Terminal abilities. "jove" apparently isn't an editor that comes with OS X. Very Happy

Sorry for being so ignorant-- how do I use an editor to create an rc.local file under Leopard?


You are correct that you need to create this file. You will need to invoke administrator access in the Terminal to create this file so probably the easiest way to do this is to use the following steps:

1. Open the /Applications/TextEdit application, copy the lines into a new TextEdit document.

2. Select the Format :: Make Plain Text menu and then the File :: Save menu. When the Save dialog appears, set the Plain Text Encoding field to "Unicode (UTF-Cool" and save it anywhere you like.

3. Move the file that you saved (in the following example I assume you named it Untitled.txt and saved it to your Desktop) to /etc/rc.local using the following Terminal commands:

Code:
sudo cp ~/Desktop/Untitled.txt /etc/rc.local
sudo chown root:wheel /etc/rc.local


Note that with the first command Mac OS X will prompt you for your password to validate that you have administrator access.

Patrick
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Fri Aug 22, 2008 11:40 am    Post subject:

There are two things missing from my last post:

1. This forum put a smiley in the Plain Text Encoding selection. You should select "Unicode (UTF-8)".

2. Before rebooting, you can test if the command will work by executing the following Terminal command and then checking if NeoOffice.app appears in the /Applications folder in the Finder (note: the script will do nothing if there is a real NeoOffice.app already in the /Applications folder). After you run the command, press Command-Alt-Escape, click on Finder, and relaunch the Finder. If the script worked, there should be a NeoOffice.app icon in the Finder's /Applications folder and the icon will have a little arrow on it:

Code:
sudo sh /etc/rc.local


If you get any errors when testing the script, please post them.

Patrick
Back to top
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Fri Aug 22, 2008 2:20 pm    Post subject:

Once there's a solution (or solutions) here that are up and working, I'd like to get a page in the wiki about mass-deploying NeoOffice across multiple archs.

I'll go ahead and start a page and begin by describing the technical and resource-constraint reasons why there aren't UBs of Neo and then we can fill in the solution(s) later.

Smokey

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


Joined: Sep 07, 2004
Posts: 1799
Location: Dawlish, Devon

PostPosted: Fri Aug 22, 2008 2:34 pm    Post subject:

Good on yer... then all the folk who hit the same issue with OOo can get directed there too Smile
Back to top
JT
Red Pill


Joined: Aug 21, 2008
Posts: 6

PostPosted: Fri Aug 22, 2008 5:19 pm    Post subject:

Just wanted to give a status update-- so far on my Intel master Patrick's shell script seems to work perfectly. I left work with the master cloning to a PPC machine for further testing. I'll let everyone know how the PPC machine works on Monday, but so far all signs are positive!

Thanks Patrick one and all!
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11949

PostPosted: Fri Aug 22, 2008 6:05 pm    Post subject:

JT wrote:
Just wanted to give a status update-- so far on my Intel master Patrick's shell script seems to work perfectly. I left work with the master cloning to a PPC machine for further testing. I'll let everyone know how the PPC machine works on Monday, but so far all signs are positive!

Thanks Patrick one and all!


Good to hear that it works. One thing I am curious about is whether double-clicking on a NeoOffice file in the Finder will launch the right NeoOffice. Or will it sometimes launch the wrong one.

If so, let us know as I can modify the shell script to make sure the wrong one is ignored by the Finder.

Patrick
Back to top
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Fri Aug 22, 2008 11:44 pm    Post subject:

Draft page is here.

Patrick, is that 4 TB figure still correct (and is it per mirror, or total across all the mirrors)? I tried to find a recent mention here on trinity, but came up short....

Smokey

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


Joined: Apr 25, 2006
Posts: 2315
Location: Montpellier, France

PostPosted: Sat Aug 23, 2008 4:18 am    Post subject:

I think it is an average of 4 TB per mirror per month. With 250,000 downloads a month and 135 MB per download, I think the global figure should be more like 30 TB…
Back to top
Display posts from previous:   
   NeoOffice Forum Index -> NeoOffice Development All times are GMT - 7 Hours
Goto page Previous  1, 2, 3  Next
Page 2 of 3

 
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.