diyabc / diyabcGUI

User interface to DIYABC/AbcRanger
https://diyabc.github.io/
Other
4 stars 2 forks source link

MacOS standalone app build #19

Open gdurif opened 4 years ago

gdurif commented 4 years ago

ToDo

check possible issue with electricShine

fradav commented 4 years ago

Fails with : package 'rlang' successfully unpacked and MD5 sums checked Erreur : (converti depuis l'avis) cannot remove prior installation of package 'rlang' Exécution arrêtée

(missing library(devtools) ?)

gdurif commented 4 years ago

build_standalone.R fails due to problem with npm

gdurif commented 3 years ago

To create a portable version of R for MacOS (credit to @fradav)

#!/usr/bin/env bash
set -e

# Download and extract the main Mac Resources directory
# Requires xar and cpio, both installed in the Dockerfile
mkdir -p r-mac
curl -o r-mac/latest_r.pkg \
     https://cloud.r-project.org/bin/macosx/R-4.0.3.pkg

cd r-mac
xar -xf latest_r.pkg
rm -r R-app.pkg Resources tcltk.pkg texinfo.pkg Distribution latest_r.pkg
cat R-fw.pkg/Payload | gunzip -dc | cpio -i
mv R.framework/Versions/Current/Resources/* .
rm -r R-fw.pkg R.framework

# Patch the main R script
sed -i.bak '/^R_HOME_DIR=/d' bin/R
sed -i.bak 's;/Library/Frameworks/R.framework/Resources;${R_HOME};g' \
    bin/R
chmod +x bin/R
rm -f bin/R.bak

# Remove unneccessary files TODO: What else
rm -rf doc tests
rm -rf lib/*.dSYM
fradav commented 3 years ago

real credit to https://github.com/dirkschumacher/r-shiny-electron/blob/master/get-r-mac.sh I just tuned a few things there and there for 4.0.3