-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.ps1
20 lines (16 loc) · 857 Bytes
/
build.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Make ZIP archive
tar.exe -a -c -f FS25_LeaseToOwn.zip Logger.lua LeaseToOwn.lua LeaseToOwnEvent.lua modDesc.xml icon_leasetoown.dds
# Define the path to the "Documents" folder, user and language independent
$documentsPath = [System.Environment]::GetFolderPath('MyDocuments')
# Combine the "Documents" path with "My Games\FarmingSimulator2025\mods" folder
$modsFolderPath = Join-Path -Path $documentsPath -ChildPath "My Games\FarmingSimulator2025\mods"
# Check if the mods folder exists
if (Test-Path -Path $modsFolderPath) {
# Copy ZIP to FS25 mods folder
Copy-Item -Path FS25_LeaseToOwn.zip -Destination $modsFolderPath -Force
Write-Output "Build and copied successfully."
} else {
Write-Warning "The path '$modsFolderPath' does not exist."
}
Write-Host "Press any key to exit..."
$x = $Host.UI.RawUI.ReadKey("NoEcho,IncludeKeyDown")