Re: install.bat in windows-arm64 not working

Thomas Welter <[email protected]>
Newsgroups gmane.comp.tex.context
Message-ID <AMBP192MB2966DF4C03BACF9CC26E5BEC835B2@AMBP192MB2966.EURP192.PROD.OUTLOOK.COM>
Sorry for the late response; I also do not really use the arm laptop, but I was testing my IDE and stumbled upon the error. 
I investigated a little further:

The output of your command inspect(os.uname()) is:
table={
 ["machine"]="arm64",
 ["nodename"]="LAPTOP-93YX-KB0",
 ["release"]="",
 ["sysname"]="Windows",
 ["version"]="",
}

So the (using my workaround) installed distribution correctly detects itself as arm64 and the install.bat script does this too, as:
echo %PROCESSOR_ARCHITECTURE% returns ARM64
and
echo %PLATFORM% returns windows-arm64

I opened the extracted installer zip folder as a VS Code workspace and let Github Copilot analyse the files. His response:
-----
In mtxrun.lua (line 4058), the platform detection for Windows ARM64 sets:
   bits, platform = 64, "windows-arm64"
So os.platform becomes "windows-arm64".
In mtx-install.lua (line 477), the lookup:
   local osplatform = environment.arguments.platform or nil         -- nil (no --platform arg passed)
   local platform   = platforms[osplatform or os.platform or ""]   -- platforms["windows-arm64"]
The problem: The platforms table in mtx-install.lua:106 has entries for "win64", "mswin", "windows" etc., but "windows-arm64" is missing. So the lookup returns nil.
On your x86-64 machine os.platform is "win64", which exists in the table — that's why it works there.
-----
And indeed, by adding the line
["windows-arm64"]  = "windows-arm64",
to the platforms table, the installer works (output: mtx-install     | platform : windows-arm64). I guess the entry was just forgotten to put in.. But I am quite confused that I am the first to notice this, as these days there are many windows arm devices around..

So I guess that was the issue and adding the platform table entry is the solution?


___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the Wiki!

maillist : [email protected] / https://mailman.ntg.nl/mailman3/lists/ntg-context.ntg.nl
webpage  : https://www.pragma-ade.nl / https://context.aanhet.net (mirror)
archive  : https://github.com/contextgarden/context
wiki     : https://wiki.contextgarden.net
___________________________________________________________________________________
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.