diff --git a/.github/README.md b/.github/README.md index e05f6579d7..0d47e67b53 100644 --- a/.github/README.md +++ b/.github/README.md @@ -33,12 +33,12 @@ The easiest way to get set up is with [scoop](https://scoop.sh/). You will also git clone 'https://github.com/doldecomp/melee.git' cd melee ``` -1. Download our [compilers zip archive](https://cdn.discordapp.com/attachments/727909624342380615/1129879865433264158/MELEE_COMPILERS_N.zip) and rename the `GC` subfolder to `mwcc_compiler`, and place it in `/tools`. You can do this manually, or use the following PowerShell snippet (from inside your melee directory): +1. Download our [compilers zip archive](https://mega.nz/file/BU43wKxT#rVC11Rl7DPxfSn7V9Iu--8E7m7gc1gsJWtfVBbfmKwQ) and rename the `GC` subfolder to `mwcc_compiler`, and place it in `/tools`. You can do this manually, or use the following PowerShell snippet (from inside your melee directory): ```ps1 - $url = 'https://cdn.discordapp.com/attachments/727909624342380615/1129879865433264158/MELEE_COMPILERS_N.zip' - $tmp = New-TemporaryFile - Invoke-WebRequest -Uri $url -OutFile $tmp - $zip = Rename-Item $tmp -NewName ($tmp.BaseName + '.zip') -PassThru + & scoop install megatools + $url = 'https://mega.nz/file/BU43wKxT#rVC11Rl7DPxfSn7V9Iu--8E7m7gc1gsJWtfVBbfmKwQ' + $zip = [System.IO.Path]::GetTempFileName() -replace '\.[^.]+$','.zip' + & megatools dl --no-progress --path "$zip" "$url" $dir = New-Item -ItemType Directory ` -Path (Join-Path $env:Temp 'MELEE_COMPILERS') @@ -51,6 +51,9 @@ The easiest way to get set up is with [scoop](https://scoop.sh/). You will also Remove-Item -Force $zip Remove-Item -Recurse -Force $dir + + # Optional: Uninstall megatools + & scoop uninstall megatools ``` 1. Run `make` using `bash` to build the project: ```ps1 diff --git a/.github/packages/build-linux/Dockerfile b/.github/packages/build-linux/Dockerfile index c925a56549..51230ea166 100644 --- a/.github/packages/build-linux/Dockerfile +++ b/.github/packages/build-linux/Dockerfile @@ -11,7 +11,7 @@ COPY --from=devkitpro/devkitppc:latest \ COPY .github/packages/build-linux/setup.sh /usr/local/bin ENV DEBIAN_FRONTEND=noninteractive ENV LANG=C -ENV MELEE_COMPILERS_URL="https://cdn.discordapp.com/attachments/727909624342380615/1129879865433264158/MELEE_COMPILERS_N.zip" +ENV MELEE_COMPILERS_URL="https://mega.nz/file/BU43wKxT#rVC11Rl7DPxfSn7V9Iu--8E7m7gc1gsJWtfVBbfmKwQ" RUN chmod +x /usr/local/bin/setup.sh && setup.sh VOLUME [ "/input", "/output" ] ENV WINE=${WIBO_PATH} diff --git a/.github/packages/build-linux/setup.sh b/.github/packages/build-linux/setup.sh index 2ffad17688..289daae124 100644 --- a/.github/packages/build-linux/setup.sh +++ b/.github/packages/build-linux/setup.sh @@ -10,16 +10,16 @@ apt install -y --no-install-recommends \ libc6-dev \ python3-full \ python-is-python3 \ - curl \ + megatools \ libarchive-tools -curl -L "$MELEE_COMPILERS_URL" | +megadl --no-progress "$MELEE_COMPILERS_URL" --path - | bsdtar -xvf- -C /tmp mv /tmp/GC /tmp/mwcc_compiler mv /tmp/mwcc_compiler /opt apt remove -y \ - curl \ + megatools \ libarchive-tools apt autoremove -y apt clean diff --git a/.github/packages/build-windows/Dockerfile b/.github/packages/build-windows/Dockerfile index 99214924ce..e6c853de85 100644 --- a/.github/packages/build-windows/Dockerfile +++ b/.github/packages/build-windows/Dockerfile @@ -29,7 +29,7 @@ RUN net user melee /add; \ # grant melee user read access to requirements.txt icacls 'C:/Windows/Temp/requirements.txt' /grant 'melee:(R)'; USER melee -ENV MELEE_COMPILERS_URL="https://cdn.discordapp.com/attachments/727909624342380615/1129879865433264158/MELEE_COMPILERS_N.zip" +ENV MELEE_COMPILERS_URL="https://mega.nz/file/BU43wKxT#rVC11Rl7DPxfSn7V9Iu--8E7m7gc1gsJWtfVBbfmKwQ" RUN setup.ps1 VOLUME [ "C:/Input", "C:/Output" ] ENTRYPOINT entrypoint.ps1 diff --git a/.github/packages/build-windows/setup.ps1 b/.github/packages/build-windows/setup.ps1 index d1be241f7e..36940c3737 100644 --- a/.github/packages/build-windows/setup.ps1 +++ b/.github/packages/build-windows/setup.ps1 @@ -19,7 +19,8 @@ & scoop install ` git ` python ` - mingw + mingw ` + megatools if ($LASTEXITCODE -ne 0) { Exit $LASTEXITCODE @@ -49,10 +50,9 @@ $data = New-Item -Path "$env:LocalAppData/Melee" -ItemType Directory # download and save melee compilers & { - $tmp = New-TemporaryFile - Invoke-WebRequest -Uri "$env:MELEE_COMPILERS_URL" -OutFile $tmp # Expand-Archive won't unzip it if its extension isn't .zip lol - $zip = Rename-Item $tmp -NewName ($tmp.BaseName + '.zip') -PassThru + $zip = [System.IO.Path]::GetTempFileName() -replace '\.[^.]+$','.zip' + & megatools dl --no-progress --path "$zip" "$env:MELEE_COMPILERS_URL" $dir = New-Item -ItemType Directory ` -Path (Join-Path $env:Temp 'MELEE_COMPILERS') @@ -65,4 +65,5 @@ $data = New-Item -Path "$env:LocalAppData/Melee" -ItemType Directory Remove-Item -Force $zip Remove-Item -Recurse -Force $dir + & scoop uninstall megatools }