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 [3]

Author Topic: Re: aMule 2.3.2 for mac compiled on macOS Sierra  (Read 65239 times)

titi75011

  • Approved Newbie
  • *
  • Karma: 1
  • Offline Offline
  • Posts: 18
Re: aMule 2.3.2 for mac compiled on macOS Sierra
« Reply #30 on: August 15, 2019, 02:55:16 AM »

It works very well. Thank you PepitoGrilloOSX!

Did you consider adding it to Homebrew?

What step did you follow to compile amule?
Logged

PepitoGrilloOSX

  • Approved Newbie
  • *
  • Karma: 7
  • Offline Offline
  • Posts: 19
Re: aMule 2.3.2 for mac compiled on macOS Sierra
« Reply #31 on: September 13, 2019, 06:39:43 PM »

PepitoGrilloOSX: Thank you very much for your builds, they are top notch!  :)

Thank you!
Nice to read that!
Logged

PepitoGrilloOSX

  • Approved Newbie
  • *
  • Karma: 7
  • Offline Offline
  • Posts: 19
Re: aMule 2.3.2 for mac compiled on macOS Sierra
« Reply #32 on: September 13, 2019, 07:06:52 PM »

It works very well. Thank you PepitoGrilloOSX!

Did you consider adding it to Homebrew?

What step did you follow to compile amule?

Thank you very much.
I actually didn't think about adding it to homebrew, but maybe I will try to...

My process is quite simple, and it is based on three steps:

1. Build cryptopp library (64 bits). One shot action (I use version 5.6.2)
2. Build the wxWidgets version that supports the 64 bits Cocoa version (now 3.0.4).
3. Build aMule (now 2.3.2) against that libraries, with the proper options.

Steps 3 & 4 are supported by two shell scripts that make the proper setup of the "configure" building utilities (wxWidgets & aMule) in order to build the final binary and pack it into an OSX app.
« Last Edit: September 13, 2019, 07:54:13 PM by PepitoGrilloOSX »
Logged

PepitoGrilloOSX

  • Approved Newbie
  • *
  • Karma: 7
  • Offline Offline
  • Posts: 19
Re: aMule 2.3.2 for mac compiled on macOS Sierra
« Reply #33 on: October 12, 2019, 07:33:43 PM »

New binaries for macos 10.15 (Catalina):

https://www.dropbox.com/s/wqnmnl3qom287hp/aMule-2.3.2-macOS_10.15-wxWidgets-3.0.4.zip?dl=0
https://www.dropbox.com/s/8wxxt6tadhjpmxk/aMuleGUI-amuled-2.3.2-macOS_10.15-wxWidgets-3.0.4.zip?dl=0

Remember, force UI Light Mode for aMule (with pure Dark Mode widgets are nearly unusable):

defaults write org.amule.aMule NSRequiresAquaSystemAppearance -bool YES
Logged

noblem

  • Newbie
  • Karma: 1
  • Offline Offline
  • Posts: 2
Re: aMule 2.3.2 for mac compiled on macOS Sierra
« Reply #34 on: October 14, 2019, 10:57:41 AM »

ed2kHelperScript.app no longer functions on Catalina due to the binary not being 64bit. After a bit of digging, I came across an old post that suggests this problem had been seen before when Apple dropped rosetta support, so the old PPC binary stopped working. As the binary is just compiled AppleScript, the fix was just use the AppleScript editor to export a new app with the required support and this is what has been shipped ever since. This didn't quite work when I tried it as the bit of scripts that used tell application "System Events" to work out the path to the ed2k binary didn't work any more, likely due to security changes

I was able to get it working with the below code AppleScript code


minimac:> osadecompile /Applications/aMule.app/Contents/MacOS/ed2kHelperScript.app
on open location theURL --error reporting shouldReport

   set thePath to POSIX path of ((path to me as text) & "::")
   set ed2kProgram to thePath & "ed2k"
   set theCommand to quoted form of ed2kProgram & " " & quoted form of theURL
   do shell script theCommand
   return

end open location


You can either paste the above into the script editor, and export as ed2kHelperScript.app, taking care to replace Info.plist in the new .app with that of the original one, or simply use the compiled version, which would need to go in /Applications/aMule.app/Contents/MacOS/ed2kHelperScript.app/Contents/MacOS assuming aMule is installed in the default location


https://www.dropbox.com/s/3emqjg7bykpke39/applet?dl=0


Logged

mr_hyde

  • Global Moderator
  • Full Member
  • *****
  • Karma: 12
  • Offline Offline
  • Posts: 108
Re: aMule 2.3.2 for mac compiled on macOS Sierra
« Reply #35 on: October 20, 2019, 05:03:11 PM »

[...]
I was able to get it working with the below code AppleScript code

[...]

You can either paste the above into the script editor, and export as ed2kHelperScript.app, taking care to replace Info.plist in the new .app with that of the original one, or simply use the compiled version, which would need to go in /Applications/aMule.app/Contents/MacOS/ed2kHelperScript.app/Contents/MacOS assuming aMule is installed in the default location

Uhm..m I'm wondering if we can "merge" the old applet file with the new one using "lipo" command to obtain a new universal binary containing ppc, i386 and x86_64.

I've just used

Code: [Select]
lipo applet <path to app generated using script editor>/Contents/MacOS/applet <path to current aMule app>/Contents/MacOS/ed2kHelperScript.app/Contents/MacOS/applet -create -output /tmp/applet

The obtained file seems to have all the architectures

Code: [Select]
file applet
applet: Mach-O universal binary with 3 architectures: [ppc:Mach-O executable ppc] [i386:Mach-O executable i386] [x86_64:Mach-O 64-bit executable x86_64]
applet (for architecture ppc): Mach-O executable ppc
applet (for architecture i386): Mach-O executable i386
applet (for architecture x86_64): Mach-O 64-bit executable x86_64

I'm also wondering if we need also to change some attribute in Info.plist (probably not, in the old one nothig seems related to architecture).

If this works we could replace the old applet in repository.


Bye,
  Mr Hyde
Logged

noblem

  • Newbie
  • Karma: 1
  • Offline Offline
  • Posts: 2
Re: aMule 2.3.2 for mac compiled on macOS Sierra
« Reply #36 on: October 21, 2019, 02:07:24 PM »


Uhm..m I'm wondering if we can "merge" the old applet file with the new one using "lipo" command to obtain a new universal binary containing ppc, i386 and x86_64.

I've just used

Code: [Select]
lipo applet <path to app generated using script editor>/Contents/MacOS/applet <path to current aMule app>/Contents/MacOS/ed2kHelperScript.app/Contents/MacOS/applet -create -output /tmp/applet

The obtained file seems to have all the architectures

Code: [Select]
file applet
applet: Mach-O universal binary with 3 architectures: [ppc:Mach-O executable ppc] [i386:Mach-O executable i386] [x86_64:Mach-O 64-bit executable x86_64]
applet (for architecture ppc): Mach-O executable ppc
applet (for architecture i386): Mach-O executable i386
applet (for architecture x86_64): Mach-O 64-bit executable x86_64

I'm also wondering if we need also to change some attribute in Info.plist (probably not, in the old one nothig seems related to architecture).

If this works we could replace the old applet in repository.


Bye,
  Mr Hyde

I don't see why merging the old and new applets using lipo wouldn't work, it seems to be exactly what it's designed to do and obviously has the advantage that the code will still work on older devices. I'm not sure who, if anyone is still using old 32bit only, or PCC Macs, but up until recently I was happily using a 2009 mini, so I'm sure there are older devices out there and it doesn't seem to be a big problem to ensure they are supported

The only potential issue I see is my AppleScript is slightly different to what we was there previously, but the old script work fine pre Catalina, so there's no real reason to change it...

Regards

Matt
Logged

Macadam29

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 1
Re: aMule 2.3.2 for mac compiled on macOS Sierra
« Reply #37 on: October 25, 2019, 08:58:44 AM »

Hi,

Can someone could post a tuto that explain step by step how to make working the old app on new catalina please.

Thanks in advance
Logged

mr_hyde

  • Global Moderator
  • Full Member
  • *****
  • Karma: 12
  • Offline Offline
  • Posts: 108
Re: aMule 2.3.2 for mac compiled on macOS Sierra
« Reply #38 on: October 27, 2019, 06:44:26 PM »


I don't see why merging the old and new applets using lipo wouldn't work, it seems to be exactly what it's designed to do and obviously has the advantage that the code will still work on older devices. I'm not sure who, if anyone is still using old 32bit only, or PCC Macs, but up until recently I was happily using a 2009 mini, so I'm sure there are older devices out there and it doesn't seem to be a big problem to ensure they are supported

The only potential issue I see is my AppleScript is slightly different to what we was there previously, but the old script work fine pre Catalina, so there's no real reason to change it...

Regards

Matt

Uhm, in my experiment (see http://forum.amule.org/index.php?topic=51877.msg153773#msg153773) I simply used the script code you posted in this discussion.

I just tried now the cmd "osadecompile" on the ed2khelper app currently present in GIT branch and the result is

Code: [Select]
on open location theURL --error reporting shouldReport
set theApp to me
set thePath to the path to theApp
tell application "System Events"
set thePath to the container of thePath
set thePosixPath to POSIX path of thePath
end tell
set ed2kProgram to thePosixPath & "/ed2k"
set theCommand to quoted form of ed2kProgram & " " & quoted form of theURL
do shell script theCommand
return
end open location

I can repeat again the lipo operation generating a new app from this decompiled...

EDIT: done, see attachment (just the applet file)

« Last Edit: October 27, 2019, 07:01:56 PM by mr_hyde »
Logged

PepitoGrilloOSX

  • Approved Newbie
  • *
  • Karma: 7
  • Offline Offline
  • Posts: 19
Re: aMule 2.3.2 for mac compiled on macOS Sierra
« Reply #39 on: November 03, 2019, 09:26:14 AM »

New binaries for macos 10.15 (Catalina), with patched ed2kHelperScript.app for 64 bits support:

https://www.dropbox.com/s/wqnmnl3qom287hp/aMule-2.3.2-macOS_10.15-wxWidgets-3.0.4.zip?dl=0
https://www.dropbox.com/s/8wxxt6tadhjpmxk/aMuleGUI-amuled-2.3.2-macOS_10.15-wxWidgets-3.0.4.zip?dl=0

Remember, force UI Light Mode for aMule (with pure Dark Mode widgets are nearly unusable):

defaults write org.amule.aMule NSRequiresAquaSystemAppearance -bool YES
Logged

mr_hyde

  • Global Moderator
  • Full Member
  • *****
  • Karma: 12
  • Offline Offline
  • Posts: 108
Re: aMule 2.3.2 for mac compiled on macOS Sierra
« Reply #40 on: November 03, 2019, 05:28:54 PM »

New binaries for macos 10.15 (Catalina), with patched ed2kHelperScript.app for 64 bits support

Did you use the applet I provided in previous post? Does it work? If the answer is yes I can create a pull request to update the current GIT branch (or feel free to do it by yourself), I have already a pull request to build aMule with wxWidgets 3.1.x (I've already done it for Mac Catalina and linux, still to try Windows).
Logged

PepitoGrilloOSX

  • Approved Newbie
  • *
  • Karma: 7
  • Offline Offline
  • Posts: 19
Re: aMule 2.3.2 for mac compiled on macOS Sierra
« Reply #41 on: November 03, 2019, 07:17:23 PM »

Yes, I used your applet to update the binary artifacts.
So, all the credit goes on side :) ...
Logged

mr_hyde

  • Global Moderator
  • Full Member
  • *****
  • Karma: 12
  • Offline Offline
  • Posts: 108
Re: aMule 2.3.2 for mac compiled on macOS Sierra
« Reply #42 on: November 03, 2019, 09:05:34 PM »

Logged

megamarty

  • Newbie
  • Karma: 0
  • Offline Offline
  • Posts: 2
Re: aMule 2.3.2 for mac compiled on macOS Sierra
« Reply #43 on: November 14, 2019, 11:35:17 PM »

Hi everyone!

I'm not very expert...  :-\

I've downloaded the patched widgets posted by PepitoGrilloOSX, but amule still gives me the error that there is not more space while saving the files I'm downloading.

I've checked and there is lot of space left.

Could you please help me out?

Thank you !!

(Sorry in advance if this question is already been replied to)
Logged
Pages: 1 2 [3]