{"id":13858967,"url":"https://github.com/coatless-mac/r-macos-rtools","last_synced_at":"2025-07-14T01:32:28.143Z","repository":{"id":89518901,"uuid":"95988675","full_name":"coatless-mac/r-macos-rtools","owner":"coatless-mac","description":"Scripts to build an **unofficial** Rtools-esq installer for the macOS R toolchain","archived":true,"fork":false,"pushed_at":"2023-02-24T20:16:31.000Z","size":3498,"stargazers_count":171,"open_issues_count":8,"forks_count":6,"subscribers_count":12,"default_branch":"main","last_synced_at":"2024-04-10T06:13:45.904Z","etag":null,"topics":["bash","gfortran","llvm-clang","macos","osx","package","pkgbuild","r","xcode-cli"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coatless-mac.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2017-07-01T21:34:57.000Z","updated_at":"2023-09-25T12:28:13.000Z","dependencies_parsed_at":null,"dependency_job_id":"0bfc2355-9c4c-4300-8ff0-390b527325ce","html_url":"https://github.com/coatless-mac/r-macos-rtools","commit_stats":null,"previous_names":["rmacoslib/r-macos-rtools"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coatless-mac%2Fr-macos-rtools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coatless-mac%2Fr-macos-rtools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coatless-mac%2Fr-macos-rtools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coatless-mac%2Fr-macos-rtools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coatless-mac","download_url":"https://codeload.github.com/coatless-mac/r-macos-rtools/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225938735,"owners_count":17548543,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","gfortran","llvm-clang","macos","osx","package","pkgbuild","r","xcode-cli"],"created_at":"2024-08-05T03:02:27.866Z","updated_at":"2024-11-22T17:30:33.869Z","avatar_url":"https://github.com/coatless-mac.png","language":"Shell","readme":"**This installer has been superceded by the [{macrtools}](https://github.com/coatless-mac/macrtools) _R_ package, which automatically installs and configures the _R_ toolchain for compiled code on macOS.**\n\n**Please do not use the `r-macos-rtools` installer package as it is notably out of date.**\n\n# Installer Package for macOS _R_ toolchain [![License](https://img.shields.io/badge/license-GPL%20%28%3E=%202%29-brightgreen.svg?style=flat)](http://www.gnu.org/licenses/gpl-2.0.html)\n\nThe repository contains the scripts used to create an installer package (`.pkg`)\nthat contains binaries used to create the CRAN official macOS _R_ binary. \n\nSpecifically, the installer will try to download and install:\n\n- Xcode command line tools (XCode CLI) from Apple\n- `gfortran6.3` or `gfortran8.2` from \u003chttps://github.com/fxcoudert/gfortran-for-macOS/releases\u003e\n\nMoreover, the installer will attempt to clean up previous installations by \nremoving configuration files `~/.R/Makevars` and `~/.Renviron` that are no longer used. \nBackups for each file will be presented with `.bck` appended to the end. \n\nFor those interested, the installer can be obtained\non either the project's [**release page**](https://github.com/rmacoslib/r-macos-rtools/releases/latest).\nThe pre-built binaries this\ninstaller encloses can be found at \u003chttps://developer.apple.com/download/more/\u003e and\n\u003chttps://github.com/fxcoudert/gfortran-for-macOS/releases\u003e. \n\n**Note** The installer package was developed by [James Joseph Balamuta](https://thecoatlessprofessor.com)\nand has no connection with the R project’s macOS CRAN maintainers. \nFinancial support was provided to sign the installer by \n[Professor Timothy Bates](http://www.ed.ac.uk/profile/timothy-bates) \nof the [University of Edinburgh](http://www.ed.ac.uk/).\n\n## How do I use the installer?\n\n1. Download it from the project's [**release page**](https://github.com/rmacoslib/r-macos-rtools/releases/latest).\n2. Open the installer by either double click or right clicking to bring up menu and selecting \"Open\".\n3. From here, navigate through it like a normal macOS installer.\n\n**That's it.**\n\nOnce installed, you can start using compiled code in _R_ like normal.\n\nIf you want to see behind the curtain, continue reading...\n\n## What does the installer do?\n\nThe macOS _R_ toolchain installer performs four actions that require\nthe user's password to accomplish. These actions are:\n\n1. download and install XCode CLI via secure Apple product update\n1. remove any existing `~/.R/Makevars` or `~/.Renviron` (backups available with `.bck`)s\n1. determine which `gfortran` version to use\n1. download, verify, and install the appropriate `gfortran` version\n\n**Note:** The installer will remove any existing `~/.R/Makevars` and `~/.Renviron` files. \nThe existing files will be copied to a backup file, e.g. `~/.R/Makevars.bck` and `~/.Renvion.bck`.\n\nVerify steps are conducted using embedded md5 hashes of the files.\nIf the hash is not identical to what was embedded, the installer will\nexit. For details as to how this was implemented please see\n[Issue 8: Verify pkg hash](https://github.com/coatless/r-macos-rtools/issues/8)\nand the \n[Pull Request 10: Feature Pkg Hash Verification](https://github.com/coatless/r-macos-rtools/pull/10).\n\n\n## Verify the Installer\n\nThanks to the **financial support provided by [Professor Timothy Bates](http://www.ed.ac.uk/profile/timothy-bates) of\nthe [University of Edinburgh](http://www.ed.ac.uk/)** to join the [Apple Developer program](https://developer.apple.com/).\nThe installer is now signed using [developer credentials](https://developer.apple.com/library/content/documentation/IDEs/Conceptual/AppDistributionGuide/MaintainingCertificates/MaintainingCertificates.html).\n\nAs a result, the installer should have a \"lock\" icon in the upper right corner:\n\n![Signed Installer Lock Icon](readme_img/lock_icon.png)\n\nClicking the lock icon will reveal the signed developer certificate:\n\n![Signed Developer Certificate](readme_img/signed_certificate.png)\n\nWith this being said, the code used to generate the installer has been made publically available under an open source license (GPL \u003e= 2). \n\n## Overview of Files\n\nBelow is an abridged version of the actions of each file provided.\n\n- `scripts/postinstall`\n   - Downloads and Installs Xcode CLI and the appropriate `gfortran` version\n      - Detects the appropriate `Command Line Tools` dmg installer\n\t    by using a [headless cli check](https://github.com/timsutton/osx-vm-templates/blob/ce8df8a7468faa7c5312444ece1b977c1b2f77a4/scripts/xcode-cli-tools.sh#L8-L14),\n\t\tdownloads the installer from \u003chttps://developer.apple.com/download/more/\u003e,\n\t\tand installs it using `softwareupdate`.\n      - Downloads the gfortran binary  from \n        \u003chttps://github.com/fxcoudert/gfortran-for-macOS/releases\u003e, and \n        and installs it into `/usr/local/gfortran`.\n   - Removes the `~/.R/Makevars` and `~/.Renviron` files \n   - **Note:** Pre-existing `~/.R/Makevars` and `~/.Renviron` files will be backed up prior to being removed. \n- `make_installer.sh`\n   - Create the installer package R binary installer `.pkg`\n      - Builds the package from the extracted tar using `pkgbuild` \n      - Analyzing the package using `productbuild` to create a `distribution.xml`   \n\t  - Inserts customizations into the `distribution.xml` (title, background, ...)\n\t  - Calls `productbuild` to rebuild the package.\n- `distribution.xml`\n   - Customization options (e.g. title, background) of installer built by analyzing a temporary .pkg\n- `build_files/Rlogo.png`\n   - R logo\n- `build_files/LICENSE.rtf`\n   - License of the Xcode CLI, LLVM installer, and gfortran\n- `build_files/WELCOME_DISPLAY.rtf`\n   - Text displayed on welcome screen\n\n# License\n\nGPL (\u003e= 2) \n","funding_links":[],"categories":["Shell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoatless-mac%2Fr-macos-rtools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoatless-mac%2Fr-macos-rtools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoatless-mac%2Fr-macos-rtools/lists"}