mirror of
https://github.com/TangentFoxy/love-release.git
synced 2025-07-28 11:02:20 +00:00
Add new options, rename some
Modules options have been capitalized. "project's name" was renamed to "project's title". Many options to set global variables were added. "--clean" option was reimplemented.
This commit is contained in:
2
Makefile
2
Makefile
@@ -42,7 +42,7 @@ embedded: clean
|
|||||||
if [[ -n $$long && $${long: -1} != ',' ]]; then long="$${long},"; fi; \
|
if [[ -n $$long && $${long: -1} != ',' ]]; then long="$${long},"; fi; \
|
||||||
sed -re "s/^OPTIONS=(['\"]?)/OPTIONS=\1$$short/" -e "s/^LONG_OPTIONS=(['\"]?)/LONG_OPTIONS=\1$$long/" \
|
sed -re "s/^OPTIONS=(['\"]?)/OPTIONS=\1$$short/" -e "s/^LONG_OPTIONS=(['\"]?)/LONG_OPTIONS=\1$$long/" \
|
||||||
-e 's/EMBEDDED=false/EMBEDDED=true/' \
|
-e 's/EMBEDDED=false/EMBEDDED=true/' \
|
||||||
-e '/include_scripts_here$$/r $(BUILD_DIR)/tmp' love-release.sh > '$(BUILD_DIR)/love-release'
|
-e '/include_scripts_here$$/r $(BUILD_DIR)/tmp' love-release.sh > '$(BUILD_DIR)/love-release.sh'
|
||||||
chmod 0775 '$(BUILD_DIR)/love-release.sh'
|
chmod 0775 '$(BUILD_DIR)/love-release.sh'
|
||||||
rm -rf '$(BUILD_DIR)/tmp'
|
rm -rf '$(BUILD_DIR)/tmp'
|
||||||
|
|
||||||
|
44
README.md
44
README.md
@@ -20,7 +20,7 @@ make embedded
|
|||||||
To remove love-release, if you haven't changed the default installation directories, run `make remove`.
|
To remove love-release, if you haven't changed the default installation directories, run `make remove`.
|
||||||
|
|
||||||
### SYNOPSIS
|
### SYNOPSIS
|
||||||
`love-release.sh [-adlmw] [-n project_name] [-r release_dir] [-v love_version] [FILES...]`
|
`love-release.sh [-ADLMW] [-t project_title] [-r release_dir] [-l love_version] [FILES...]`
|
||||||
|
|
||||||
### DESCRIPTION
|
### DESCRIPTION
|
||||||
love-release.sh can be used to generate Love 2D game applications
|
love-release.sh can be used to generate Love 2D game applications
|
||||||
@@ -40,7 +40,7 @@ See the `conf.lua` file included to see how configuration works.
|
|||||||
`--help` Print this longer help
|
`--help` Print this longer help
|
||||||
|
|
||||||
#### OPERATING SYSTEMS
|
#### OPERATING SYSTEMS
|
||||||
`-a` Create an Android package.
|
`-A` Create an Android package.
|
||||||
In order to create an Android package, you must have installed the Android SDK.
|
In order to create an Android package, you must have installed the Android SDK.
|
||||||
See [Building LÖVE for Android](https://bitbucket.org/MartinFelis/love-android-sdl2/wiki/Building_L%C3%96VE_for_Android_-_Linux),
|
See [Building LÖVE for Android](https://bitbucket.org/MartinFelis/love-android-sdl2/wiki/Building_L%C3%96VE_for_Android_-_Linux),
|
||||||
but there is no need to install the [LÖVE port to Android](https://bitbucket.org/MartinFelis/love-android-sdl2),
|
but there is no need to install the [LÖVE port to Android](https://bitbucket.org/MartinFelis/love-android-sdl2),
|
||||||
@@ -48,43 +48,53 @@ See the `conf.lua` file included to see how configuration works.
|
|||||||
You also might want to provide more informations about it.
|
You also might want to provide more informations about it.
|
||||||
See the ANDROID section below.
|
See the ANDROID section below.
|
||||||
|
|
||||||
`-d` Create a deb package. Aimed at Debian and Ubuntu derivatives.
|
`-D` Create a deb package. Aimed at Debian and Ubuntu derivatives.
|
||||||
In order to create a Debian package, you must provide more informations about it.
|
In order to create a Debian package, you must provide more informations about it.
|
||||||
See the DEBIAN section below.
|
See the DEBIAN section below.
|
||||||
|
|
||||||
`-l` Create a plain Love file. It is just a zip of your sources, renamed in \*.love.
|
`-L` Create a plain Love file. It is just a zip of your sources, renamed in \*.love.
|
||||||
Mostly aimed at Linux players or developers and the most common distribution process.
|
Mostly aimed at Linux players or developers and the most common distribution process.
|
||||||
|
|
||||||
`-m` Create MacOS application.
|
`-M` Create MacOS application.
|
||||||
Starting with Love 0.9.0, Love no longer supports old x86 Macintosh.
|
Starting with Love 0.9.0, Love no longer supports old x86 Macintosh.
|
||||||
If you are targeting one of these, your project must be developped with Love 0.8.0 or lower.
|
If you are targeting one of these, your project must be developped with Love 0.8.0 or lower.
|
||||||
Depending on the Love version used, the script will choose which one,
|
Depending on the Love version used, the script will choose which one,
|
||||||
between x64 only or Universal Build to create.
|
between x64 only or Universal Build to create.
|
||||||
|
|
||||||
`-w` Create Windows application.
|
`-W` Create Windows application.
|
||||||
Starting with Love 0.8.0, a release is specially available for Windows x64.
|
Starting with Love 0.8.0, a release is specially available for Windows x64.
|
||||||
If you are targeting one of these, your project must be developed with Love 0.8.0 or newer.
|
If you are targeting one of these, your project must be developed with Love 0.8.0 or newer.
|
||||||
Remember that x86 is always backwards compatible with x64.
|
Remember that x86 is always backwards compatible with x64.
|
||||||
Depending on the Love version used, the script will choose which one,
|
Depending on the Love version used, the script will choose which one,
|
||||||
between x64 and x86 or x86 only to create.
|
between x64 and x86 or x86 only to create.
|
||||||
`-w32` Create Windows x86 executable only
|
`-W32` Create Windows x86 executable only
|
||||||
`-w64` Create Windows x64 executable only
|
`-W64` Create Windows x64 executable only
|
||||||
|
|
||||||
#### PROJECT OPTIONS
|
#### PROJECT OPTIONS
|
||||||
`-n` Set the projects name. By default, the name of the current directory is used.
|
`-a, --author` Set the project's author.
|
||||||
|
|
||||||
`-r` Set the release directory. By default, a subdirectory called releases is created.
|
`-d, --description` Set the project's description.
|
||||||
|
|
||||||
`-v` Love version. Default is 0.9.1.
|
`-e, --email` Set the author's email.
|
||||||
Starting with Love 0.8.0, a release is specially available for Windows x64.
|
|
||||||
Starting with Love 0.9.0, Love no longer supports old x86 Macintosh.
|
`-i, --icon` Path to icons.
|
||||||
|
|
||||||
|
`-l, --love` Love version. Default is 0.9.2.
|
||||||
|
Starting with Love 0.8.0, a release is specially available for Windows x64.
|
||||||
|
Starting with Love 0.9.0, Love no longer supports old x86 Macintosh.
|
||||||
|
|
||||||
|
`-p, --pkg` Set the project's identity.
|
||||||
|
|
||||||
|
`-r, --release` Set the release directory. By default, a subdirectory called releases is created.
|
||||||
|
|
||||||
|
`-t, --title` Set the project's title. By default, the name of the current directory is used.
|
||||||
|
|
||||||
|
`-u, --url` Set the project's homepage.
|
||||||
|
|
||||||
|
`-v, --version` Set your project's version.
|
||||||
|
|
||||||
`-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
|
||||||
You can create an installer. If you don’t, you will have zip of a folder
|
You can create an installer. If you don’t, you will have zip of a folder
|
||||||
containing your game executable and its dlls.
|
containing your game executable and its dlls.
|
||||||
|
@@ -3,7 +3,7 @@
|
|||||||
love-release.sh \- Bash script to generate Love 2D game releases
|
love-release.sh \- Bash script to generate Love 2D game releases
|
||||||
.SH SYNOPSIS
|
.SH SYNOPSIS
|
||||||
.B love\-release.sh
|
.B love\-release.sh
|
||||||
[\fB\-adlmw\fR] [\fB\-n\fR \fIproject_name\fR] [\fB\-r\fR \fIrelease_dir\fR] [\fB\-v\fR \fIlove_version\fR] [\fIFILES...\fR]
|
[\fB\-ADLMW\fR] [\fB\-t\fR \fIproject_title\fR] [\fB\-r\fR \fIrelease_dir\fR] [\fB\-l\fR \fIlove_version\fR] [\fIFILES...\fR]
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.B love-release.sh
|
.B love-release.sh
|
||||||
can be used to generate Love 2D game applications
|
can be used to generate Love 2D game applications
|
||||||
@@ -25,7 +25,7 @@ Print a short help
|
|||||||
Print this longer help
|
Print this longer help
|
||||||
.SH OPERATING SYSTEMS
|
.SH OPERATING SYSTEMS
|
||||||
.TP
|
.TP
|
||||||
.B \-a
|
.B \-A
|
||||||
Create an Android package.
|
Create an Android package.
|
||||||
In order to create an Android package, you must have installed the Android SDK,
|
In order to create an Android package, you must have installed the Android SDK,
|
||||||
but there is no need to install the LÖVE port to Android,
|
but there is no need to install the LÖVE port to Android,
|
||||||
@@ -33,23 +33,23 @@ as the script will handle this by itself.
|
|||||||
You also might want to provide more informations about it.
|
You also might want to provide more informations about it.
|
||||||
See the ANDROID section below.
|
See the ANDROID section below.
|
||||||
.TP
|
.TP
|
||||||
.B \-d
|
.B \-D
|
||||||
Create a deb package. Aimed at Debian and Ubuntu derivatives.
|
Create a deb package. Aimed at Debian and Ubuntu derivatives.
|
||||||
In order to create a Debian package, you must provide more informations about it.
|
In order to create a Debian package, you must provide more informations about it.
|
||||||
See the DEBIAN section below.
|
See the DEBIAN section below.
|
||||||
.TP
|
.TP
|
||||||
.B \-l
|
.B \-L
|
||||||
Create a plain Love file. It is just a zip of your sources, renamed in \fI*.love\fR.
|
Create a plain Love file. It is just a zip of your sources, renamed in \fI*.love\fR.
|
||||||
Mostly aimed at Linux players or developers and the most common distribution process.
|
Mostly aimed at Linux players or developers and the most common distribution process.
|
||||||
.TP
|
.TP
|
||||||
.B \-m
|
.B \-M
|
||||||
Create MacOS application.
|
Create MacOS application.
|
||||||
Starting with Love 0.9.0, Love no longer supports old x86 Macintosh.
|
Starting with Love 0.9.0, Love no longer supports old x86 Macintosh.
|
||||||
If you are targeting one of these, your project must be developed with Love 0.8.0 or lower.
|
If you are targeting one of these, your project must be developed with Love 0.8.0 or lower.
|
||||||
Depending on the Love version used, the script will choose which one,
|
Depending on the Love version used, the script will choose which one,
|
||||||
between x64 only or Universal Build to create.
|
between x64 only or Universal Build to create.
|
||||||
.TP
|
.TP
|
||||||
.BR \-w \", \" \-w32 \", \" \-w64
|
.BR \-W
|
||||||
Create Windows application.
|
Create Windows application.
|
||||||
Starting with Love 0.8.0, a release is specially available for Windows x64.
|
Starting with Love 0.8.0, a release is specially available for Windows x64.
|
||||||
If you are targeting one of these, your project must be developed with Love 0.8.0 or newer.
|
If you are targeting one of these, your project must be developed with Love 0.8.0 or newer.
|
||||||
@@ -57,32 +57,47 @@ Remember that x86 is always backwards compatible with x64.
|
|||||||
Depending on the Love version used, the script will choose which one,
|
Depending on the Love version used, the script will choose which one,
|
||||||
between x64 and x86 or x86 only to create.
|
between x64 and x86 or x86 only to create.
|
||||||
.br
|
.br
|
||||||
.B \-w32
|
.B \-W32
|
||||||
Create Windows x86 executable only.
|
Create Windows x86 executable only.
|
||||||
.br
|
.br
|
||||||
.B \-w64
|
.B \-W64
|
||||||
Create Windows x64 executable only.
|
Create Windows x64 executable only.
|
||||||
.SH PROJECT OPTIONS
|
.SH PROJECT OPTIONS
|
||||||
.TP
|
.TP
|
||||||
.B \-n \fIproject-name\fR
|
.B \-a, \-\-author \fIauthor\fR
|
||||||
Set the projects name. By default, the name of the current directory is used.
|
Set the project's author.
|
||||||
.TP
|
.TP
|
||||||
.B \-r \fIrelease-dir\fR
|
.B \-d, \-\-description \fIdescription\fR
|
||||||
Set the release directory. By default, a subdirectory called releases is created.
|
Set the project's description.
|
||||||
.TP
|
.TP
|
||||||
.B \-v \fIversion\fR
|
.B \-e, \-\-email \fIemail\fR
|
||||||
Love version. Default is 0.9.1.
|
Set the author's email.
|
||||||
|
.TP
|
||||||
|
.B \-i, \-\-icon \fIicon\fR
|
||||||
|
Path to icons.
|
||||||
|
.TP
|
||||||
|
.B \-l, \-\-love \fIlove\fR
|
||||||
|
Love version. Default is 0.9.2.
|
||||||
Starting with Love 0.8.0, a release is specially available for Windows x64.
|
Starting with Love 0.8.0, a release is specially available for Windows x64.
|
||||||
Starting with Love 0.9.0, Love no longer supports old x86 Macintosh.
|
Starting with Love 0.9.0, Love no longer supports old x86 Macintosh.
|
||||||
.TP
|
.TP
|
||||||
|
.B \-p, \-\-pkg \fIidentity\fR
|
||||||
|
Set the project's identity.
|
||||||
|
.TP
|
||||||
|
.B \-r, \-\-release \fIrelease-dir\fR
|
||||||
|
Set the release directory. By default, a subdirectory called releases is created.
|
||||||
|
.TP
|
||||||
|
.B \-t, \-\-title \fItitle\fR
|
||||||
|
Set the project's title. By default, the name of the current directory is used.
|
||||||
|
.TP
|
||||||
|
.B \-u, \-\-url \fIurl\fR
|
||||||
|
Set your project's homepage.
|
||||||
|
.TP
|
||||||
|
.B \-v, \-\-version \fIversion\fR
|
||||||
|
Set the version for your project.
|
||||||
|
.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
|
||||||
You can create an installer. If you don’t, you will have zip of a folder
|
You can create an installer. If you don’t, you will have zip of a folder
|
||||||
containing your game executable and its dlls.
|
containing your game executable and its dlls.
|
||||||
|
@@ -243,7 +243,7 @@ short_help () {
|
|||||||
Usage: love-release.sh [options...] [files...]
|
Usage: love-release.sh [options...] [files...]
|
||||||
Options:
|
Options:
|
||||||
-h Print short help
|
-h Print short help
|
||||||
-n <name> Set the project's name
|
-t <title> Set the project's title
|
||||||
-r <release> Set the release directory
|
-r <release> Set the release directory
|
||||||
-v <version> Set the LÖVE version
|
-v <version> Set the LÖVE version
|
||||||
EOF
|
EOF
|
||||||
@@ -368,18 +368,26 @@ RELEASE_DIR=releases
|
|||||||
CACHE_DIR=~/.cache/love-release
|
CACHE_DIR=~/.cache/love-release
|
||||||
FILES=()
|
FILES=()
|
||||||
|
|
||||||
OPTIONS="lhn:r:v:"
|
OPTIONS="La:d:e:hi:l:p:r:t:u:v:"
|
||||||
LONG_OPTIONS=""
|
LONG_OPTIONS="author:,clean,description:,email:,help,icon:,love:,pkg:,release:,title:,url:,version:"
|
||||||
ARGS=$(getopt -o "$OPTIONS" -l "$LONG_OPTIONS" -n 'love-release' -- "$@")
|
ARGS=$(getopt -o "$OPTIONS" -l "$LONG_OPTIONS" -n 'love-release' -- "$@")
|
||||||
if (( $? != 0 )); then short_help; exit_module "options"; fi
|
if (( $? != 0 )); then short_help; exit_module "options"; fi
|
||||||
eval set -- "$ARGS"
|
eval set -- "$ARGS"
|
||||||
|
|
||||||
while true; do
|
while true; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
-n ) TITLE="$2"; shift 2 ;;
|
-a|--author ) AUTHOR="$2"; shift 2 ;;
|
||||||
-r ) RELEASE_DIR="$2"; shift 2 ;;
|
--clean ) rm -rf "$CACHE_DIR"; shift ;;
|
||||||
-v ) if ! gen_version "$2"; then exit_module "version"; fi; shift 2 ;;
|
-d|--description ) DESCRIPTION="$2"; shift 2 ;;
|
||||||
-h ) short_help; exit 0 ;;
|
-e|--email ) EMAIL="$2"; shift 2 ;;
|
||||||
|
-h|--help ) short_help; exit 0 ;;
|
||||||
|
-i|--icon ) ICON="$2"; shift 2 ;;
|
||||||
|
-l|--love ) if ! gen_version "$2"; then exit_module "version"; fi; shift 2 ;;
|
||||||
|
-p|--pkg ) IDENTITY="$2"; shift 2 ;;
|
||||||
|
-r|--release ) RELEASE_DIR="$2"; shift 2 ;;
|
||||||
|
-t|--title ) TITLE="$2"; shift 2 ;;
|
||||||
|
-u|--url ) URL="$2"; shift 2 ;;
|
||||||
|
-v|--version ) GAME_VERSION="$2"; shift 2 ;;
|
||||||
-- ) shift; break ;;
|
-- ) shift; break ;;
|
||||||
* ) shift ;;
|
* ) shift ;;
|
||||||
esac
|
esac
|
||||||
@@ -406,7 +414,7 @@ fi
|
|||||||
|
|
||||||
|
|
||||||
(
|
(
|
||||||
(init_module "LÖVE" "love" "l")
|
(init_module "LÖVE" "love" "L")
|
||||||
if [[ $? -eq 0 || $DEFAULT_MODULE == true ]]; then
|
if [[ $? -eq 0 || $DEFAULT_MODULE == true ]]; then
|
||||||
init_module "LÖVE" "default"
|
init_module "LÖVE" "default"
|
||||||
create_love_file 9
|
create_love_file 9
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
# Android debug package
|
# Android debug package
|
||||||
init_module "Android" "android" "a"
|
init_module "Android" "android" "A"
|
||||||
OPTIONS="a"
|
OPTIONS="A"
|
||||||
LONG_OPTIONS=""
|
LONG_OPTIONS=""
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
# Debian package
|
# Debian package
|
||||||
init_module "Debian" "debian" "d"
|
init_module "Debian" "debian" "D"
|
||||||
OPTIONS="d"
|
OPTIONS="D"
|
||||||
LONG_OPTIONS=""
|
LONG_OPTIONS=""
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
# Mac OS X
|
# Mac OS X
|
||||||
init_module "Mac OS X" "osx" "m"
|
init_module "Mac OS X" "osx" "M"
|
||||||
OPTIONS="m"
|
OPTIONS="M"
|
||||||
LONG_OPTIONS=""
|
LONG_OPTIONS=""
|
||||||
|
|
||||||
|
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
# Windows
|
# Windows
|
||||||
init_module "Windows" "windows" "w"
|
init_module "Windows" "windows" "W"
|
||||||
OPTIONS="w"
|
OPTIONS="W"
|
||||||
LONG_OPTIONS=""
|
LONG_OPTIONS=""
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user