Difference between revisions of "Anri-chan/Source/edit settings.bat"
From SDA Knowledge Base
(New page: <code><nowiki>@ECHO OFF (SET in_anrichan_settings=y) (SET anri_dir=%~dp0) (SET anri_path=%~dp0anri.bat) (SET curdir=%anri_dir%) CALL "%anri_dir%settings.bat" REM SETTINGS (SET vars_to_use...) |
Ballofsnow (Talk | contribs) |
||
Line 1: | Line 1: | ||
− | < | + | <pre><nowiki>@ECHO OFF |
(SET in_anrichan_settings=y) | (SET in_anrichan_settings=y) | ||
(SET anri_dir=%~dp0) | (SET anri_dir=%~dp0) | ||
Line 306: | Line 306: | ||
CD %curdir% | CD %curdir% | ||
TITLE anri-chan dun ^^_^^ | TITLE anri-chan dun ^^_^^ | ||
− | PAUSE</nowiki></ | + | PAUSE</nowiki></pre> |
Latest revision as of 10:13, 18 July 2007
@ECHO OFF (SET in_anrichan_settings=y) (SET anri_dir=%~dp0) (SET anri_path=%~dp0anri.bat) (SET curdir=%anri_dir%) CALL "%anri_dir%settings.bat" REM SETTINGS (SET vars_to_use=temp_files this_anriver done d f vhs onepixel nes twod statid statid1 statid2 statid3 driveletter chapternumber projname gba gameboy odd dvdsource vbo prog trim trim1 trim2 create_hq create_mq create_lq create_iq create_xm create_xl using_settings check_now avipath deflicker twodtemp) (SET anri_ver=b7) REM LETZGOH CALL :resetvars CALL :out_cls_info Here you can define your default settings for anri-chan, so they won't be asked by anri-chan. Enter "x" if you don't want to use a default setting. PAUSE CALL :out_cls_section MOVIE SOURCE CALL :q_dvdsource IF "%dvdsource%"=="y" ( CALL :q_driveletter CALL :q_vbo CALL :q_chapternumber CALL :q_mpa ) CALL :out_cls_section GAME PROPERTIES CALL :q_dfnd IF "%dfnd%"=="y" CALL :q_update_anri CALL :out_cls_section VIDEO PROPERTIES CALL :q_prog IF "%prog%"=="y" GOTO contprop CALL :q_vhs IF "%d%"=="1" GOTO contprop CALL :q_odd CALL :q_onepixel CALL :q_nes IF "%nes%"=="y" GOTO contprop CALL :q_gba IF "%gba%"=="y" GOTO contprop CALL :q_gameboy IF "%gameboy%"=="y" GOTO contprop CALL :q_deflicker :contprop CALL :out_cls_section CONTENT PROPERTIES CALL :q_statid CALL :q_encodenow CALL :create_settings_file CALL :resetvars GOTO die :q_dfnd SET s= SET /P s=Use anri-chan's game database by default? [y,n,x] CALL :set_var_bool dfnd q_dfnd IF "%dfnd%"=="y" CALL :dfnd GOTO :EOF :q_dvdsource SET s= SET /P s=DVD source by default? [y,n,x]: CALL :set_var_bool dvdsource q_dvdsource GOTO :EOF :q_driveletter SET s= SET /P s=Default DVD Drive Letter: CALL :set_var_letter driveletter q_driveletter GOTO :EOF :q_vbo SET s= SET /P s=Use DVD-RAM .VRO source? Answer n if you don't know [y,n,x]: CALL :set_var_bool vbo q_vbo GOTO :EOF :q_chapternumber SET s= SET /P s=Default DVD Chapter Number: CALL :set_var_number chapternumber q_chapternumber 9 GOTO :EOF :q_mpa SET s= SET /P s=MPA Audio? Answer n if you don't know [y,n,x]: CALL :set_var_bool mpa q_mpa GOTO :EOF :q_prog SET s= SET /P s=Progressive scan source? Answer n if you don't know [y,n,x]: CALL :set_var_bool prog q_prog GOTO :EOF :q_vhs SET s= SET /P s=Originally VHS [y,n,x]: CALL :set_var_bool vhs q_vhs GOTO :EOF :q_odd SET s= SET /P s=Odd dominant ... answer n if you don't know [y,n,x]: CALL :set_var_bool odd q_odd GOTO :EOF :q_onepixel SET s= SET /P s=1 pixel bob ... answer y if it's jumping up and down [y,n,x]: CALL :set_var_bool onepixel q_onepixel GOTO :EOF :q_nes SET s= SET /P s=NES [y,n,x]: CALL :set_var_bool nes q_nes GOTO :EOF :q_gba SET s= SET /P s=Game Boy Advance [y,n,x]: CALL :set_var_bool gba q_gba GOTO :EOF :q_gameboy SET s= SET /P s=Game Boy [y,n,x]: CALL :set_var_bool gameboy q_gameboy GOTO :EOF :q_deflicker SET s= SET /P s=Deflickered (rereleased old game e.g. Mega Man AC, Sonic Mega Collection, Wii Virtual Console) [y,n,x]: CALL :set_var_bool deflicker q_deflicker GOTO :EOF :q_statid SET s= SET /P s=Do you want to append an SDA Station ID to the front and end? [y,n,x]: CALL :set_var_bool statid q_statid_p2 GOTO :EOF :q_encodenow SET s= SET /P s="Do you want to start encoding now [Y] or save the job for a later date [N]? [y,n,x]" CALL :set_var_bool start_encode q_encodenow GOTO :EOF :q_update_anri SET s= SET /P s="Do you want to update Anri-chan's games database? [y,n,x] " CALL :set_var_bool check_now q_update_anri GOTO :EOF :q_submit_dfnd SET s= SET /P s="Submit this game's DFnD data to SDA? [y,n] " CALL :set_var_bool submit_dfnd q_submit_dfnd GOTO :EOF REM SUBROUTINES TO VALIDATE/SET VARIABLES :set_var_bool IF "%s%"=="y" ( SET %1=y SET _%1=y GOTO :EOF ) IF "%s%"=="n" ( SET %1=n SET _%1=y GOTO :EOF ) IF "%s%"=="x" ( SET _%1=n GOTO :EOF ) CALL :out_error Invalid value. Please enter Y (Yes) or N (No). GOTO :%2 :set_var_letter ECHO %s%|findStr /i "^[a-z]$">nul IF "%s%"=="x" ( SET _%1=n GOTO :EOF ) IF %ERRORLEVEL%==0 ( SET %1=%s% SET _%1=y GOTO :EOF ) ELSE ( CALL :out_error Invalid value. Please enter a single letter. GOTO :%2 ) :set_var_number IF "%s%"=="x" ( SET _%1=n GOTO :EOF ) ECHO %s%|findStr "[^0-9]">nul IF %ERRORLEVEL%==0 ( CALL :out_error Invalid value. Please enter a number. GOTO :%2 ) IF "%3"=="" GOTO :napproved IF %s% GTR %3% ( CALL :out_error Invalid value. The maximum value is %3. GOTO :%2 ) :napproved SET %1=%s% SET _%1=y GOTO :EOF REM SAVE IT BUTCH :create_settings_file CD %curdir% ECHO @ECHO OFF > "settings.bat" ECHO ^(SET dvdsource=%dvdsource%^) >> "settings.bat" ECHO ^(SET mpa=%mpa%^) >> "settings.bat" ECHO ^(SET driveletter=%driveletter%^) >> "settings.bat" ECHO ^(SET vhs=%vhs%^) >> "settings.bat" ECHO ^(SET onepixel=%onepixel%^) >> "settings.bat" ECHO ^(SET nes=%nes%^) >> "settings.bat" ECHO ^(SET statid=%statid%^) >> "settings.bat" ECHO ^(SET driveletter=%driveletter%^) >> "settings.bat" ECHO ^(SET chapternumber=%chapternumber%^) >> "settings.bat" ECHO ^(SET gba=%gba%^) >> "settings.bat" ECHO ^(SET gb=%gameboy%^) >> "settings.bat" ECHO ^(SET odd=%odd%^) >> "settings.bat" ECHO ^(SET dvdsource=%dvdsource%^) >> "settings.bat" ECHO ^(SET vbo=%vbo%^) >> "settings.bat" ECHO ^(SET prog=%prog%^) >> "settings.bat" ECHO ^(SET encodenow=%encodenow%^) >> "settings.bat" ECHO ^(SET _dvdsource=%_dvdsource%^) >> "settings.bat" ECHO ^(SET _mpa=%_mpa%^) >> "settings.bat" ECHO ^(SET _driveletter=%_driveletter%^) >> "settings.bat" ECHO ^(SET _vhs=%_vhs%^) >> "settings.bat" ECHO ^(SET _onepixel=%_onepixel%^) >> "settings.bat" ECHO ^(SET _nes=%_nes%^) >> "settings.bat" ECHO ^(SET _statid=%_statid%^) >> "settings.bat" ECHO ^(SET _driveletter=%_driveletter%^) >> "settings.bat" ECHO ^(SET _chapternumber=%_chapternumber%^) >> "settings.bat" ECHO ^(SET _gba=%_gba%^) >> "settings.bat" ECHO ^(SET _gb=%_gameboy%^) >> "settings.bat" ECHO ^(SET _odd=%_odd%^) >> "settings.bat" ECHO ^(SET _dvdsource=%_dvdsource%^) >> "settings.bat" ECHO ^(SET _vbo=%_vbo%^) >> "settings.bat" ECHO ^(SET _prog=%_prog%^) >> "settings.bat" ECHO ^(SET _encodenow=%_encodenow%^) >> "settings.bat" GOTO :EOF REM OUTPUT :out_cls CLS ECHO. ECHO =============================================================================== ECHO. metroid 2002 speed demos archive anri-chan %anri_ver% ECHO. http://www.metroid2002.com/ http://speeddemosarchive.com/ ECHO =============================================================================== ECHO. GOTO :EOF :out_info ECHO %* REM ECHO. GOTO :EOF :out_error ECHO [!] ECHO [!] %* ECHO [!] ECHO. GOTO :EOF :out_section TITLE anri-chan %anri_ver% - %* ECHO ------------------------- ECHO. %* ECHO ------------------------- ECHO. GOTO :EOF :out_cls_section CALL :out_cls CALL :out_section %* GOTO :EOF :out_cls_info CALL :out_cls CALL :out_info %* GOTO :EOF :resetvars FOR %%A IN (%vars_to_use%) DO (SET %%A=) GOTO :EOF :die CALL :resetvars (SET in_anrichan=) CD %curdir% TITLE anri-chan dun ^^_^^ PAUSE