forked from shizukachan/atelier_pak_decrypt
-
Notifications
You must be signed in to change notification settings - Fork 25
/
Copy pathtest_gmpk.cmd
61 lines (55 loc) · 1.28 KB
/
test_gmpk.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
@rem This test script performs unpack and repack of GMPK
@rem archives and validates that the data matches.
@rem The GMPK test files can be found in the PC version of
@rem Fatal Frame - Maiden of Black Water
@rem
@echo off
setlocal EnableDelayedExpansion
set EXT=gmpk
set TST=.test
call build.cmd cmp
call build.cmd %EXT%
if %ERRORLEVEL% neq 0 goto err
set list=^
BOCHI_00^
G_HAK_A^
G_KAG_D^
H_KYO_A^
H_MIU_A^
H_MIU_D_WiiU^
H_MIU_M_WiiU^
H_MIU_S^
R_PHO_A^
H_YRI_A^
H_YRI_A_WiiU^
H_YRI_V
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