The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 2,803 other followers

Archive for the ‘Apple’ Category

The only practical way of running x86 VMs on Apple M1 seems to be QEMU based UTM

Posted by jpluimers on 2022/07/01

Few articles exist on running x86 VMs on Apple M1 architecture.

This is the best I found, and clearly states that QEMU based UTM is the way to go, but notably lacks 3D support: [Wayback/Archive.is] Apple Silicon M1: How to run x86 and ARM Virtual Machines on it? | by Dmitry Yarygin | Mar, 2021 | Medium

Without VMs, but running Windows x86_64 code is already possible using Windows 10 for ARM via Parallels: [Wayback] Windows 10 on M1 Macs: What you can do (virtualization, sorta) and can’t (Boot Camp) | Macworld.

VMware Fusion is not going to support x86_64 virtualisation anytime soon as per [Wayback/Archive.is] Fusion on Apple Silicon: Progress Update – VMware Fusion Blog – VMware Blogs

What about x86 emulation?

We get asked regularly about running x86 VMs on M1 Macs. It makes total sense… If Apple can emulate x86 with Rosetta 2, surely VMware can do something too, right?

Well, the short answer is that there isn’t exactly much business value relative to the engineering effort that is required, at least for the time being. For now, we’re laser focused on making Arm Linux VMs on Apple silicon a delight to use.

So, to be a bit blunt, running x86 operating systems on Apple silicon is not something we are planning to deliver with this project. Installing Windows or Linux from an x86 ISO, for example, will not work.

More on UTM, which is open source:

Now hopefully someone posts a Wiki of running x86_64 Windows on Apple M1 (:

This is a small start that it can be done [Wayback/Archive.is] Has anyone tried running Delphi on Windows ARM? – Delphi IDE and APIs – Delphi-PRAXiS [en]

It works well. I’ve managed to build and run my VCL and FMX projects on Android, iOS, Windows and Mac without any problems.
Note that both Windows ARM and the way it runs Delphi are still in preview so tread carefully!
On 4/18/2021 at 8:01 PM, Der schöne Günther said:
Can you confirm it cannot only build projects but also debug them?
I can debug Windows and Android no problem. I’m having issues debugging iOS as it’s stopping in the IDE but showing the CPU rather than code views. I believe this might be a badly built component I need to re-install rather than an issue with the environment but can’t confirm either way at the moment.

An update on the debugging issues on iOS – it’s all working now. My VM just needed a restart and I can debug without problems now.

–jeroen

Posted in Power User, Apple, Windows, Mac OS X / OS X / MacOS, Mac, Virtualization, Windows 10, Qemu, UTM, M1 Mac | Leave a Comment »

How can you export the Visual Studio Code extension list? (via: Stack Overflow)

Posted by jpluimers on 2022/06/16

Adapted from [Archive.is] How can you export the Visual Studio Code extension list? – Stack Overflow, presuming that code is on the PATH:

  1. From the command-line interface on MacOS, Linux, BSD or on Windows with git installed:
    code --list-extensions | xargs -L 1 echo code --install-extension
  2. From the command-line interface on MacOS, Linux, BSD or on Windows without git installed:
    code --list-extensions | % { "code --install-extension $_" }

    or, as I think, more clearly (see also [WayBack] syntax – What does “%” (percent) do in PowerShell? – Stack Overflow):

    code --list-extensions | foreach { "code --install-extension $_" }

    or even more explanatory:

    code --list-extensions | ForEach-Object { "code --install-extension $_" }
  3. From the command-line interface on Windows as a plain cmd.exe command:
    @for /f %l in ('code --list-extensions') do @echo code --install-extension %l
  4. On Windows as a plain cmd.exe batch file (in a .bat/.cmd script):
    @for /f %%l in ('code --list-extensions') do @echo code --install-extension %%l
  5. The above two on Windows can also be done using PowerShell:
    PowerShell -Command "code --list-extensions | % { """""code --install-extension $_""""" }"

    Note that here too, the % can be expanded into foreach or ForEach-Object for clarity.

All of the above prepend “code --install-extension ” (note the trailing space) before each installed Visual Studio Code extension.

They all give you a list like this which you can execute on any machine having Visual Studio Code installed and its code on the PATH, and a working internet connection:

code --install-extension DavidAnson.vscode-markdownlint
code --install-extension ms-vscode.powershell
code --install-extension yzhang.markdown-all-in-onex

(This is about the minimum install for me to edit markdown documents and do useful things with PowerShell).

Of course you can pipe these to a text-file script to execute them later on.

The double-quote escaping is based on [Wayback/Archive.is] How to escape PowerShell double quotes from a .bat file – Stack Overflow:

you need to escape the " on the command line, inside a double quoted string. From my testing, the only thing that seems to work is quadruple double quotes """" inside the quoted parameter:

powershell.exe -command "echo '""""X""""'"

Via: [Archive.is] how to save your visual studio code extension list – Google Search

–jeroen

Posted in *nix, *nix-tools, .NET, bash, Batch-Files, CommandLine, Console (command prompt window), Development, Mac OS X / OS X / MacOS, Power User, PowerShell, PowerShell, Software Development, Visual Studio and tools, vscode Visual Studio Code, Windows, Windows 10, Windows 7, Windows 8, Windows 8.1, Windows Development, Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2, Windows Server 2016, WSL Windows Subsystem for Linux, xargs | Leave a Comment »

MacOS: default PCL printer driver only allows monochrome (black&white/grayscale); default PostScript allows colour

Posted by jpluimers on 2022/05/23

Printing on MacOS can be less Plug&Play than one hopes for.

For default printer drivers on MacOS for the same printer:

  • Postscript allows colour and monochrome (black & white / grayscale)
  • PCL only allows monochrome (black & white / grayscale)

One solution for my OKI MC363 is to use the HP PCL driver and fake it as a HP Colour LaserJet 9500 (which provides a similar amount of memory, and colour duplex A4 printing):

Read the rest of this entry »

Posted in Apple, Development, EPS/PostScript, Hardware, Mac OS X / OS X / MacOS, MC342 printer/scanner, OKI C332, OKI MC363/MC363DNW, OKI Printers, Power User, Printers | Leave a Comment »

How to view the html page source of a website in Safari – Macintosh How To

Posted by jpluimers on 2022/04/14

[Wayback] How to view the html page source of a website in Safari – Macintosh How To

You can enable the extra menu in Safari by selecting ‘Preferences’ under Safari in the OS X menu bar  and then under the ‘Advanced’ pane select the checkbox that says ‘Show Develop menu in menu bar.’

This is the option you need:

a

MacOS - Safari - Show Develop menu in menu bar

MacOS – Safari – Show Develop menu in menu bar

–jeroen

Posted in Apple, Development, Mac OS X / OS X / MacOS, Power User, Safari, Software Development, Web Browsers, Web Development | Leave a Comment »

Kris on Twitter is a bit radical against shell scripts. Learn why.

Posted by jpluimers on 2022/04/13

I say to people: only use shell interactively, don’t write scripts. Never. Not one.
But Kris, they ask, why so radical?
Because of this:

is the literal English Google Translation of the German text

Ich sage den Leuten: benutzt Shell nur interaktiv, schreibt keine Scripte. Nie. Nicht eines.
Aber Kris, fragen sie, wieso so Radikal?
Deswegen:

then links to [Wayback/Archive] Jan Schaumann on Twitter: “TIL zgrep(1) is a shell script. BSD basically does “zcat | grep”, but GNU does “gzip -dc | sed”. How did I learn that? The fun way! CVE-2022-1271, arbitrary-file-write and code execution vulnerability in GNU zgrep / gzip. …”:

Read the rest of this entry »

Posted in *nix, *nix-tools, Apple, ash/dash, ash/dash development, bash, bash, BSD, Development, Mac, Mac OS X / OS X / MacOS, Power User, Scripting, Software Development | Leave a Comment »

 
%d bloggers like this: