Builds for native Apple silicon #656

Open
opened 2021-05-04 01:59:24 +02:00 by sam1am · 13 comments
sam1am commented 2021-05-04 01:59:24 +02:00 (Migrated from github.com)

Native builds for Apple silicon.

Native builds for Apple silicon.
simonSlamka commented 2021-07-18 04:08:12 +02:00 (Migrated from github.com)

+1 on this

+1 on this
radnor commented 2021-11-04 19:37:21 +01:00 (Migrated from github.com)

You can do this yourself by following one of the items under Build instructions.

The only modification you'll need to do is adding a copy command (copied from #587) to address missing files in QMLTermWidget:

mkdir cool-retro-term.app/Contents/PlugIns
cp -r qmltermwidget/src/qmldir qmltermwidget/lib/kb-layouts qmltermwidget/lib/color-schemes qmltermwidget/src/QMLTermScrollbar.qml qmltermwidget/QMLTermWidget
cp -r qmltermwidget/QMLTermWidget cool-retro-term.app/Contents/PlugIns
open cool-retro-term.app
You can do this yourself by following one of the items under [Build instructions](https://github.com/Swordfish90/cool-retro-term#build-instructions-macos). The only modification you'll need to do is adding a copy command (copied from #587) to address missing files in QMLTermWidget: ``` mkdir cool-retro-term.app/Contents/PlugIns cp -r qmltermwidget/src/qmldir qmltermwidget/lib/kb-layouts qmltermwidget/lib/color-schemes qmltermwidget/src/QMLTermScrollbar.qml qmltermwidget/QMLTermWidget cp -r qmltermwidget/QMLTermWidget cool-retro-term.app/Contents/PlugIns open cool-retro-term.app ```
wjwOffline commented 2022-07-01 04:33:17 +02:00 (Migrated from github.com)

any one need a native build?I have build a dmg use qt 5.15.5

any one need a native build?I have build a dmg use qt 5.15.5
simonSlamka commented 2022-07-01 08:14:11 +02:00 (Migrated from github.com)

any one need a native build?I have build a dmg use qt 5.15.5

Is it signed?

> any one need a native build?I have build a dmg use qt 5.15.5 Is it signed?
wjwOffline commented 2022-07-01 08:24:30 +02:00 (Migrated from github.com)

sorry, I haven't register the Apple Developer Program,you can build it with qt 5.15.5 for yourself , it works.

> sorry, I haven't register the Apple Developer Program,you can build it with qt 5.15.5 for yourself , it works.
Mario-SO commented 2022-09-06 12:44:42 +02:00 (Migrated from github.com)

Could you share it please?

Could you share it please?
Justtheflu commented 2022-09-08 21:12:36 +02:00 (Migrated from github.com)

any one need a native build?I have build a dmg use qt 5.15.5

yes please.

> any one need a native build?I have build a dmg use qt 5.15.5 yes please.
ngocphamm commented 2022-12-27 17:59:13 +01:00 (Migrated from github.com)

I was able to build in on Ventura 13.1 with Qt installed via brew install qt@5 (version 5.15.7 as of now) using the original instructions. I found out I didn't have to copy those extra files like what @radnor said, and the app still runs.

cp -r qmltermwidget/src/qmldir qmltermwidget/lib/kb-layouts qmltermwidget/lib/color-schemes qmltermwidget/src/QMLTermScrollbar.qml qmltermwidget/QMLTermWidget.

However, I found some issues with some special characters I use for my ZSH prompt, like », , etc.

It renders fine (below) if

  • I run it from another Terminal, here Alacritty using open cool-retro-term.app
  • If I run the Intel built app (downloaded as .dmg from Releases) using Rosetta (this is in a virtual machine to test, I do not have Rosetta installed on my main M1 machine)

It does not render the chracters if I run it directly (double click the app, or via Spotlight/Alfred launcher).

This somehow seems like a shell issue, but I have no idea where to start yet. It also does not happen on my Intel mac.

CleanShot 2022-12-27 at 11 53 39

I was able to build in on Ventura 13.1 with Qt installed via `brew install qt@5` (version `5.15.7` as of now) using the original [instructions](https://github.com/Swordfish90/cool-retro-term#build-instructions-macos). I found out I didn't have to copy those extra files like what @radnor said, and the app still runs. `cp -r qmltermwidget/src/qmldir qmltermwidget/lib/kb-layouts qmltermwidget/lib/color-schemes qmltermwidget/src/QMLTermScrollbar.qml qmltermwidget/QMLTermWidget`. However, I found some issues with some special characters I use for my ZSH prompt, like `»`, `✘`, etc. It renders fine (below) if * I run it from another Terminal, here Alacritty using `open cool-retro-term.app` * If I run the Intel built app (downloaded as `.dmg` from Releases) using Rosetta (this is in a virtual machine to test, I do not have Rosetta installed on my main M1 machine) It does not render the chracters if I run it directly (double click the app, or via Spotlight/Alfred launcher). This somehow seems like a shell issue, but I have no idea where to start yet. It also does not happen on my Intel mac. ![CleanShot 2022-12-27 at 11 53 39](https://user-images.githubusercontent.com/395123/209697438-fd38ab69-0bfa-491b-b2a9-fd53d632817b.png)
axxyhtrx commented 2023-08-28 11:14:18 +02:00 (Migrated from github.com)

UP

UP
iamthebot commented 2023-08-29 23:24:11 +02:00 (Migrated from github.com)

@ngocpham just created #809 to track this issue (powerline fonts broken).

@ngocpham just created #809 to track this issue (powerline fonts broken).
IgorMuzyka commented 2023-11-01 06:29:47 +01:00 (Migrated from github.com)

On macOS 14.1 Sonoma.
Just built it trying what @radnor suggested.
Installed qt via brew by doing brew install qt5 & brew link qt5 --force and applying suggested change(export PATH="/opt/homebrew/opt/qt@5/bin:$PATH") to .zshrc.
At first font's were broken, but then i did macdeployqt cool-retro-term.app -qmldir=app/qml -dmg as build instructions suggest.
Which actually breaks the resulting .app inside the .dmg for me.
But after doing this 3-5 times and then skipping macdeployqt step i finally got it working.

Seems to me that macdeployqt does some crucial step, so building after running it again gave me a working variation where font's arrent bugged.

Here's a proof screenshot.
screenshot 2023-11-01 at 07 20 14
By the way i'm using monospaced MesloLGMDZ Nerd Font Mono which is icon patched version of Menlo.
You can see icons are fine and starship.rs prompt isn't glitched or missing.
Also you may see that architecture is arm64 which indicates that i indeed just built this and it isn't running in Rosetta mode as version from releases page.

@ngocphamm @iamthebot i believe #809 is a false positive, and build instructions can probably be adapted to reproduce working app every time.

Just noticed:

  • When launching from terminal via open cool-retro-term.app - font's work fine
  • Opening from finder - font's bugged.
On macOS 14.1 Sonoma. Just built it trying what @radnor suggested. Installed qt via brew by doing `brew install qt5` & `brew link qt5 --force` and applying suggested change(`export PATH="/opt/homebrew/opt/qt@5/bin:$PATH"`) to `.zshrc`. At first font's were broken, but then i did `macdeployqt cool-retro-term.app -qmldir=app/qml -dmg` as build instructions suggest. Which actually breaks the resulting .app inside the .dmg for me. But after doing this 3-5 times and then skipping `macdeployqt` step i finally got it working. Seems to me that `macdeployqt` does some crucial step, so building after running it again gave me a working variation where font's arrent bugged. Here's a proof screenshot. <img width="1136" alt="screenshot 2023-11-01 at 07 20 14" src="https://github.com/Swordfish90/cool-retro-term/assets/4402333/3072b8b9-aee1-4028-8cde-5a9705c71947"> By the way i'm using _monospaced_ `MesloLGMDZ Nerd Font Mono` which is icon patched version of `Menlo`. You can see icons are fine and `starship.rs` prompt isn't glitched or missing. Also you may see that architecture is `arm64` which indicates that i indeed just built this and it isn't running in Rosetta mode as version from releases page. @ngocphamm @iamthebot i believe #809 is a false positive, and build instructions can probably be adapted to reproduce working app every time. Just noticed: - When launching from terminal via `open cool-retro-term.app` - font's work fine - Opening from finder - font's bugged.
runofthemillgeek commented 2024-02-02 21:59:33 +01:00 (Migrated from github.com)

I narrowed this down to the env variable that's needed to avoid breaking the font—LC_CTYPE.

You can simulate the "no icons" condition by running:

env -i open cool-retro-term.app

and it will load without icons as if it were launched directly from Finder. But if I run:

env -i "LC_CTYPE=UTF-8" open cool-retro-term.app

then the icons appear as expected.

I thought the following should account for this but it doesn't seem to be. I installed Qt 5.15.12 via brew, so maybe this isn't getting set when pre-processing?

f157648d1e/app/main.cpp (L45-L48)

Anyway, to set this variable globally at least on newer macOS versions (I'm using Sonoma right now), you need to create a file /Library/LaunchDaemons/setenv.LC_CTYPE.plist with the following contents:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"\>
  <plist version="1.0">
  <dict>
  <key>Label</key>
  <string>setenv.LC_CTYPE</string>
  <key>ProgramArguments</key>
  <array>
    <string>/bin/launchctl</string>
    <string>setenv</string>
    <string>LC_CTYPE</string>
    <string>UTF-8</string>
  </array>
  <key>RunAtLoad</key>
  <true/>
  <key>ServiceIPC</key>
  <false/>
</dict>
</plist>

Save it. Then run the following command for this to take effect globally even after reboots:

launchctl load -w /Library/LaunchDaemons/setenv.LC_CTYPE.plist

Now if you open the app directly from Finder or from Spotlight, it'll load fonts correctly.

CleanShot 2024-02-03 at 02 28 18@2x

I narrowed this down to the env variable that's needed to avoid breaking the font—`LC_CTYPE`. You can simulate the "no icons" condition by running: ```sh env -i open cool-retro-term.app ``` and it will load without icons as if it were launched directly from Finder. But if I run: ```sh env -i "LC_CTYPE=UTF-8" open cool-retro-term.app ``` then the icons appear as expected. I thought the following should account for this but it doesn't seem to be. I installed Qt 5.15.12 via `brew`, so maybe this isn't getting set when pre-processing? https://github.com/Swordfish90/cool-retro-term/blob/f157648d1e51878a10e02a8836c1e15aa8c59cc9/app/main.cpp#L45-L48 Anyway, to set this variable globally at least on newer macOS versions (I'm using Sonoma right now), you need to create a file `/Library/LaunchDaemons/setenv.LC_CTYPE.plist` with the following contents: ```xml <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"\> <plist version="1.0"> <dict> <key>Label</key> <string>setenv.LC_CTYPE</string> <key>ProgramArguments</key> <array> <string>/bin/launchctl</string> <string>setenv</string> <string>LC_CTYPE</string> <string>UTF-8</string> </array> <key>RunAtLoad</key> <true/> <key>ServiceIPC</key> <false/> </dict> </plist> ``` Save it. Then run the following command for this to take effect globally even after reboots: ```sh launchctl load -w /Library/LaunchDaemons/setenv.LC_CTYPE.plist ``` Now if you open the app directly from Finder or from Spotlight, it'll load fonts correctly. ![CleanShot 2024-02-03 at 02 28 18@2x](https://github.com/Swordfish90/cool-retro-term/assets/2759499/2ddeb6a6-5a97-45dc-8679-9ff2192ac8f2)
runofthemillgeek commented 2024-06-11 17:37:00 +02:00 (Migrated from github.com)

Looks like launchctl load gets reset if you upgrade the OS. Have to run it again.

Looks like `launchctl load` gets reset if you upgrade the OS. Have to run it again.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: seeseemelk/cool-retro-term#656
No description provided.