Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@ build/linux/dist/*.tar.gz
build/linux/*.tgz
test-bin
*.iml
build/windows/launch4j-*
build/windows/launcher/launch4j
build/windows/WinAVR-*.zip
5 changes: 3 additions & 2 deletions app/src/processing/app/Sketch.java
Original file line number Diff line number Diff line change
Expand Up @@ -2063,9 +2063,10 @@ static public String sanitizeName(String origName) {
for (int i = 0; i < c.length; i++) {
if (((c[i] >= '0') && (c[i] <= '9')) ||
((c[i] >= 'a') && (c[i] <= 'z')) ||
((c[i] >= 'A') && (c[i] <= 'Z'))) {
((c[i] >= 'A') && (c[i] <= 'Z')) ||
((i > 0) && (c[i] == '-')) ||
((i > 0) && (c[i] == '.'))) {
buffer.append(c[i]);

} else {
buffer.append('_');
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/processing/app/SketchCode.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public SketchCode(File file, String extension) {

protected void makePrettyName() {
prettyName = file.getName();
int dot = prettyName.indexOf('.');
int dot = prettyName.lastIndexOf('.');
prettyName = prettyName.substring(0, dot);
}

Expand Down
34 changes: 27 additions & 7 deletions build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
<condition property="platform"
value="linux64"><os family="unix" arch="amd64" /></condition>

<condition property="launch4j-download-unpack-target-name" value="launch4j-windows"><os family="windows" /></condition>
<property name="launch4j-download-unpack-target-name" value="launch4j-linux"/>

<!-- Libraries required for running arduino -->
<fileset dir=".." id="runtime.jars">
<include name="core/core.jar" />
Expand Down Expand Up @@ -457,8 +460,22 @@

<fail message="wrong platform (${os.name})" />
</target>

<target name="windows-build"

<target name="download-launch4j-windows">
<get src="http://switch.dl.sourceforge.net/project/launch4j/launch4j-3/3.0.2/launch4j-3.0.2-win32.zip" dest="windows" usetimestamp="true" skipexisting="true" verbose="true" />
<unzip dest="windows/launcher/" src="windows/launch4j-3.0.2-win32.zip" overwrite="true"/>
</target>

<target name="download-launch4j-linux">
<get src="http://switch.dl.sourceforge.net/project/launch4j/launch4j-3/3.0.2/launch4j-3.0.2-linux.tgz" dest="windows" usetimestamp="true" skipexisting="true" verbose="true" />

<exec executable="tar" dir="windows/launcher">
<arg value="-xzf"/>
<arg value="../launch4j-3.0.2-linux.tgz"/>
</exec>
</target>

<target name="windows-build"
depends="revision-check, windows-checkos, subprojects-build"
description="Build windows version">
<mkdir dir="windows/work" />
Expand Down Expand Up @@ -492,19 +509,22 @@
<antcall target="assemble">
<param name="target.path" value="windows/work" />
</antcall>


<antcall target="download-${launch4j-download-unpack-target-name}" />

<property name="launch4j.dir" value="windows/launcher/launch4j/" />
<taskdef name="launch4j"
classname="net.sf.launch4j.ant.Launch4jTask"
classpath="${launch4j.dir}/launch4j.jar; ${launch4j.dir}/lib/xstream.jar" />

<copy todir="windows/work">
<fileset dir="windows/launcher"
includes="about.bmp, application.ico, config.xml"/>
<fileset dir="windows/launcher"
includes="about.bmp, application.ico, config.xml, config_debug.xml"/>
</copy>
<launch4j configFile="windows/work/config.xml" />
<delete dir="windows/work"
includes="about.bmp, application.ico, config.xml" />
<launch4j configFile="windows/work/config_debug.xml" />
<delete dir="windows/work"
includes="about.bmp, application.ico, config.xml, config_debug.xml" />

<!-- cygwin requires html, dll, and exe to have the +x flag -->
<chmod perm="755">
Expand Down
38 changes: 38 additions & 0 deletions build/windows/launcher/config_debug.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<launch4jConfig>
<dontWrapJar>true</dontWrapJar>
<headerType>console</headerType>
<jar>lib</jar>
<outfile>arduino_debug.exe</outfile>
<errTitle></errTitle>
<cmdLine></cmdLine>
<chdir>.</chdir>
<priority>normal</priority>
<downloadUrl>http://java.sun.com/javase/downloads/</downloadUrl>
<supportUrl></supportUrl>
<customProcName>false</customProcName>
<stayAlive>false</stayAlive>
<manifest></manifest>
<icon>application.ico</icon>
<classPath>
<mainClass>processing.app.Base</mainClass>
<cp>lib/pde.jar</cp>
<cp>lib/core.jar</cp>
<cp>lib/jna.jar</cp>
<cp>lib/ecj.jar</cp>
<cp>lib/RXTXcomm.jar</cp>
</classPath>
<jre>
<path>java</path>
<minVersion>1.5.0</minVersion>
<maxVersion></maxVersion>
<jdkPreference>preferJre</jdkPreference>
<opt>-Xms128m -Xmx128m</opt>
</jre>
<messages>
<startupErr>An error occurred while starting the application.</startupErr>
<bundledJreErr>This application was configured to use a bundled Java Runtime Environment but the runtime is missing or corrupted.</bundledJreErr>
<jreVersionErr>This application requires at least Java Development Kit</jreVersionErr>
<launcherErr>The registry refers to a nonexistent Java Development Kit installation or the runtime is corrupted.</launcherErr>
<instanceAlreadyExistsMsg>An application instance is already running.</instanceAlreadyExistsMsg>
</messages>
</launch4jConfig>
16 changes: 0 additions & 16 deletions build/windows/launcher/launch4j/.classpath

This file was deleted.

17 changes: 0 additions & 17 deletions build/windows/launcher/launch4j/.project

This file was deleted.

This file was deleted.

30 changes: 0 additions & 30 deletions build/windows/launcher/launch4j/LICENSE.txt

This file was deleted.

Loading