rstudio: 2025.05.1+513 -> 2025.09.0+387

This commit is contained in:
TomaSajt
2025-09-17 23:00:28 +02:00
parent e369ea3f6c
commit 83259ce13b
4 changed files with 58 additions and 116 deletions
@@ -1,67 +0,0 @@
diff --git a/src/node/desktop/package-lock.json b/src/node/desktop/package-lock.json
index e4cf455..f822c46 100644
--- a/src/node/desktop/package-lock.json
+++ b/src/node/desktop/package-lock.json
@@ -18,7 +18,7 @@
"line-reader": "0.4.0",
"lodash.debounce": "4.0.8",
"net-ipc": "2.2.0",
- "node-abi": "3.71.0",
+ "node-abi": "^4.10.0",
"node-addon-api": "8.3.1",
"node-system-fonts": "1.0.1",
"properties-reader": "2.3.0",
@@ -1068,6 +1068,19 @@
"node": ">=12.13.0"
}
},
+ "node_modules/@electron/rebuild/node_modules/node-abi": {
+ "version": "3.75.0",
+ "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.75.0.tgz",
+ "integrity": "sha512-OhYaY5sDsIka7H7AtijtI9jwGYLyl29eQn/W623DiN/MIv5sUqc4g7BIDThX+gb7di9f6xK02nkp8sdfFWZLTg==",
+ "dev": true,
+ "license": "MIT",
+ "dependencies": {
+ "semver": "^7.3.5"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
"node_modules/@electron/universal": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/@electron/universal/-/universal-2.0.2.tgz",
@@ -9615,15 +9628,15 @@
}
},
"node_modules/node-abi": {
- "version": "3.71.0",
- "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.71.0.tgz",
- "integrity": "sha512-SZ40vRiy/+wRTf21hxkkEjPJZpARzUMVcJoQse2EF8qkUWbbO2z7vd5oA/H6bVH6SZQ5STGcu0KRDS7biNRfxw==",
+ "version": "4.10.0",
+ "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-4.10.0.tgz",
+ "integrity": "sha512-99+BHGmmk969uU3Q4DM9t2tBvDKmqZ3prz/yumY7n+fV2zA+DAOBXuodsp9ZD/QSXK8aSKgWIpkg8tbrAe9JBg==",
"license": "MIT",
"dependencies": {
- "semver": "^7.3.5"
+ "semver": "^7.6.3"
},
"engines": {
- "node": ">=10"
+ "node": ">=22.12.0"
}
},
"node_modules/node-abort-controller": {
diff --git a/src/node/desktop/package.json b/src/node/desktop/package.json
index 1fe9294..e3797cf 100644
--- a/src/node/desktop/package.json
+++ b/src/node/desktop/package.json
@@ -76,7 +76,7 @@
"line-reader": "0.4.0",
"lodash.debounce": "4.0.8",
"net-ipc": "2.2.0",
- "node-abi": "3.71.0",
+ "node-abi": "^4.10.0",
"node-addon-api": "8.3.1",
"node-system-fonts": "1.0.1",
"properties-reader": "2.3.0",
+30
View File
@@ -0,0 +1,30 @@
diff --git a/src/node/desktop/CMakeLists.txt b/src/node/desktop/CMakeLists.txt
index bccf5b3..71e10a7 100644
--- a/src/node/desktop/CMakeLists.txt
+++ b/src/node/desktop/CMakeLists.txt
@@ -117,11 +117,7 @@ file(MAKE_DIRECTORY "${ELECTRON_BINARY_DIR}")
file(
COPY "${CMAKE_CURRENT_SOURCE_DIR}/"
DESTINATION "${ELECTRON_BINARY_DIR}/"
- REGEX "/.webpack$" EXCLUDE
- REGEX "/build$" EXCLUDE
- REGEX "/bin$" EXCLUDE
- REGEX "/out$" EXCLUDE
- REGEX "/node_modules$" EXCLUDE)
+)
configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/src/main/build-info.ts.in
diff --git a/src/node/desktop/package.json b/src/node/desktop/package.json
index df92166..47ca4b4 100644
--- a/src/node/desktop/package.json
+++ b/src/node/desktop/package.json
@@ -10,7 +10,7 @@
"scripts": {
"clean": "ts-node scripts/clean.ts",
"lint": "eslint ./src ./test",
- "package": "npm ci && electron-forge package",
+ "package": "electron-forge package",
"start": "electron-forge start -- --no-sandbox",
"debug": "electron-forge start --inspect-electron",
"fullstart": "npm install && electron-forge start",
+6 -31
View File
@@ -56,37 +56,12 @@ index 40ae0f3..756fd5f 100644
# Detect node.js, npm, and npx; use versions supplied by the dependency scripts
find_program(NODEJS
diff --git a/src/node/desktop/CMakeLists.txt b/src/node/desktop/CMakeLists.txt
index 35438fd..f9b1951 100644
index bccf5b3..0cc798a 100644
--- a/src/node/desktop/CMakeLists.txt
+++ b/src/node/desktop/CMakeLists.txt
@@ -122,22 +122,9 @@ if (APPLE)
# configure Info.plist
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in
${CMAKE_CURRENT_SOURCE_DIR}/Info.plist)
+endif()
- # copy sources to build directory. note that the build directory cannot
- # be the "true" CMake directory as some files are resolved relative to
- # the desktop project's relative path in the application structure
- set(ELECTRON_BUILD_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../desktop-build-${UNAME_M}" CACHE INTERNAL "")
- file(REMOVE_RECURSE "${ELECTRON_BUILD_DIR}")
- file(MAKE_DIRECTORY "${ELECTRON_BUILD_DIR}")
- file(
- COPY "${CMAKE_CURRENT_SOURCE_DIR}/"
- DESTINATION "${ELECTRON_BUILD_DIR}/"
- REGEX "/.webpack$" EXCLUDE
- REGEX "/build$" EXCLUDE
- REGEX "/bin$" EXCLUDE
- REGEX "/out$" EXCLUDE
- REGEX "/node_modules$" EXCLUDE)
-else()
+if(true)
set(ELECTRON_BUILD_DIR "${ELECTRON_SOURCE_DIR}" CACHE INTERNAL "")
endif()
@@ -233,16 +220,21 @@ if(WIN32)
PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}
DESTINATION "${RSTUDIO_INSTALL_BIN}")
@@ -236,16 +236,21 @@ if(WIN32)
install(FILES ${VCRUNTIME_X86_FILES} DESTINATION "${RSTUDIO_INSTALL_BIN}/x86")
install(FILES ${VCRUNTIME_X64_FILES} DESTINATION "${RSTUDIO_INSTALL_BIN}")
-elseif(LINUX)
+elseif(LINUX OR APPLE)
@@ -104,8 +79,8 @@ index 35438fd..f9b1951 100644
+ endif()
install(
- DIRECTORY "${ELECTRON_BUILD_DIR}/out/RStudio-linux-${ELECTRON_ARCH}/"
+ DIRECTORY "${ELECTRON_BUILD_DIR}/out/RStudio-${ELECTRON_PLATFORM}-${ELECTRON_ARCH}/"
- DIRECTORY "${ELECTRON_BINARY_DIR}/out/RStudio-linux-${ELECTRON_ARCH}/"
+ DIRECTORY "${ELECTRON_BINARY_DIR}/out/RStudio-${ELECTRON_PLATFORM}-${ELECTRON_ARCH}/"
DIRECTORY_PERMISSIONS
OWNER_READ OWNER_WRITE OWNER_EXECUTE
GROUP_READ GROUP_EXECUTE
+22 -18
View File
@@ -26,7 +26,7 @@
apple-sdk_11,
boost187,
electron_36,
electron_37,
fontconfig,
gnumake,
hunspellDicts,
@@ -45,19 +45,28 @@
}:
let
electron = electron_36;
electron = electron_37;
mathJaxSrc = fetchzip {
url = "https://s3.amazonaws.com/rstudio-buildtools/mathjax-27.zip";
hash = "sha256-J7SZK/9q3HcXTD7WFHxvh++ttuCd89Vc4SEBrUEU0AI=";
};
# rev should ideally be the last commit of the release/rstudio-[codename] branch
# Note: we could build this from source, but let's just do what upstream does for now
gwt = fetchzip {
url = "https://rstudio-buildtools.s3.us-east-1.amazonaws.com/gwt/gwt-2.12.2.tar.gz";
stripRoot = false;
hash = "sha256-DgcCiheYeP7sISduz6E3WhTty2nSs14k2OYIG93KmkY=";
};
quartoSrc = fetchFromGitHub {
owner = "quarto-dev";
repo = "quarto";
rev = "8ee12b5d6bd49c7b212eae894bd011ffbeea1c48";
hash = "sha256-pTrWedYeG2SWQ4jl2fstKjsweWhj4aAvVDiSfkdU3No=";
# Note: rev should ideally be the last commit of the release/rstudio-[codename] branch
# Note: This is the last working revision, because https://github.com/quarto-dev/quarto/pull/757
# started using `file:` in the lockfile, which our fetcher can't handle
rev = "faef822a085df65809adf55fb77c273e9cdb87b9";
hash = "sha256-DLpVYl0OkaBQtkFinJAS2suZ8gqx9BVS5HBaYrrT1HA=";
};
hunspellDictionaries = lib.filter lib.isDerivation (lib.unique (lib.attrValues hunspellDicts));
@@ -79,13 +88,13 @@ let
in
stdenv.mkDerivation rec {
pname = "RStudio";
version = "2025.05.1+513";
version = "2025.09.0+387";
src = fetchFromGitHub {
owner = "rstudio";
repo = "rstudio";
tag = "v${version}";
hash = "sha256-KaolU82bxzAlYl+aYwlFljqsmNv0dn8XP1llaLK3LQE=";
hash = "sha256-je2nfWIToGGizWyH/YbhtD4XhtP39qUIhatzDOUnsSc=";
};
# sources fetched into _deps via cmake's FetchContent
@@ -117,7 +126,7 @@ stdenv.mkDerivation rec {
dontBuild = true;
dontFixup = true;
outputHash = "sha256-YW+l0/RZf8ek217pfWTwsR4PTugMGHyW+vaZEwGjMas=";
outputHash = "sha256-pXpp42hjjKrV75f2XLDYK7A9lrvWhuQBDJ0oymXE8Fg=";
outputHashAlgo = "sha256";
outputHashMode = "recursive";
};
@@ -207,8 +216,8 @@ stdenv.mkDerivation rec {
./ignore-etc-os-release.patch
./dont-yarn-install.patch
./dont-npm-ci.patch
./fix-darwin.patch
./bump-node-abi.patch
];
postPatch = ''
@@ -223,7 +232,7 @@ stdenv.mkDerivation rec {
yarnOfflineCache = fetchYarnDeps {
src = quartoSrc;
hash = "sha256-F+gqVNNhLmyrC+tJuElw7cpx5z/WLHOiYow/y86KR5c=";
hash = "sha256-9ObJ3fzxPyGVfIgBj4BhCWqkrG1A2JqZsCreJA+1fWQ=";
};
dontYarnInstallDeps = true; # will call manually in preConfigure
@@ -239,11 +248,7 @@ stdenv.mkDerivation rec {
name = "rstudio-${version}-npm-deps";
inherit src;
postPatch = "cd ${npmRoot}";
patches = [
# needed for support for electron versions above electron_34
./bump-node-abi.patch
];
hash = "sha256-64PJPUE/xwdQdxVGiKzy8ADnxXH/qGQtFMib0unZpoA=";
hash = "sha256-HfJsm/UauA5Vdi22WfTJGiI9K979Sw7RYApYdZU0AUs=";
};
preConfigure = ''
@@ -270,6 +275,8 @@ stdenv.mkDerivation rec {
done
done
ln -s ${gwt} dependencies/common/gwtproject
ln -s ${quartoWrapper} dependencies/quarto
# version in dependencies/common/install-mathjax
@@ -284,9 +291,6 @@ stdenv.mkDerivation rec {
+ lib.optionalString (!server) ''
pushd $npmRoot
substituteInPlace package.json \
--replace-fail "npm ci && " ""
# use electron's headers to make node-gyp compile against the electron ABI
export npm_config_nodedir="${electron.headers}"