Skip to content

Commit

Permalink
Remove lite version.
Browse files Browse the repository at this point in the history
Signed-off-by: Thomas Rohloff <[email protected]>
  • Loading branch information
V10lator committed Aug 4, 2024
1 parent a09c9eb commit 5139c0a
Show file tree
Hide file tree
Showing 22 changed files with 22 additions and 187 deletions.
4 changes: 0 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,6 @@ CFLAGS := $(MACHDEP) -Ofast -flto=auto -fno-fat-lto-objects \
-Wno-implicit-fallthrough \
-D__WIIU__ -D__WUT__ -DIOAPI_NO_64 -D__unix__

ifeq ($(strip $(LITE)), 1)
CFLAGS += -DNUSSPLI_LITE
endif

CXXFLAGS := $(CFLAGS) -std=c++20 -fpermissive
ASFLAGS := -g $(ARCH)
LDFLAGS := -g $(ARCH) $(RPXSPECS) $(CFLAGS) -Wl,-Map,$(notdir $*.map)
Expand Down
12 changes: 2 additions & 10 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def cDownload(url, file):

editionList = ["-DEBUG", ""]
extList = [".rpx", ".zip", ".wuhb"]
pkgList = ["Aroma", "Channel", "Lite"]
pkgList = ["Aroma", "Channel"]
for edition in editionList:
for ext in extList:
checkAndDeleteFile(f"NUSspli-{version}{edition}{ext}")
Expand All @@ -79,7 +79,7 @@ def cDownload(url, file):
for pkg in pkgList:
checkAndDeleteFile(f"zips/NUSspli-{version}-{pkg}{edition}{ext}")

tmpArray = ["out/Aroma-DEBUG", "out/Lite-DEBUG", "out/Channel-DEBUG", "NUStmp/code"]
tmpArray = ["out/Aroma-DEBUG", "out/Channel-DEBUG", "NUStmp/code"]
for path in tmpArray:
os.makedirs(path)
os.makedirs("zips", exist_ok=True)
Expand All @@ -90,8 +90,6 @@ def cDownload(url, file):
for file in files:
if file.endswith(".xcf"):
os.remove(os.path.join(root, file))
if file.__contains__("-Lite"):
os.remove(os.path.join(root, file))

tmpArray = ["NUSspli.rpx", "NUStmp/meta/app.xml", "NUStmp/meta/cos.xml"]
for file in tmpArray:
Expand All @@ -100,9 +98,6 @@ def cDownload(url, file):
os.system(f"java -jar {nuspacker} -in NUStmp -out out/Channel-DEBUG/NUSspli")
shutil.make_archive(f"zips/NUSspli-{version}-Channel-DEBUG", "zip", "out/Channel-DEBUG", ".")

os.system(f"make clean && make -j$(nproc) LITE=1 debug && {wuhbtool} NUSspli.rpx out/Lite-DEBUG/NUSspli-Lite.wuhb --name=\"NUSspli Lite\" --short-name=\"NUSspli Lite\" --author=V10lator --icon=meta/menu/iconTex-lite.tga --tv-image=meta/menu/bootTvTex-lite.tga --drc-image=meta/menu/bootDrcTex.tga --content=data")
shutil.make_archive(f"zips/NUSspli-{version}-Lite-DEBUG", "zip", "out/Lite-DEBUG", ".")

if not isBeta:
os.makedirs("out/Aroma")
os.system(f"make clean && make -j$(nproc) release && {wuhbtool} NUSspli.rpx out/Aroma/NUSspli.wuhb --name=NUSspli --short-name=NUSspli --author=V10lator --icon=meta/menu/iconTex.tga --tv-image=meta/menu/bootTvTex.tga --drc-image=meta/menu/bootDrcTex.tga --content=data")
Expand All @@ -112,8 +107,5 @@ def cDownload(url, file):
os.makedirs("out/Channel")
os.system(f"java -jar {nuspacker} -in NUStmp -out out/Channel/NUSspli")
shutil.make_archive(f"zips/NUSspli-{version}-Channel", "zip", "out/Channel", ".")
os.makedirs("out/Lite")
os.system(f"make clean && make -j$(nproc) LITE=1 release && {wuhbtool} NUSspli.rpx out/Lite/NUSspli-Lite.wuhb --name=\"NUSspli Lite\" --short-name=\"NUSspli Lite\" --author=V10lator --icon=meta/menu/iconTex-lite.tga --tv-image=meta/menu/bootTvTex-lite.tga --drc-image=meta/menu/bootDrcTex.tga --content=data")
shutil.make_archive(f"zips/NUSspli-{version}-Lite", "zip", "out/Lite", ".")

shutil.rmtree("NUStmp")
9 changes: 2 additions & 7 deletions include/config.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/***************************************************************************
* This file is part of NUSspli. *
* Copyright (c) 2020-2022 V10lator <[email protected]> *
* Copyright (c) 2020-2024 V10lator <[email protected]> *
* Copyright (c) 2022 Xpl0itU <[email protected]> *
* *
* This program is free software; you can redistribute it and/or modify *
Expand Down Expand Up @@ -31,12 +31,7 @@
#include <coreinit/mcp.h>
#pragma GCC diagnostic pop

#ifndef NUSSPLI_LITE
#define CONFIG_PATH NUSDIR_SD "NUSspli.txt"
#else
#define CONFIG_PATH NUSDIR_SD "NUSspli-Lite.txt"
#endif

#define CONFIG_PATH NUSDIR_SD "NUSspli.txt"
#define TITLE_KEY_URL_MAX_SIZE 1024

#ifdef __cplusplus
Expand Down
4 changes: 0 additions & 4 deletions include/queue.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,23 +37,19 @@ extern "C"
{
#endif

#ifndef NUSSPLI_LITE
typedef enum
{
OPERATION_DOWNLOAD = 0x01,
OPERATION_INSTALL = 0x02,
OPERATION_DOWNLOAD_INSTALL = OPERATION_DOWNLOAD | OPERATION_INSTALL,
} OPERATION;
#endif

typedef struct
{
TMD *tmd;
#ifndef NUSSPLI_LITE
size_t tmdSize;
void *rambuf; // TODO
OPERATION operation;
#endif
const TitleEntry *entry;
char titleVer[33];
char folderName[FS_MAX_PATH - 11] __attribute__((__aligned__(0x40)));
Expand Down
Binary file removed meta/menu/bootTvTex-lite.tga
Binary file not shown.
Binary file removed meta/menu/iconTex-lite.tga
Binary file not shown.
6 changes: 1 addition & 5 deletions src/cfw.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/***************************************************************************
* This file is part of NUSspli. *
* Copyright (c) 2020-2022 V10lator <[email protected]> *
* Copyright (c) 2020-2024 V10lator <[email protected]> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
Expand Down Expand Up @@ -93,17 +93,13 @@ const char *cfwValid()
if(s == MOCHA_RESULT_UNSUPPORTED_API_VERSION || s == MOCHA_RESULT_UNSUPPORTED_COMMAND)
return printCfwError("Can't dummy load RPX: %s", Mocha_GetStatusStr(s));

#ifndef NUSSPLI_LITE
if(!isChannel())
{
#endif
char path[FS_MAX_PATH];
RPXLoaderStatus rs = RPXLoader_GetPathOfRunningExecutable(path, FS_MAX_PATH);
if(rs != RPX_LOADER_RESULT_SUCCESS)
return printCfwError("RPXLoader error: %s", RPXLoader_GetStatusStr(rs));
#ifndef NUSSPLI_LITE
}
#endif

for(; oi < 6; ++oi)
{
Expand Down
12 changes: 1 addition & 11 deletions src/config.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/***************************************************************************
* This file is part of NUSspli. *
* Copyright (c) 2020-2022 V10lator <[email protected]> *
* Copyright (c) 2020-2024 V10lator <[email protected]> *
* Copyright (c) 2022 Xpl0itU <[email protected]> *
* *
* This program is free software; you can redistribute it and/or modify *
Expand Down Expand Up @@ -77,10 +77,8 @@ static bool autoResume = true;
static Swkbd_LanguageType lang = Swkbd_LanguageType__Invalid;
static Swkbd_LanguageType sysLang;
static Swkbd_LanguageType menuLang = Swkbd_LanguageType__English;
#ifndef NUSSPLI_LITE
static bool dlToUSB = true;
static MCPRegion regionSetting = MCP_REGION_EUROPE | MCP_REGION_USA | MCP_REGION_JAPAN;
#endif
static NOTIF_METHOD notifSetting = NOTIF_METHOD_RUMBLE | NOTIF_METHOD_LED;

static inline void intSetMenuLanguage()
Expand Down Expand Up @@ -249,7 +247,6 @@ void initConfig()
changed = true;
}

#ifndef NUSSPLI_LITE
configEntry = json_object_get(json, "Region");
if(configEntry != NULL && json_is_string(configEntry))
{
Expand All @@ -276,7 +273,6 @@ void initConfig()
addToScreenLog("Download to setting not found!");
changed = true;
}
#endif

configEntry = json_object_get(json, "Notification method");
if(configEntry != NULL && json_is_string(configEntry))
Expand Down Expand Up @@ -403,14 +399,12 @@ void saveConfig(bool force)
value = json_string(getLanguageString(lang));
if(setValue(config, "Keyboard language", value))
{
#ifndef NUSSPLI_LITE
value = json_string(getFormattedRegion(getRegion()));
if(setValue(config, "Region", value))
{
value = dlToUSB ? json_true() : json_false();
if(setValue(config, "Download to USB", value))
{
#endif
value = json_string(getNotificationString(getNotificationMethod()));
if(setValue(config, "Notification method", value))
{
Expand Down Expand Up @@ -438,10 +432,8 @@ void saveConfig(bool force)
}
}
}
#ifndef NUSSPLI_LITE
}
}
#endif
}
}
}
Expand Down Expand Up @@ -500,7 +492,6 @@ const char *getFormattedRegion(MCPRegion region)
return region & MCP_REGION_JAPAN ? SET_JPN : "Unknown";
}

#ifndef NUSSPLI_LITE
bool dlToUSBenabled()
{
return dlToUSB;
Expand Down Expand Up @@ -528,7 +519,6 @@ void setRegion(MCPRegion region)
regionSetting = region;
changed = true;
}
#endif

Swkbd_LanguageType getMenuLanguage()
{
Expand Down
2 changes: 0 additions & 2 deletions src/downloader.c
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,6 @@ int downloadFile(const char *url, char *file, downloadData *data, FileType type,
return 0;
}

#ifndef NUSSPLI_LITE
bool downloadTitle(const TMD *tmd, size_t tmdSize, const TitleEntry *titleEntry, const char *titleVer, char *folderName, bool inst, NUSDEV dlDev, bool toUSB, bool keepFiles, QUEUE_DATA *queueData)
{
char tid[17];
Expand Down Expand Up @@ -1149,7 +1148,6 @@ bool downloadTitle(const TMD *tmd, size_t tmdSize, const TitleEntry *titleEntry,

return ret;
}
#endif

RAMBUF *allocRamBuf()
{
Expand Down
4 changes: 1 addition & 3 deletions src/main.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/***************************************************************************
* This file is part of NUSspli. *
* Copyright (c) 2019-2020 Pokes303 *
* Copyright (c) 2020-2022 V10lator <[email protected]> *
* Copyright (c) 2020-2024 V10lator <[email protected]> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
Expand Down Expand Up @@ -147,9 +147,7 @@ static void innerMain()
checkStacks("main()");
if(!updateCheck())
{
#ifndef NUSSPLI_LITE
initFSSpace();
#endif
checkStacks("main");
mainMenu(); // main loop
checkStacks("main");
Expand Down
12 changes: 1 addition & 11 deletions src/menu/configMenu.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/***************************************************************************
* This file is part of NUSspli. *
* Copyright (c) 2020-2022 V10lator <[email protected]> *
* Copyright (c) 2020-2024 V10lator <[email protected]> *
* Copyright (c) 2022 Xpl0itU <[email protected]> *
* *
* This program is free software; you can redistribute it and/or modify *
Expand Down Expand Up @@ -35,11 +35,7 @@
#include <coreinit/mcp.h>
#pragma GCC diagnostic pop

#ifndef NUSSPLI_LITE
#define ENTRY_COUNT 4
#else
#define ENTRY_COUNT 3
#endif

static int cursorPos = 0;

Expand Down Expand Up @@ -68,12 +64,10 @@ static void drawConfigMenu()
strcat(toScreen, localise(getNotificationString(getNotificationMethod())));
textToFrame(3, 4, toScreen);

#ifndef NUSSPLI_LITE
strcpy(toScreen, localise("Region:"));
strcat(toScreen, " ");
strcat(toScreen, localise(getFormattedRegion(getRegion())));
textToFrame(4, 4, toScreen);
#endif

lineToFrame(MAX_LINES - 2, SCREEN_COLOR_WHITE);
textToFrame(MAX_LINES - 1, ALIGNED_CENTER, localise("Press " BUTTON_B " to return"));
Expand Down Expand Up @@ -193,7 +187,6 @@ static inline void switchNotificationMethod()
setNotificationMethod(m);
}

#ifndef NUSSPLI_LITE
static inline void switchRegion()
{
MCPRegion reg = getRegion();
Expand Down Expand Up @@ -235,7 +228,6 @@ static inline void switchRegion()

setRegion(reg);
}
#endif

void configMenu()
{
Expand Down Expand Up @@ -276,11 +268,9 @@ void configMenu()
case 3:
switchNotificationMethod();
break;
#ifndef NUSSPLI_LITE
case 4:
switchRegion();
break;
#endif
}

redraw = true;
Expand Down
6 changes: 1 addition & 5 deletions src/menu/downloadMenu.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/***************************************************************************
* This file is part of NUSspli. *
* Copyright (c) 2019-2020 Pokes303 *
* Copyright (c) 2020-2022 V10lator <[email protected]> *
* Copyright (c) 2020-2024 V10lator <[email protected]> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
Expand All @@ -17,8 +17,6 @@
* with this program; if not, If not, see <http://www.gnu.org/licenses/>. *
***************************************************************************/

#ifndef NUSSPLI_LITE

#include <wut-fixups.h>

#include <stdint.h>
Expand Down Expand Up @@ -63,5 +61,3 @@ bool downloadMenu()

return false;
}

#endif // ifndef NUSSPLI_LITE
4 changes: 1 addition & 3 deletions src/menu/installerMenu.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/***************************************************************************
* This file is part of NUSspli. *
* Copyright (c) 2020-2022 V10lator <[email protected]> *
* Copyright (c) 2020-2024 V10lator <[email protected]> *
* *
* This program is free software; you can redistribute it and/or modify *
* it under the terms of the GNU General Public License as published by *
Expand Down Expand Up @@ -49,10 +49,8 @@ static bool addToOpQueue(const TitleEntry *entry, const char *dir, const TMD *tm
return false;

titleInfo->tmd = (TMD *)tmd;
#ifndef NUSSPLI_LITE
titleInfo->rambuf = NULL;
titleInfo->operation = OPERATION_INSTALL;
#endif
titleInfo->entry = entry;
strcpy(titleInfo->folderName, dir);
titleInfo->dlDev = fromDev;
Expand Down
Loading

0 comments on commit 5139c0a

Please sign in to comment.