# HG changeset patch # User David Barts # Date 1608952067 28800 # Node ID c310ec097194b7f0e1122c2ac590a5bbdc84eaeb # Parent 404eb7e57fe604b3bb39a01fe2a63eead5da0dbb Add Linux support. diff -r 404eb7e57fe6 -r c310ec097194 build.xml --- a/build.xml Fri Dec 25 18:58:45 2020 -0800 +++ b/build.xml Fri Dec 25 19:07:47 2020 -0800 @@ -29,6 +29,31 @@ ]]> + + + + + + + @@ -191,4 +216,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff -r 404eb7e57fe6 -r c310ec097194 make-debian-package --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/make-debian-package Fri Dec 25 19:07:47 2020 -0800 @@ -0,0 +1,57 @@ +#!/bin/bash +# A v. 2.0 Debian package is nothing but an ar(1) archive that contains +# three members: +# 1. A debian-binary file containing the string "2.0" and a newline, +# 2. A compressed tar archive with a name of control, +# 3. A compressed tar archive with a name of data. +# (See https://en.wikipedia.org/wiki/Deb_%28file_format%29.) Make one. +# +# There are other ways to do this, but they tend to be so complex and +# badly-documented that I found it easier to just roll my own. + +# Name executed as +myname="${0##*/}" + +# We must specify single directory name and an output file. +if [ $# -ne 2 ] +then + 1>&2 echo "$myname: expecting directory and output file" + exit 2 +fi + +# Change to the directory, die if we can't +cd "$1" || exit 2 + +# Do some sanity checks. +for i in data control +do + if [ ! -d "$i" ] + then + 1>&2 echo "$myname: '$1/$i', no such directory" + exit 2 + fi +done + +# If there is no debian-binary file, make one. +dbin="debian-binary" +if [ ! -e "$dbin" ] +then + 1>&2 echo "$myname: warning - '$dbin' does not exist, creating it" + echo "2.0" > "$dbin" || exit 1 +fi + +# Remember where we are, and bail on errors +set -e + +# Process data +cd data +find * -type f -print0 | xargs -0 md5sum > ../control/md5sums +tar -c -z --owner=0 --group=0 -f ../data.tar.gz * + +# Process control +cd ../control +tar -c -z --owner=0 --group=0 -f ../control.tar.gz * + +# Finally, make deb file +cd .. +ar r "$2" "$dbin" control.tar.gz data.tar.gz diff -r 404eb7e57fe6 -r c310ec097194 package-files/linux/deb/Packages --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package-files/linux/deb/Packages Fri Dec 25 19:07:47 2020 -0800 @@ -0,0 +1,15 @@ +Package: imageprep +Version: @app.version@ +Architecture: all +Installed-Size: @deb.installed.size@ +Recommends: default-jre | openjdk-8-jre +Suggests: default-jdk | openjdk-8-jdk +Filename: @deb.repository.file@ +Size: @deb.size@ +MD5sum: @deb.md5@ +SHA1: @deb.sha1@ +SHA256: @deb.sha256@ +Section: contrib/graphics +Homepage: http://notyouraveragetechie.com/ImagePrep.html +Priority: optional +Description: Prepare photos for sharing on social media. diff -r 404eb7e57fe6 -r c310ec097194 package-files/linux/deb/changelog --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package-files/linux/deb/changelog Fri Dec 25 19:07:47 2020 -0800 @@ -0,0 +1,7 @@ +imageprep (1.01) unstable; urgency=low + + * 1.01 First Debian package for ImagePrep. + + -- David Barts Fri, 25 Dec 2020 18:09:00 -0800 + +# This comment to make lintian happy. diff -r 404eb7e57fe6 -r c310ec097194 package-files/linux/deb/control --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package-files/linux/deb/control Fri Dec 25 19:07:47 2020 -0800 @@ -0,0 +1,13 @@ +Package: imageprep +Version: @app.version@ +Architecture: all +Section: contrib/graphics +Homepage: http://notyouraveragetechie.com/ImagePrep.html +Recommends: default-jre | openjdk-8-jre +Build-depends: default-jdk | openjdk-8-jdk, ant +Suggests: default-jdk | openjdk-8-jdk +Priority: optional +Installed-Size: @deb.installed.size@ +Description: Prepare photos for sharing on social media. + This dummy line here to make lintian happy. +Maintainer: David Barts diff -r 404eb7e57fe6 -r c310ec097194 package-files/linux/deb/copyright --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package-files/linux/deb/copyright Fri Dec 25 19:07:47 2020 -0800 @@ -0,0 +1,13 @@ + @app.copyright@ + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + See: /usr/share/common-licenses/GPL-3 diff -r 404eb7e57fe6 -r c310ec097194 package-files/linux/deb/imageprep --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package-files/linux/deb/imageprep Fri Dec 25 19:07:47 2020 -0800 @@ -0,0 +1,2 @@ +?package(imageprep):needs="X11" section="Contrib/Graphics" \ + title="ImagePrep" command="/usr/bin/imageprep" diff -r 404eb7e57fe6 -r c310ec097194 package-files/linux/deb/imageprep.desktop --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package-files/linux/deb/imageprep.desktop Fri Dec 25 19:07:47 2020 -0800 @@ -0,0 +1,13 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=ImagePrep +GenericName=Image Preparer +Comment=Resize, rotate, generate clean, metadata-free JPEG +Exec=imageprep +Icon=imageprep +Terminal=false +Type=Application +Categories=Graphics;Photography;Security; +StartupNotify=true +StartupWMClass=imageprep +Keywords=Photo;Resize;Rotate;JPEG;Privacy diff -r 404eb7e57fe6 -r c310ec097194 package-files/linux/deb/postinst --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package-files/linux/deb/postinst Fri Dec 25 19:07:47 2020 -0800 @@ -0,0 +1,3 @@ +#!/bin/sh +set -e +if [ "$1" = "configure" ] && [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi diff -r 404eb7e57fe6 -r c310ec097194 package-files/linux/deb/postrm --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package-files/linux/deb/postrm Fri Dec 25 19:07:47 2020 -0800 @@ -0,0 +1,3 @@ +#!/bin/sh +set -e +if [ -x "`which update-menus 2>/dev/null`" ]; then update-menus ; fi diff -r 404eb7e57fe6 -r c310ec097194 package-files/linux/icon_48x48.png Binary file package-files/linux/icon_48x48.png has changed diff -r 404eb7e57fe6 -r c310ec097194 package-files/linux/imageprep --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package-files/linux/imageprep Fri Dec 25 19:07:47 2020 -0800 @@ -0,0 +1,25 @@ +#!/bin/sh +# +# Runs ImagePrep. Adopted from a similar script in the jEdit distribution. +# +# Find a java installation. +if [ -z "${JAVA_HOME}" ]; then + echo 'Warning: $JAVA_HOME environment variable not set! Consider setting it.' + echo ' Attempting to locate java...' + j=`which java 2>/dev/null` + if [ -z "$j" ]; then + echo "Failed to locate the java virtual machine! Bailing..." + exit 1 + else + echo "Found a virtual machine at: $j..." + JAVA="$j" + fi +else + JAVA="${JAVA_HOME}/bin/java" +fi + +# Antialias menus and dockable text: +ANTIALIAS_ALL="-Dawt.useSystemAAFontSettings=on -Dswing.aatext=true" + +# Launch application. +exec "${JAVA}" ${ANTIALIAS_ALL} -jar "/usr/share/imageprep/@jar.filename@" diff -r 404eb7e57fe6 -r c310ec097194 package-files/linux/imageprep.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/package-files/linux/imageprep.1 Fri Dec 25 19:07:47 2020 -0800 @@ -0,0 +1,19 @@ +.TH IMAGEPREP 1 +.SH NAME +.B ImagePrep +\- prepare digital photos for sharing on the Internet +.SH SYNOPSIS +.B "imageprep" +.SH DESCRIPTION +This is a simple (and hopefully user-friendly), GUI-based tool for preparing +digital photographs for sharing on the Internet. It resizes the image file +without distortion to the specified maximum dimension, allows the user to +rotate the image if needed, then saves the result as a minimal JPEG file with +no metadata. +.SH FILES +.TP +~/.imageprep/* +Various configuration and other cached data lives here. +.SH "SEE ALSO" +.BR java (1) +.BR kotlin (1)