Skip to content

Commit a059dd9

Browse files
committed
incorporate slight edits to Linux install scripts from the Arduino guys
1 parent 465861f commit a059dd9

File tree

3 files changed

+25
-38
lines changed

3 files changed

+25
-38
lines changed

build/build.xml

Lines changed: 13 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -826,33 +826,25 @@
826826
<copy file="linux/processing" tofile="linux/work/processing-java" />
827827
<chmod perm="ugo+x" file="linux/work/processing-java" />
828828

829-
<!-- Additions by the Arduino folks having beer on a Friday evening -->
830-
<!-- this allows Linux users to add mime types to IDE by simply running the
831-
install script added to the Processing folder. This adds the following features:
832-
- the icons for the IDE in different resolutions
829+
<!-- This allows Linux users to add mime types to the PDE by simply
830+
running the install script added to the Processing folder.
831+
This adds the following features:
832+
- the icons for the PDE in different resolutions
833833
- icons for the files
834834
- a desktop icon
835-
- when double clicking the *.pde files, the IDE will be opened
835+
- when double clicking the *.pde files, the PDE will be opened
836836
837837
from Sweden with <3
838-
-->
839-
<copy file="linux/install.sh" todir="linux/work" />
840-
<chmod perm="ugo+x" file="linux/work/install.sh" />
841-
842-
<copy file="linux/uninstall.sh" todir="linux/work" />
843-
<chmod perm="ugo+x" file="linux/work/uninstall.sh" />
844-
845-
<copy file="linux/processing-processingide.xml" todir="linux/work/lib" />
846-
<copy file="linux/appdata.xml" todir="linux/work/lib" />
847-
<copy file="linux/desktop.template" todir="linux/work/lib" />
838+
-->
839+
<copy file="linux/install.sh" todir="linux/work" />
840+
<chmod perm="ugo+x" file="linux/work/install.sh" />
848841

842+
<copy file="linux/uninstall.sh" todir="linux/work" />
843+
<chmod perm="ugo+x" file="linux/work/uninstall.sh" />
849844

850-
851-
<!--
852-
<get src="http://download.processing.org/java/${jre.file}"
853-
dest="linux/jre.tgz"
854-
usetimestamp="true" />
855-
-->
845+
<copy file="linux/processing-pde.xml" todir="linux/work/lib" />
846+
<copy file="linux/appdata.xml" todir="linux/work/lib" />
847+
<copy file="linux/desktop.template" todir="linux/work/lib" />
856848

857849
<!--
858850
Cannot use ant version of tar because it doesn't preserve properties.
@@ -876,11 +868,6 @@
876868
<arg value="../${jre.tgz.path}"/>
877869
</exec>
878870

879-
<!--
880-
We only want to move when the folder didn't exist before
881-
<move file="linux/jre1.7.0_40" tofile="linux/work/java" />
882-
-->
883-
884871
<!-- use the jre subfolder when having downloaded a JDK file -->
885872
<condition property="jre.dir" value="jdk${jdk.esoteric}/jre">
886873
<!-- property might not be set, but it is for arm -->

build/linux/install.sh

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
#!/bin/sh
22

3-
# This script adds a menu item, icons and mime type for Arduino for the current
4-
# user. If possible, it will use the xdg-utils - or fall back to just creating
5-
# and copying a desktop file to the user's dir.
6-
# If called with the "-u" option, it will undo the changes.
3+
# This script adds a menu item, icons and mime type for Processing for
4+
# the current user. If possible, it will use the xdg-utils - or fall back
5+
# to just creating and copying a desktop file to the user's directory.
6+
# If called with the "-u" option, it will uninstall.
77

88
# Resource name to use (including vendor prefix)
9-
RESOURCE_NAME=processing-processingide
9+
RESOURCE_NAME=processing-pde
1010

1111
# Get absolute path from which this script file was executed
1212
# (Could be changed to "pwd -P" to resolve symlinks to their target)
@@ -61,7 +61,7 @@ xdg_install_f() {
6161
xdg-icon-resource install --context mimetypes --size 512 "${SCRIPT_PATH}/lib/icons/pde-512.png" text-x-processing
6262
xdg-icon-resource install --context mimetypes --size 1024 "${SCRIPT_PATH}/lib/icons/pde-1024.png" text-x-processing
6363

64-
# Make Processing IDE the default application for *.pde
64+
# Make the Processing Development Environment the default app for *.pde files
6565
xdg-mime default ${RESOURCE_NAME}.desktop text/x-processing
6666

6767
# Clean up
@@ -128,7 +128,7 @@ xdg_uninstall_f() {
128128
xdg-icon-resource uninstall --size 512 text-x-processing
129129
xdg-icon-resource uninstall --size 1024 text-x-processing
130130

131-
# Remove Arduino MIME type
131+
# Remove MIME type
132132
xdg-mime uninstall "${SCRIPT_PATH}/lib/${RESOURCE_NAME}.xml"
133133

134134
}
@@ -194,7 +194,7 @@ xdg_exists_f() {
194194

195195
# Shows a description of the available options
196196
display_help_f() {
197-
printf "\nThis script will add a Processing IDE desktop shortcut, menu item,\n"
197+
printf "\nThis script will add a Processing desktop shortcut, menu item,\n"
198198
printf "icons and file associations for the current user.\n"
199199
if ! xdg_exists_f; then
200200
printf "\nxdg-utils are recommended to be installed, so this script can use them.\n"
@@ -227,21 +227,21 @@ done
227227
# If possible, use xdg-utils, if not, use a more basic approach
228228
if xdg_exists_f; then
229229
if [ ${UNINSTALL} = true ]; then
230-
printf "Removing desktop shortcut and menu item for Processing IDE..."
230+
printf "Removing desktop shortcut and menu item for Processing..."
231231
xdg_uninstall_f
232232
simple_uninstall_f
233233
else
234-
printf "Adding desktop shortcut, menu item and file associations for Processing IDE..."
234+
printf "Adding desktop shortcut, menu item and file associations for Processing..."
235235
xdg_uninstall_f
236236
simple_uninstall_f
237237
xdg_install_f
238238
fi
239239
else
240240
if [ ${UNINSTALL} = true ]; then
241-
printf "Removing desktop shortcut and menu item for Processing IDE..."
241+
printf "Removing desktop shortcut and menu item for Processing..."
242242
simple_uninstall_f
243243
else
244-
printf "Adding desktop shortcut and menu item for Processing IDE..."
244+
printf "Adding desktop shortcut and menu item for Processing..."
245245
simple_uninstall_f
246246
simple_install_f
247247
fi

0 commit comments

Comments
 (0)