-
-
Save porteusconf/cd1de43d4cab3cce8a3454a672d550f7 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash | |
## Put this qgle.command in /Applications and in Terminal: | |
### chmod a+x /Applications/qgle.command | |
### assumes you installed gle in /usr/local/cellar and did brew link similar to following... | |
## brew diy --name=gle --version=4.3.0 | |
## mkdir /usr/local/Cellar/gle | |
## cd /usr/local/Cellar/gle | |
## tar zxf gle_macosx_4.3.0_x64.tar.bz2 # download newest tarball from sourceforge | |
## mv /usr/local/Cellar/gle/gle-4.3 /usr/local/Cellar/gle/4.3.0 | |
## brew link gle | |
### After you have done the above, then you should see a symlink like this: | |
### ls -l /usr/local/opt/gle ### | |
### lrwxr-xr-x /usr/local/opt/gle -> ../Cellar/gle/4.3 | |
### And if so, then next line should open the gui qgle.app | |
export GLE_TOP=/usr/local/opt/gle; open /usr/local/opt/gle/bin/qgle.app | |
echo "/usr/local/opt/gle/qgle.app should be running..." | |
sleep 7 | |
exit |
Using curl will avoid macos warnings/quarantines of "untrusted" binary executables, like gle and qgle.app files.
cd /Users/Shared/
curl -LJO https://github.com/vlabella/GLE/releases/download/4.3.3/gle-4.3.3-Darwin.zip
unzip gle-4.3.3-Darwin.zip
cd /Users/Shared/gle-4.3.3-Darwin/bin
./gle. --version
open. qgle.app/
Both gle and qgle.app should run without you having to allow them in SysPrefs->Security. I think this is because:
"There is no quarantining flag for a CLI app downloaded with curl." per https://stackoverflow.com/questions/67446317/why-are-executables-installed-with-homebrew-trusted-on-macos
== How to fix fonts warning from qgle on macos ==
On macos 12 (aka "monterey"), we saw warning below in Terminal (running qgle
inside `qgle.app/Contents/Macos). Warning can only be easily seen in terminal, and is not seen or hidden/discarded when lauching the app by double-click of the qgle.app in Finder).
$GLE_TOP/bin/qgle.app/Contents/MacOS/qgle
qt.qpa.fonts: Populating font family aliases took 429 ms. Replace uses of missing font family "Courier" with one that exists to avoid this cost.
Cause: macos ships with "Courier New" but not "Courier" as detailed here: https://discussions.apple.com/thread/253481507
Fix: Download a Courier font-file and install with Fontbook.app (to "Computer" if you are admin, or just "User" if you are not admin).
At https://discussions.apple.com/thread/253481507?answerId=256515086022#256515086022 Tom Gewecke posted a dropbox link https://www.dropbox.com/s/0ideg56xq7pry41/Courier.dfont.zip?dl=0 to download 586380 byte Courier.dfont.zip
file that came with Catalina (aka Macos 10.15). And Fontbook installed it ok on macos 12.6. Once Fontbook installed and enabled Courier.dfont file, then qgle no longer displayed that font warning (or any other warnings). No need to disable "Courier New" which is different from "Courier": they do not interfere and are independent of each other.
(Note: Also tried a 60856 byte 09809_COURIER.ttf
file but Fontbook found many problems and warned not to install it.)
If anyone finds a Courier.ttf that works, please post it, as apple has been deprecating *.dfont in favor of truetype, so it would be better in long run to use a Courier.ttf rather than apple's propietary Courier.dfont file.
Well, it is 2023 now, and some of the advice above may or may not still be useful. The gle source code and binary packages are now on github at https://github.com/vlabella/GLE and I was even able to get it compile and run, tho with a flaw, on both intel and apple-silicon macos12 (monterey) and/or macos13 (ventura). I tried to fix the flaw, but gave up as it was easier to get qGLE running in a UTM-provided debian-11 vm on both intel and apple-silicon macs. The flaw and attempted fixes are issue 2 at GLE github site vlabella/GLE#2
=== Quick-start: How to setup a vm on macos to run qgle ===
-
To run vm (virtual machine) on macos host, we'll use free UTM.app.
brew update utm-beta
Note: You can buy for $10 the macos-version of UTM in the App Store. Or, get it free from https://mac.getutm.app/ where is says: "What's the difference in the Mac App Store version?
UTM is and always will be completely free and open source. The Mac App Store version is identical to the free version and there are no features left out of the free version. The only advantage of the Mac App Store version is that you can get automatic updates. Purchasing the App Store version directly funds the development of UTM and shows your support." I think it relies on macos to check for updates, rather than the UTM.app checking on its own. In any case, the free version currently does not
As of March 2023, there have been over 90 releases of new versions of UTM, lately more than one a month. So the beta versions may be worth checking out! You can manually download both stable and beta releases at https://github.com/utmapp/UTM/releases such as this 4.20-beta version:
https://github.com/utmapp/UTM/releases/download/v4.2.0/UTM.dmg (newest beta released as of 2023-Mar-6). If you manually copy the UTM.app from the dmg to /Applications, you'll have to check the releases site to find new releases. Or if you have (home)brew, you can justbrew update utm
orbrew update utm-beta
. -
Get a minimal debian11-xfce, like UTM-provided vm at https://mac.getutm.app/gallery/debian-11-xfce, which is for arm64 (and not for intel amd64/x86) and so best used only on apple-silicon macs (or ios!). (For intel, as of Mar 2023 there was not any amd64/x86 debian-11 UTM bundle in the gallery for intel macs, but I'll try to get one added. A bundle is simply an item whose name ends in .utm such as
debian-11.5-xfce-arm64-utm
inside https://github.com/utmapp/vm-downloads/releases/download/debian-11.5/debian-11.5-xfce-arm64-utm4.zip And/or I will post post how to create an intel-debian-vm from scratch using appropriate iso from https://www.debian.org/CD/netinst/ which for amd64/x86 is currently https://cdimage.debian.org/debian-cd/current/amd64/iso-cd/debian-11.6.0-amd64-netinst.iso file.) -
Open a terminal In the deb11 vm. For example, right-click on desktop -> Open Terminal here.
-
Optional but nice: create account with same (short) username as on macos host: In vm:
sudo adduser _mac-user_
sudo passwod _mac-user_
Be sure you substitute your actual short username on mac for _mac-user_
. This way when you ssh/scp to/from vm/mac, you won't have to specify username). In vm, do id debian
and id mac-user
then add mac-user to appropriate groups:
sudo usermod -a -G examplegroup mac-user
- In vm:
sudo visudo
then add lines like:
%admin ALL = (ALL) ALL
mac-user ALL = (ALL) ALL
- Create, copy or download a file in /var/tmp/ called gle-packages.txt with the following contents:
apt-listchanges
atril
bind9-dnsutils
deborphan
discover
dkms
doc-debian
dpkg-repack
featherpad
gle-graphics
ifupdown
init
installation-report
iputils-ping
liblockfile-bin
lightdm
nano
netcat-traditional
nftables
seetxt
task-english
task-laptop
task-ssh-server
telnet
texlive-latex-base
traceroute
usbutils
-
xargs -r --arg-file=/var/tmp/gle-packages.txt sudo apt-get -y --no-install-recommends install
# installs all pkgs and deps (see https://unix.stackexchange.com/questions/179851/using-a-file-to-install-packages-with-apt-get) Before & After disk-usage:
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 14G 3.7G 8.9G 30% / # 3.7gb used before install
/dev/sda2 14G 4.1G 8.6G 33% / # 4.1gb used after install
-
sudo apt-get -y --no-install-recommends install git
thencd /var/tmp; git clone https://github.com/vlabella/gle-library.git
If on apple-silicon (m1) then
sudo apt-get -y --no-install-recommends install linux-image-arm64
If in intel vm/mac (x86/amd64) then
sudo apt-get -y --no-install-recommends install linux-image-amd64
Now, in terminal type qgle
and you should be able to open files in this tree: /var/tmp/gle-library/examples After qgle exports to a pdf, it can optionally automatically open in the viewer. We installed "Atril Document Viewer" which seems to do a good job of displaying pdf. Set that as default app for opening pdfs if need be.
Fix for qgle 4.3.3 on newer debian (like bullseye) if you get missing libicu*66 libs and/or
qgle: undefined symbol: u_strToLower_66
Issue is that newer Debians/ubuntus provide libicu67 and the libicu66 we need is not in the repos, but you can install manually without removing libicu67 (or libicu57). The fix below worked on my sparky-linux rolling debain-bullseye system (with all updates/upgrades as of Sept 2022), even tho the libicu66.deb came from ubuntu website.