mirror of
https://github.com/TangentFoxy/love-release.git
synced 2025-07-28 11:02:20 +00:00
Little fixes. Description and Homepage now global.
This commit is contained in:
@@ -67,16 +67,18 @@ it will automatically detect which version your project uses.
|
|||||||
|
|
||||||
`-x` Exclude file or directory.
|
`-x` Exclude file or directory.
|
||||||
|
|
||||||
|
`--description` Set the description of your project.
|
||||||
|
|
||||||
|
`--homepage` Set the homepage of your project.
|
||||||
|
|
||||||
#### WINDOWS
|
#### WINDOWS
|
||||||
`--win-icon` Path to an ico file to use.
|
`--win-icon` Path to an ico file to use.
|
||||||
|
|
||||||
#### MAC OS X
|
#### MAC OS X
|
||||||
`--osx-icon` Path to an icns file to use.
|
`--osx-icon` Path to an icns file to use.
|
||||||
`--osx-maintainer-name` Set the maintainer’s name. Provide it for OS X CFBundleIdentifier.
|
`--osx-maintainer-name` Set the maintainer’s name. Provide it for OS X CFBundleIdentifier.
|
||||||
|
|
||||||
#### DEBIAN
|
#### DEBIAN
|
||||||
`--description` Set the description of your project.
|
|
||||||
`--homepage` Set the homepage of your project.
|
|
||||||
`--maintainer-email` Set the maintainer’s email.
|
`--maintainer-email` Set the maintainer’s email.
|
||||||
`--deb-maintainer-name` Set the maintainer’s name.
|
`--deb-maintainer-name` Set the maintainer’s name.
|
||||||
`--deb-package-name` Set the name of the package and the command that will be used to launch your game.
|
`--deb-package-name` Set the name of the package and the command that will be used to launch your game.
|
||||||
|
12
config.ini
12
config.ini
@@ -13,6 +13,12 @@ love_version="0.9.1"
|
|||||||
; Project's name
|
; Project's name
|
||||||
project_name=""
|
project_name=""
|
||||||
|
|
||||||
|
; Homepage
|
||||||
|
homepage=""
|
||||||
|
|
||||||
|
; Description
|
||||||
|
description=""
|
||||||
|
|
||||||
[windows]
|
[windows]
|
||||||
; Path to an .ico file to use
|
; Path to an .ico file to use
|
||||||
icon=""
|
icon=""
|
||||||
@@ -35,12 +41,6 @@ maintainer_name=""
|
|||||||
; Maintainer_email
|
; Maintainer_email
|
||||||
maintainer_email=""
|
maintainer_email=""
|
||||||
|
|
||||||
; Homepage
|
|
||||||
homepage=""
|
|
||||||
|
|
||||||
; Description
|
|
||||||
description=""
|
|
||||||
|
|
||||||
; Package name
|
; Package name
|
||||||
; No spaces and no special characters except underscore. Better be lowercase.
|
; No spaces and no special characters except underscore. Better be lowercase.
|
||||||
package_name=""
|
package_name=""
|
||||||
|
@@ -78,6 +78,12 @@ Starting with Love 0.9.0, Love no longer supports old x86 Macintosh.
|
|||||||
.TP
|
.TP
|
||||||
.B \-x \fIfile\fR|\fIdirectory\fR
|
.B \-x \fIfile\fR|\fIdirectory\fR
|
||||||
Exclude file or directory.
|
Exclude file or directory.
|
||||||
|
.TP
|
||||||
|
.B \-\-description \fIdescription\fR
|
||||||
|
Set the description of your project.
|
||||||
|
.TP
|
||||||
|
.B \-\-homepage \fIurl\fR
|
||||||
|
Set the homepage of your project.
|
||||||
.SH WINDOWS
|
.SH WINDOWS
|
||||||
.TP
|
.TP
|
||||||
.B \-\-win\-icon \fIicon\fR
|
.B \-\-win\-icon \fIicon\fR
|
||||||
@@ -91,12 +97,6 @@ Path to an icns file to use.
|
|||||||
Set the maintainer's name. Provide it for OS X CFBundleIdentifier.
|
Set the maintainer's name. Provide it for OS X CFBundleIdentifier.
|
||||||
.SH DEBIAN
|
.SH DEBIAN
|
||||||
.TP
|
.TP
|
||||||
.B \-\-description \fIdescription\fR
|
|
||||||
Set the description of your project.
|
|
||||||
.TP
|
|
||||||
.B \-\-homepage \fIpage\fR
|
|
||||||
Set the homepage of your project.
|
|
||||||
.TP
|
|
||||||
.B \-\-maintainer-email \fIemail\fR
|
.B \-\-maintainer-email \fIemail\fR
|
||||||
Set the maintainer's email.
|
Set the maintainer's email.
|
||||||
.TP
|
.TP
|
||||||
@@ -119,7 +119,7 @@ The name of the class that extends GameActivity.
|
|||||||
By default it is the name of the project with 'Activity' appended,
|
By default it is the name of the project with 'Activity' appended,
|
||||||
eventual spaces and dashes replaced by underscores.
|
eventual spaces and dashes replaced by underscores.
|
||||||
.TP
|
.TP
|
||||||
.B \-\-apk\|maintainer\-name \fIname\fR
|
.B \-\-apk\-maintainer\-name \fIname\fR
|
||||||
Set the maintainer’s name.
|
Set the maintainer’s name.
|
||||||
It must be only alphanumerical characters, with eventual underscores.
|
It must be only alphanumerical characters, with eventual underscores.
|
||||||
.TP
|
.TP
|
||||||
|
@@ -20,7 +20,7 @@ SCRIPT_ARGS="l;"
|
|||||||
SCRIPT_ARGS="w. win-icon: $SCRIPT_ARGS"
|
SCRIPT_ARGS="w. win-icon: $SCRIPT_ARGS"
|
||||||
|
|
||||||
## Debian
|
## Debian
|
||||||
SCRIPT_ARGS="d; deb-package-version: deb-maintainer-name: maintainer-email: homepage: description: deb-package-name: $SCRIPT_ARGS"
|
SCRIPT_ARGS="d; deb-package-version: deb-maintainer-name: maintainer-email: deb-package-name: $SCRIPT_ARGS"
|
||||||
|
|
||||||
## Android
|
## Android
|
||||||
SCRIPT_ARGS="a; activity: apk-package-version: apk-maintainer-name: apk-package-name: update-android; $SCRIPT_ARGS"
|
SCRIPT_ARGS="a; activity: apk-package-version: apk-maintainer-name: apk-package-name: update-android; $SCRIPT_ARGS"
|
||||||
@@ -83,7 +83,7 @@ LOVE_GT_090=$(float_test "$LOVE_VERSION_MAJOR >= 0.9")
|
|||||||
|
|
||||||
# Global variables
|
# Global variables
|
||||||
ARGS=( "$@" )
|
ARGS=( "$@" )
|
||||||
SCRIPT_ARGS="$SCRIPT_ARGS h; n: r: v: x: config: clean help"
|
SCRIPT_ARGS="$SCRIPT_ARGS h; n: r: v: x: config: homepage: description: clean help"
|
||||||
SCRIPT_ARGS=$(printf '%s\n' $SCRIPT_ARGS | sort -u)
|
SCRIPT_ARGS=$(printf '%s\n' $SCRIPT_ARGS | sort -u)
|
||||||
CONFIG=false
|
CONFIG=false
|
||||||
CONFIG_FILE=config.ini
|
CONFIG_FILE=config.ini
|
||||||
@@ -139,6 +139,12 @@ do
|
|||||||
if [ -n "${INI__global__project_name}" ]; then
|
if [ -n "${INI__global__project_name}" ]; then
|
||||||
PROJECT_NAME=${INI__global__project_name}
|
PROJECT_NAME=${INI__global__project_name}
|
||||||
fi
|
fi
|
||||||
|
if [ -n "${INI__global__homepage}" ]; then
|
||||||
|
PROJECT_HOMEPAGE=${INI__global__homepage}
|
||||||
|
fi
|
||||||
|
if [ -n "${INI__global__description}" ]; then
|
||||||
|
PROJECT_DESCRIPTION=${INI__global__description}
|
||||||
|
fi
|
||||||
for option in "${EXCLUDE_CONFIG[@]}"
|
for option in "${EXCLUDE_CONFIG[@]}"
|
||||||
do
|
do
|
||||||
MAIN_EXCLUDE_FILES="${!option} $MAIN_EXCLUDE_FILES"
|
MAIN_EXCLUDE_FILES="${!option} $MAIN_EXCLUDE_FILES"
|
||||||
@@ -169,6 +175,10 @@ do
|
|||||||
LOVE_GT_090=$(float_test "$LOVE_VERSION_MAJOR >= 0.9")
|
LOVE_GT_090=$(float_test "$LOVE_VERSION_MAJOR >= 0.9")
|
||||||
elif [ "$OPTOPT" = "x" ]; then
|
elif [ "$OPTOPT" = "x" ]; then
|
||||||
EXCLUDE_FILES="$OPTARG $EXCLUDE_FILES"
|
EXCLUDE_FILES="$OPTARG $EXCLUDE_FILES"
|
||||||
|
elif [ "$OPTOPT" = "homepage" ]; then
|
||||||
|
PROJECT_HOMEPAGE=$OPTARG
|
||||||
|
elif [ "$OPTOPT" = "description" ]; then
|
||||||
|
PROJECT_DESCRIPTION=$OPTARG
|
||||||
elif [ "$OPTOPT" = "clean" ]; then
|
elif [ "$OPTOPT" = "clean" ]; then
|
||||||
missing_operands=false
|
missing_operands=false
|
||||||
rm -rf "$MAIN_CACHE_DIR"
|
rm -rf "$MAIN_CACHE_DIR"
|
||||||
|
@@ -2,6 +2,9 @@
|
|||||||
init_module "Android"
|
init_module "Android"
|
||||||
|
|
||||||
|
|
||||||
|
PACKAGE_NAME=$(echo $PROJECT_NAME | sed -e 's/[^-a-zA-Z0-9_]/-/g' | tr '[:upper:]' '[:lower:]')
|
||||||
|
ACTIVITY=$(echo $PROJECT_NAME | sed -e 's/[^a-zA-Z0-9_]/_/g')
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
if [ "$CONFIG" = true ]; then
|
if [ "$CONFIG" = true ]; then
|
||||||
if [ -n "${INI__android__activity}" ]; then
|
if [ -n "${INI__android__activity}" ]; then
|
||||||
@@ -20,8 +23,6 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
# Options
|
# Options
|
||||||
activity_defined_argument=false
|
|
||||||
package_name_defined_argument=false
|
|
||||||
while getoptex "$SCRIPT_ARGS" "$@"
|
while getoptex "$SCRIPT_ARGS" "$@"
|
||||||
do
|
do
|
||||||
if [ "$OPTOPT" = "activity" ]; then
|
if [ "$OPTOPT" = "activity" ]; then
|
||||||
@@ -38,12 +39,6 @@ do
|
|||||||
UPDATE_ANDROID_REPO=true
|
UPDATE_ANDROID_REPO=true
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ "$package_name_defined_argument" = false ]; then
|
|
||||||
PACKAGE_NAME=$(echo $PROJECT_NAME | sed -e 's/[^-a-zA-Z0-9_]/-/g')
|
|
||||||
fi
|
|
||||||
if [ "$activity_defined_argument" = false ]; then
|
|
||||||
ACTIVITY=$(echo $PROJECT_NAME | sed -e 's/[^a-zA-Z0-9_]/_/g')
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Android
|
# Android
|
||||||
@@ -52,12 +47,12 @@ ERROR_MSG="Could not build Android package."
|
|||||||
if [ -z "$PACKAGE_VERSION" ]; then
|
if [ -z "$PACKAGE_VERSION" ]; then
|
||||||
MISSING_INFO=1
|
MISSING_INFO=1
|
||||||
ERROR_MSG="$ERROR_MSG
|
ERROR_MSG="$ERROR_MSG
|
||||||
Missing project's version. Use --package-version."
|
Missing project's version. Use --apk-package-version."
|
||||||
fi
|
fi
|
||||||
if [ -z "$MAINTAINER_NAME" ]; then
|
if [ -z "$MAINTAINER_NAME" ]; then
|
||||||
MISSING_INFO=1
|
MISSING_INFO=1
|
||||||
ERROR_MSG="$ERROR_MSG
|
ERROR_MSG="$ERROR_MSG
|
||||||
Missing maintainer's name. Use --maintainer-name."
|
Missing maintainer's name. Use --apk-maintainer-name."
|
||||||
fi
|
fi
|
||||||
if [ "$MISSING_INFO" -eq 1 ]; then
|
if [ "$MISSING_INFO" -eq 1 ]; then
|
||||||
exit_module "$MISSING_INFO" "$ERROR_MSG"
|
exit_module "$MISSING_INFO" "$ERROR_MSG"
|
||||||
|
@@ -1,17 +1,14 @@
|
|||||||
# Debian package
|
# Debian package
|
||||||
init_module "Debian"
|
init_module "Debian"
|
||||||
|
|
||||||
|
|
||||||
|
PACKAGE_NAME=$(echo $PROJECT_NAME | sed -e 's/[^-a-zA-Z0-9_]/-/g' | tr '[:upper:]' '[:lower:]')
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
if [ "$CONFIG" = true ]; then
|
if [ "$CONFIG" = true ]; then
|
||||||
if [ -n "${INI__debian__package_version}" ]; then
|
if [ -n "${INI__debian__package_version}" ]; then
|
||||||
PACKAGE_VERSION=${INI__debian__package_version}
|
PACKAGE_VERSION=${INI__debian__package_version}
|
||||||
fi
|
fi
|
||||||
if [ -n "${INI__debian__homepage}" ]; then
|
|
||||||
PROJECT_HOMEPAGE=${INI__debian__homepage}
|
|
||||||
fi
|
|
||||||
if [ -n "${INI__debian__description}" ]; then
|
|
||||||
PROJECT_DESCRIPTION=${INI__debian__description}
|
|
||||||
fi
|
|
||||||
if [ -n "${INI__debian__maintainer_name}" ]; then
|
if [ -n "${INI__debian__maintainer_name}" ]; then
|
||||||
MAINTAINER_NAME=${INI__debian__maintainer_name}
|
MAINTAINER_NAME=${INI__debian__maintainer_name}
|
||||||
fi
|
fi
|
||||||
@@ -25,15 +22,10 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
# Options
|
# Options
|
||||||
package_name_defined_argument=false
|
|
||||||
while getoptex "$SCRIPT_ARGS" "$@"
|
while getoptex "$SCRIPT_ARGS" "$@"
|
||||||
do
|
do
|
||||||
if [ "$OPTOPT" = "deb-package-version" ]; then
|
if [ "$OPTOPT" = "deb-package-version" ]; then
|
||||||
PACKAGE_VERSION=$OPTARG
|
PACKAGE_VERSION=$OPTARG
|
||||||
elif [ "$OPTOPT" = "homepage" ]; then
|
|
||||||
PROJECT_HOMEPAGE=$OPTARG
|
|
||||||
elif [ "$OPTOPT" = "description" ]; then
|
|
||||||
PROJECT_DESCRIPTION=$OPTARG
|
|
||||||
elif [ "$OPTOPT" = "deb-maintainer-name" ]; then
|
elif [ "$OPTOPT" = "deb-maintainer-name" ]; then
|
||||||
MAINTAINER_NAME=$OPTARG
|
MAINTAINER_NAME=$OPTARG
|
||||||
elif [ "$OPTOPT" = "maintainer-email" ]; then
|
elif [ "$OPTOPT" = "maintainer-email" ]; then
|
||||||
@@ -43,9 +35,6 @@ do
|
|||||||
package_name_defined_argument=true
|
package_name_defined_argument=true
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
if [ "$package_name_defined_argument" = false ]; then
|
|
||||||
PACKAGE_NAME=$(echo $PROJECT_NAME | sed -e 's/[^-a-zA-Z0-9_]/-/g')
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
# Debian
|
# Debian
|
||||||
@@ -53,7 +42,7 @@ MISSING_INFO=0
|
|||||||
ERROR_MSG="Could not build Debian package."
|
ERROR_MSG="Could not build Debian package."
|
||||||
if [ -z "$PACKAGE_VERSION" ]; then
|
if [ -z "$PACKAGE_VERSION" ]; then
|
||||||
MISSING_INFO=1
|
MISSING_INFO=1
|
||||||
ERROR_MSG="$ERROR_MSG\nMissing project's version. Use --package-version."
|
ERROR_MSG="$ERROR_MSG\nMissing project's version. Use --deb-package-version."
|
||||||
fi
|
fi
|
||||||
if [ -z "$PROJECT_HOMEPAGE" ]; then
|
if [ -z "$PROJECT_HOMEPAGE" ]; then
|
||||||
MISSING_INFO=1
|
MISSING_INFO=1
|
||||||
@@ -65,7 +54,7 @@ if [ -z "$PROJECT_DESCRIPTION" ]; then
|
|||||||
fi
|
fi
|
||||||
if [ -z "$MAINTAINER_NAME" ]; then
|
if [ -z "$MAINTAINER_NAME" ]; then
|
||||||
MISSING_INFO=1
|
MISSING_INFO=1
|
||||||
ERROR_MSG="$ERROR_MSG\nMissing maintainer's name. Use --maintainer-name."
|
ERROR_MSG="$ERROR_MSG\nMissing maintainer's name. Use --deb-maintainer-name."
|
||||||
fi
|
fi
|
||||||
if [ -z "$MAINTAINER_EMAIL" ]; then
|
if [ -z "$MAINTAINER_EMAIL" ]; then
|
||||||
MISSING_INFO=1
|
MISSING_INFO=1
|
||||||
@@ -133,6 +122,6 @@ cd "$RELEASE_DIR"
|
|||||||
rm -rf $TEMP
|
rm -rf $TEMP
|
||||||
|
|
||||||
|
|
||||||
unset PROJECT_DESCRIPTION PROJECT_HOMEPAGE MAINTAINER_NAME MAINTAINER_EMAIL PACKAGE_NAME PACKAGE_VERSION
|
unset MAINTAINER_NAME MAINTAINER_EMAIL PACKAGE_NAME PACKAGE_VERSION
|
||||||
exit_module
|
exit_module
|
||||||
|
|
||||||
|
@@ -2,6 +2,8 @@
|
|||||||
init_module "Mac OS X"
|
init_module "Mac OS X"
|
||||||
|
|
||||||
|
|
||||||
|
PACKAGE_NAME=$(echo $PROJECT_NAME | sed -e 's/[^-a-zA-Z0-9_]/-/g' | tr '[:upper:]' '[:lower:]')
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
if [ "$CONFIG" = true ]; then
|
if [ "$CONFIG" = true ]; then
|
||||||
if [ -n "${INI__macosx__maintainer_name}" ]; then
|
if [ -n "${INI__macosx__maintainer_name}" ]; then
|
||||||
@@ -22,7 +24,6 @@ do
|
|||||||
MAINTAINER_NAME=$OPTARG
|
MAINTAINER_NAME=$OPTARG
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
PACKAGE_NAME=$(echo $PROJECT_NAME | sed -e 's/[^-a-zA-Z0-9_]/-/g')
|
|
||||||
|
|
||||||
|
|
||||||
create_love_file 9
|
create_love_file 9
|
||||||
|
Reference in New Issue
Block a user