Skip to content

Commit e709673

Browse files
author
kalibera
committed
Windows/aarch64 installer fix: file utility now reports ARM64 instead of
Aarch64. git-svn-id: https://svn.r-project.org/R/trunk@87888 00db46b3-68df-0310-9c12-caf00c1e9a41
1 parent 63fde7c commit e709673

File tree

3 files changed

+10
-4
lines changed

3 files changed

+10
-4
lines changed

src/gnuwin32/installer/JRins.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@
5454
intern=TRUE)
5555
if (grepl("x86-64", fout, fixed = TRUE))
5656
cat("ArchitecturesInstallIn64BitMode=x64 arm64\n", file = con)
57-
else if (grepl("Aarch64", fout, fixed = TRUE)) {
57+
else if (grepl("Aarch64", fout, fixed = TRUE)
58+
|| grepl("ARM64", fout, fixed = TRUE)) {
5859
cat("ArchitecturesInstallIn64BitMode=arm64\n", file = con)
5960
cat("ArchitecturesAllowed=arm64\n", file = con)
6061
aarch64 <- TRUE

src/gnuwin32/installer/Makefile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,18 @@ SHARE_DIRS = R dictionaries encodings licenses make Rd texmf zoneinfo
4040
all: $(RPREFIX)-win.exe
4141
msi: $(RPREFIX)-$(SUFF).msi
4242

43-
RBUILD := $(if $(findstring Aarch64,$(shell file "$(R_HOME)/bin/R.exe")),aarch64,x86_64)
43+
RBUILD := $(if $(findstring Aarch64,\
44+
$(subst ARM64,Aarch64,$(shell file "$(R_HOME)/bin/R.exe"))),\
45+
aarch64,x86_64)
4446

4547
ifeq ($(CROSS_BUILD),)
4648
RTARGET := $(RBUILD)
4749
R_ARCH_TARGET := $(R_ARCH)
4850
else
4951
R_HOME_CROSS = $(CROSS_BUILD)
50-
RTARGET := $(if $(findstring Aarch64,$(shell file "$(R_HOME_CROSS)/bin/R.exe")),aarch64,x86_64)
52+
RTARGET := $(if $(findstring Aarch64,\
53+
$(subst ARM64,Aarch64,$(shell file "$(R_HOME_CROSS)/bin/R.exe"))),\
54+
aarch64,x86_64)
5155
R_ARCH_TARGET := $(shell $(FIND) $(R_HOME_CROSS)/bin -name $R.dll | $(SED) -e 's!.*/bin\(.*\)/R.dll!\1!g')
5256
endif
5357

src/gnuwin32/installer/WiXins.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@
6464
fout <- system(
6565
paste("file", shQuote(file.path(srcdir, "bin", "R.exe"))),
6666
intern=TRUE)
67-
if (grepl("Aarch64", fout, fixed = TRUE))
67+
if (grepl("Aarch64", fout, fixed = TRUE)
68+
|| grepl("ARM64", fout, fixed = TRUE))
6869
aarch64 <- TRUE
6970
}
7071

0 commit comments

Comments
 (0)