[Scummvm-cvs-logs] scummvm master -> 9c885719fd27be0c84ede2f403dc5ab82065ecd4

sev- sev at scummvm.org
Fri Oct 24 18:26:13 CEST 2014


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
9c885719fd GCW0: Initial code for GCW Zero port


Commit: 9c885719fd27be0c84ede2f403dc5ab82065ecd4
    https://github.com/scummvm/scummvm/commit/9c885719fd27be0c84ede2f403dc5ab82065ecd4
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2014-10-24T18:20:37+02:00

Commit Message:
GCW0: Initial code for GCW Zero port

Changed paths:
  A dists/gcw0/default.gcw0.desktop
  A dists/gcw0/opk_make.sh
  A dists/gcw0/scummvm.png
  A dists/gcw0/scummvm.sh
  A dists/gcw0/scummvmrc
    ports.mk



diff --git a/dists/gcw0/default.gcw0.desktop b/dists/gcw0/default.gcw0.desktop
new file mode 100644
index 0000000..32c2982
--- /dev/null
+++ b/dists/gcw0/default.gcw0.desktop
@@ -0,0 +1,16 @@
+[Desktop Entry]
+Name=ScummVM
+Comment=Interpreter for several adventure games
+Comment[pl]=Interpreter graficznych gier przygodowych
+Comment[sv]=Tolk för flera äventyrsspel
+Comment[he]=פרשן למספר משחקי הרפתקאות
+Comment[de]=Interpreter für diverse Abenteuerspiele
+Comment[es]=Intérprete para varias aventuras gráficas
+Comment[ca]=Intèrpret per diverses aventures gràfiques
+Exec=scummvm
+Icon=scummvm
+Terminal=false
+Type=Application
+Categories=Game;AdventureGame;
+StartupNotify=false
+X-OD-Manual=README
diff --git a/dists/gcw0/opk_make.sh b/dists/gcw0/opk_make.sh
new file mode 100755
index 0000000..b1bfd03
--- /dev/null
+++ b/dists/gcw0/opk_make.sh
@@ -0,0 +1,111 @@
+#!/bin/bash
+#
+# opk_make.sh
+#
+# This script is meant to ease generation of a opk file. Please consult the output
+# when running --help for a list of available parameters and an explaination of
+# those.
+#
+# Required tools when running the script:
+# bash
+# echo, cat, mv, rm, mksquashfs
+
+check_for_tool()
+{
+	which $1 &> /dev/null
+	if [ "$?" -ne "0" ];
+	then
+		cecho "ERROR: Could not find the program '$1'. Please make sure
+that it is available in your PATH since it is required to complete your request." $red
+		exit 1
+	fi
+}
+
+print_help()
+{
+	cat << EOSTREAM
+opk_make.sh - A script to package "something" into a OPK.
+
+Usage:
+  $(basename ${0}) {--directory|-d} <folder> {--opk|-o} <file> [{--help|-h}]
+
+
+Switches:
+  --directory / -d          Sets the folder that is to be used for the resulting opk
+                            to <folder>. This option is mandatory for the script to
+                            function correctly.
+
+  --help / -h               Displays this help text.
+
+  --opkname / -o            Sets the output filename of the resulting opk to <file>.
+                            This option is mandatory for the script to function
+                            correctly.
+
+A version >=4.0 of squashfs is required to be available in your PATH.
+EOSTREAM
+}
+
+
+# Parse command line parameters
+while [ "${1}" != "" ]; do
+	if [ "${1}" = "--directory" ] || [ "${1}" = "-d" ];
+	then
+		FOLDER=$2
+		shift 2
+	elif [ "${1}" = "--help" ] || [ "${1}" = "-h" ];
+	then
+		print_help
+		exit 0
+	elif [ "${1}" = "--opkname" ] || [ "${1}" = "-o" ];
+	then
+		OPKNAME=$2
+		shift 2
+	else
+		echo "ERROR: '$1' is not a known argument. Printing --help and aborting."
+		print_help
+		exit 1
+	fi
+done
+
+
+# Probe if required variables were set
+echo "Checking if all required variables were set."
+if [ ! $OPKNAME ] || [ ! $FOLDER ];
+then
+	echo "ERROR: Not all required options were set! Please see the --help information below."
+	print_help
+	exit 1
+else
+	echo "OPKNAME set to '$OPKNAME'."
+fi
+# Check if the selected folder actually exists
+if [ ! -d $FOLDER ];
+then
+	echo "ERROR: '$FOLDER' doesn't exist or is not a folder."
+	exit 1
+else
+	echo "FOLDER set to '$FOLDER'."
+fi
+
+# Make iso from folder
+echo "Creating an iso file based on '$FOLDER'."
+
+check_for_tool mksquashfs
+if [ $(mksquashfs -version | awk 'BEGIN{r=0} $3>=4{r=1} END{print r}') -eq 0 ];
+then
+	echo "ERROR: Your squashfs version is older then version 4, please upgrade to 4.0 or later"
+	exit 1
+fi
+mksquashfs $FOLDER $OPKNAME.opk -noappend -no-exports -no-xattrs
+
+# Final message
+if [ -f $OPKNAME ];
+then
+	echo "Successfully finished creating the opk '$OPKNAME'."
+else
+	echo "There seems to have been a problem and '$OPKNAME' was not created. Please check
+the output above for any error messages. A possible cause for this is that there was
+not enough space available."
+	exit 1
+fi
+
diff --git a/dists/gcw0/scummvm.png b/dists/gcw0/scummvm.png
new file mode 100644
index 0000000..128e59e
Binary files /dev/null and b/dists/gcw0/scummvm.png differ
diff --git a/dists/gcw0/scummvm.sh b/dists/gcw0/scummvm.sh
new file mode 100755
index 0000000..c12a303
--- /dev/null
+++ b/dists/gcw0/scummvm.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+cd `dirname $0`
+
+if [ ! -f $HOME/.scummvmrc ] ; then
+	cp ./scummvmrc $HOME/.scummvmrc
+fi
+
+exec ./scummvm
diff --git a/dists/gcw0/scummvmrc b/dists/gcw0/scummvmrc
new file mode 100644
index 0000000..afa295e
--- /dev/null
+++ b/dists/gcw0/scummvmrc
@@ -0,0 +1,6 @@
+[scummvm]
+fullscreen=true
+gfx_mode=1x
+aspect_ratio=true
+themepath=/mnt/scummvm
+browser_lastpath=/media
diff --git a/ports.mk b/ports.mk
index 97b43fe..ce6bf38 100644
--- a/ports.mk
+++ b/ports.mk
@@ -293,6 +293,22 @@ win32setup: $(EXECUTABLE)
 	makensis -V2 -Dtop_srcdir="../.." -Dstaging_dir="../../$(STAGINGPATH)" -Darch=$(ARCH) $(srcdir)/dists/win32/scummvm.nsi
 
 
+# Special target for generationg GCW-Zero OPK bundle
+gcw0-opk:
+	mkdir gcw0-opk
+	cp $(DIST_FILES_DOCS) gcw0-opk/
+	cp $(DIST_FILES_THEMES) gcw0-opk/
+ifdef DIST_FILES_ENGINEDATA
+	cp $(DIST_FILES_ENGINEDATA) gcw0-opk/
+endif
+	$(STRIP) scummvm
+	chmod 755 scummvm
+	cp scummvm gcw0-opk/
+	cp $(srcdir)/dists/gcw0/scummvm.png gcw0-opk/
+	cp $(srcdir)/dists/gcw0/default.gcw0.desktop gcw0-opk/
+	cp $(srcdir)/dists/gcw0/scummvmrc gcw0-opk/
+	cp $(srcdir)/dists/gcw0/scummvm.sh gcw0-opk/
+	./dists/gcw0/opk_make.sh -d gcw0-opk -o scummvm.opk
 #
 # Special target to generate project files for various IDEs
 # Mainly Win32-specific






More information about the Scummvm-git-logs mailing list