DeadlyFoez Posted February 11, 2013 Share Posted February 11, 2013 (edited) Easy LUA DecompilerThe Easy LUA Decompiler is a batch file that aids in the decompiling of compiled LUA files. The original batch file was written by [MENTION=6393]Aoredon[/MENTION] and was posted HERE. I have taken [MENTION=6393]Aoredon[/MENTION]'s batch file greatly extended it's capabilities and usefulness.Features [*]Single file drag and drop support [*]Prompts before overwriting a fileRequirements [*]Easy LUA Decompiler [*]unluacNOTE: Both Easy LUA Decompiler and unluac must be in the same directory. The program will halt and inform you if unluac.jar is not in the same folder.Source Code@Echo offset ProgDir=%~dp0if not exist %ProgDir%unluac.jar goto NoUnluacif "%1"=="" goto START:NEXTSHIFTif not %ProgDir% == %~dp1 copy %1 %ProgDir%%~nx1 > NULset targetFile=%~nx1goto CHECKDEC:SHIFTINGSHIFTgoto NEXTSHIFT:STARTSet targetFile=CLSEcho Easy LUA Decompiler V0.3Echo.Echo Instructions:Echo Enter the filename of the LUA file you want to decompile.Echo Leave blank and press [Enter] to exit.Echo.set /p targetFile="Enter target file name: "if %targetFile% == NULL goto ENDclsif exist %targetFile%.lua goto ADDEXTif exist %targetFile% goto CHECKDECgoto NOTFOUND:ADDEXTset targetFile=%targetFile%.luagoto CHECKDEC:CHECKDECif exist %~dp1dec_%targetFile% goto OVERWRITEgoto DECOMPILE:OVERWRITEEcho WARNING: %~dp1dec_%targetFile% already exists.choice /c:YN /m "Would you like to overwrite the file"if errorlevel 2 goto ARGUSTART:DECOMPILEJava -jar %ProgDir%unluac.jar %targetFile% > dec_%targetFile%if not %ProgDir% == %~dp1 goto CLEANINGif not "%1"=="" goto endclsEcho File decompiled succesfully. Echo Input File: %~dp1%targetfile% Echo Output File: %~dp1dec_%targetfile%Echo.pausegoto START:NOTFOUNDEcho The specified file was not found.Echo.pausegoto START:ARGUSTARTif not "%1"=="" goto endgoto START:CLEANINGmove dec_%targetFile% %~dp1dec_%targetFile% > NULdel %ProgDir%%targetFile%if not "%2"=="" goto SHIFTING:ENDif not "%2"=="" goto SHIFTINGexit:NOUNLUACecho ERROR: unluac.jar not found.echo Program must exit.goto ENDVersion HistoryV0.1 - Initial ReleaseV0.2 - Added single file drag and drop supportV0.3 - Added multiple file drag and drop supportYou can now drag and drop files from other directoriesProgram will halt if unluac.jar is not in the same folder as Easy LUA DecompilerKnown IssuesDrag and drop does not work if any of the parent folders has a space in it's name. That will be fixed in the next version. Edited February 12, 2013 by DeadlyFoez Link to comment Share on other sites More sharing options...
Aoredon Posted February 12, 2013 Share Posted February 12, 2013 Vouch for this :)You've done a good job on it. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now