-
Notifications
You must be signed in to change notification settings - Fork 0
/
compile.ps1
48 lines (40 loc) · 1.74 KB
/
compile.ps1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# compile.ps1 - Autobuild PowerShell script.
# Copyright (C) 2023 Makonede
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
[Diagnostics.CodeAnalysis.SuppressMessageAttribute(
'PSUseDeclaredVarsMoreThanAssignments', ''
)]
$PSNativeCommandUseErrorActionPreference = $true
$ErrorActionPreference = 'Stop'
$TID = '01007EF00011E000'
$RELEASE_PATH = "release\atmosphere\contents\$TID"
(Test-Path build) ? (Remove-Item build\* -Recurse -Force) : (
New-Item build -ItemType Directory -Force
)
py -3 tools\botw-link config\botw-link.toml -cvV 160
if (Test-Path release) { Remove-Item release -Recurse -Force }
if (Test-Path patched) { Remove-Item patched -Recurse -Force }
New-Item $RELEASE_PATH\exefs -ItemType Directory -Force
Copy-Item build\LinkCannon.nso $RELEASE_PATH\exefs\subsdk9 -Recurse -Force
Copy-Item build\app.npdm $RELEASE_PATH\exefs\main.npdm -Recurse -Force
Copy-Item romfs $RELEASE_PATH -Recurse -Force
py -3 patch.py
Copy-Item patched\* $RELEASE_PATH\romfs -Recurse -Force
Write-Host @'
Build complete. To install, copy the contents of the release folder onto the
root of your microSD card.
Press any key to continue...
'@
[void][System.Console]::ReadKey($true)