aMule Bug Tracker - aMule
View Issue Details
0001803aMuleUtilitiespublic2019-10-14 11:122020-05-18 09:36
noblem 
 
normalminoralways
resolvedfixed 
OSXCatalina
2.3.2 
2.3.32.3.3 
11028
OSX Catalina
0001803: ed2kHelperScript.app needs to be updated for OSX Catalina
ed2kHelperScript.app no longer functions in OSX Catalina due to apple dropping support for 32bit applications. ed2kHelperScript.app is essentially compiled apple script, however the binary that's currently in the Git repo only has PPC and 32bit support

Additionally, even if the original apple script is exported as a 64bit binary, it silently fails, which appears to be down to the use of tell application "System Events" to determine the path to ed2k. I suspect this is down to security changes in Catalina, and is easily worked around
Any attempt to download ed2k:// URLs will fail as the helper application (ed2kHelperScript.app) isn't registered
ed2kHelperScript.app is basically just compiled AppleScript, the actual source code can be found in the below location and edited via the apple script editor, which can also be used to export a new .app file with the required 64 bit support

aMule.app/Contents/MacOS/ed2kHelperScript.app/Contents/Resources/Scripts/main.scpt

The below code, if exported from the script editor, doesn't require any special privilidges and restores functionality of the helper script (you may need to double click the new .app to register it)

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

If exporting the above via the script editor, then the Info.plist in the new .app directory should be replaced with that from the original. Alternatively, the attached applet can be used to replace the original (You can use osadecompile to verify the code), although as it's was exported on Catalina, it only contains 64bit code so it may be better to export on Mojave, which I believe would produce a universal PPC/32bit/64bit binary
No tags attached.
? applet (8,648) 2019-10-14 11:12
http://bugs.amule.org/file_download.php?file_id=380&type=bug
? applet.universal (24,996) 2019-10-15 13:10
http://bugs.amule.org/file_download.php?file_id=381&type=bug
Issue History
2019-10-14 11:12noblemNew Issue
2019-10-14 11:12noblemFile Added: applet
2019-10-15 13:10noblemFile Added: applet.universal
2019-10-15 13:10noblemNote Added: 0003735
2019-10-16 18:41noblemNote Added: 0003736
2019-12-02 15:35GonoszTopiNote Added: 0003745
2019-12-02 15:35GonoszTopiStatusnew => feedback
2019-12-02 15:35GonoszTopiResolutionopen => fixed
2019-12-02 15:35GonoszTopiTarget Version => 2.3.3
2020-05-18 09:34GonoszTopiStatusfeedback => resolved
2020-05-18 09:34GonoszTopiAssigned To => GonoszTopi
2020-05-18 09:36GonoszTopiFixed in Revision => 11028
2020-05-18 09:36GonoszTopiAssigned ToGonoszTopi =>
2020-05-18 09:36GonoszTopiFixed in Version => 2.3.3

Notes
(0003735)
noblem   
2019-10-15 13:10   
There are now two attachments to this bug report, applet is the AppleScript compiled on OSX Catalina, which results in a X86_64 binary. The second attachment was created on Mojave and is a Universal i386/x86_64 binary, so will work on older systems

The version of applet currently in git is a universal binary supporting both ppc and i386, but not x86_64, so doesn't work on Catalina, which is 64bit only. As the new binary lacks ppc support, it won't work on non-intel (i.e. ppc) Macs, although I believed these shipped prior to 2006, so this may not be an issue
(0003736)
noblem   
2019-10-16 18:41   
If anyone is wanting to use the attached applet on Catalina while waiting for something a bit more official, the following should hopefully get you up and running again.

* Download applet from the attachments
* From a finder window, browse to aMule.app in the Applications directory, right click and select "Show package contents"
* Open up the MacOS directory, fine ed2kHelperScript.app, right click and repeat the above
* Drag the downloaded applet file in to the MacOS directory of the ed2kHelperScript bundle
* Go back in finder to the contents of the aMule.app bundle and double click on ed2kHelperScript.app to register the helper, which should hopefully restore the ability to click and download ed2k links from Safari

From command line, you can simply copy applet to /Applications/aMule.app/Contents/MacOS/ed2kHelperScript.app/Contents/MacOS/ and then run the helper app (e.g. /Applications/aMule.app/Contents/MacOS/ed2kHelperScript.app)
(0003745)
GonoszTopi   
2019-12-02 15:35   
Revision 11028 (latest git code at the time of writing) has the applet updated. Please test.