Commit 2ce72e08 authored by Carlos Donizete Froes's avatar Carlos Donizete Froes 🐧

Import Upstream version 1.4.1

parents
###############################################################################
# (c) Copyright holder 2012-2017 PokeMMO.eu <linux@pokemmo.eu>
# - The permitted usage of the PokeMMO game client is defined by
# a non-free license. Visit https://pokemmo.eu/tos
#
# (c) Copyright 2017 Launcher created by Carlos Donizete Froes
# This is free software, licensed under the GPL-3 license.
###############################################################################
**version: 1.4.1**
* Acquired originally from the official site
* Modified script name: 'pokemmo-launch' for 'pokemmo.sh'
* Imported from the official package the file "bootstrapper"
* Reinscribed the game manpage
* Added desktop file
* Added official icon in format (png) size 512 pixels
**version: 1.4.0**
* Update bootstrapper to version 15/12/2017
* Fixes Java 9 compatibility on certain platforms (Deb Buster, etc.)
**version: 1.3.0**
* Update bootstrapper to version 19/08/2017
* Reduce default heap RAM to 384M
* Fix Error 4 permission check
* Add persistent config for home directory (-H)
* Add: --debug --swr --skip-java-ram-opts
* Change: -r to --reverify
**version: 1.2.0**
* Fix various issues with file integrity checks
* Update bootstrapper to version 23/12/2016
* Add -H
**version: 1.1.0**
* Fix POSIX compliancy for main launcher script
* Fix installation for gnome-software
**version: 1.0.0**
* Initial release
This diff is collapsed.
###############################################################################
# (c) Copyright holder 2012-2017 PokeMMO.eu <linux@pokemmo.eu>
# - The permitted usage of the PokeMMO game client is defined by
# a non-free license. Visit https://pokemmo.eu/tos
#
# (c) Copyright 2017 Launcher created by Carlos Donizete Froes
# This is free software, licensed under the GPL-3 license.
###############################################################################
EXE = pokemmo
SRCDIR = src
PREFIX = $(DESTDIR)/usr
BINDIR = $(PREFIX)/games
GAMEDIR = $(PREFIX)/share/games
ICNDIR = $(PREFIX)/share/pixmaps
APPDIR = $(PREFIX)/share/applications
SCRIPT = pokemmo.sh
DATA = pokemmo_bootstrapper.jar
ICON = pokemmo.png
DESKTOP = pokemmo.desktop
CP = cp -f
RM = rm -rf
MD = mkdir -p
ECHO = echo
CHMOD = chmod 755
all:
@$(CP) "$(SRCDIR)/$(SCRIPT)" "$(EXE)"
@$(CHMOD) "$(EXE)"
@$(ECHO) "Created executable script successfully"
clean:
@$(RM) $(EXE)
@$(ECHO) "Removed script executable successfully"
install: all
@$(MD) "$(BINDIR)"
@$(CP) "$(EXE)" "$(BINDIR)"
@$(MD) "$(GAMEDIR)/$(EXE)"
@$(CP) "$(SRCDIR)/$(DATA)" "$(GAMEDIR)/$(EXE)"
@$(MD) "$(ICNDIR)"
@$(CP) "$(SRCDIR)/$(ICON)" "$(ICNDIR)"
@$(MD) "$(APPDIR)"
@$(CP) "$(SRCDIR)/$(DESKTOP)" "$(APPDIR)"
@$(ECHO) "Installed the files successfully"
uninstall: clean
@$(RM) "$(BINDIR)/$(EXE)"
@$(RM) "$(GAMEDIR)/$(EXE)"
@$(RM) "$(ICNDIR)/$(ICON)"
@$(RM) "$(APPDIR)/$(DESKTOP)"
@$(ECHO) "Successfully removed"
.PHONY: all clean install uninstall
PokeMMO for GNU/Linux
=====================
PokeMMO is an emulator of several popular console games with additional
features and multiplayer capabilities.
But you can face other players and even form groups with your friends, do joint
battles and group missions.
You can call them to duel with you or even watch the fight with other people.
**Register**
------------
PokeMMO is a free to play mmorpg, come join a growing community as you level
up and discover new monsters.
To play this game, you need to make a free registration on the official website
- https://pokemmo.eu/account
**Important Request**
---------------------
This program downloads and installs the PokeMMO client to a user's home directory.
You need to enter in the hidden personal directory (**$HOME/.pokemmo/roms**)
the roms of the games in the versions **Game Boy Advance** and **Nintendo DS**.
* Current Required Compatible ROMS: Black/White 1
* Current Optional Content Compatible ROMS: Fire Red, Emerald
* Current Optional Visuals Compatible ROMS: HeartGold, SoulSilver
> **You must have the legal right to use that rom. We will not supply you with
> the roms, or help you find them as they are copyrighted.**
**Installation dependency: Debian/Ubuntu**
------------------------------------------
# apt install default-jre make zenity
When all these dependencies have installed, simply run the script.
Next you need to compile this release.
**Compilation**
---------------
To build game, do from the source directory:
$ make clean && make
Once the compilation has finished, execute the created binary:
$ ./pokemmo
**Make Install and Make Uninstall**
-----------------------------------
In this second option it will be installed as root:
# make install
Once completed, it will appear in the application menu.
To make the removal, within the compiled directory, execute this command:
# make uninstall
**License**
-----------
(c) Copyright holder 2012-2017 **PokeMMO.eu** - <linux@pokemmo.eu>
**Terms of Service:** https://pokemmo.eu/tos
(c) Copyright 2017 Launcher created by Carlos Donizete Froes [a.k.a coringao]
This is free software, you can redistribute it and/or modify it under the terms
of the GNU General Public License as published by the Free Software Foundation,
either version 3 of the License, or any later version.
.TH pokemmo "6" "December 2017" "PokeMMO" "Multiplayer online game based on the Pokemon universe"
.SH NAME
pokemmo \- is a free to play mmorpg, come join a growing community as you level
up and discover new monsters.
.br
.PP
.SH SYNOPSIS
.B pokemmo
[
.BI - options
]
.br
.PP
.SH DESCRIPTION
.br
PokeMMO is an emulator of several popular console games with additional features
and multiplayer capabilities.
.PP
In this game, you can play as you would on the portable video game,
but you can face other players and even form groups with your friends,
do joint battles and group missions.
.PP
You can call them to duel with you or even watch the fight with other people.
.PP
This launcher assists with the download, installation, and maintenance of
the game client.
.br
.PP
.SH REGISTER
.br
To play this game, you need to make a free registration
on the official website - https://pokemmo.eu/account
.br
.PP
.SH IMPORTANT REQUEST
.br
This program downloads and installs the PokeMMO client to a user's home directory.
.PP
You need to enter in the hidden personal directory (**$HOME/.pokemmo/roms**)
the roms of the games in the versions **Game Boy Advance** and **Nintendo DS**.
.PP
Locate compatible *ROMS* using the ingame menu:
.PP
.br
* Current Required Compatible ROMS: Black/White 1
.br
* Current Optional Content Compatible ROMS: Fire Red, Emerald
.br
* Current Optional Visuals Compatible ROMS: HeartGold, SoulSilver
.br
.PP
.TP
.B You must have the legal right to use that rom.
.TP
.B We will not supply you with the roms, or help you find them as they are copyrighted.
.br
.PP
.SH OPTIONS
.TP
.B -h
Displays help text.
.TP
.B -H <dir>
Defines the PokeMMO directory to the target, instead of $HOME/.pokemmo
.TP
.B -v
Verbose output in stdout.
.TP
.B --debug
Enables debugging of child java processes (Client and Updater)
.TP
.B --swr
When launching, the client will attempt to use a software renderer if one is available. If the client is in a Mesa3D environment, LIBGL_ALWAYS_SOFTWARE will be enabled. Otherwise the internal LWJGL2 swr will be enabled.
.TP
.B --reverify
Reverify the contents of the PokeMMO directory using the bootstrapper. This process is non-destructive.
.TP
.B --skip-java-ram-opts
Use the operating system's default settings for java RAM allocation (-Xmx & -Xms)
.br
.PP
.SH AUTHOR
.br
The PokeMMO game client is developed by PokeMMO.eu <admin@pokemmo.eu>.
.br
The permitted usage of the PokeMMO game client is defined by a non-free license.
.br
The content of this license can be found in the game client after an account's
first login or at https://pokemmo.eu/tos
.PP
This manual page was written by Carlos Donizete Froes [a.k.a coringao],
for the Debian project (but may be used by others).
[Desktop Entry]
Name=PokeMMO
Comment=Online game based on the Pokemon universe
Exec=pokemmo
Keywords=game;adventure;MMO;multiplayer;online;fantasy;emulator;
Terminal=false
Type=Application
Icon=pokemmo
Categories=Game;AdventureGame;Emulator;RolePlaying;
#!/bin/bash
#
# (c) Copyright holder 2012-2017 PokeMMO.eu <linux@pokemmo.eu>
# - The permitted usage of the PokeMMO game client is defined by
# a non-free license. Visit https://pokemmo.eu/tos
#
# (c) Copyright 2017 Launch edited by Carlos Donizete Froes [a.k.a coringao]
# This is free software, licensed under the GPL-3 license.
#
# Modified script name: 'pokemmo-launch' for 'pokemmo.sh'
# Edited version: '1.4.1'
getLauncherConfig() {
while read i; do
case $i in
installed=1) PKMO_IS_INSTALLED=1 ;;
debugs=1) PKMO_CREATE_DEBUGS=1 ;;
homedir=*) POKEMMO=$(echo "$i" | cut -c9-) ;;
*) continue ;;
esac
done <"$PKMOLAUNCHERCONFIG"
}
getJavaOpts() {
JAVA_OPTS=()
case "$1" in
client)
if [[ ! $SKIPJAVARAMOPTS ]]; then
JAVA_OPTS=(-Xms128M)
if [ -f "$POKEMMO/PokeMMO.l4j.ini" ]; then
JAVA_OPTS+=($(grep -oE "\-Xmx[0-9]{1,4}(M|G)" "$POKEMMO/PokeMMO.l4j.ini" || echo -- "-Xmx384M"))
else
JAVA_OPTS+=(-Xmx384M)
fi
fi
[[ $PKMO_CREATE_DEBUGS ]] && JAVA_OPTS+=(-XX:+UnlockDiagnosticVMOptions -XX:+LogVMOutput -XX:LogFile=client_jvm.log)
[[ $PKMO_CREATE_DEBUGS && $LIBGL_ALWAYS_SOFTWARE ]] && JAVA_OPTS+=(-Dorg.lwjgl.opengl.Display.allowSoftwareOpenGL=true)
;;
updater)
[[ ! $SKIPJAVARAMOPTS ]] && JAVA_OPTS=(-Xms64M -Xmx128M)
[[ $PKMO_CREATE_DEBUGS ]] && JAVA_OPTS+=(-XX:+UnlockDiagnosticVMOptions -XX:+LogVMOutput -XX:LogFile=updater_jvm.log)
;;
esac
echo "Java options were ${JAVA_OPTS[*]}"
}
showMessage() {
if [ "$(command -v zenity)" ]; then
case "$1" in
--info) zenity --info --text="$2" ; echo "INFO: $2" ;;
--error) zenity --error --text="$2" ; echo "ERROR: $2" ; exit 1 ;;
--warn) zenity --warning --text="$2" ; echo "WARNING: $2" ;;
esac
elif [ "$(command -v kdialog)" ]; then
case "$1" in
--info) kdialog --passivepopup "$2" ; echo "INFO: $2" ;;
--error) kdialog --error "$2" ; echo "ERROR: $2" ; exit 1 ;;
--warn) kdialog --sorry "$2" ; echo "WARNING: $2" ;;
esac
else
case "$1" in
--info) echo "INFO: $2" ;;
--error) echo "ERROR: $2" ; exit 1 ;;
--warn) echo "WARNING: $2" ;;
esac
fi
}
downloadPokemmo() {
rm -f "$PKMOLAUNCHERCONFIG"
find "$POKEMMO" -type f -name "*.TEMPORARY" -exec rm -f {} +
cp -f src/pokemmo_bootstrapper.jar "$POKEMMO/"
cp -f /usr/share/games/pokemmo/pokemmo_bootstrapper.jar "$POKEMMO/"
# Updater exits with 1 on successful update
getJavaOpts "updater"
(cd "$POKEMMO" && java ${JAVA_OPTS[*]} -cp ./pokemmo_bootstrapper.jar com.pokeemu.updater.ClientUpdater -install -quick) && exit 1 || echo "installed=1" >> "$PKMOLAUNCHERCONFIG"
rm -f "$POKEMMO/pokemmo_bootstrapper.jar"
if [[ $PKMO_IS_INSTALLED ]]; then
# Rebuild the launcher config
[[ $PKMO_CREATE_DEBUGS ]] && echo "debugs=1" >> "$PKMOLAUNCHERCONFIG"
[[ $POKEMMO ]] && echo "homedir=$POKEMMO" >> "$PKMOLAUNCHERCONFIG"
fi
}
verifyInstallation() {
if [ ! -d "$POKEMMO" ]; then
if [[ -e "$POKEMMO" || -L "$POKEMMO" ]]; then
# Could also be a broken symlink
showMessage --error $"(Error 3) Could not install to $POKEMMO\n\n$POKEMMO already exists,\nbut is not a directory.\n\nMove or delete this file and try again."
else
mkdir -p "$POKEMMO"
showMessage --info $"PokeMMO is being installed to $POKEMMO"
downloadPokemmo
return
fi
fi
if [[ ! -r "$POKEMMO" || ! -w "$POKEMMO" || ! -x "$POKEMMO" || ! "$PKMO_IS_INSTALLED" || ! -f "$POKEMMO/PokeMMO.exe" || ! -d "$POKEMMO/data" || ! -d "$POKEMMO/lib" ]]; then
showMessage --warn $"(Error 1) The installation is in a corrupt state.\n\nReverifying the game files."
# Try to fix permissions before erroring out
(find "$POKEMMO" -type d -exec chmod u+rwx {} + && find "$POKEMMO" -type f -exec chmod u+rw {} +) || showMessage --error $"(Error 4) Could not fix permissions of $POKEMMO.\n\nContact PokeMMO support."
downloadPokemmo
return
fi
[[ $PKMO_REINSTALL && $PKMO_IS_INSTALLED ]] && downloadPokemmo
}
######################
# Environment checks #
######################
if [[ ! -z "$XDG_CONFIG_HOME" ]]; then
PKMOLAUNCHERCONFIG="$XDG_CONFIG_HOME/pokemmo"
else
PKMOLAUNCHERCONFIG="$HOME/.config/pokemmo"
fi
export TEXTDOMAIN=pokemmo
export TEXTDOMAINDIR="/usr/share/locale/"
if [[ ! -d "$HOME" || ! -r "$HOME" || ! -w "$HOME" || ! -x "$HOME" ]]; then showMessage --error $"(Error 5) $HOME is not accessible. Exiting.." ; fi
[[ ! "$(command -v java)" ]] && showMessage --error $"(Error 6) Java is not installed or is not executable. Exiting.."
while getopts "vhH:-:" opt; do
case $opt in
-) case "$OPTARG" in
skip-java-ram-opts) SKIPJAVARAMOPTS=1 ;;
reverify) PKMO_REINSTALL=1 ;;
debug) PKMO_CREATE_DEBUGS=1 ;;
swr) export LIBGL_ALWAYS_SOFTWARE=1 ;;
esac
;;
v) set -x
PS4='Line ${LINENO}: '
;;
h) printf "\
PokeMMO Linux Launcher v1.4\n\
https://pokemmo.eu/\n\n\
Usage: pokemmo [option...]\n\n\
-h Display this dialogue\n\
-H <dir> Set the PokeMMO directory (Default: $HOME/.pokemmo).
This option is persistent and may be modified in $PKMOLAUNCHERCONFIG \n\
-v Print verbose status to stdout\n
--debug Enable java debug logs\n\
--swr Try to fallback to an available software renderer\n\
--reverify Reverify the game files\n\
--skip-java-ram-opts Use the operating system's default RAM options instead of the suggested values\n"
exit
;;
H) POKEMMO="$OPTARG"
echo "homedir=$OPTARG" >> "$PKMOLAUNCHERCONFIG";;
esac
done
#################
# Start PokeMMO #
#################
getLauncherConfig
[[ -z "$POKEMMO" ]] && POKEMMO="$HOME/.pokemmo"
verifyInstallation
getJavaOpts "client"
cd "$POKEMMO" && java ${JAVA_OPTS[*]} -cp ./lib/*:PokeMMO.exe com.pokeemu.client.Client > /dev/null
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment