[script] Make equivalent to tsV1
Fixed: functions in functions Added functions: version, menu, pathCombine, pathEscFolder, fileMove, fileCopy, fileDel, mmcConnect, mmcMount, mkdir, dirRead, dirCopy, dirDel, mmcDump, mmcRestore
This commit is contained in:
@@ -89,6 +89,15 @@ void BoxRestOfScreen(){
|
||||
}
|
||||
|
||||
ErrCode_t FolderCopy(const char *locin, const char *locout){
|
||||
if (TConf.explorerCopyMode >= CMODE_CopyFolder){
|
||||
if (strstr(locout, locin) != NULL)
|
||||
return newErrCode(TE_ERR_PATH_IN_PATH);
|
||||
}
|
||||
|
||||
if (!strcmp(locin, locout)){
|
||||
return newErrCode(TE_ERR_SAME_LOC);
|
||||
}
|
||||
|
||||
char *dstPath = CombinePaths(locout, strrchr(locin, '/') + 1);
|
||||
int res = 0;
|
||||
ErrCode_t ret = newErrCode(0);
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
#include "../../script/parser.h"
|
||||
#include "../../script/variables.h"
|
||||
#include <storage/nx_sd.h>
|
||||
#include "../../storage/emummc.h"
|
||||
|
||||
MenuEntry_t FileMenuEntries[] = {
|
||||
{.optionUnion = COLORTORGB(COLOR_WHITE) | SKIPBIT, .name = "-- File menu --"},
|
||||
@@ -83,6 +84,7 @@ void RunScript(char *path, FSEntry_t entry){
|
||||
free(script);
|
||||
|
||||
dictVectorAdd(&ctx.varDict, newDict(CpyStr("_CWD"), (newVar(StringType, 0, .stringType = path))));
|
||||
dictVectorAdd(&ctx.varDict, newDict(CpyStr("_EMU"), (newVar(IntType, 0, emu_cfg.enabled))));
|
||||
|
||||
printError(mainLoop(&ctx));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user