Rewritten long help to Groff syntax. Now uses man to display

This commit is contained in:
Antonin Décimo
2014-07-18 16:19:45 +02:00
parent 1ed78ed25b
commit c7f130d34f

View File

@@ -10,8 +10,8 @@ function short_help()
echo "Usage: love-release.sh [options...] [files...] echo "Usage: love-release.sh [options...] [files...]
Options: Options:
-h, --help Prints short or long help -h, --help Prints short or long help
-l Create a plain Love file
-d Create a deb package -d Create a deb package
-l Create a plain Love file
-m Create a MacOS application -m Create a MacOS application
-w, Create a Windows application -w, Create a Windows application
-w32 Create a Windows x86 application -w32 Create a Windows x86 application
@@ -26,74 +26,142 @@ Options:
## Long help ## ## Long help ##
function long_help() function long_help()
{ {
echo "NAME echo "
love-release.sh -- Bash script to generate Love 2D game releases .TH LOVE-RELEASE.SH 1
SYNOPSIS .SH NAME
love-release.sh [-dlmw] [-n project_name] [-r release_dir] [-u company_name] [-v love_version] [FILES...] love-release.sh \- Bash script to generate Love 2D game releases
.SH SYNOPSIS
DESCRIPTION .B love\-release.sh
You can use love-release.sh to generate Love 2D game applications and get over the fastidious zipping commands you had to do. [\fB\-dlmw\fR] [\fB\-n\fR \fIproject_name\fR] [\fB\-r\fR \fIrelease_dir\fR]
The script fully supports Windows, MacOS either on x86 or x64, and Debian packages. [\fB\-u\fR \fIcompany_name\fR] [\fB\-v\fR \fIlove_version\fR] [\fIFILES...\fR]
It needs an Internet connection to download Love files, and relies on curl, zip and unzip commands. .SH DESCRIPTION
To set the default Love version to use, you can edit the very beginning of the script. .B love-release.sh
If lua and a conf.lua file are found, it will automatically detect which version your project uses. can be used to generate Love 2D game applications
If a ProjectName.icns file is provided, the script will use it to set the game icon on MacOS. and get over the fastidious zipping commands you had to do.
If a ProjectName.ico file is provided, and that Wine and Resource Hacker are installed, the script will use them to set the game icon on Windows. .PP
The script fully supports Windows, MacOS either on x86 or x64,
OPTIONS and Debian packages.
-h Print a short help It needs an Internet connection to download Love files,
--help Print this longer help and relies on \fBcurl\fR, \fBzip\fR and \fBunzip\fR commands.
To set the default Love version to use,
OPERATING SYSTEMS you can edit the very beginning of the script.
-l Create a plain Love file. It is just a zip of your sources, renamed in *.love. If \fBlua\fR and a \fIconf.lua\fR file are found,
Mostly aimed at Linux players or developers and the most common distribution process. it will automatically detect which version your project uses.
If a \fIProjectName.icns\fR file is provided,
-d Create a deb package. Aimed at Debian and Ubuntu derivatives. the script will use it to set the game icon on MacOS.
In order to create a Debian package, you must provide more informations about it. If a \fIProjectName.ico\fR file is provided, and that \fBWine\fR
See the DEBIAN section below. and \fBResource Hacker\fR are installed, the script will use them
to set the game icon on Windows.
-m Create MacOS application. .SH OPTIONS
Starting with Love 0.9.0, Love no longer supports old x86 Macintosh. .TP
If you are targeting one of these, your project must be developed with Love 0.8.0 or lower. .B \-h
Depending on the Love version used, the script will choose which one, between x64 only or Universal Build to create. Print a short help
.TP
-w Create Windows application. .B \-\-help
Starting with Love 0.8.0, a release is specially available for Windows x64. Print this longer help
If you are targeting one of these, your project must be developed with Love 0.8.0 or newer. .SH OPERATING SYSTEMS
Remember that x86 is always backwards compatible with x64. .TP
Depending on the Love version used, the script will choose which one, between x64 and x86 or x86 only to create. .B \-d
-w32 Create Windows x86 executable only Create a deb package. Aimed at Debian and Ubuntu derivatives.
-w64 Create Windows x64 executable only In order to create a Debian package, you must provide more informations about it.
See the DEBIAN section below.
PROJECT OPTIONS .TP
-n Set the projects name. By default, the name of the current directory is used. .B \-l
Create a plain Love file. It is just a zip of your sources, renamed in \fI*.love\fR.
-r Set the release directory. By default, a subdirectory called releases is created. Mostly aimed at Linux players or developers and the most common distribution process.
.TP
-u Set the company name. Provide it for MacOS CFBundleIdentifier. .B \-m
Create MacOS application.
-v Love version. Default is 0.9.1. Starting with Love 0.9.0, Love no longer supports old x86 Macintosh.
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 lower.
Starting with Love 0.9.0, Love no longer supports old x86 Macintosh. Depending on the Love version used, the script will choose which one,
between x64 only or Universal Build to create.
DEBIAN .TP
--version Set the version of your package. .BR \-w \", \" \-w32 \", \" \-w64
--maintainer-name Set the maintainer's name. The company name is used by default. Create Windows application.
--maintainer-email Set the maintainer's email. Starting with Love 0.8.0, a release is specially available for Windows x64.
--homepage Set the homepage of your project. If you are targeting one of these, your project must be developed with Love 0.8.0 or newer.
--description Set the description of your project. Remember that x86 is always backwards compatible with x64.
--package-name Set the name of the package and the command that will be use to launch your game. Depending on the Love version used, the script will choose which one,
By default, it is the name of your project converted to lowercase, with eventual spaces replaced by dashes. between x64 and x86 or x86 only to create.
.br
OTHERS .B \-w32
--refresh Refresh the cache located in ~/.cache/love-release. One can replace the Love files there. Create Windows x86 executable only.
--debug Dump the scripts variables without making releases. .br
.B \-w64
SEE ALSO Create Windows x64 executable only.
https://www.love2d.org .SH PROJECT OPTIONS
https://www.love2d.org/wiki/Game_Distribution .TP
https://www.github.org/MisterDA/love-release .B \-n \fIproject-name\fR
" Set the projects name. By default, the name of the current directory is used.
.TP
.B \-r \fIrelease-dir\fR
Set the release directory. By default, a subdirectory called releases is created.
.TP
.B \-u \fIcompany\fR
Set the company name. Provide it for MacOS CFBundleIdentifier.
.TP
.B \-v \fIversion\fR
Love version. Default is 0.9.1.
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.
.SH DEBIAN
.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
Set the maintainer's email.
.TP
.B \-\-maintainer\-name \fIname\fR
Set the maintainer's name. The company name is used by default.
.TP
.B \-\-package-name \fIname\fR
Set the name of the package and the command that will be use to launch your game.
By default, it is the name of your project converted to lowercase,
with eventual spaces replaced by dashes.
.TP
.B \-\-version \fIversion\fR
Set the version of your package.
.SH OTHERS
.TP
.B \-\-refresh
Refresh the cache located in \fI~/.cache/love-release\fR.
One can replace the Love files there.
.TP
.B \-\-debug
Dump the scripts variables without making releases.
.SH ICONS
The script doesnt yet handle the process of creating icons,
but if provided it can use them.
.br
If you want to create MacOS icons (\fI.icns\fR), and you are
running MacOS, then check \fIiconutil\fR. If you are running GNU/Linux,
then check \fIlibicns\fR.
.br
If you want to create Windows icons (\fI.ico\fR),
you can use \fIicoutils\fR to create the icon,
then Wine and Resource Hacker to set the icon.
This last step can be automatically done,
assuming Wine and Resource Hacker are installed.
.br
If you want to add icons in the debian package,
open it and put the icons in \fI/usr/share/icons/hicolor/YYxYY/apps/\fR,
where YY is the width of the icon.
You also have to edit the line \"Icon=love\" in
\fI/usr/share/applications/yourgame.desktop\fR to match the icon's name.
See \fIhttps://developer.gnome.org/integration-guide/stable/basic-integration.html.en\fR
for more informations.
.SH SEE ALSO
.I https://www.love2d.org
.br
.I https://www.love2d.org/wiki/Game_Distribution
.br
.I https://www.github.org/MisterDA/love-release
" | man /dev/stdin
} }