Switch: fix build, add build instructions, avoid using delete()
This commit is contained in:
parent
488bbb267a
commit
875bc0b1c2
6 changed files with 54 additions and 24 deletions
41
backends/platform/sdl/switch/README.SWITCH
Normal file
41
backends/platform/sdl/switch/README.SWITCH
Normal file
|
@ -0,0 +1,41 @@
|
|||
ScummVM-Switch README
|
||||
==============================================================================
|
||||
|
||||
Installation
|
||||
============
|
||||
- Copy the relevant game datafiles to your sd card (location doesn't matter).
|
||||
- Install ScummVM like any other homebrew.
|
||||
- After installation you should have a file `/switch/scummvm/scummvm.nro`
|
||||
- Run ScummVM and use the launcher to add games and run them.
|
||||
- Press the plus key to return to the launcher and play another game.
|
||||
|
||||
Notes
|
||||
=====
|
||||
- This README may be outdated, for more up-to-date instructions and notes see
|
||||
the Switch Port Wiki: https://wiki.scummvm.org/index.php/Nintendo_Switch
|
||||
|
||||
Building the source code
|
||||
========================
|
||||
To build ScummVM for Switch:
|
||||
|
||||
- Obtain the ScummVM source code from https://github.com/scummvm/scummvm
|
||||
|
||||
- Install devkitPro for Switch (https://switchbrew.org/wiki/Setting_up_Development_Environment)
|
||||
|
||||
- Ensure your $DEVKITPRO variable is set via `export DEVKITPRO="/opt/devkitpro"`
|
||||
|
||||
- Ensure your $DEVKITA64 variable is set via `export DEVKITA64="/opt/devkitpro/devkitA64"`
|
||||
|
||||
- Ensure devkitPro binaries are in your path via `export PATH="$DEVKITA64/bin:$DEVKITPRO/tools/bin:$PATH"`
|
||||
|
||||
- Install libraries via `sudo -E dkp-pacman -S switch-portlibs` (or just `pacman -S switch-portlibs`)
|
||||
|
||||
- Create a subdirectory somewhere outside the source folder for your ScummVM build and cd into it
|
||||
|
||||
- Execute the command `configure --host=switch`
|
||||
|
||||
- Execute the command `make scummvm_switch.zip`
|
||||
|
||||
Port Authors
|
||||
============
|
||||
cpasjuste
|
|
@ -52,7 +52,7 @@ int main(int argc, char *argv[]) {
|
|||
int res = scummvm_main(argc, argv);
|
||||
|
||||
// Free OSystem
|
||||
delete (OSystem_Switch *)g_system;
|
||||
g_system->destroy();
|
||||
|
||||
#ifdef __SWITCH_DEBUG__
|
||||
socketExit();
|
||||
|
|
|
@ -87,16 +87,6 @@ void OSystem_Switch::initBackend() {
|
|||
OSystem_SDL::initBackend();
|
||||
}
|
||||
|
||||
bool OSystem_Switch::hasFeature(Feature f) {
|
||||
|
||||
if (f == kFeatureDisplayLogFile)
|
||||
return false;
|
||||
if (f == kFeatureOpenUrl)
|
||||
return false;
|
||||
|
||||
return OSystem_SDL::hasFeature(f);
|
||||
}
|
||||
|
||||
void OSystem_Switch::logMessage(LogMessageType::Type type, const char *message) {
|
||||
printf("%s\n", message);
|
||||
}
|
||||
|
|
|
@ -33,7 +33,6 @@ public:
|
|||
|
||||
virtual void init() override;
|
||||
virtual void initBackend() override;
|
||||
virtual bool hasFeature(Feature f) override;
|
||||
virtual void logMessage(LogMessageType::Type type, const char *message) override;
|
||||
|
||||
protected:
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
scummvm.nro: $(EXECUTABLE)
|
||||
mkdir -p $(srcdir)/switch_release/scummvm/data
|
||||
mkdir -p $(srcdir)/switch_release/scummvm/doc
|
||||
nacptool --create "ScummVM" "Cpasjuste" "2.12" $(srcdir)/switch_release/scummvm.nacp
|
||||
elf2nro $(EXECUTABLE) $(srcdir)/switch_release/scummvm/scummvm.nro --icon=$(srcdir)/dists/switch/icon.jpg --nacp=$(srcdir)/switch_release/scummvm.nacp
|
||||
mkdir -p ./switch_release/scummvm/data
|
||||
mkdir -p ./switch_release/scummvm/doc
|
||||
nacptool --create "ScummVM" "Cpasjuste" "2.12" ./switch_release/scummvm.nacp
|
||||
elf2nro $(EXECUTABLE) ./switch_release/scummvm/scummvm.nro --icon=$(srcdir)/dists/switch/icon.jpg --nacp=./switch_release/scummvm.nacp
|
||||
|
||||
scummvm_switch.zip: scummvm.nro
|
||||
rm -f $(srcdir)/switch_release/scummvm.nacp
|
||||
cp $(srcdir)/backends/vkeybd/packs/vkeybd_default.zip $(srcdir)/switch_release/scummvm/data
|
||||
cp $(srcdir)/backends/vkeybd/packs/vkeybd_small.zip $(srcdir)/switch_release/scummvm/data
|
||||
cp $(DIST_FILES_THEMES) $(srcdir)/switch_release/scummvm/data
|
||||
rm -f ./switch_release/scummvm.nacp
|
||||
cp $(srcdir)/backends/vkeybd/packs/vkeybd_default.zip ./switch_release/scummvm/data
|
||||
cp $(srcdir)/backends/vkeybd/packs/vkeybd_small.zip ./switch_release/scummvm/data
|
||||
cp $(DIST_FILES_THEMES) ./switch_release/scummvm/data
|
||||
ifdef DIST_FILES_ENGINEDATA
|
||||
cp $(DIST_FILES_ENGINEDATA) $(srcdir)/switch_release/scummvm/data
|
||||
cp $(DIST_FILES_ENGINEDATA) ./switch_release/scummvm/data
|
||||
endif
|
||||
cp $(DIST_FILES_DOCS) $(srcdir)/switch_release/scummvm/doc/
|
||||
cd $(srcdir)/switch_release && zip -r ../scummvm_switch.zip . && cd ..
|
||||
cp $(DIST_FILES_DOCS) ./switch_release/scummvm/doc/
|
||||
cd ./switch_release && zip -r ../scummvm_switch.zip . && cd ..
|
||||
|
||||
.PHONY: scummvm.nro scummvm_switch.zip
|
||||
|
||||
|
|
2
configure
vendored
2
configure
vendored
|
@ -1688,7 +1688,7 @@ samsungtv)
|
|||
;;
|
||||
switch)
|
||||
_host_os=switch
|
||||
_host_cpu=arm
|
||||
_host_cpu=aarch64
|
||||
_host_alias=aarch64-none-elf
|
||||
test "x$prefix" = xNONE && prefix=.
|
||||
datarootdir='${prefix}/data'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue