Skip to content

Commit

Permalink
Merge pull request #207 from JanTrueno/Bananaguy-2
Browse files Browse the repository at this point in the history
New Port: Bananaguy 2
  • Loading branch information
Cebion authored Mar 23, 2024
2 parents d7cb9f2 + 7712e13 commit d71bb43
Show file tree
Hide file tree
Showing 14 changed files with 322 additions and 0 deletions.
72 changes: 72 additions & 0 deletions ports/bananaguy2/Bananaguy 2.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
#!/bin/bash

if [ -d "/opt/system/Tools/PortMaster/" ]; then
controlfolder="/opt/system/Tools/PortMaster"
elif [ -d "/opt/tools/PortMaster/" ]; then
controlfolder="/opt/tools/PortMaster"
else
controlfolder="/roms/ports/PortMaster"
fi

source $controlfolder/control.txt
source $controlfolder/device_info.txt

[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"

get_controls

GAMEDIR=/$directory/ports/bananaguy2/
CONFDIR="$GAMEDIR/conf/"

# Ensure the conf directory exists
mkdir -p "$GAMEDIR/conf"

# Set the XDG environment variables for config & savefiles
export XDG_CONFIG_HOME="$CONFDIR"
export XDG_DATA_HOME="$CONFDIR"

cd $GAMEDIR

# Unpack bananaguy2.zip using unzip if it exists
if [[ -f "gamedata/bananaguy2.zip" ]]; then
if "libs/7zzs" x "gamedata/bananaguy2.zip" -o"gamedata"; then
if [[ -f "gamedata/Bananaguy2.pck" ]]; then
$ESUDO rm "gamedata/bananaguy2.zip"
fi
fi
fi





runtime="frt_3.5.2"
if [ ! -f "$controlfolder/libs/${runtime}.squashfs" ]; then
# Check for runtime if not downloaded via PM
if [ ! -f "$controlfolder/harbourmaster" ]; then
echo "This port requires the latest PortMaster to run, please go to https://portmaster.games/ for more info." > /dev/tty0
sleep 5
exit 1
fi

$ESUDO $controlfolder/harbourmaster --quiet --no-check runtime_check "${runtime}.squashfs"
fi

# Setup Godot
godot_dir="$HOME/godot"
godot_file="$controlfolder/libs/${runtime}.squashfs"
$ESUDO mkdir -p "$godot_dir"
$ESUDO umount "$godot_file" || true
$ESUDO mount "$godot_file" "$godot_dir"
PATH="$godot_dir:$PATH"

export FRT_NO_EXIT_SHORTCUTS=FRT_NO_EXIT_SHORTCUTS

$ESUDO chmod 666 /dev/uinput
$GPTOKEYB "$runtime" -c "./bananaguy2.gptk" &
SDL_GAMECONTROLLERCONFIG="$sdl_controllerconfig" "$runtime" $GODOT_OPTS --main-pack "gamedata/Bananaguy2.pck"

$ESUDO umount "$godot_dir"
$ESUDO kill -9 $(pidof gptokeyb)
$ESUDO systemctl restart oga_events &
printf "\033c" > /dev/tty0
17 changes: 17 additions & 0 deletions ports/bananaguy2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
## Notes

Huge thanks to [bananamanhatguy](https://bananamanhatguy.itch.io/) for making this great game and allowing PortMaster to distribute it for free!

Also check out the paid expanded version on Steam for PC: https://store.steampowered.com/app/2346890/Bananaguy/

## Controls

| Button | Action |
|--|--|
|A|Jump|
|X|Peel Dive|
|Y|Coin List|
|Start/Select|Menu|
|DPAD/L-Stick|Movement|


144 changes: 144 additions & 0 deletions ports/bananaguy2/bananaguy2/LICENSE.7zzs.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
7-Zip for Linux and macOS
~~~~~~~~~~~~~~~~~~~~~~~~~
License for use and distribution
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

7-Zip Copyright (C) 1999-2024 Igor Pavlov.

The licenses for 7zz and 7zzs files are:

- The "GNU LGPL" as main license for most of the code
- The "GNU LGPL" with "unRAR license restriction" for some code
- The "BSD 3-clause License" for some code
- The "BSD 2-clause License" for some code

Redistributions in binary form must reproduce related license information from this file.

Note:
You can use 7-Zip on any computer, including a computer in a commercial
organization. You don't need to register or pay for 7-Zip.


GNU LGPL information
--------------------

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.

You can receive a copy of the GNU Lesser General Public License from
http://www.gnu.org/




BSD 3-clause License in 7-Zip code
----------------------------------

The "BSD 3-clause License" is used for the following code in 7z.dll
1) LZFSE data decompression.
That code was derived from the code in the "LZFSE compression library" developed by Apple Inc,
that also uses the "BSD 3-clause License".
2) ZSTD data decompression.
that code was developed using original zstd decoder code as reference code.
The original zstd decoder code was developed by Facebook Inc,
that also uses the "BSD 3-clause License".

Copyright (c) 2015-2016, Apple Inc. All rights reserved.
Copyright (c) Facebook, Inc. All rights reserved.
Copyright (c) 2023-2024 Igor Pavlov.

Text of the "BSD 3-clause License"
----------------------------------

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

3. Neither the name of the copyright holder nor the names of its contributors may
be used to endorse or promote products derived from this software without
specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

---




BSD 2-clause License in 7-Zip code
----------------------------------

The "BSD 2-clause License" is used for the XXH64 code in 7-Zip.

XXH64 code in 7-Zip was derived from the original XXH64 code developed by Yann Collet.

Copyright (c) 2012-2021 Yann Collet.
Copyright (c) 2023-2024 Igor Pavlov.

Text of the "BSD 2-clause License"
----------------------------------

Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

---




unRAR license restriction
-------------------------

The decompression engine for RAR archives was developed using source
code of unRAR program.
All copyrights to original unRAR code are owned by Alexander Roshal.

The license for original unRAR code has the following restriction:

The unRAR sources cannot be used to re-create the RAR compression algorithm,
which is proprietary. Distribution of modified unRAR sources in separate form
or as a part of other software is permitted, provided that it is clearly
stated in the documentation and source comments that the code may
not be used to develop a RAR (WinRAR) compatible archiver.

--
21 changes: 21 additions & 0 deletions ports/bananaguy2/bananaguy2/LICENSE.FRT.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) 2017-2023 Emanuele Fornara

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
6 changes: 6 additions & 0 deletions ports/bananaguy2/bananaguy2/LICENSE.GAME.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
JanTrueno: 02/06/2024

Hello! bananamanhatguy, Im part of a team called PortMaster. We port over games to multiple handheld linux devices running custom versions of Linux. Some of your games peeked my interest, but especially Bananaguy2. That particular game i've already gotten running and i would like to ask you to allow us to distribute the .pck files from your free games. Otherwise gamers would have to download the game on itch.io manually. I look forward to hearing back from you, if you are interested in PortMaster, here is a link: https://portmaster.games/

bananmanhatguy: 02/07/2024
Sure, 'thumbs up'
24 changes: 24 additions & 0 deletions ports/bananaguy2/bananaguy2/bananaguy2.gptk
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
start = esc
select = \"

a = z
b = \"
x = x
y = tab
l1 = \"
l2 = \"
l3 = \"

r1 = \"
r2 = \"
r3 = \"

up = up
down = down
left = left
right = right

left_analog_up = up
left_analog_down = down
left_analog_left = left
left_analog_right = right
Binary file added ports/bananaguy2/bananaguy2/conf/pulse/cookie
Binary file not shown.
Binary file not shown.
Binary file added ports/bananaguy2/bananaguy2/libs/7zzs
Binary file not shown.
Binary file added ports/bananaguy2/bananaguy2/libs/libcrypto.so.1.1
Binary file not shown.
Binary file added ports/bananaguy2/bananaguy2/libs/libzip.so.5
Binary file not shown.
12 changes: 12 additions & 0 deletions ports/bananaguy2/gameinfo.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<gameList>
<game>
<path>./Bananaguy 2.sh</path>
<name>Bananaguy 2</name>
<desc>Bananaguy 2 is about exploring strange and playful worlds collecting \"Power Coins\" along the way which are used to travel to the next world. Each coin features its own wacky little adventure.</desc>
<developer>Bananamanhatguy</developer>
<publisher>Bananamanhatguy</publisher>
<genre>Platformer</genre>
<image>./bananaguy2/screenshot.jpg</image>
</game>
</gameList>
26 changes: 26 additions & 0 deletions ports/bananaguy2/port.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"version": 2,
"name": "bananaguy2.zip",
"items": [
"Bananaguy 2.sh",
"bananaguy2"
],
"items_opt": [],
"attr": {
"title": "Bananaguy 2",
"porter": [
"JanTrueno"
],
"desc": "Bananaguy 2 is about exploring strange and playful worlds collecting \"Power Coins\" along the way which are used to travel to the next world. Each coin features its own wacky little adventure.",
"inst": "This game is ready to run.",
"genres": [
"platformer"
],
"image": null,
"rtr": true,
"exp": false,
"runtime": "frt_3.5.2.squashfs",
"reqs": [],
"arch": []
}
}
Binary file added ports/bananaguy2/screenshot.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d71bb43

Please sign in to comment.