Files
TachideskJUI/scripts/SetupWindows.ps1
Syer10 c06ea33112 Many Many updates and fixes!
Update to Tachidesk 0.3.7
Update to compose build198
State persistence for the sources menu!
Update setup scripts for using a specific version of Tachidesk
Backup support
Context menu now half works
Server service fixes
Chapter context menu to mark as read and other features
Start screen customization
Extension update and obsolete support
2021-05-19 17:27:48 -04:00

38 lines
1.4 KiB
PowerShell

if ($(Split-Path -Path (Get-Location) -Leaf) -eq "scripts" ) {
Set-Location ..
}
Remove-Item -Recurse -Force "tmp" -ErrorAction SilentlyContinue | Out-Null
New-Item -ItemType Directory -Force -Path "tmp"
Write-Output "Getting latest Tachidesk build files"
#$zipball = (Invoke-WebRequest -Uri "https://api.github.com/repos/Suwayomi/Tachidesk/releases/latest" -UseBasicParsing).content | Select-String -Pattern 'https[\.:\/A-Za-z0-9]*zipball\/[a-zA-Z0-9.]*' -CaseSensitive
#Invoke-WebRequest -Uri $zipball.Matches.Value -OutFile tmp/Tachidesk.zip -UseBasicParsing
Invoke-WebRequest -Uri "https://github.com/Suwayomi/Tachidesk/archive/refs/tags/v0.3.7.zip" -OutFile tmp/Tachidesk.zip -UseBasicParsing
Expand-Archive -Path "tmp/Tachidesk.zip" -DestinationPath "tmp"
$tachidesk_folder = Get-ChildItem -Path "tmp" | Where-Object {$_.Name -match ".*Tachidesk-[a-z0-9\.]*"} | Select-Object FullName
Push-Location $tachidesk_folder.FullName
Write-Output "Setting up android.jar"
&"./AndroidCompat/getAndroid.ps1"
Write-Output "Building Tachidesk.jar"
&"./gradlew" :server:shadowJar -x :webUI:copyBuild
$tachidesk_jar = $(Get-ChildItem "server/build" | Where-Object { $_.Name -match '.*\.jar' })[0].FullName
Pop-Location
Write-Output "Copying Tachidesk.jar to resources folder..."
Move-Item -Force $tachidesk_jar "src/main/resources/Tachidesk.jar" -ErrorAction SilentlyContinue
Write-Output "Cleaning up..."
Remove-Item -Recurse -Force "tmp" | Out-Null
Write-Output "Done!"