```{r, echo=FALSE, warning=FALSE, message=FALSE, cache=TRUE}
#| context: setup

library(downloadthis)
library(stringi)

### Parameters #################################################################
RmacARM_ver = "R-4.5.0-arm64"
RmacIntel_ver = "R-4.5.0-x86_64"
RStudioMac_ver = "RStudio-2024.12.1-563"
QuartoMac_ver = "quarto-1.7.29-macos"
XQuartz_ver = "XQuartz-2.8.5"
gfortranARM_ver = "gfortran-14.2-ARM-Sequoia"
gfortranIntel_ver = "gfortran-14.2-Intel-Sequoia"
################################################################################
## R
RmacARM_link =   
  download_link(
    link = paste0("https://edu.med.yokohama-cu.ac.jp/software/r/macOS/",
                  RmacARM_ver,".pkg"),
    output_name = RmacARM_ver,
    output_extension = ".pkg",
    button_label = paste0(RmacARM_ver, ".pkg"),
    button_type = "default",
    self_contained = TRUE,
    has_icon = TRUE,
    icon = "fa fa-save",
    id = "RmacARM")

RmacIntel_link =
  download_link(
    link = paste0("https://edu.med.yokohama-cu.ac.jp/software/r/macOS/",
                  RmacIntel_ver,".pkg"),
    output_name = RmacIntel_ver,
    output_extension = ".pkg",
    button_label = paste0(RmacIntel_ver,".pkg"),
    button_type = "default",
    self_contained = TRUE, # specify whether your HTML output is self-contained
    has_icon = TRUE,
    icon = "fa fa-save",
    id = "RmacIntel")

## RStudio
RStudioMac_link =   
  download_link(
    link = paste0("https://edu.med.yokohama-cu.ac.jp/software/rstudio/macOS/",
                  RStudioMac_ver,".dmg"),
    output_name = RStudioMac_ver,
    output_extension = ".dmg",
    button_label = paste0(RStudioMac_ver,".dmg"),
    button_type = "default",
    self_contained = TRUE,
    has_icon = TRUE,
    icon = "fa fa-save",
    id = "RStudiomac")

## Quarto
QuartoMac_link =   
  download_link(
    link = paste0("https://edu.med.yokohama-cu.ac.jp/software/quarto/macOS/",
                  QuartoMac_ver,".pkg"),
    output_name = QuartoMac_ver,
    output_extension = ".pkg",
    button_label = paste0(QuartoMac_ver, ".pkg"),
    button_type = "default",
    self_contained = TRUE,
    has_icon = TRUE,
    icon = "fa fa-save",
    id = "RStudioWin")

## Quartz
XQuartz_link =
  download_link(
    link = paste0("https://edu.med.yokohama-cu.ac.jp/software/quartz/",
                  XQuartz_ver,".pkg"),
    output_name = XQuartz_ver,
    output_extension = ".pkg",
    button_label = paste0(XQuartz_ver, ".pkg"),
    button_type = "default",
    self_contained = TRUE,
    has_icon = TRUE,
    icon = "fa fa-save",
    id = "XQuartz")

## gfortran
gfortranARM_link =
  download_link(
    link = paste0("https://edu.med.yokohama-cu.ac.jp/software/gfortran/", 
                  gfortranARM_ver, ".pkg"),
    output_name = gfortranARM_ver,
    output_extension = ".pkg",
    button_label = paste0(gfortranARM_ver, ".pkg"),
    button_type = "default",
    self_contained = TRUE,
    has_icon = TRUE,
    icon = "fa fa-save",
    id = "gfortran")
gfortranIntel_link =
  download_link(
    link = paste0("https://edu.med.yokohama-cu.ac.jp/software/gfortran/", 
                  gfortranIntel_ver, ".pkg"),
    output_name = gfortranIntel_ver,
    output_extension = ".pkg",
    button_label = paste0(gfortranIntel_ver, ".pkg"),
    button_type = "default",
    self_contained = TRUE,
    has_icon = TRUE,
    icon = "fa fa-save",
    id = "gfortran")
```
