mirror of
https://github.com/arduino/Arduino.git
synced 2025-01-17 06:52:18 +01:00
Merge pull request #3421 from ffissore/current-working-dir
Introducing APP_DIR property
This commit is contained in:
commit
199d069410
4
.gitignore
vendored
4
.gitignore
vendored
@ -33,8 +33,8 @@ build/macosx/libastylej*
|
||||
build/macosx/appbundler*.jar
|
||||
build/macosx/appbundler*.zip
|
||||
build/macosx/appbundler
|
||||
build/macosx/appbundler-1.0ea-arduino2
|
||||
build/macosx/appbundler-1.0ea-upstream1
|
||||
build/macosx/appbundler-1.0ea-arduino*.zip
|
||||
build/macosx/appbundler-1.0ea-upstream*.zip
|
||||
build/linux/work/
|
||||
build/linux/dist/*.tar.gz
|
||||
build/linux/dist/*.tar.bz2
|
||||
|
@ -186,21 +186,8 @@ public class BaseNoGui {
|
||||
}
|
||||
|
||||
static public File getContentFile(String name) {
|
||||
File path = new File(System.getProperty("user.dir"));
|
||||
|
||||
if (OSUtils.isMacOS()) {
|
||||
if (System.getProperty("WORK_DIR") != null) {
|
||||
path = new File(System.getProperty("WORK_DIR"));
|
||||
} else {
|
||||
try {
|
||||
path = new File(BaseNoGui.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath()).getParentFile();
|
||||
} catch (URISyntaxException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return new File(path, name);
|
||||
File installationFolder = new File(System.getProperty("APP_DIR"));
|
||||
return new File(installationFolder, name);
|
||||
}
|
||||
|
||||
static public TargetPlatform getCurrentTargetPlatformFromPackage(String pack) {
|
||||
@ -976,11 +963,6 @@ public class BaseNoGui {
|
||||
preferencesFile = args[i];
|
||||
continue;
|
||||
}
|
||||
if (args[i].equals("--curdir")) {
|
||||
i++;
|
||||
currentDirectory = args[i];
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
// run static initialization that grabs all the prefs
|
||||
|
@ -146,11 +146,8 @@ public class CommandlineParser {
|
||||
continue;
|
||||
}
|
||||
if (args[i].equals("--curdir")) {
|
||||
i++;
|
||||
if (i >= args.length)
|
||||
BaseNoGui.showError(null, _("Argument required for --curdir"), 3);
|
||||
// Argument should be already processed by Base.main(...)
|
||||
continue;
|
||||
BaseNoGui.showError(null, _("--curdir no longer supported"), 3);
|
||||
return;
|
||||
}
|
||||
if (args[i].equals("--buildpath")) {
|
||||
i++;
|
||||
|
@ -305,16 +305,17 @@
|
||||
<mkdir dir="${staging_folder}/work" />
|
||||
|
||||
<antcall target="unzip">
|
||||
<param name="archive_file" value="${staging_folder}/appbundler-1.0ea-upstream1.jar.zip" />
|
||||
<param name="archive_url" value="http://downloads.arduino.cc/appbundler-1.0ea-upstream1.jar.zip" />
|
||||
<param name="final_folder" value="${staging_folder}/appbundler-1.0ea-upstream1" />
|
||||
<param name="dest_folder" value="${staging_folder}/appbundler-1.0ea-upstream1" />
|
||||
<param name="archive_file" value="${staging_folder}/appbundler-1.0ea-arduino3.jar.zip" />
|
||||
<param name="archive_url" value="http://downloads.arduino.cc/appbundler-1.0ea-arduino3.jar.zip" />
|
||||
<param name="final_folder" value="${staging_folder}/appbundler-1.0ea-arduino3" />
|
||||
<param name="dest_folder" value="${staging_folder}/appbundler-1.0ea-arduino3" />
|
||||
</antcall>
|
||||
|
||||
<taskdef name="bundleapp" classname="com.oracle.appbundler.AppBundlerTask" classpath="${staging_folder}/appbundler-1.0ea-upstream1/appbundler-1.0ea-upstream1.jar"/>
|
||||
<taskdef name="bundleapp" classname="com.oracle.appbundler.AppBundlerTask" classpath="${staging_folder}/appbundler-1.0ea-arduino3/appbundler-1.0ea-arduino3.jar"/>
|
||||
|
||||
<bundleapp
|
||||
jvmRequired="1.8"
|
||||
jrepreferred="true"
|
||||
outputdirectory="${staging_folder}/work"
|
||||
name="Arduino"
|
||||
displayname="Arduino"
|
||||
@ -326,6 +327,7 @@
|
||||
icon="macosx/template.app/Contents/Resources/processing.icns"
|
||||
mainclassname="processing.app.Base"
|
||||
copyright="Arduino LLC"
|
||||
applicationCategory="public.app-category.education"
|
||||
minimumsystemversion="10.7"
|
||||
highresolutioncapable="true">
|
||||
|
||||
@ -336,11 +338,12 @@
|
||||
|
||||
<classpath refid="runtime.jars"/>
|
||||
|
||||
<option value="-Dapple.awt.application.name=Arduino" />
|
||||
<option value="-Dapple.awt.application.name=Arduino"/>
|
||||
<option value="-Dapple.laf.useScreenMenuBar=true"/>
|
||||
<option value="-Dcom.apple.macos.use-file-dialog-packages=true"/>
|
||||
<option value="-Dcom.apple.smallTabs=true"/>
|
||||
<option value="-Dcom.apple.macos.useScreenMenuBar=true" />
|
||||
<option value="-Dcom.apple.macos.useScreenMenuBar=true"/>
|
||||
<option value="-DAPP_DIR=$APP_ROOT/Contents/Java"/>
|
||||
|
||||
<!--
|
||||
<option value="-Dapple.awt.showGrowBox=false"/>
|
||||
|
3
build/linux/dist/arduino
vendored
3
build/linux/dist/arduino
vendored
@ -33,4 +33,5 @@ if [ -x ./java/bin/java ]; then
|
||||
JAVA=./java/bin/java
|
||||
fi
|
||||
|
||||
$JAVA -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel $SPLASH processing.app.Base --curdir "$CURDIR" "$@"
|
||||
$JAVA -DAPP_DIR="$APPDIR" -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel $SPLASH processing.app.Base --curdir "$CURDIR" "$@"
|
||||
|
||||
|
1
build/macosx/appbundler-1.0ea-arduino3.jar.zip.sha
Normal file
1
build/macosx/appbundler-1.0ea-arduino3.jar.zip.sha
Normal file
@ -0,0 +1 @@
|
||||
247d19a71672171ce2eda25704121375f04c5e1f
|
@ -1 +0,0 @@
|
||||
5bb6377a65edf7af7b5b3820711bab0e377bdee1
|
@ -1,45 +1,44 @@
|
||||
<launch4jConfig>
|
||||
<dontWrapJar>true</dontWrapJar>
|
||||
<headerType>gui</headerType>
|
||||
<jar>lib</jar>
|
||||
<outfile>arduino.exe</outfile>
|
||||
<chdir>.</chdir>
|
||||
<errTitle>Arduino</errTitle>
|
||||
<downloadUrl>http://www.oracle.com/technetwork/java/javase/downloads/index.html</downloadUrl>
|
||||
<icon>application.ico</icon>
|
||||
<classPath>
|
||||
<mainClass>processing.app.Base</mainClass>
|
||||
<cp>lib/antlr.jar</cp>
|
||||
<cp>lib/apple.jar</cp>
|
||||
<cp>lib/arduino-core.jar</cp>
|
||||
<cp>lib/bcpg-jdk15on-152.jar</cp>
|
||||
<cp>lib/bcprov-jdk15on-152.jar</cp>
|
||||
<cp>lib/commons-codec-1.7.jar</cp>
|
||||
<cp>lib/commons-compress-1.8.jar</cp>
|
||||
<cp>lib/commons-exec-1.1.jar</cp>
|
||||
<cp>lib/commons-httpclient-3.1.jar</cp>
|
||||
<cp>lib/commons-lang3-3.3.2.jar</cp>
|
||||
<cp>lib/commons-logging-1.0.4.jar</cp>
|
||||
<cp>lib/ecj.jar</cp>
|
||||
<cp>lib/guava-18.0.jar</cp>
|
||||
<cp>lib/jackson-annotations-2.2.3.jar</cp>
|
||||
<cp>lib/jackson-core-2.2.3.jar</cp>
|
||||
<cp>lib/jackson-databind-2.2.3.jar</cp>
|
||||
<cp>lib/jackson-module-mrbean-2.2.3.jar</cp>
|
||||
<cp>lib/java-semver-0.8.0.jar</cp>
|
||||
<cp>lib/jmdns-3.4.1.jar</cp>
|
||||
<cp>lib/jna-4.1.0.jar</cp>
|
||||
<cp>lib/jna-platform-4.1.0.jar</cp>
|
||||
<cp>lib/jsch-0.1.50.jar</cp>
|
||||
<cp>lib/jssc-2.8.0.jar</cp>
|
||||
<cp>lib/pde.jar</cp>
|
||||
<cp>lib/rsyntaxtextarea-2.5.6.1+arduino.jar</cp>
|
||||
<cp>%EXEDIR%/lib/antlr.jar</cp>
|
||||
<cp>%EXEDIR%/lib/apple.jar</cp>
|
||||
<cp>%EXEDIR%/lib/arduino-core.jar</cp>
|
||||
<cp>%EXEDIR%/lib/bcpg-jdk15on-152.jar</cp>
|
||||
<cp>%EXEDIR%/lib/bcprov-jdk15on-152.jar</cp>
|
||||
<cp>%EXEDIR%/lib/commons-codec-1.7.jar</cp>
|
||||
<cp>%EXEDIR%/lib/commons-compress-1.8.jar</cp>
|
||||
<cp>%EXEDIR%/lib/commons-exec-1.1.jar</cp>
|
||||
<cp>%EXEDIR%/lib/commons-httpclient-3.1.jar</cp>
|
||||
<cp>%EXEDIR%/lib/commons-lang3-3.3.2.jar</cp>
|
||||
<cp>%EXEDIR%/lib/commons-logging-1.0.4.jar</cp>
|
||||
<cp>%EXEDIR%/lib/ecj.jar</cp>
|
||||
<cp>%EXEDIR%/lib/guava-18.0.jar</cp>
|
||||
<cp>%EXEDIR%/lib/jackson-annotations-2.2.3.jar</cp>
|
||||
<cp>%EXEDIR%/lib/jackson-core-2.2.3.jar</cp>
|
||||
<cp>%EXEDIR%/lib/jackson-databind-2.2.3.jar</cp>
|
||||
<cp>%EXEDIR%/lib/jackson-module-mrbean-2.2.3.jar</cp>
|
||||
<cp>%EXEDIR%/lib/java-semver-0.8.0.jar</cp>
|
||||
<cp>%EXEDIR%/lib/jmdns-3.4.1.jar</cp>
|
||||
<cp>%EXEDIR%/lib/jna-4.1.0.jar</cp>
|
||||
<cp>%EXEDIR%/lib/jna-platform-4.1.0.jar</cp>
|
||||
<cp>%EXEDIR%/lib/jsch-0.1.50.jar</cp>
|
||||
<cp>%EXEDIR%/lib/jssc-2.8.0.jar</cp>
|
||||
<cp>%EXEDIR%/lib/pde.jar</cp>
|
||||
<cp>%EXEDIR%/lib/rsyntaxtextarea-2.5.6.1+arduino.jar</cp>
|
||||
</classPath>
|
||||
<jre>
|
||||
<path>java</path>
|
||||
<runtimeBits>32</runtimeBits>
|
||||
<opt>-splash:./lib/splash.png</opt>
|
||||
<opt>-splash:"%EXEDIR%/lib/splash.png"</opt>
|
||||
<opt>-Dsun.java2d.d3d=false</opt>
|
||||
<opt>-DAPP_DIR="%EXEDIR%"</opt>
|
||||
</jre>
|
||||
<versionInfo>
|
||||
<fileDescription>Arduino IDE</fileDescription>
|
||||
|
@ -1,44 +1,43 @@
|
||||
<launch4jConfig>
|
||||
<dontWrapJar>true</dontWrapJar>
|
||||
<headerType>console</headerType>
|
||||
<jar>lib</jar>
|
||||
<outfile>arduino_debug.exe</outfile>
|
||||
<chdir>.</chdir>
|
||||
<errTitle>Arduino</errTitle>
|
||||
<downloadUrl>http://www.oracle.com/technetwork/java/javase/downloads/index.html</downloadUrl>
|
||||
<icon>application.ico</icon>
|
||||
<classPath>
|
||||
<mainClass>processing.app.Base</mainClass>
|
||||
<cp>lib/antlr.jar</cp>
|
||||
<cp>lib/apple.jar</cp>
|
||||
<cp>lib/arduino-core.jar</cp>
|
||||
<cp>lib/bcpg-jdk15on-152.jar</cp>
|
||||
<cp>lib/bcprov-jdk15on-152.jar</cp>
|
||||
<cp>lib/commons-codec-1.7.jar</cp>
|
||||
<cp>lib/commons-compress-1.8.jar</cp>
|
||||
<cp>lib/commons-exec-1.1.jar</cp>
|
||||
<cp>lib/commons-httpclient-3.1.jar</cp>
|
||||
<cp>lib/commons-lang3-3.3.2.jar</cp>
|
||||
<cp>lib/commons-logging-1.0.4.jar</cp>
|
||||
<cp>lib/ecj.jar</cp>
|
||||
<cp>lib/guava-18.0.jar</cp>
|
||||
<cp>lib/jackson-annotations-2.2.3.jar</cp>
|
||||
<cp>lib/jackson-core-2.2.3.jar</cp>
|
||||
<cp>lib/jackson-databind-2.2.3.jar</cp>
|
||||
<cp>lib/jackson-module-mrbean-2.2.3.jar</cp>
|
||||
<cp>lib/java-semver-0.8.0.jar</cp>
|
||||
<cp>lib/jmdns-3.4.1.jar</cp>
|
||||
<cp>lib/jna-4.1.0.jar</cp>
|
||||
<cp>lib/jna-platform-4.1.0.jar</cp>
|
||||
<cp>lib/jsch-0.1.50.jar</cp>
|
||||
<cp>lib/jssc-2.8.0.jar</cp>
|
||||
<cp>lib/pde.jar</cp>
|
||||
<cp>lib/rsyntaxtextarea-2.5.6.1+arduino.jar</cp>
|
||||
<cp>%EXEDIR%/lib/antlr.jar</cp>
|
||||
<cp>%EXEDIR%/lib/apple.jar</cp>
|
||||
<cp>%EXEDIR%/lib/arduino-core.jar</cp>
|
||||
<cp>%EXEDIR%/lib/bcpg-jdk15on-152.jar</cp>
|
||||
<cp>%EXEDIR%/lib/bcprov-jdk15on-152.jar</cp>
|
||||
<cp>%EXEDIR%/lib/commons-codec-1.7.jar</cp>
|
||||
<cp>%EXEDIR%/lib/commons-compress-1.8.jar</cp>
|
||||
<cp>%EXEDIR%/lib/commons-exec-1.1.jar</cp>
|
||||
<cp>%EXEDIR%/lib/commons-httpclient-3.1.jar</cp>
|
||||
<cp>%EXEDIR%/lib/commons-lang3-3.3.2.jar</cp>
|
||||
<cp>%EXEDIR%/lib/commons-logging-1.0.4.jar</cp>
|
||||
<cp>%EXEDIR%/lib/ecj.jar</cp>
|
||||
<cp>%EXEDIR%/lib/guava-18.0.jar</cp>
|
||||
<cp>%EXEDIR%/lib/jackson-annotations-2.2.3.jar</cp>
|
||||
<cp>%EXEDIR%/lib/jackson-core-2.2.3.jar</cp>
|
||||
<cp>%EXEDIR%/lib/jackson-databind-2.2.3.jar</cp>
|
||||
<cp>%EXEDIR%/lib/jackson-module-mrbean-2.2.3.jar</cp>
|
||||
<cp>%EXEDIR%/lib/java-semver-0.8.0.jar</cp>
|
||||
<cp>%EXEDIR%/lib/jmdns-3.4.1.jar</cp>
|
||||
<cp>%EXEDIR%/lib/jna-4.1.0.jar</cp>
|
||||
<cp>%EXEDIR%/lib/jna-platform-4.1.0.jar</cp>
|
||||
<cp>%EXEDIR%/lib/jsch-0.1.50.jar</cp>
|
||||
<cp>%EXEDIR%/lib/jssc-2.8.0.jar</cp>
|
||||
<cp>%EXEDIR%/lib/pde.jar</cp>
|
||||
<cp>%EXEDIR%/lib/rsyntaxtextarea-2.5.6.1+arduino.jar</cp>
|
||||
</classPath>
|
||||
<jre>
|
||||
<path>java</path>
|
||||
<runtimeBits>32</runtimeBits>
|
||||
<opt>-Dsun.java2d.d3d=false</opt>
|
||||
<opt>-DAPP_DIR="%EXEDIR%"</opt>
|
||||
</jre>
|
||||
<versionInfo>
|
||||
<fileDescription>Arduino IDE</fileDescription>
|
||||
|
Loading…
x
Reference in New Issue
Block a user