touchHLE icon indicating copy to clipboard operation
touchHLE copied to clipboard

Issue with loading the fonts on Intel Mac

Open EyexPro opened this issue 9 months ago • 23 comments

I am having a problem upon starting the touchHLE unix file on Mac. I get the following error messages:

touchHLE::window: Driver info: OpenGL 2.1 INTEL-20.7.2 / Intel Inc. / Intel(R) Iris(TM) Plus Graphics 640 thread 'main' panicked at src/font.rs:76:13: Couldn't read bundled font file "touchHLE_fonts/LiberationSans-Regular.ttf": No such file or directory (os error 2). Perhaps the directory is missing? note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

Could anyone help me solve this problem?

EyexPro avatar Apr 29 '24 13:04 EyexPro

Perhaps the directory is missing?

This is the problem. touchHLE comes with certain bundled files (fonts, dynamic libraries, default options). You must extract the whole content of the ZIP file, not just the touchHLE executable, and you should keep the files together.

If you are using one of the unstable testing builds from GitHub Actions, you need to extract the ZIP file from a stable release first.

hikari-no-yume avatar Apr 29 '24 13:04 hikari-no-yume

Thank you so much for the quick reply! I have extracted all the files already, the fonts are there in the folder, but the error message still pops up. Can you send me a link for a stable release?

EyexPro avatar Apr 29 '24 13:04 EyexPro

https://github.com/touchHLE/touchHLE/releases

hikari-no-yume avatar Apr 29 '24 13:04 hikari-no-yume

Yes, this is the same one that I am trying to use, the latest release. Képernyőfotó 2024-04-29 - 15 42 21

EyexPro avatar Apr 29 '24 13:04 EyexPro

How are you running it?

hikari-no-yume avatar Apr 29 '24 13:04 hikari-no-yume

Hi, Could you please share as well what your launch command?

ciciplusplus avatar Apr 29 '24 13:04 ciciplusplus

I am trying to run the touchHLE unix file (exec) by clicking on it. If this is the wrong way to do it, please let me know.

EyexPro avatar Apr 29 '24 13:04 EyexPro

Uhh… that should work. I wonder if this is falling afoul of modern macOS trying to sandbox stuff downloaded from the internet.

If you right click on it and click Open, what happens?

hikari-no-yume avatar Apr 29 '24 14:04 hikari-no-yume

So, when I opened it initially, gatekeeper stepped in, but I could overwrite it in the settings, and launch the executable. I can see from the log that it tries to build the app selector interface, but it stops at the problem with the fonts, and gives the error message.

EyexPro avatar Apr 29 '24 14:04 EyexPro

Okay, I want to check something… if you open Terminal and type xattr -d com.apple.quarantine (include the final space, don't press enter), then drag and drop the touchHLE file into the window, then press Enter… does the problem disappear?

hikari-no-yume avatar Apr 29 '24 14:04 hikari-no-yume

Thank you for the suggestion, but sadly, I am still getting the same error. I am also receiving the "No such xattr: com.apple.quarantine" error in terminal or the "Not enough arguments for option -d. Expected at least 2 but got 1" error

EyexPro avatar Apr 30 '24 06:04 EyexPro

Képernyőfotó 2024-04-30 - 8 49 17

EyexPro avatar Apr 30 '24 06:04 EyexPro

Googling this error, you might want to try this:

codesign --force --deep --sign - /path/to/touchHLE.app

via: https://stackoverflow.com/a/64985297/1110655

nighto avatar Apr 30 '24 06:04 nighto

Are you on macOS Ventura?

hikari-no-yume avatar Apr 30 '24 06:04 hikari-no-yume

Nighto, thank you for the suggestion, sadly, still the same error. I am on Ventura, with no future upgrade path, this is the latest supported MacOS on my machine.

EyexPro avatar Apr 30 '24 06:04 EyexPro

Okay, my suggestion is to open a Terminal window, type cd (including the space), drag the folder containing touchHLE into the terminal, press enter, then type ./touchHLE and press enter again

hikari-no-yume avatar Apr 30 '24 07:04 hikari-no-yume

This is working! The app picker just opened. I could not get my Tower Bloxx New York .ipa to run, but this is still up to a great start. Thank you so much for the quick support

EyexPro avatar Apr 30 '24 07:04 EyexPro

This is the problem. touchHLE comes with certain bundled files (fonts, dynamic libraries, default options). You must extract the whole content of the ZIP file, not just the touchHLE executable, and you should keep the files together.

Are Asian language fonts expected to be a problem? The file picker refuses to come up for me when certain apps are in the directory (tested on Windows & Android), a commonality seems to be some sort of Japanese/English content. ErrorTouchHle

Jamirus238 avatar May 18 '24 15:05 Jamirus238

Please file a separate issue for that rather than commenting on this one. It's not the same issue.

hikari-no-yume avatar May 18 '24 17:05 hikari-no-yume

when I double click on the touchHLE.exec file it also gives me this error related to the font, but when using the ./touchHLE command instead in my terminal it does not appear

rachelombok avatar Aug 20 '24 03:08 rachelombok

There is no file called touchHLE.exec.

hikari-no-yume avatar Aug 20 '24 04:08 hikari-no-yume

Oh, I can reproduce the issue with double-clicking not working. Maybe it has to be run from the Terminal :/

I can try to fix that in the next release.

hikari-no-yume avatar Aug 20 '24 04:08 hikari-no-yume

Sorry wrong verbiage, when I click on the touchHLE exec file on mac, I get the error related to the font that OP described

rachelombok avatar Aug 20 '24 04:08 rachelombok