From fd4e0195a73947943f26e872320c098e0e7d8ec8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Antonin=20D=C3=A9cimo?= Date: Sat, 23 Aug 2014 11:44:29 +0200 Subject: [PATCH] Conflicting options are now prefixed #8 --- README.md | 38 +++++++++++++++++++------------------- love-release.1 | 29 ++++++++++++++++------------- love-release.sh | 8 ++++---- scripts/android.sh | 6 +++--- scripts/debian.sh | 6 +++--- scripts/example.sh | 1 + scripts/macosx.sh | 4 ++-- scripts/windows.sh | 2 +- 8 files changed, 49 insertions(+), 45 deletions(-) diff --git a/README.md b/README.md index 706db4e..e2b6ff1 100644 --- a/README.md +++ b/README.md @@ -20,10 +20,6 @@ To set the default Love version to use, you can edit the very beginning of the script. If `lua` and a `conf.lua` file are found, it will automatically detect which version your project uses. -If a `ProjectName.icns` file is provided, -the script will use it to set the game icon on MacOS. -If a `ProjectName.ico` file is provided, and that Wine is installed, -the script will use it to set the game icon on Windows. ### OPTIONS `-h` Print a short help @@ -71,31 +67,35 @@ the script will use it to set the game icon on Windows. `-x` Exclude file or directory. +#### WINDOWS +`--win-icon` Path to an ico file to use. + #### MAC OS X -`--maintainer-name` Set the maintainer’s name. Provide it for OS X CFBundleIdentifier. +`--osx-icon` Path to an icns file to use. +`--osx-maintainer-name` Set the maintainer’s name. Provide it for OS X CFBundleIdentifier. #### DEBIAN `--description` Set the description of your project. `--homepage` Set the homepage of your project. `--maintainer-email` Set the maintainer’s email. -`--maintainer-name` Set the maintainer’s name. -`--package-name` Set the name of the package and the command that will be used to launch your game. - By default, it is the name of your project converted to lowercase, - with eventual spaces replaced by dashes. -`--package-version` Set the version of your package. +`--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. + By default, it is the name of your project converted to lowercase, + with eventual spaces replaced by dashes. +`--deb-package-version` Set the version of your package. #### ANDROID Note that every argument passed to the options should be alphanumerical, with eventual underscores (i.e. [a-zA-Z0-9\_]), otherwise you'll get errors. -`--activity` The name of the class that extends GameActivity. - By default it is the name of the project with ‘Activity’ appended, - eventual spaces and dashes replaced by underscores. -`--maintainer-name` Set the maintainer’s name. - It must be only alphanumerical characters, with eventual underscores. -`--package-name` Set the name of the package. - By default, it is the name of your project, with eventual spaces replaced by underscores. -`--update-android` Update the love-android-sdl2.git repository used in the cache. -`--package-version` Set the version of your package. +`--activity` The name of the class that extends GameActivity. + By default it is the name of the project with ‘Activity’ appended, + eventual spaces and dashes replaced by underscores. +`--apk-maintainer-name` Set the maintainer’s name. + It must be only alphanumerical characters, with eventual underscores. +`--apk-package-name` Set the name of the package. + By default, it is the name of your project, with eventual spaces replaced by underscores. +`--apk-package-version` Set the version of your package. +`--update-android` Update the love-android-sdl2.git repository used in the cache. #### OTHERS `--clean` Clean the cache located in `~/.cache/love-release`. diff --git a/love-release.1 b/love-release.1 index e4ff72e..aa21e9f 100644 --- a/love-release.1 +++ b/love-release.1 @@ -17,10 +17,6 @@ To set the default Love version to use, you can edit the very beginning of the script. If \fBlua\fR and a \fIconf.lua\fR file are found, it will automatically detect which version your project uses. -If a \fIProjectName.icns\fR file is provided, -the script will use it to set the game icon on MacOS. -If a \fIProjectName.ico\fR file is provided, and that \fBWine\fR -is installed, the script will use it to set the game icon on Windows. .SH OPTIONS .TP .B \-h @@ -82,9 +78,16 @@ Starting with Love 0.9.0, Love no longer supports old x86 Macintosh. .TP .B \-x \fIfile\fR|\fIdirectory\fR Exclude file or directory. +.SH WINDOWS +.TP +.B \-\-win\-icon \fIicon\fR +Path to an ico file to use. .SH MAC OS X .TP -.B \-\-maintainer\-name \fIname\fR +.B \-\-osx\-icon \fIicon\fR +Path to an icns file to use. +.TP +.B \-\-osx\-maintainer\-name \fIname\fR Set the maintainer's name. Provide it for OS X CFBundleIdentifier. .SH DEBIAN .TP @@ -97,15 +100,15 @@ Set the homepage of your project. .B \-\-maintainer-email \fIemail\fR Set the maintainer's email. .TP -.B \-\-maintainer\-name \fIname\fR +.B \-\-deb\-maintainer\-name \fIname\fR Set the maintainer's name. .TP -.B \-\-package-name \fIname\fR +.B \-\-deb\-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 \-\-package\-version \fIversion\fR +.B \-\-deb\-package\-version \fIversion\fR Set the version of your package. .SH ANDROID Note that every argument passed to the options should be alphanumerical, @@ -116,19 +119,19 @@ The name of the class that extends GameActivity. By default it is the name of the project with 'Activity' appended, eventual spaces and dashes replaced by underscores. .TP -.B \-\-maintainer\-name \fIname\fR +.B \-\-apk\|maintainer\-name \fIname\fR Set the maintainer’s name. It must be only alphanumerical characters, with eventual underscores. .TP -.B \-\-package\-name \fIname\fR +.B \-\-apk\-package\-name \fIname\fR Set the name of the package. By default, it is the name of your project, with eventual spaces replaced by underscores. .TP +.B \-\-apk\-package\-version \fIversion\fR +Set the version of your package. +.TP .B \-\-update\-android Update the love-android-sdl2.git repository used in the cache. -.TP -.B \-\-package\-version \fIversion\fR -Set the version of your package. .SH OTHERS .TP .B \-\-clean diff --git a/love-release.sh b/love-release.sh index 03032b7..7db63cc 100755 --- a/love-release.sh +++ b/love-release.sh @@ -17,16 +17,16 @@ LOVE_VERSION=0.9.1 SCRIPT_ARGS="l;" ## Windows -SCRIPT_ARGS="w. icon: $SCRIPT_ARGS" +SCRIPT_ARGS="w. win-icon: $SCRIPT_ARGS" ## Debian -SCRIPT_ARGS="d; package-version: maintainer-name: maintainer-email: homepage: description: package-name: $SCRIPT_ARGS" +SCRIPT_ARGS="d; deb-package-version: deb-maintainer-name: maintainer-email: homepage: description: deb-package-name: $SCRIPT_ARGS" ## Android -SCRIPT_ARGS="a; activity: package-version: maintainer-name: package-name: update-android; $SCRIPT_ARGS" +SCRIPT_ARGS="a; activity: apk-package-version: apk-maintainer-name: apk-package-name: update-android; $SCRIPT_ARGS" ## Mac OS X -SCRIPT_ARGS="m; icon: maintainer-name: $SCRIPT_ARGS" +SCRIPT_ARGS="m; osx-icon: osx-maintainer-name: $SCRIPT_ARGS" ## Add a short summary of your platform script here diff --git a/scripts/android.sh b/scripts/android.sh index dc0b543..66b215e 100644 --- a/scripts/android.sh +++ b/scripts/android.sh @@ -27,11 +27,11 @@ do if [ "$OPTOPT" = "activity" ]; then ACTIVITY=$OPTARG activity_defined_argument=true - elif [ "$OPTOPT" = "package-version" ]; then + elif [ "$OPTOPT" = "apk-package-version" ]; then PACKAGE_VERSION=$OPTARG - elif [ "$OPTOPT" = "maintainer-name" ]; then + elif [ "$OPTOPT" = "apk-maintainer-name" ]; then MAINTAINER_NAME=$OPTARG - elif [ "$OPTOPT" = "package-name" ]; then + elif [ "$OPTOPT" = "apk-package-name" ]; then PACKAGE_NAME=$OPTARG package_name_defined_argument=true elif [ "$OPTOPT" = "update-android" ]; then diff --git a/scripts/debian.sh b/scripts/debian.sh index d29b8e4..d31d298 100644 --- a/scripts/debian.sh +++ b/scripts/debian.sh @@ -28,17 +28,17 @@ fi package_name_defined_argument=false while getoptex "$SCRIPT_ARGS" "$@" do - if [ "$OPTOPT" = "package-version" ]; then + if [ "$OPTOPT" = "deb-package-version" ]; then PACKAGE_VERSION=$OPTARG elif [ "$OPTOPT" = "homepage" ]; then PROJECT_HOMEPAGE=$OPTARG elif [ "$OPTOPT" = "description" ]; then PROJECT_DESCRIPTION=$OPTARG - elif [ "$OPTOPT" = "maintainer-name" ]; then + elif [ "$OPTOPT" = "deb-maintainer-name" ]; then MAINTAINER_NAME=$OPTARG elif [ "$OPTOPT" = "maintainer-email" ]; then MAINTAINER_EMAIL=$OPTARG - elif [ "$OPTOPT" = "package-name" ]; then + elif [ "$OPTOPT" = "deb-package-name" ]; then PACKAGE_NAME=$OPTARG package_name_defined_argument=true fi diff --git a/scripts/example.sh b/scripts/example.sh index f2e88a5..7fe9827 100644 --- a/scripts/example.sh +++ b/scripts/example.sh @@ -24,6 +24,7 @@ # - a semicolon ";" if it doesn't require an argument # - a dot "." if it has an optional argument # - a colon ":" if it requires an argument +# If you need options that might conflict by their names with already defined options, please prefix them. SCRIPT_ARGS="q; wer: ty. uiop $SCRIPT_ARGS" ## 2. Add a short summary of your module diff --git a/scripts/macosx.sh b/scripts/macosx.sh index 603bce8..79fbe00 100644 --- a/scripts/macosx.sh +++ b/scripts/macosx.sh @@ -16,9 +16,9 @@ fi # Options while getoptex "$SCRIPT_ARGS" "$@" do - if [ "$OPTOPT" = "icon" ]; then + if [ "$OPTOPT" = "osx-icon" ]; then PROJECT_ICNS=$OPTARG - elif [ "$OPTOPT" = "maintainer-name" ]; then + elif [ "$OPTOPT" = "osx-maintainer-name" ]; then MAINTAINER_NAME=$OPTARG fi done diff --git a/scripts/windows.sh b/scripts/windows.sh index eba9822..e562cbc 100644 --- a/scripts/windows.sh +++ b/scripts/windows.sh @@ -15,7 +15,7 @@ fi # Options while getoptex "$SCRIPT_ARGS" "$@" do - if [ "$OPTOPT" = "icon" ]; then + if [ "$OPTOPT" = "win-icon" ]; then PROJECT_ICO=$OPTARG fi done