Closed probonopd closed 3 years ago
And progress, Bar.app
runs on helloSystem when I take the missing library from helium.txz
on the ISO:
FreeBSD% '/home/user/Desktop/Bar.app/Bar'
2021-04-25 21:27:27.561 Bar[5608:802140000] Hello from Bar.app
2021-04-25 21:27:27.565 Bar[5608:802140000] this is a sample resource file
2021-04-25 21:27:31.231 Bar[5608:802140000] ReparentNotify
2021-04-25 21:27:31.231 Bar[5608:802140000] MapNotify
2021-04-25 21:27:31.231 Bar[5608:802140000] VisibilityNotify
2021-04-25 21:27:31.231 Bar[5608:802140000] VisibilityNotify
2021-04-25 21:27:31.233 Bar[5608:802140000] VisibilityNotify
2021-04-25 21:27:31.234 Bar[5608:802140000] ReparentNotify
2021-04-25 21:27:31.234 Bar[5608:802140000] MapNotify
2021-04-25 21:27:31.234 Bar[5608:802140000] VisibilityNotify
zsh: bus error '/home/user/Desktop/Bar.app/Bar'
The last line happens as soon as one clicks anywhere on the screen.
The launch command looks awesome :) I will update he.app.mk
to create that symlink for Filer compatibility!
Something is definitely broken - there should be another window showing the "crazy ones" image from the Resources dir. I get the same result now so it is not you.
The frameworks are still pretty buggy, especially the X stuff. Darling did a bunch of work on these as well. I may try to bring some of their changes over, but it is hard to see the diffs because they rearranged all the files.
Btw, when you throw a png (128x128 or 256x256) into Resources/Bar.png
then Filer will automagically use it as the application icon. (I was too lazy to implement any of the plist parsing so far.)
Nice! Good to know... I can add a "ICON=" to the Makefile that sets that up as well.
PS There's full plist parsing available in NSPropertyList in Foundation.framework ... just saying ;) It also understands how to load user prefs and such from ~/Library/*
Actually, not going to add ICON=
because it's easy to just list the icon file in the existing RESOURCES=
parameter. But I did make it create the top-level executable symlink.
LOL! I found why the other window wasn't displaying... I had forgotten to make an absolute path into a bundle-relative path. Try the latest one.
Thanks @mszoek The latest one gives:
ld-elf.so.1: Shared object "libCoreText.so" not found, required by "libAppKit.so"
FreeBSD% ldd '/home/user/Desktop/Bar.app/Contents/Helium/Bar' | grep not
libCoreText.so => not found (0)
libCoreData.so => not found (0)
libQuartzCore.so => not found (0)
libCFNetwork.so => not found (0)
Some rpaths not set?
FreeBSD% patchelf --print-rpath '/home/user/Desktop/Bar.app/Contents/Helium/Bar'
$ORIGIN/../Frameworks/AppKit.framework/Versions/Current:$ORIGIN/../Frameworks/CoreGraphics.framework/Versions/Current:$ORIGIN/../Frameworks/Onyx2D.framework/Versions/Current:$ORIGIN/../Frameworks/OpenGL.framework/Versions/Current:$ORIGIN/../Frameworks/Foundation.framework/Versions/Current:$ORIGIN/../Frameworks/CoreFoundation.framework/Versions/Current
This is what happens when I try to do things while recovering from a vaccine. :( OK, rebuilt with everything relative again. Hopefully this one will work and be worth it, because the app is not really that impressive! LOL
yuki% ldd Bar.app/Contents/Helium/Bar|grep Users
libAppKit.so => /Users/zoe/helium/examples/app/Bar.app/Contents/Helium/../Frameworks/AppKit.framework/Versions/Current/libAppKit.so (0x8002e5000)
libCoreGraphics.so => /Users/zoe/helium/examples/app/Bar.app/Contents/Helium/../Frameworks/CoreGraphics.framework/Versions/Current/libCoreGraphics.so (0x8006b6000)
libOnyx2D.so => /Users/zoe/helium/examples/app/Bar.app/Contents/Helium/../Frameworks/Onyx2D.framework/Versions/Current/libOnyx2D.so (0x8006d5000)
libOpenGL.so => /Users/zoe/helium/examples/app/Bar.app/Contents/Helium/../Frameworks/OpenGL.framework/Versions/Current/libOpenGL.so (0x80083a000)
libFoundation.so => /Users/zoe/helium/examples/app/Bar.app/Contents/Helium/../Frameworks/Foundation.framework/Versions/Current/libFoundation.so (0x80083e000)
libjpeg.so.62 => /Users/zoe/helium/examples/app/Bar.app/Contents/Helium/../Frameworks/Foundation.framework/Versions/Current/libjpeg.so.62 (0x800acc000)
libobjc.so.4.6 => /Users/zoe/helium/examples/app/Bar.app/Contents/Helium/../Frameworks/Foundation.framework/Versions/Current/libobjc.so.4.6 (0x800b64000)
libCoreFoundation.so => /Users/zoe/helium/examples/app/Bar.app/Contents/Helium/../Frameworks/CoreFoundation.framework/Versions/Current/libCoreFoundation.so (0x800b98000)
libCoreText.so => /Users/zoe/helium/examples/app/Bar.app/Contents/Helium/../Frameworks/CoreText.framework/Versions/Current/libCoreText.so (0x800bbd000)
libCoreData.so => /Users/zoe/helium/examples/app/Bar.app/Contents/Helium/../Frameworks/CoreData.framework/Versions/Current/libCoreData.so (0x800bc5000)
libQuartzCore.so => /Users/zoe/helium/examples/app/Bar.app/Contents/Helium/../Frameworks/QuartzCore.framework/Versions/Current/libQuartzCore.so (0x800c00000)
libCFNetwork.so => /Users/zoe/helium/examples/app/Bar.app/Contents/Helium/../Frameworks/CFNetwork.framework/Versions/Current/libCFNetwork.so (0x800c28000)
yuki% ldd Bar.app/Contents/Helium/Bar|grep /System
yuki%
Uploading now...
Thank you very mich for uploading https://github.com/mszoek/helium/releases/download/M1/Bar.app.tgz, an example application to see whether it can run on helloSystem. So exciting!
This is what currently happens when you run it:
Please add
libjpeg.so.62
to the bundle, since it doesn't seem to be a standard library on FreeBSD?I tried this workaround:
But it is not sufficient:
Thanks to the launch command, we now get the message on screen:
(For double-clicking to work in helloSystem Filer, I symlinked the main executable to the top-level directory of the
.app
bundle.)