aMule Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

We're back! (IN POG FORM)

Pages: 1 [2]

Author Topic: mac_packager  (Read 17731 times)

mirko.g

  • Global Moderator
  • Full Member
  • *****
  • Karma: 6
  • Offline Offline
  • Posts: 188
  • Grattatio pallorum omnia mala repellent!
    • Personal WebSite
Re: mac_packager
« Reply #15 on: September 24, 2009, 10:46:06 AM »

Oh, it looks like I could have spared my explanations, you know well enough what you do...stupid me for not checking your code first.

Fortunately bash scripting is not new to me as Mac OS development...  :P

Quote
Reading this, grep -v '/usr/bin\|/any/other/system/directories' should do the job. I trust you know the relavant directories a lot better than me. ;-)

Seems to be. Looking at the list mirko.g quoted above, I'd change it to
Code: [Select]
grep -E -v '^\W*/System/|^\W*/usr/lib/'
to filter out system libraries, but that has to be verified by someone actually using mac_packager.

Inverting the sense of matching you won't filter object file names...
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: mac_packager
« Reply #16 on: September 24, 2009, 11:10:06 AM »

you won't filter object file names...
Should we? In my understanding otool -L doesn't produce object file names, nor does the example provided by you show any.
Logged
concordia cum veritate

mirko.g

  • Global Moderator
  • Full Member
  • *****
  • Karma: 6
  • Offline Offline
  • Posts: 188
  • Grattatio pallorum omnia mala repellent!
    • Personal WebSite
Re: mac_packager
« Reply #17 on: September 24, 2009, 11:29:44 AM »

Should we? In my understanding otool -L doesn't produce object file names, nor does the example provided by you show any.

I simply cut away the last line.
Code: [Select]
$ otool -L *
amule:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 123.0.0)
/opt/local/lib/libz.1.dylib (compatibility version 1.0.0, current version 1.2.3)
/opt/local/lib/libupnp.3.dylib (compatibility version 4.0.0, current version 4.5.0)
/opt/local/lib/libthreadutil.2.dylib (compatibility version 5.0.0, current version 5.3.0)
/opt/local/lib/libixml.2.dylib (compatibility version 3.0.0, current version 3.4.0)
/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
/System/Library/Frameworks/Carbon.framework/Versions/A/Carbon (compatibility version 2.0.0, current version 152.0.0)
/System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa (compatibility version 1.0.0, current version 15.0.0)
/System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
/System/Library/Frameworks/WebKit.framework/Versions/A/WebKit (compatibility version 1.0.0, current version 531.9.0)
/opt/local/lib/libiconv.2.dylib (compatibility version 8.0.0, current version 8.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
/usr/lib/libobjc.A.dylib (compatibility version 1.0.0, current version 227.0.0)
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 44.0.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 550.0.0)
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices (compatibility version 1.0.0, current version 38.0.0)
/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation (compatibility version 300.0.0, current version 751.0.0)
/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit (compatibility version 45.0.0, current version 1038.0.0)
ed2k:
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 123.0.0)
/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices (compatibility version 1.0.0, current version 44.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.9.0)
/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation (compatibility version 150.0.0, current version 550.0.0)
otool: can't map file: ed2kHelperScript.app (Invalid argument)
This is the normal output of otool even with one object only.
I should get rid of that error too... maybe this works:
Code: [Select]
for i in $( otool -L aMule.app/Contents/MacOS/* 2> /dev/null \
| sort -u | grep -E '/opt/local/|/usr/local/|libwx_' | cut -d " " -f 1 ); do
cp $i aMule.app/Contents/Frameworks;
done
for i in $( otool -L aMule.app/Contents/Frameworks/* 2> /dev/null \
| sort -u | grep -E '/opt/local/|/usr/local/|libwx_' | cut -d " " -f 1 ); do
cp $i aMule.app/Contents/Frameworks;
done
« Last Edit: September 24, 2009, 11:31:49 AM by mirko.g »
Logged

GonoszTopi

  • The current man in charge of most things.
  • Administrator
  • Hero Member
  • *****
  • Karma: 169
  • Offline Offline
  • Posts: 2685
Re: mac_packager
« Reply #18 on: September 24, 2009, 12:13:35 PM »

I should get rid of that error too...

Ok, using
Code: [Select]
grep -E -v '^\W*/System/|^\W*/usr/lib/|^\w'
will get rid of anything not indented (including error messages) besides system libraries (/System/*, /usr/lib/*). What do you think?
Logged
concordia cum veritate

mirko.g

  • Global Moderator
  • Full Member
  • *****
  • Karma: 6
  • Offline Offline
  • Posts: 188
  • Grattatio pallorum omnia mala repellent!
    • Personal WebSite
Re: mac_packager
« Reply #19 on: September 24, 2009, 12:15:28 PM »

Logged

mirko.g

  • Global Moderator
  • Full Member
  • *****
  • Karma: 6
  • Offline Offline
  • Posts: 188
  • Grattatio pallorum omnia mala repellent!
    • Personal WebSite
Re: mac_packager
« Reply #20 on: September 24, 2009, 01:24:20 PM »

About GeoIP support, this works with libgeoip from MacPorts only and I don't know were the self-compiled version can store GeoIP.dat:
Code: [Select]
$ mkdir aMule.app/Contents/Resources/GeoIP
$ cp -p /opt/local/share/GeoIP/GeoIP.dat aMule.app/Contents/Resources/GeoIP

I don't know if this was in you intentions but it would be great if mac_packager toke care of extra tools too (otherwise, why should we compile them???  :P).
This is what I usually do by hand, for aMule:
Code: [Select]
$ cp src/amuled aMule.app/Contents/MacOS/
$ cp src/utils/aLinkCreator/src/alcc aMule.app/Contents/MacOS/
$ cp src/utils/cas/cas aMule.app/Contents/MacOS/
$ cp src/utils/fileview/mulefileview aMule.app/Contents/MacOS/

aMuleGUI:
Code: [Select]
$ cp src/amulegui aMuleGUI.app/Contents/MacOS/
$ cp src/amulecmd aMuleGUI.app/Contents/MacOS/
$ cp -R src/webserver aMuleGUI.app/Contents/Resources/

wxCas:
Code: [Select]
$ cp src/utils/wxCas/src/wxcas WxCas.app/Contents/MacOS/
aLinkCreator:
Code: [Select]
cp src/utils/aLinkCreator/src/alc aLinkCreator.app/Contents/MacOS/
And for every app I repeat step 3 to 5 of mac_packager.
Do I miss anything else?

(my last revision)
« Last Edit: September 24, 2009, 03:20:34 PM by mirko.g »
Logged

Stu Redman

  • Administrator
  • Hero Member
  • *****
  • Karma: 214
  • Offline Offline
  • Posts: 3739
  • Engines screaming
Re: mac_packager
« Reply #21 on: September 24, 2009, 11:10:48 PM »

About GeoIP support, this works with libgeoip from MacPorts only and I don't know were the self-compiled version can store GeoIP.dat:
SVN is downloading the latest GeoIP.dat itself and stores it in aMule's config folder so don't bother packaging it.  :)
Logged
The image of mother goddess, lying dormant in the eyes of the dead, the sheaf of the corn is broken, end the harvest, throw the dead on the pyre -- Iron Maiden, Isle of Avalon

mr_hyde

  • Global Moderator
  • Full Member
  • *****
  • Karma: 12
  • Offline Offline
  • Posts: 105
Re: mac_packager
« Reply #22 on: September 29, 2009, 04:39:04 AM »

Don't know if this can be useful: I rememmber that a user (gtoso) wrote a mac_packager to package not only the monolithic amule...
Try to give a look at http://gtoso.tor.it/pub/amule/osx/svn/OSXBuild/

Bye,
  Mr Hyde
Logged

mirko.g

  • Global Moderator
  • Full Member
  • *****
  • Karma: 6
  • Offline Offline
  • Posts: 188
  • Grattatio pallorum omnia mala repellent!
    • Personal WebSite
Re: mac_packager
« Reply #23 on: September 29, 2009, 07:49:23 PM »

Don't know if this can be useful: I rememmber that a user (gtoso) wrote a mac_packager to package not only the monolithic amule...
Try to give a look at http://gtoso.tor.it/pub/amule/osx/svn/OSXBuild/

Thanks, good starting point... I was going the same direction: I will save a lot of time... ;)
Logged
Pages: 1 [2]