Move autodl_files to misc

This commit is contained in:
Kaenbyou Rin 2023-11-20 18:14:58 +01:00
parent 7103cc3b20
commit 6f7fae6a76
4 changed files with 5 additions and 137 deletions

View File

@ -1,7 +0,0 @@
https://git.uupdump.net/uup-dump/converter/raw/commit/7b507c6c99afcf4cff59adcdf51cdb75159bd548/convert.sh
out=convert.sh
checksum=sha-256=689ba88620ae9e49d370341422ece227fd3f08014a0b6f3e302e9528648ff4ab
https://git.uupdump.net/uup-dump/converter/raw/commit/7b507c6c99afcf4cff59adcdf51cdb75159bd548/convert_ve_plugin
out=convert_ve_plugin
checksum=sha-256=02db2f5f2caf742daa6aeaa189d9af27775e8457db48fadd8d71bb1be5982eae

View File

@ -1,91 +0,0 @@
<#
This was made because I refuse to continue taking part in the unwritten
PowerShell/Batch obfuscation contest.
#>
param (
[Parameter()]
[Switch]$ForDownload
)
<#
There are myths that some Windows versions do not work without this.
Since I can't be arsed to verify this, I'm just adding this to lower the number
of reports to which I would normally respond with "works on my machine".
#>
try {
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
} catch {
Write-Error "Abandonware operating systems are not supported."
Exit 1
}
$filesDownload = @('aria2c.exe')
$filesConvert = @('aria2c.exe', '7zr.exe', 'uup-converter-wimlib.7z')
$urls = @{
'aria2c.exe' = 'https://git.uupdump.net/uup-dump/containment-zone/raw/commit/d0b2adac035890497f12de371b3b44756e93b516/aria2c.exe';
'7zr.exe' = 'https://git.uupdump.net/uup-dump/containment-zone/raw/commit/d0b2adac035890497f12de371b3b44756e93b516/7zr.exe';
'uup-converter-wimlib.7z' = 'https://git.uupdump.net/uup-dump/containment-zone/raw/commit/d0b2adac035890497f12de371b3b44756e93b516/uup-converter-wimlib.7z';
}
$hashes = @{
'aria2c.exe' = '0ae98794b3523634b0af362d6f8c04a9bbd32aeda959b72ca0e7fc24e84d2a66';
'7zr.exe' = '108ab5f1e36f2068e368fe97cd763c639e403cac8f511c6681eaf19fc585d814';
'uup-converter-wimlib.7z' = '7f07dfc0fa041820746c55c2704fd18f8930b984ca472d2ac397a1c69f15f3af';
}
function Retrieve-File {
param (
[String]$File,
[String]$Url
)
Write-Host -BackgroundColor Black -ForegroundColor Yellow "Downloading ${File}..."
Invoke-WebRequest -UseBasicParsing -Uri $Url -OutFile "files\$File" -ErrorAction Stop
}
function Test-Hash {
param (
[String]$File,
[String]$Hash
)
Write-Host -BackgroundColor Black -ForegroundColor Cyan "Verifying ${File}..."
$fileHash = (Get-FileHash -Path "files\$File" -Algorithm SHA256 -ErrorAction Stop).Hash
return ($fileHash.ToLower() -eq $Hash)
}
if($ForDownload.IsPresent) {
$files = $filesDownload
} else {
$files = $filesConvert
}
if(-not (Test-Path -PathType Container -Path "files")) {
$null = New-Item -Path "files" -ItemType Directory
}
foreach($file in $files) {
try {
Retrieve-File -File $file -Url $urls[$file]
} catch {
Write-Host "Failed to download $file"
Write-Host $_
Exit 1
}
}
Write-Host ""
foreach($file in $files) {
if(-not (Test-Hash -File $file -Hash $hashes[$file])) {
Write-Error "$file appears to be tampered with"
Exit 1
}
}
Write-Host ""
Write-Host -BackgroundColor Black -ForegroundColor Green "It appears all the dependencies are ready."

View File

@ -1,34 +0,0 @@
Multiplatform UUP converter requirements
========================================
The script requires the following applications:
* cabextract - to extract cabs
* wimlib-imagex - to export files from metadata ESD
* chntpw - to modify registry of first index of boot.wim
* genisoimage or mkisofs - to create ISO image
Linux
-----
If you use Debian or Ubuntu based distribution you can install these using
the following command:
```bash
sudo apt-get install cabextract wimtools chntpw genisoimage
```
If you use Arch Linux you can also install these using the following command:
```bash
sudo pacman -S cabextract wimlib chntpw cdrtools
```
If you use any other distribution, you'll need to check its repository for the
appropriate packages.
macOS
-----
macOS requires [Homebrew](https://brew.sh) to install the prerequisite software.
After Homebrew was installed, you can install the requirements using:
```bash
brew tap sidneys/homebrew
brew install cabextract wimlib cdrtools sidneys/homebrew/chntpw
```

10
get.php
View File

@ -332,9 +332,9 @@ CONFIG;
$zip->addFromString('ConvertConfig.ini', $convertConfig);
$zip->addFromString('files/convert_config_linux', $convertConfigLinux);
$zip->addFromString('files/convert_config_macos', $convertConfigLinux);
$zip->addFile($currDir.'/contrib/autodl_files/readme.unix.md', 'readme.unix.md');
$zip->addFile($currDir.'/contrib/autodl_files/converter_multi', 'files/converter_multi');
$zip->addFile($currDir.'/contrib/autodl_files/depends_win.ps1', 'files/depends_win.ps1');
$zip->addFile($currDir.'/misc/autodl_files/readme.unix.md', 'readme.unix.md');
$zip->addFile($currDir.'/misc/autodl_files/converter_multi', 'files/converter_multi');
$zip->addFile($currDir.'/misc/autodl_files/depends_win.ps1', 'files/depends_win.ps1');
$zip->close();
if($virtualEditions) {
@ -525,8 +525,8 @@ SCRIPT;
$zip->addFromString('uup_download_windows.cmd', $cmdScript);
$zip->addFromString('uup_download_linux.sh', $shellScript);
$zip->addFromString('uup_download_macos.sh', $shellScript);
$zip->addFile($currDir.'/contrib/autodl_files/readme.unix.md', 'readme.unix.md');
$zip->addFile($currDir.'/contrib/autodl_files/depends_win.ps1', 'files/depends_win.ps1');
$zip->addFile($currDir.'/misc/autodl_files/readme.unix.md', 'readme.unix.md');
$zip->addFile($currDir.'/misc/autodl_files/depends_win.ps1', 'files/depends_win.ps1');
$zip->close();
} else {
echo 'Failed to create archive.';