好吧,我已经编写了一个 bat 文件,用于在我离开我的游戏男孩时加载我的 pokemon 备份,但是我已经转换为 linux,并且在我的 exe 中获取 .BAT 文件时遇到了问题(我我已经将 exe 反编译回源代码)以作为 .SH 工作,我真的找不到太多关于如何使用 shell 命令作为它们在 BAT 文件中的相同功能:/ 我也很想知道如何将 SH 文件设置为从当前目录加载并在 wine 中运行所述程序。
这是我的 .BAT 文件,它在 windows 下 100% 完美运行,但拒绝在 wine 下运行或在 wine 下可移植的 CMD 提示符
`:MENU
CLS
ECHO ============= RawX GBA's =============
ECHO -------------------------------------
ECHO 1. Pokemon Crystal
ECHO 2. Pokemon Green
ECHO 3. Pokemon Gold
ECHO 4. Pokemon Pikachu
ECHO 5. Pokemon Ruby
ECHO 6. Pokemon Chaos Black
Echo 7. Pokemon Silver
ECHO 8. Pokemon White (NDS)
ECHO 9.
Echo 10.
Echo 11.
Echo 12. Pokemon Black (NDS)
ECHO ==========PRESS 'Q' TO QUIT==========
ECHO.
color fc
SET INPUT=
SET /P INPUT=Please select a number:
IF /I '%INPUT%'=='1' GOTO Selection1
IF /I '%INPUT%'=='2' GOTO Selection2
IF /I '%INPUT%'=='3' GOTO Selection3
IF /I '%INPUT%'=='4' GOTO Selection4
IF /I '%INPUT%'=='5' GOTO Selection5
IF /I '%INPUT%'=='6' GOTO Selection6
IF /I '%INPUT%'=='7' GOTO Selection7
IF /I '%INPUT%'=='8' GOTO Selection8
IF /I '%INPUT%'=='9' GOTO Selection9
IF /I '%INPUT%'=='10' GOTO Selection10
IF /I '%INPUT%'=='11' GOTO Selection11
IF /I '%INPUT%'=='12' GOTO Selection12
IF /I '%INPUT%'=='Q' GOTO Quit
CLS
ECHO ============INVALID INPUT============
ECHO -------------------------------------
ECHO Please select a number from the Main
echo Menu [1-9] or select 'Q' to quit.
ECHO -------------------------------------
ECHO ======PRESS ANY KEY TO CONTINUE======
PAUSE > NUL
GOTO MENU
:Selection1
:1
".\VisualBoyAdvance.exe" ".\Pokemon Crystal.zip"
goto menu
:Selection2
:2
".\VisualBoyAdvance.exe" ".\Pokemon Green.zip"
goto menu
:Selection3
".\VisualBoyAdvance.exe" ".\Pokemon Gold.zip"
goto menu
:Selection4
".\VisualBoyAdvance.exe" ".\Poke'mon Pikachu.zip"
goto menu
:Selection5
".\VisualBoyAdvance.exe" ".\Pokemon Ruby.zip"
goto menu
:Selection6
".\VisualBoyAdvance.exe" ".\Pokemon - Chaos Black.zip"
goto menu
:Selection7
".\VisualBoyAdvance.exe" ".\Pokemon Silver.zip"
goto menu
:Selection8
".\desmume.exe" ".\PokeWhite.zip"
goto menu
:Selection12
".\desmume.exe" ".\PokeBlack.zip"
goto menu
:Quit
CLS
ECHO ==============THANK YOU===============
ECHO -------------------------------------
ECHO ======PRESS ANY KEY TO CONTINUE======
PAUSE>NUL
EXIT`