1@echo off
2
3REM Path to the Layout Binary Converter
4set LYTCVTR=%NW4R_ROOT%\CommandLineTools\bin\nw4r_lytcvtr.exe
5REM Major version of the Layout Binary Converter
6set LYTCVTRVER=2
7REM Banner mode option for the Layout Binary Converter
8set LYTCVTRBNROPT=--banner
9
10REM Determine which line of the Layout Binary Converter's output contains
11REM version information, and extract the major version value.
12for /F "skip=1 tokens=1,2" %%i in ('%LYTCVTR% 2^> nul') do if "%%i"  == "Version" for /F "delims=." %%k in ("%%j") do set LYTCVTRVER=%%k
13
14REM Clear the banner mode option when the major version is zero
15if "%LYTCVTRVER%" == "0" set LYTCVTRBNROPT=
16
17IF EXIST arc rmdir /s /q arc
18mkdir arc
19
20REM If the outside keyframe segment setting is set as "repeat," the --bake-infinity option is required.
21%LYTCVTR% -g --bake-infinity %LYTCVTRBNROPT% banner\layout arc
22
23REM If the layout binary converter fails, the process is stopped.
24if errorlevel 1 goto error
25
26IF EXIST arc\fnta rmdir /s /q arc\fnta
27%REVOLUTION_SDK_ROOT%\X86\bin\darch.exe -c arc banner.arc
28
29if errorlevel 1 goto error
30
31rmdir /s /q arc
32
33mkdir arc
34
35%LYTCVTR% %LYTCVTRBNROPT% icon\layout arc
36
37REM If the layout binary converter fails, the process is stopped.
38if errorlevel 1 goto error
39
40IF EXIST arc\fnta rmdir /s /q arc\fnta
41%REVOLUTION_SDK_ROOT%\X86\bin\darch.exe -c arc icon.arc
42
43if errorlevel 1 goto error
44
45rmdir /s /q arc
46%REVOLUTION_SDK_ROOT%\X86\bin\WiiMakeBanner.exe -j banner.cfg.txt -o opening.bnr
47
48if errorlevel 1 goto error
49
50goto end
51
52:error
53echo Failed
54pause
55goto end
56
57:end
58