Added support for windows setup (hopefully)

This commit is contained in:
Gvidas Juknevičius 2024-09-19 18:49:50 +03:00
parent affafed441
commit 6e70d38f7f
2 changed files with 24 additions and 0 deletions

View File

@ -15,3 +15,4 @@ cp ./target/x86_64-pc-windows-gnu/release/mcmg.exe ./target/mcmg_win32.exe
cp ./target/x86_64-unknown-linux-gnu/release/mcmg ./target/mcmg_linux_x86_64
cp ./target/aarch64-unknown-linux-gnu/release/mcmg ./target/mcmg_linux_aarch64
cp ./scripts/setup-template.sh "./target/mcmg-setup-$1.sh"
cp ./scripts/setup-template.ps1 "./target/mcmg-setup-$1.ps1"

View File

@ -0,0 +1,23 @@
$MyInvocation.MyCommand.Name -match '([0-9]+\.[0-9]+\.[0-9]+([ab]|(rc[-]*[0-9]*)))'
$Ver = $Matches[1]
if (-not (Get-Command ffmpeg -ErrorAction SilentlyContinue)) {
winget install Gyan.FFmpeg
}
if (-not (Get-Command "yt-dlp" -ErrorAction SilentlyContinue)) {
winget install "yt-dlp.yt-dlp"
}
if (-not (Get-Command spotdl -ErrorAction SilentlyContinue)) {
if (-not (Get-Command python -ErrorAction SilentlyContinue)) {
winget install "Python.Python.3.12"
}
python -m pip install spotdl
}
$url = "https://git.mcorangehq.xyz/XOR64/music/releases/download/$Ver/mcmg_win32.exe"
Invoke-WebRequest -Uri $url -OutFile "mcmg.exe"