Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Port Bot Vice #74

Merged
merged 7 commits into from
Feb 12, 2024
Merged

New Port Bot Vice #74

merged 7 commits into from
Feb 12, 2024

Conversation

Fraxinus88
Copy link
Contributor

New Port for Bot Vice

Game Information

Submission Requirements

CFW Tests

Ensure your game has been tested on all major CFWs:

  • AmberELEC
  • ArkOS
  • JELOS

Resolution Tests

Test all major resolutions:

  • 480x320
  • 640x480
  • 720x720 (RGB30)
  • Higher resolutions (e.g., 1280x720)

File Structure

  • Your port should have the following structure:
    • portname/
      • port.json
      • README.md
      • screenshot.jpg
      • cover.jpg
      • Port Name.sh
      • portname/

Additional Resources

For an in-depth guide on creating a pull request, refer to: PortMaster Game Packaging Guide

Copy link
Collaborator

@Cebion Cebion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Screenshot needs to be 640x480

@Fraxinus88
Copy link
Contributor Author

Updated screenshot

Cebion
Cebion previously approved these changes Feb 11, 2024
Copy link
Collaborator

@JeodC JeodC left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here is an updated launchscript based on new modular files per cfw. We no longer need to include pipewire exports in each launchscript, for example. This means updating the port will be easier if a cfw makes any port breaking changes in the future.

#!/bin/bash
# PORTMASTER: botvice.zip, Bot Vice.sh

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
get_controls
[ -f "${controlfolder}/mod_${CFW_NAME}.txt" ] && source "${controlfolder}/mod_${CFW_NAME}.txt"

$ESUDO chmod 666 /dev/tty0

GAMEDIR="/$directory/ports/botvice"

export LD_LIBRARY_PATH="/usr/lib32:$GAMEDIR/libs:$GAMEDIR/utils/libs"
export GMLOADER_DEPTH_DISABLE=1
export GMLOADER_SAVEDIR="$GAMEDIR/gamedata/"

# We log the execution of the script into log.txt
exec > >(tee "$GAMEDIR/log.txt") 2>&1

# Patch game
cd "$GAMEDIR"
# If "gamedata/game.unx" exists and its size is 4,660,180 bytes, apply the xdelta3 patch
if [ -f "./gamedata/game.unx" ]; then
    file_size=$(ls -l "./gamedata/game.unx" | awk '{print $5}')
    if [ "$file_size" -eq 4660180 ]; then
        $ESUDO ./patch/xdelta3 -d -s gamedata/game.unx -f ./patch/botvice.xdelta gamedata/game.unx
    fi
fi

# If "gamedata/audiogroup1.dat" exists and its size is 12,241,788 bytes, apply the xdelta3 patch
if [ -f "./gamedata/audiogroup1.dat" ]; then
    file_size=$(ls -l "./gamedata/audiogroup1.dat" | awk '{print $5}')
    if [ "$file_size" -eq 12241788 ]; then
        $ESUDO ./patch/xdelta3 -d -s gamedata/audiogroup1.dat -f ./patch/audio1.xdelta gamedata/audiogroup1.dat
    fi
fi

# If "gamedata/audiogroup2.dat" exists and its size is 27,416,556 bytes, apply the xdelta3 patch
if [ -f "./gamedata/audiogroup2.dat" ]; then
    file_size=$(ls -l "./gamedata/audiogroup2.dat" | awk '{print $5}')
    if [ "$file_size" -eq 27416556 ]; then
        $ESUDO ./patch/xdelta3 -d -s gamedata/audiogroup2.dat -f ./patch/audio2.xdelta gamedata/audiogroup2.dat
    fi
fi

cd $GAMEDIR

# Check for file existence before trying to manipulate them:
[ -f "./gamedata/game.win" ] && mv gamedata/data.win gamedata/game.droid
[ -f "./gamedata/game.unx" ] && mv gamedata/game.unx gamedata/game.droid

# Make sure uinput is accessible so we can make use of the gptokeyb controls
$ESUDO chmod 666 /dev/uinput

$GPTOKEYB "gmloader" -c ./botvice.gptk &

$ESUDO chmod +x "$GAMEDIR/gmloader"

./gmloader botvice.apk

$ESUDO kill -9 $(pidof gptokeyb)
$ESUDO systemctl restart oga_events &
printf "\033c" > /dev/tty0

@Fraxinus88
Copy link
Contributor Author

Updated .sh file

@JeodC JeodC self-requested a review February 12, 2024 02:24
JeodC
JeodC previously approved these changes Feb 12, 2024
@@ -0,0 +1,21 @@
## Notes

Special thanks to DYA Games [https://dyagames.com/] for making this wonderful game
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Markdown link is incorrect, it should be:

Special thanks to [DYA Games](https://dyagames.com/) for making this wonderful game

Copy link
Contributor

@kloptops kloptops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

README.md needs fixing.

@Cebion Cebion requested a review from kloptops February 12, 2024 08:53
Copy link
Collaborator

@Cebion Cebion left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@Cebion Cebion requested a review from JeodC February 12, 2024 08:54
Copy link
Contributor

@kloptops kloptops left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@kloptops kloptops merged commit 6efea63 into PortsMaster:main Feb 12, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants