Issue 73693 - aquavcl01->modify Bundle tree for native version
Summary: aquavcl01->modify Bundle tree for native version
Status: CLOSED FIXED
Alias: None
Product: porting
Classification: Code
Component: MacOSX (show other issues)
Version: 680m196
Hardware: Mac Mac OS X, all
: P3 Trivial (vote)
Target Milestone: OOo 2.3
Assignee: obrmac
QA Contact: issues@porting
URL:
Keywords: aqua
Depends on:
Blocks: 74396
  Show dependency tree
 
Reported: 2007-01-20 21:57 UTC by eric.bachard
Modified: 2007-07-01 09:27 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
Patch to scp2 to tweak bundle structure (3.41 KB, patch)
2007-01-29 00:01 UTC, obrmac
no flags Details | Diff
Patch against aquavcl01 (m202) (2.43 KB, patch)
2007-03-27 21:12 UTC, obrmac
no flags Details | Diff
new patch after m208 resync (2.36 KB, patch)
2007-04-12 13:30 UTC, eric.bachard
no flags Details | Diff
New patch using OopenOffice.org instead of soffice as application name (2.37 KB, patch)
2007-04-13 16:46 UTC, eric.bachard
no flags Details | Diff
Correct fix instead of broken hack (2.97 KB, patch)
2007-04-14 07:07 UTC, moxfox
no flags Details | Diff
new patch: versioning + use OpenOffice.org (instead of soffice ) as application name (2.98 KB, patch)
2007-04-14 14:05 UTC, eric.bachard
no flags Details | Diff
should-be-fully-working patch, with _correct_ fixes (2.97 KB, patch)
2007-04-14 21:17 UTC, moxfox
no flags Details | Diff
Complete patch, verified on X11 too, including Mox's changes too (6.42 KB, patch)
2007-04-25 08:45 UTC, eric.bachard
no flags Details | Diff
Patch to rename soffice.bin to soffice-bin (19.61 KB, patch)
2007-05-29 23:05 UTC, obrmac
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description eric.bachard 2007-01-20 21:57:15 UTC
This issue is one of 10 most important issues to fix before first public release of native ( Aqua , without 
X11) version of OpenOffice.org on Mac OS X

To be fixed : the bundle we use currently with X11 version does not allow to launch Aqua version with a 
double click, because the tree has to be modified 

(see Pavel's script fixOOostart.sh )

To do : modify things in scp2 to make it work out of the box
Comment 1 eric.bachard 2007-01-20 22:12:29 UTC
Reassigning issue + add cloph on CC

ericb->obrmac

If I'm not too wrong, the mai work has to be done in scp2, and cloph is willing to help for that issue.
Can you see with him ?   Thanks in advance

Comment 2 eric.bachard 2007-01-22 11:43:07 UTC
Setting keyword
Comment 3 obrmac 2007-01-25 20:11:42 UTC
O.k., let's start.
Comment 4 obrmac 2007-01-29 00:00:48 UTC
The following patch (against m199) modifies the tree for both OSX version (aqua and X11) in the way that 
it treats the MacOS directory as "program" directory and thus moves everything up for one level.

The only aqua related thing is the replacement of "soffice" script with a symbolic link.

The only thing missing is a "sed" line which changes Info.plist to contain "soffice" instead of "droplet" for 
the aqua version. 
Comment 5 obrmac 2007-01-29 00:01:42 UTC
Created attachment 42533 [details]
Patch to scp2 to tweak bundle structure
Comment 6 lohmaier 2007-02-05 21:22:56 UTC
It doesn't seem to be necessary to move the stuff to different places.

Just modifying Info.plist to point to program/soffice.bin and building desktop
module is enough.

(probably when extracting the package from the dmg there are some other files
written that require the additional moving around of things - but when the
modified Info.plist is alread in the dmg, things work out-of-the-box)
Comment 7 shaunmcdonald131 2007-02-10 10:35:31 UTC
Adding to Meta Issue.
Comment 8 eric.bachard 2007-02-11 10:06:05 UTC
ericb->oliver

I have tested your patch, but something is wrong, and when I try to launch OpenOffice.org, I have a 
message saying the bundle is damaged.

Maybe some part is not at the good place ?
Comment 9 eric.bachard 2007-03-11 14:21:19 UTC
ericb->obrmac

Can me make a point for that issue ? 
Comment 10 obrmac 2007-03-12 00:44:14 UTC
I just confirmed that changing Info.plist in desktop to point to program/soffice
(with soffice being a symbolic link to soffice.bin) does also work for me. So I
am going to remove the tree relocating part from this patch.

BTW: changing Info.plist in the created bundle did not work for me, it seems the
change has to happen before osacompile ?! 

So I am going to introduce a s/droplet/program\/soffice/ in desktop unless this
causes problems for debugging with Xcode. Is the symbolic link approach sufficient
to work around Xcode's problem with '.' executables ?
Comment 11 obrmac 2007-03-27 21:12:56 UTC
Created attachment 43982 [details]
Patch against aquavcl01 (m202)
Comment 12 obrmac 2007-03-27 21:16:17 UTC
The second version of the patch includes changes in framework/desktop, but needs
to be updated as soon as aquavcl01 gets resynced.

For me, the office installed from the created dmg launches fine, but does not
have native menus.
Comment 13 eric.bachard 2007-03-28 12:32:58 UTC
ericb->obrmac

Oliver,

I tested your patch, and everything seem ok for me ( wizards, Base - just started - )

Short patch, big effects :  thank you very much : !  :)


@pavel : maybe we could resync with a recent milestone, then Oliver will adapt the patch to the last 
changes in desktop and instsetoo_native  (macosxversioning cws or something)  ?



P.S. :  for native menus, just comment Pavel changes in vcl/aqua/source/window/salmenu.cxx
Comment 14 eric.bachard 2007-04-12 13:30:25 UTC
Created attachment 44379 [details]
new patch after m208 resync
Comment 15 eric.bachard 2007-04-12 13:32:37 UTC
ericb->obrmac

I have adapted your patch to m208 (just two huncks to be modified ). 

A quick try let me see it works as expected : double click on the fina bundle, ... et hop  :) 

Can you confirm it is ok, and commit everything in aquavcl01 ?

Thanks
Comment 16 eric.bachard 2007-04-13 16:44:16 UTC
Michael Sicotte reported a bug with the previous patch : in the main menubar, we see soffice.

I'll attach a new patch to make OpenOffice.org appear instead  :-)
Comment 17 eric.bachard 2007-04-13 16:46:17 UTC
Created attachment 44417 [details]
New patch using OopenOffice.org instead of soffice as application name
Comment 18 moxfox 2007-04-14 07:07:31 UTC
Created attachment 44421 [details]
Correct fix instead of broken hack
Comment 19 moxfox 2007-04-14 07:09:49 UTC
The patch above fixes the issue properly. The aquabundle4.diff was a hack and broken.
Comment 20 eric.bachard 2007-04-14 07:16:42 UTC
ericb->mox

Explain why the previous patch was broken, instead of present things like you do is more constructive 
*for all*

Thanks in advance to keep that in mind.

Comment 21 eric.bachard 2007-04-14 14:05:02 UTC
Created attachment 44423 [details]
new patch:  versioning + use OpenOffice.org (instead of soffice ) as application name
Comment 22 eric.bachard 2007-04-14 14:06:32 UTC
ericb->mox

Thanks for the correct versioning, but this is not complete : we see soffice in the main menubar.

New patch fixing that is attached
Comment 23 moxfox 2007-04-14 21:17:21 UTC
Created attachment 44424 [details]
should-be-fully-working patch, with _correct_ fixes
Comment 24 obrmac 2007-04-16 19:16:31 UTC
As there were some more discussions on the list about this issue, can we please
summarize what exactly we want to achive with this patch ?

What exactly does not work when using the program/soffice approach ? And: wasn't
there an issue with gdb and '.' executables ?
Comment 25 eric.bachard 2007-04-25 08:45:57 UTC
Created attachment 44656 [details]
Complete patch, verified on X11 too, including Mox's changes too
Comment 26 eric.bachard 2007-04-25 08:47:08 UTC
Attached the IMHO correct patch.

All changes verified with Oliver. thanks to all contributors.
Comment 27 moxfox 2007-04-25 09:32:09 UTC
The latest patch looks good. 

Although I can't apply it to my test tree directly, because the patch has "+++
instsetoo_native_new/..." -style paths. It's a small thing, but a bit uncomfortable.
Comment 28 eric.bachard 2007-04-25 10:26:06 UTC
ericb->mox

How do you apply this patch ?

patch -p0 <i73693_test5.diff

in $SRC_ROOT works without any glitch on OpenOffice.org tree ... 

Comment 29 eric.bachard 2007-04-28 22:39:18 UTC
changes commited in aquavcl01

as discussed on IRC, Oliver will create a cws, and once integrated, the resync will solve everything.

IMHO, this issue is ( first step) fixed.

Comment 30 eric.bachard 2007-05-16 15:46:03 UTC
ericb->obr

did you find some time to create the cws we discussed ?
Comment 31 obrmac 2007-05-24 21:56:20 UTC
I commited a slightly modified version of test5.diff to CWS aquabundle, but will additionally change 
soffice.bin to soffice-bin before marking this issue as fixed.
Comment 32 eric.bachard 2007-05-24 22:16:45 UTC
ericb->obr

Ok, I'll check the sources, and test everything tomorrow afternoon (or later if
changes are not complete)
Comment 33 obrmac 2007-05-29 23:05:41 UTC
Created attachment 45501 [details]
Patch to rename soffice.bin to soffice-bin
Comment 34 obrmac 2007-05-29 23:10:38 UTC
The last patch renames soffice.bin to soffice-bin on MacOS X. However, I found a problem with the X11 
build: with this change, the "sofficerc" UNO bootstrap file is no longer recognized as matching to soffice-
bin, leading to the macosxrc.txt file (needed for aqua like colors) being ignored.

Assuming that we might consider renaming other ".bin" binaries to "-bin" as well, probably the right thing 
to do is to add "-bin" to the recognized file extension list in sal/rtl/source/bootstrap.cxx.
Comment 35 moxfox 2007-05-30 14:04:58 UTC
My understanding is that file extension is defined with the ".", not the amount
of letters. For example Mac OS X can have "foo.applescript", with the
.applescript correctly identified as an extension.

Thus, I thought soffice-bin would be treated as extensionless thing. 

Even if the "-bin" -extension would be specific to the OOo universe, are we
shooting our foot? I could imagine stuff silently breaking with Mac or non-Mac
platforms adding files like flash-bin-image.dat
Comment 36 obrmac 2007-05-30 15:06:29 UTC
Yeah, thought about that too. However, since soffice-bin _is_ currently treated
as extension-less thing, actually that is the problem: we would need to rename
"sofficerc" to "soffice-binrc" to get it recognizes again.

Another option would be to only use "soffice" for the binary, but how should we
name the start script for X11 then ?

OTOH we could reduce the risk of mis-interpretation by only treating "-bin" at
the end of the name as something to cut off. The existing code in rtl/bootstrap
does pretty much the same thing with ".exe" and ".bin" (and does not handle any
generic file extension).
Comment 37 rt 2007-05-30 15:34:21 UTC
I just stumbled about this issue without really understanding what it's all
about. But, please be very carefull in renaming something into -bin and take
that as 'extension'. I'm not sure what kind of tooling relies on '.' as
extension delimiter. Things like crash mail resolution, f.e. 
I do not know anything will break, but I'm afraid things may break.
Comment 38 moxfox 2007-05-30 16:29:48 UTC
Something that would make sense in the general UNIX world too:
Rename soffice to soffice.sh     (i.e. the shell script. Most people use the GUI
anyway)
Rename soffice.bin to soffice    (IMHO happens to be the most "Apple-like"
alternative too)

The above should work, if I understand the situation correctly.

A bit more Apple-likeness, would be to rename sofficerc to sofficerc.txt or some
other extension. But that's not so important though. 
Comment 39 obrmac 2007-05-30 22:34:11 UTC
I have submitted issue 77967 to discuss the Xcode problem further. For this issue, just ignored the latest 
patch (not commited).
Comment 40 eric.bachard 2007-06-05 07:25:06 UTC
Tested on X11 build : no problem so far

Issue verified fixed in aquabundle cws. Change will be integrated in both ( X11 and aqua versions )
Comment 41 pavel 2007-06-28 09:46:06 UTC
Aquabundle is now integrated. Can we close this issue now?
Comment 42 obrmac 2007-07-01 09:27:27 UTC
Yes.