-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
Co-authored-by: Cpasjuste <[email protected]> Signed-off-by: Caroline Bell <[email protected]>
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: 🔄 Switch Builds | ||
on: | ||
workflow_call: | ||
|
||
# Global Cache Settings | ||
env: | ||
GODOT_BASE_BRANCH: 3.5 | ||
SCONS_CACHE_LIMIT: 4096 | ||
|
||
jobs: | ||
switch-template: | ||
runs-on: ubuntu-latest | ||
container: devkitpro/devkita64 | ||
|
||
name: Template (target=release, tools=no) | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
# Upload cache on completion and check it out now | ||
- name: Load .scons_cache directory | ||
id: switch-template-cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{github.workspace}}/.scons_cache/ | ||
key: ${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}} | ||
restore-keys: | | ||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}}-${{github.sha}} | ||
${{github.job}}-${{env.GODOT_BASE_BRANCH}}-${{github.ref}} | ||
${{github.job}}-${{env.GODOT_BASE_BRANCH}} | ||
- name: Install scons from pip | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get -y install python3-pip | ||
sudo python3 -m pip install scons | ||
- name: Compilation | ||
env: | ||
SCONS_CACHE: ${{github.workspace}}/.scons_cache/ | ||
run: | | ||
scons -j2 verbose=yes warnings=all werror=no platform=switch target=release tools=no | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: ${{ github.job }} | ||
path: bin/* | ||
retention-days: 14 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# Godot for Switch | ||
|
||
It's a port of the Godot open source game engine to the Switch, via homebrew libraries provided by devkitPro/switchbrew. | ||
See the original [README.md](./README.md) for info about Godot. | ||
|
||
## Releases | ||
|
||
See [the GitHub releases page](https://github.com/Homebrodot/Godot/releases) for pre-built editors for Windows, macOS and | ||
Linux. | ||
|
||
## How do I export my game? | ||
|
||
The editor builds above add a `Switch` exporter to the list - it will generate a .nro and a .pck file that can be | ||
transferred to your Switch. | ||
If additional debugging is required, sending the nro via nxlink (make sure to send it to the right place with the -p | ||
argument) will allow the output of the console to be viewed on PC. | ||
|
||
## How to build? | ||
|
||
You shouldn't need to build the engine if you use a release as the templates should be included - these instructions are | ||
for development! | ||
|
||
[See the official docs](https://docs.godotengine.org/en/latest/development/compiling/) | ||
for compilation instructions for every officially supported platform. | ||
|
||
### For Switch: | ||
|
||
Install these packages from [devkitPro pacman](https://devkitpro.org/wiki/devkitPro_pacman): | ||
`switch-pkg-config switch-freetype switch-bulletphysics switch-libtheora switch-libpcre2 switch-mesa switch-opusfile switch-mbedtls switch-libwebp switch-libvpx switch-miniupnpc switch-libzstd switch-wslay` | ||
then run `scons platform=switch` in the root of the repo. Add `target=release` to build for release instead of debug. | ||
|
||
Then, to build an engine release for Switch, | ||
run `./scripts/create-switch-release.sh` in the root of the repo. | ||
|
||
Or to build an export template for the editor, | ||
run `./scripts/create-switch-template.sh` in the root of the repo. | ||
|
||
## How can I get help? | ||
|
||
Either make an issue on this repo, or join the [Discord](https://discord.gg/yUC3rUk "Homebrodot - Godot Homebrew Hub")! | ||
|
||
# Credits | ||
|
||
* Thanks to devkitPro / switchbrew for producing devkitA64/libnx. | ||
* Extra special thanks to fincs from devkitPro - This port would have never been possible without their port of the open | ||
source nouveau graphics driver. | ||
* cpasjuste for help with development. | ||
* fhidalgosola/utnad for their port / help with development. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,79 +1,71 @@ | ||
# Godot Engine | ||
[![Godot Engine logo](/logo.png)](https://godotengine.org) | ||
|
||
<p align="center"> | ||
<a href="https://godotengine.org"> | ||
<img src="logo_outlined.svg" width="400" alt="Godot Engine logo"> | ||
</a> | ||
</p> | ||
## Godot Engine | ||
|
||
## 2D and 3D cross-platform game engine | ||
Homepage: https://godotengine.org | ||
|
||
**[Godot Engine](https://godotengine.org) is a feature-packed, cross-platform | ||
game engine to create 2D and 3D games from a unified interface.** It provides a | ||
comprehensive set of [common tools](https://godotengine.org/features), so that users can focus on making games | ||
without having to reinvent the wheel. Games can be exported with one click to a | ||
number of platforms, including the major desktop platforms (Linux, macOS, | ||
Windows), mobile platforms (Android, iOS), as well as Web-based platforms | ||
(HTML5) and | ||
[consoles](https://docs.godotengine.org/en/latest/tutorials/platform/consoles.html). | ||
#### 2D and 3D cross-platform game engine | ||
|
||
## Free, open source and community-driven | ||
Godot Engine is a feature-packed, cross-platform game engine to create 2D and | ||
3D games from a unified interface. It provides a comprehensive set of common | ||
tools, so that users can focus on making games without having to reinvent the | ||
wheel. Games can be exported in one click to a number of platforms, including | ||
the major desktop platforms (Linux, Mac OSX, Windows) as well as mobile | ||
(Android, iOS) and web-based (HTML5) platforms. | ||
|
||
Godot is completely free and open source under the very permissive [MIT license](https://godotengine.org/license). | ||
#### Free, open source and community-driven | ||
|
||
Godot is completely free and open source under the very permissive MIT license. | ||
No strings attached, no royalties, nothing. The users' games are theirs, down | ||
to the last line of engine code. Godot's development is fully independent and | ||
community-driven, empowering users to help shape their engine to match their | ||
expectations. It is supported by the [Software Freedom Conservancy](https://sfconservancy.org/) | ||
expectations. It is supported by the Software Freedom Conservancy | ||
not-for-profit. | ||
|
||
Before being open sourced in [February 2014](https://github.com/godotengine/godot/commit/0b806ee0fc9097fa7bda7ac0109191c9c5e0a1ac), | ||
Godot had been developed by [Juan Linietsky](https://github.com/reduz) and | ||
[Ariel Manzur](https://github.com/punto-) (both still maintaining the project) for several | ||
Before being open sourced in February 2014, Godot had been developed by Juan | ||
Linietsky and Ariel Manzur (both still maintaining the project) for several | ||
years as an in-house engine, used to publish several work-for-hire titles. | ||
|
||
![Screenshot of a 3D scene in the Godot Engine editor](https://raw.githubusercontent.com/godotengine/godot-design/master/screenshots/editor_tps_demo_1920x1080.jpg) | ||
![Screenshot of a 3D scene in Godot Engine](https://download.tuxfamily.org/godotengine/media/screenshots/editor_3d_fracteed.jpg) | ||
|
||
## Getting the engine | ||
### Getting the engine | ||
|
||
### Binary downloads | ||
#### Binary downloads | ||
|
||
Official binaries for the Godot editor and the export templates can be found | ||
[on the homepage](https://godotengine.org/download). | ||
|
||
### Compiling from source | ||
#### Compiling from source | ||
|
||
[See the official docs](https://docs.godotengine.org/en/latest/development/compiling/) | ||
for compilation instructions for every supported platform. | ||
|
||
## Community and contributing | ||
### Community and contributing | ||
|
||
Godot is not only an engine but an ever-growing community of users and engine | ||
developers. The main community channels are listed [on the homepage](https://godotengine.org/community). | ||
|
||
The best way to get in touch with the core engine developers is to join the | ||
[Godot Contributors Chat](https://chat.godotengine.org). | ||
To get in touch with the developers, the best way is to join the | ||
[#godotengine IRC channel](https://webchat.freenode.net/?channels=godotengine) | ||
on Freenode. | ||
|
||
To get started contributing to the project, see the [contributing guide](CONTRIBUTING.md). | ||
|
||
## Documentation and demos | ||
### Documentation and demos | ||
|
||
The official documentation is hosted on [ReadTheDocs](https://docs.godotengine.org). | ||
It is maintained by the Godot community in its own [GitHub repository](https://github.com/godotengine/godot-docs). | ||
|
||
The [class reference](https://docs.godotengine.org/en/latest/classes/) | ||
is also accessible from the Godot editor. | ||
is also accessible from within the engine. | ||
|
||
We also maintain official demos in their own [GitHub repository](https://github.com/godotengine/godot-demo-projects) | ||
as well as a list of [awesome Godot community resources](https://github.com/godotengine/awesome-godot). | ||
The official demos are maintained in their own [GitHub repository](https://github.com/godotengine/godot-demo-projects) | ||
as well. | ||
|
||
There are also a number of other | ||
[learning resources](https://docs.godotengine.org/en/latest/community/tutorials.html) | ||
provided by the community, such as text and video tutorials, demos, etc. | ||
Consult the [community channels](https://godotengine.org/community) | ||
for more information. | ||
There are also a number of other learning resources provided by the community, | ||
such as text and video tutorials, demos, etc. Consult the [community channels](https://godotengine.org/community) | ||
for more info. | ||
|
||
[![Actions Build Status](https://github.com/godotengine/godot/workflows/Godot/badge.svg?branch=master)](https://github.com/godotengine/godot/actions) | ||
[![Travis Build Status](https://travis-ci.org/godotengine/godot.svg?branch=master)](https://travis-ci.org/godotengine/godot) | ||
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/bfiihqq6byxsjxxh/branch/master?svg=true)](https://ci.appveyor.com/project/akien-mga/godot) | ||
[![Code Triagers Badge](https://www.codetriage.com/godotengine/godot/badges/users.svg)](https://www.codetriage.com/godotengine/godot) | ||
[![Translate on Weblate](https://hosted.weblate.org/widgets/godot-engine/-/godot/svg-badge.svg)](https://hosted.weblate.org/engage/godot-engine/?utm_source=widget) | ||
[![Total alerts on LGTM](https://img.shields.io/lgtm/alerts/g/godotengine/godot.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/godotengine/godot/alerts) | ||
[![TODOs](https://badgen.net/https/api.tickgit.com/badgen/github.com/godotengine/godot)](https://www.tickgit.com/browse?repo=github.com/godotengine/godot) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -420,6 +420,14 @@ Error ProjectSettings::_setup(const String &p_path, const String &p_main_pack, b | |
} | ||
#endif | ||
|
||
#ifdef HORIZON_ENABLED | ||
if (!found) { | ||
if (_load_resource_pack("romfs:/game.pck")) { | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
hokaze
|
||
found = true; | ||
} | ||
} | ||
#endif | ||
|
||
if (!found) { | ||
// Try to load data pack at the location of the executable. | ||
// As mentioned above, we have two potential names to attempt. | ||
|
@Homebrodot/nintendo-switch @Homebrodot/godot-3 Can't we just override
OS.get_resource_path
inos_switch.cpp
to avoid making an engine edit here?Godot/core/project_settings.cpp
Lines 362 to 364 in f950ebd