forked from shizukachan/atelier_pak_decrypt
-
Notifications
You must be signed in to change notification settings - Fork 25
/
test_g1t.cmd
78 lines (72 loc) · 1.61 KB
/
test_g1t.cmd
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
@rem This test script performs unpack and repack of G1T textures and
@rem validates that the data matches.
@rem The latest texture test files can be downloaded from:
@rem https://github.com/VitaSmith/test_g1t/archive/refs/tags/2023-04-05.zip
@rem
@echo off
setlocal EnableDelayedExpansion
set EXT=g1t
set TST=.test
call build.cmd cmp
call build.cmd %EXT%
if %ERRORLEVEL% neq 0 goto err
set list=^
type_01_sw^
type_01_win^
type_04_win^
type_08_ps3^
type_09_ps4^
type_10_psv^
type_10_psv_2^
type_12_psv^
type_12_psv_2^
type_21_sw^
type_3c_3ds^
type_3d_3ds^
type_45_3ds^
type_59_win^
type_59_win_2^
type_5b_win^
type_5b_win_2^
type_5b_win_3^
type_5c_win^
type_5e_win^
type_5e_win_2^
type_5f_sw^
type_5f_win^
type_5f_win_2^
type_5f_win_3^
type_5f_win_4^
type_60_ps4^
type_62_ps4^
type_62_ps4_2
for %%a in (%list%) do (
if exist %%a.%EXT%.bak move /y %%a.%EXT%.bak %%a.%EXT% >NUL 2>&1
)
for %%a in (%list%) do (
echo | set /p PrintName=* %%a.%EXT%...
if exist %%a.%EXT% (
gust_%EXT%.exe -y %%a.%EXT% >%TST% 2>&1
if !ERRORLEVEL! neq 0 goto err
gust_%EXT%.exe -y %%a >%TST% 2>&1
if !ERRORLEVEL! neq 0 goto err
gust_cmp.exe %%a.%EXT% %%a.%EXT%.bak >%TST% 2>&1
if !ERRORLEVEL! neq 0 goto err
echo [PASS]
) else (
echo [SKIP]
)
)
echo [ALL TESTS PASSED]
goto out
:err
echo [FAIL]
echo.
echo ----------------------- FAILURE DATA -----------------------
type %TST%
echo ------------------------------------------------------------
:out
for %%a in (%list%) do (
if exist %%a.%EXT%.bak move /y %%a.%EXT%.bak %%a.%EXT% >NUL 2>&1
)
del /q %TST% >NUL 2>&1