mirror of
https://github.com/processing/processing4.git
synced 2026-01-27 10:21:26 +01:00
incorporate slight edits to Linux install scripts from the Arduino guys
This commit is contained in:
@@ -826,33 +826,25 @@
|
||||
<copy file="linux/processing" tofile="linux/work/processing-java" />
|
||||
<chmod perm="ugo+x" file="linux/work/processing-java" />
|
||||
|
||||
<!-- Additions by the Arduino folks having beer on a Friday evening -->
|
||||
<!-- this allows Linux users to add mime types to IDE by simply running the
|
||||
install script added to the Processing folder. This adds the following features:
|
||||
- the icons for the IDE in different resolutions
|
||||
<!-- This allows Linux users to add mime types to the PDE by simply
|
||||
running the install script added to the Processing folder.
|
||||
This adds the following features:
|
||||
- the icons for the PDE in different resolutions
|
||||
- icons for the files
|
||||
- a desktop icon
|
||||
- when double clicking the *.pde files, the IDE will be opened
|
||||
- when double clicking the *.pde files, the PDE will be opened
|
||||
|
||||
from Sweden with <3
|
||||
-->
|
||||
<copy file="linux/install.sh" todir="linux/work" />
|
||||
<chmod perm="ugo+x" file="linux/work/install.sh" />
|
||||
-->
|
||||
<copy file="linux/install.sh" todir="linux/work" />
|
||||
<chmod perm="ugo+x" file="linux/work/install.sh" />
|
||||
|
||||
<copy file="linux/uninstall.sh" todir="linux/work" />
|
||||
<chmod perm="ugo+x" file="linux/work/uninstall.sh" />
|
||||
<copy file="linux/uninstall.sh" todir="linux/work" />
|
||||
<chmod perm="ugo+x" file="linux/work/uninstall.sh" />
|
||||
|
||||
<copy file="linux/processing-processingide.xml" todir="linux/work/lib" />
|
||||
<copy file="linux/appdata.xml" todir="linux/work/lib" />
|
||||
<copy file="linux/desktop.template" todir="linux/work/lib" />
|
||||
|
||||
|
||||
|
||||
<!--
|
||||
<get src="http://download.processing.org/java/${jre.file}"
|
||||
dest="linux/jre.tgz"
|
||||
usetimestamp="true" />
|
||||
-->
|
||||
<copy file="linux/processing-pde.xml" todir="linux/work/lib" />
|
||||
<copy file="linux/appdata.xml" todir="linux/work/lib" />
|
||||
<copy file="linux/desktop.template" todir="linux/work/lib" />
|
||||
|
||||
<!--
|
||||
Cannot use ant version of tar because it doesn't preserve properties.
|
||||
@@ -876,11 +868,6 @@
|
||||
<arg value="../${jre.tgz.path}"/>
|
||||
</exec>
|
||||
|
||||
<!--
|
||||
We only want to move when the folder didn't exist before
|
||||
<move file="linux/jre1.7.0_40" tofile="linux/work/java" />
|
||||
-->
|
||||
|
||||
<!-- use the jre subfolder when having downloaded a JDK file -->
|
||||
<condition property="jre.dir" value="jdk${jdk.esoteric}/jre">
|
||||
<!-- property might not be set, but it is for arm -->
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This script adds a menu item, icons and mime type for Arduino for the current
|
||||
# user. If possible, it will use the xdg-utils - or fall back to just creating
|
||||
# and copying a desktop file to the user's dir.
|
||||
# If called with the "-u" option, it will undo the changes.
|
||||
# This script adds a menu item, icons and mime type for Processing for
|
||||
# the current user. If possible, it will use the xdg-utils - or fall back
|
||||
# to just creating and copying a desktop file to the user's directory.
|
||||
# If called with the "-u" option, it will uninstall.
|
||||
|
||||
# Resource name to use (including vendor prefix)
|
||||
RESOURCE_NAME=processing-processingide
|
||||
RESOURCE_NAME=processing-pde
|
||||
|
||||
# Get absolute path from which this script file was executed
|
||||
# (Could be changed to "pwd -P" to resolve symlinks to their target)
|
||||
@@ -61,7 +61,7 @@ xdg_install_f() {
|
||||
xdg-icon-resource install --context mimetypes --size 512 "${SCRIPT_PATH}/lib/icons/pde-512.png" text-x-processing
|
||||
xdg-icon-resource install --context mimetypes --size 1024 "${SCRIPT_PATH}/lib/icons/pde-1024.png" text-x-processing
|
||||
|
||||
# Make Processing IDE the default application for *.pde
|
||||
# Make the Processing Development Environment the default app for *.pde files
|
||||
xdg-mime default ${RESOURCE_NAME}.desktop text/x-processing
|
||||
|
||||
# Clean up
|
||||
@@ -128,7 +128,7 @@ xdg_uninstall_f() {
|
||||
xdg-icon-resource uninstall --size 512 text-x-processing
|
||||
xdg-icon-resource uninstall --size 1024 text-x-processing
|
||||
|
||||
# Remove Arduino MIME type
|
||||
# Remove MIME type
|
||||
xdg-mime uninstall "${SCRIPT_PATH}/lib/${RESOURCE_NAME}.xml"
|
||||
|
||||
}
|
||||
@@ -194,7 +194,7 @@ xdg_exists_f() {
|
||||
|
||||
# Shows a description of the available options
|
||||
display_help_f() {
|
||||
printf "\nThis script will add a Processing IDE desktop shortcut, menu item,\n"
|
||||
printf "\nThis script will add a Processing desktop shortcut, menu item,\n"
|
||||
printf "icons and file associations for the current user.\n"
|
||||
if ! xdg_exists_f; then
|
||||
printf "\nxdg-utils are recommended to be installed, so this script can use them.\n"
|
||||
@@ -227,21 +227,21 @@ done
|
||||
# If possible, use xdg-utils, if not, use a more basic approach
|
||||
if xdg_exists_f; then
|
||||
if [ ${UNINSTALL} = true ]; then
|
||||
printf "Removing desktop shortcut and menu item for Processing IDE..."
|
||||
printf "Removing desktop shortcut and menu item for Processing..."
|
||||
xdg_uninstall_f
|
||||
simple_uninstall_f
|
||||
else
|
||||
printf "Adding desktop shortcut, menu item and file associations for Processing IDE..."
|
||||
printf "Adding desktop shortcut, menu item and file associations for Processing..."
|
||||
xdg_uninstall_f
|
||||
simple_uninstall_f
|
||||
xdg_install_f
|
||||
fi
|
||||
else
|
||||
if [ ${UNINSTALL} = true ]; then
|
||||
printf "Removing desktop shortcut and menu item for Processing IDE..."
|
||||
printf "Removing desktop shortcut and menu item for Processing..."
|
||||
simple_uninstall_f
|
||||
else
|
||||
printf "Adding desktop shortcut and menu item for Processing IDE..."
|
||||
printf "Adding desktop shortcut and menu item for Processing..."
|
||||
simple_uninstall_f
|
||||
simple_install_f
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user