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

Problems after upgrading to Sierra or High Sierra? Try these steps
Problems after upgrading to NeoOffice 2017? Try these steps
Download or installation problems? Try these steps


Support
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice
· Download latest patch
· User Guide
· User Guide Volume 2


RSS Feeds
· Announcements Only
· All Posts


  
NeoOffice :: View topic - How to change the BundleExecutable?
 SearchSearch   ProfileProfile   Log inLog in 

How to change the BundleExecutable?
 
Post new topic   Reply to topic    NeoOffice Forum Index -> NeoOffice Releases
View previous topic :: View next topic  
Author Message
eyeballkid
Guest





PostPosted: Tue Jan 09, 2007 10:23 am    Post subject: How to change the BundleExecutable? Reply with quote

Hi,
I have a rather simple Problem, but can't get it solved:
I'd like NeoOffice to start with the "-nodefault" parameter, which means without an empty writer-document...
I thought this should be done, by changing the CFBundleExecutable in the Info.plist inside of the NO-Bundle, from: "soffice.bin" to "soffice.bin -nodefault", which i did. I did not work.

I then tried to change that to something different, but without an argument, let's say an executable called "test" which does nothing, to find if the parameter was the problem. Doubleclicking the Bundle-Icon did still run NO like it used to before.
That for I believe CFBundleExecutable does not hold the BundleExecutable, which is a little strange (as it says it does!?).
So my question would be: where is the name of the file stored which is run, when I doubleclick on the NO-Icon?

I just tried renaming "soffice.bin" to "soffice.bin.start" and create a shell-script by the name of "soffice.bin" which does run "soffice.bin.start -nodefault". This works partially: It starts NO without a template, but the Bar-Icon is that of a Shell-Script and is named "soffice.bin.start". Which would be acceptable (and repairable, by renaming the file to NeoOffice, changing the script and giving it the Ship-Icon), if I could drop Documents on it, like I can with the normally started NO, this indeed does not work...

Can anybody give me a hand? Easiest would be if someone could tell me where I have to change the BundleExecutable...

Thanks in advance!
ebk
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11692
Location: California, USA

PostPosted: Tue Jan 09, 2007 10:32 am    Post subject: Reply with quote

I don't know if Apple's Info.plist supports passing of command line arguments. However, you might want to look through Apple's document at:

http://developer.apple.com/documentation/MacOSX/Conceptual/BPRuntimeConfig/index.html

Patrick
Back to top
View user's profile Send private message Visit poster's website
eyeballkid
Guest





PostPosted: Tue Jan 09, 2007 10:40 am    Post subject: Reply with quote

Thanks! But:
...even if it would, it doesn't seem as if the file stored in CFBundleExecutable is executated!? (I replaced it with "test" and it still started NO...)
Back to top
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11692
Location: California, USA

PostPosted: Tue Jan 09, 2007 10:55 am    Post subject: Reply with quote

eyeballkid wrote:
Thanks! But:
...even if it would, it doesn't seem as if the file stored in CFBundleExecutable is executated!? (I replaced it with "test" and it still started NO...)


The Mac OS X launch services daemon probably caches the Info.plist data so you will need to reboot to force Mac OS X to do a clean read of the Info.plist.

Patrick
Back to top
View user's profile Send private message Visit poster's website
eyeballkid
Guest





PostPosted: Tue Jan 09, 2007 11:19 am    Post subject: Reply with quote

I tried rebooting (and used a cache-cleaner).
It doesn't seem to work either. It still starts NO, though "test" is in CFBundleExecutable...
Back to top
yoxi
Cipher


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

PostPosted: Wed Jan 10, 2007 5:05 am    Post subject: Reply with quote

pluby wrote:
The Mac OS X launch services daemon probably caches the Info.plist data so you will need to reboot to force Mac OS X to do a clean read of the Info.plist.

FYI, there's a shortcut to doing this without need for a restart, which is to move the app to another folder and then back again to where it was (while it's not running, of course) - this seems to force a reload of info.plist on launch, and it saves a lot of time when one is experimenting with .plist entries.

- padmavyuha
Back to top
View user's profile Send private message
eyeballkid
Guest





PostPosted: Wed Jan 10, 2007 7:56 am    Post subject: Reply with quote

yoxi wrote:

FYI, there's a shortcut to doing this without need for a restart, which is to move the app to another folder and then back again to where it was (while it's not running, of course) - this seems to force a reload of info.plist on launch, and it saves a lot of time when one is experimenting with .plist entries.

- padmavyuha


Great! That does it...
Thank you alot!!!


For somebody might find it usefull, that's what I did:

I created a file called "soffice.bin-nodefault" (any name should work - it's just for me to remember what it's for) inside "/Applications/NeoOffice.app/Contents/MacOS" and put

Code:
#!/bin/sh
/Applications/NeoOffice.app/Contents/MacOS/soffice.bin -nodefault


inside and made it executable.
Then I changed "CFBundleExecutable" inside "Info.plist" (located in "/Applications/NeoOffice.app/Contents/") from "soffice.bin" to "soffice.bin-nodefault".

I moved the NeoOffice-Bundle into a temporary Folder and then back to the Applications-Folder.

->Starts without writer-template!



IMHO this is really usefull for there are several other helpfull commandline-arguments. One might want to start NO with an empty calc-template etc...
Back to top
OPENSTEP
The One
The One


Joined: May 25, 2003
Posts: 4752
Location: Santa Barbara, CA

PostPosted: Wed Jan 10, 2007 9:47 am    Post subject: Reply with quote

The Launch Services database may also get stale as you remove around applications. You can find some tips for how to manually rebuild it here.

ed
Back to top
View user's profile Send private message Visit poster's website AIM Address
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Wed Jan 10, 2007 12:23 pm    Post subject: Reply with quote

We might want to wiki that tip. It's not an every-day request, but there have been enough requests for me to remember them....

Note that if any patch update updates Info.plist, it will break that change, of course Wink

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
View user's profile Send private message Visit poster's website
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Wed Jan 10, 2007 3:22 pm    Post subject: Reply with quote

I added a brief summary of this thread to the bottom of the existing Launch Shortcuts article.

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
View user's profile Send private message Visit poster's website
lt_brian_x
Blue Pill


Joined: Mar 08, 2006
Posts: 1

PostPosted: Thu Dec 13, 2007 9:09 am    Post subject: documents and templates Reply with quote

Is it possible to launch into the "Templates and Documents" dialogue? It is in the NeoOffice>From Template... menu. It provides a nice starting interface for accessing any of the apps, templates, or docs.

I don't know if this is a good place for feature requests, but I think this would make a good default startup instead of launching into a text doc. Maybe a dialogue in preferences would allow choosing which app to start other than "Templates and Documents". However, "Templates and Documents" seems like a great default launch point.

That and why does the "My Documents" folder link to the user directory instead of the documents directory? This seems to be a point where OSX is in limbo between *nix and windows. What is the primary docs directory? Because OSX keeps music, pics, and vids outside of documents (unlike the windows "My Documents" folder), it would argue for the user directory. However, because applications drop so much crud in the OSX user directory (everything from printers to app config files), the user directory is too cluttered for my liking when I want to organize docs.

Sorry for the random post. I LOVE NeoOffice and appreciate all the work!

newb poster!
Back to top
View user's profile Send private message
jochenf
Blue Pill


Joined: Oct 03, 2008
Posts: 1

PostPosted: Fri Oct 03, 2008 6:10 am    Post subject: Reply with quote

The script shown above has 2 disadvantages:
1. It is not location independent, it assumes your NO is installed in /Applications.
2. It leaves a shell open while running NO

I would suggest the following script:
Code:
#!/bin/sh

cmd=`dirname "$0"`/soffice.bin
exec "$cmd" -nodefault "$@"

The first line determines the location of the executable, the second line starts NO and terminates the shell.
Back to top
View user's profile Send private message
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Sat Oct 04, 2008 2:45 pm    Post subject: Reply with quote

jochenf wrote:
The script shown above has 2 disadvantages:

I've added your commentary and improved script to the wiki.

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
View user's profile Send private message Visit poster's website
pluby
The Architect
The Architect


Joined: Jun 16, 2003
Posts: 11692
Location: California, USA

PostPosted: Sat Oct 04, 2008 3:04 pm    Post subject: Reply with quote

sardisson wrote:
jochenf wrote:
The script shown above has 2 disadvantages:

I've added your commentary and improved script to the wiki.


I forgot to add that jochenf's script is the same script that NeoOffice uses for its swriter, scalc, etc. scripts in the NeoOffice.app/Contents/MacOS folder so that script format has been very well tested. Wink

Patrick
Back to top
View user's profile Send private message Visit poster's website
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Sat Oct 04, 2008 4:38 pm    Post subject: Reply with quote

pluby wrote:
I forgot to add that jochenf's script is the same script that NeoOffice uses for its swriter, scalc, etc. scripts in the NeoOffice.app/Contents/MacOS folder so that script format has been very well tested. Wink

In that case, I think I'll just remove the previous script from the wiki and encourage everyone to use only this format.

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    NeoOffice Forum Index -> NeoOffice Releases All times are GMT - 7 Hours
Page 1 of 1

 
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.
Page Generation: 0.02 Seconds