Codebase Sync
parent
a94f3f4298
commit
b41551c9e2
@ -1,73 +1,73 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- You may freely edit this file. See commented blocks below for -->
|
<!-- You may freely edit this file. See commented blocks below for -->
|
||||||
<!-- some examples of how to customize the build. -->
|
<!-- some examples of how to customize the build. -->
|
||||||
<!-- (If you delete it and reopen the project it will be recreated.) -->
|
<!-- (If you delete it and reopen the project it will be recreated.) -->
|
||||||
<!-- By default, only the Clean and Build commands use this build script. -->
|
<!-- By default, only the Clean and Build commands use this build script. -->
|
||||||
<!-- Commands such as Run, Debug, and Test only use this build script if -->
|
<!-- Commands such as Run, Debug, and Test only use this build script if -->
|
||||||
<!-- the Compile on Save feature is turned off for the project. -->
|
<!-- the Compile on Save feature is turned off for the project. -->
|
||||||
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
|
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
|
||||||
<!-- in the project's Project Properties dialog box.-->
|
<!-- in the project's Project Properties dialog box.-->
|
||||||
<project name="SyMAT" default="default" basedir=".">
|
<project name="SyMAT" default="default" basedir=".">
|
||||||
<description>Builds, tests, and runs the project SyMAT.</description>
|
<description>Builds, tests, and runs the project SyMAT.</description>
|
||||||
<import file="nbproject/build-impl.xml"/>
|
<import file="nbproject/build-impl.xml"/>
|
||||||
<!--
|
<!--
|
||||||
|
|
||||||
There exist several targets which are by default empty and which can be
|
There exist several targets which are by default empty and which can be
|
||||||
used for execution of your tasks. These targets are usually executed
|
used for execution of your tasks. These targets are usually executed
|
||||||
before and after some main targets. They are:
|
before and after some main targets. They are:
|
||||||
|
|
||||||
-pre-init: called before initialization of project properties
|
-pre-init: called before initialization of project properties
|
||||||
-post-init: called after initialization of project properties
|
-post-init: called after initialization of project properties
|
||||||
-pre-compile: called before javac compilation
|
-pre-compile: called before javac compilation
|
||||||
-post-compile: called after javac compilation
|
-post-compile: called after javac compilation
|
||||||
-pre-compile-single: called before javac compilation of single file
|
-pre-compile-single: called before javac compilation of single file
|
||||||
-post-compile-single: called after javac compilation of single file
|
-post-compile-single: called after javac compilation of single file
|
||||||
-pre-compile-test: called before javac compilation of JUnit tests
|
-pre-compile-test: called before javac compilation of JUnit tests
|
||||||
-post-compile-test: called after javac compilation of JUnit tests
|
-post-compile-test: called after javac compilation of JUnit tests
|
||||||
-pre-compile-test-single: called before javac compilation of single JUnit test
|
-pre-compile-test-single: called before javac compilation of single JUnit test
|
||||||
-post-compile-test-single: called after javac compilation of single JUunit test
|
-post-compile-test-single: called after javac compilation of single JUunit test
|
||||||
-pre-jar: called before JAR building
|
-pre-jar: called before JAR building
|
||||||
-post-jar: called after JAR building
|
-post-jar: called after JAR building
|
||||||
-post-clean: called after cleaning build products
|
-post-clean: called after cleaning build products
|
||||||
|
|
||||||
(Targets beginning with '-' are not intended to be called on their own.)
|
(Targets beginning with '-' are not intended to be called on their own.)
|
||||||
|
|
||||||
Example of inserting an obfuscator after compilation could look like this:
|
Example of inserting an obfuscator after compilation could look like this:
|
||||||
|
|
||||||
<target name="-post-compile">
|
<target name="-post-compile">
|
||||||
<obfuscate>
|
<obfuscate>
|
||||||
<fileset dir="${build.classes.dir}"/>
|
<fileset dir="${build.classes.dir}"/>
|
||||||
</obfuscate>
|
</obfuscate>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
For list of available properties check the imported
|
For list of available properties check the imported
|
||||||
nbproject/build-impl.xml file.
|
nbproject/build-impl.xml file.
|
||||||
|
|
||||||
|
|
||||||
Another way to customize the build is by overriding existing main targets.
|
Another way to customize the build is by overriding existing main targets.
|
||||||
The targets of interest are:
|
The targets of interest are:
|
||||||
|
|
||||||
-init-macrodef-javac: defines macro for javac compilation
|
-init-macrodef-javac: defines macro for javac compilation
|
||||||
-init-macrodef-junit: defines macro for junit execution
|
-init-macrodef-junit: defines macro for junit execution
|
||||||
-init-macrodef-debug: defines macro for class debugging
|
-init-macrodef-debug: defines macro for class debugging
|
||||||
-init-macrodef-java: defines macro for class execution
|
-init-macrodef-java: defines macro for class execution
|
||||||
-do-jar: JAR building
|
-do-jar: JAR building
|
||||||
run: execution of project
|
run: execution of project
|
||||||
-javadoc-build: Javadoc generation
|
-javadoc-build: Javadoc generation
|
||||||
test-report: JUnit report generation
|
test-report: JUnit report generation
|
||||||
|
|
||||||
An example of overriding the target for project execution could look like this:
|
An example of overriding the target for project execution could look like this:
|
||||||
|
|
||||||
<target name="run" depends="SyMAT-impl.jar">
|
<target name="run" depends="SyMAT-impl.jar">
|
||||||
<exec dir="bin" executable="launcher.exe">
|
<exec dir="bin" executable="launcher.exe">
|
||||||
<arg file="${dist.jar}"/>
|
<arg file="${dist.jar}"/>
|
||||||
</exec>
|
</exec>
|
||||||
</target>
|
</target>
|
||||||
|
|
||||||
Notice that the overridden target depends on the jar target and not only on
|
Notice that the overridden target depends on the jar target and not only on
|
||||||
the compile target as the regular run target does. Again, for a list of available
|
the compile target as the regular run target does. Again, for a list of available
|
||||||
properties which you can use, check the target you are overriding in the
|
properties which you can use, check the target you are overriding in the
|
||||||
nbproject/build-impl.xml file.
|
nbproject/build-impl.xml file.
|
||||||
|
|
||||||
-->
|
-->
|
||||||
</project>
|
</project>
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -1,8 +1,8 @@
|
|||||||
build.xml.data.CRC32=0dfe898c
|
build.xml.data.CRC32=70b2413f
|
||||||
build.xml.script.CRC32=cfce77fe
|
build.xml.script.CRC32=cfce77fe
|
||||||
build.xml.stylesheet.CRC32=8064a381@1.75.2.48
|
build.xml.stylesheet.CRC32=8064a381@1.75.2.48
|
||||||
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
# This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml.
|
||||||
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
# Do not edit this file. You may delete it but then the IDE will never regenerate such files for you.
|
||||||
nbproject/build-impl.xml.data.CRC32=0dfe898c
|
nbproject/build-impl.xml.data.CRC32=70b2413f
|
||||||
nbproject/build-impl.xml.script.CRC32=eaffabc7
|
nbproject/build-impl.xml.script.CRC32=e6773cad
|
||||||
nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48
|
nbproject/build-impl.xml.stylesheet.CRC32=876e7a8f@1.75.2.48
|
||||||
|
@ -1,128 +1,128 @@
|
|||||||
annotation.processing.enabled=true
|
annotation.processing.enabled=true
|
||||||
annotation.processing.enabled.in.editor=false
|
annotation.processing.enabled.in.editor=false
|
||||||
annotation.processing.processors.list=
|
annotation.processing.processors.list=
|
||||||
annotation.processing.run.all.processors=true
|
annotation.processing.run.all.processors=true
|
||||||
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
|
annotation.processing.source.output=${build.generated.sources.dir}/ap-source-output
|
||||||
application.desc=Teach, learn, and use math and programming skills with SyMAT.
|
application.desc=Math and Programming for People
|
||||||
application.homepage=https://symatapp.com/
|
application.homepage=https://symatapp.com/
|
||||||
application.splash=C:\\Users\\Skylar\\Documents\\Apocalypse Labs\\appmedia\\SyMAT\\splashscreen.png
|
application.splash=C:\\Users\\Skylar\\Documents\\Apocalypse Labs\\appmedia\\SyMAT\\splashscreen.png
|
||||||
application.title=SyMAT
|
application.title=SyMAT
|
||||||
application.vendor=Apocalypse Laboratories
|
application.vendor=Apocalypse Laboratories
|
||||||
auxiliary.org-netbeans-spi-editor-hints-projects.perProjectHintSettingsFile=nbproject/cfg_hints.xml
|
auxiliary.org-netbeans-spi-editor-hints-projects.perProjectHintSettingsFile=nbproject/cfg_hints.xml
|
||||||
build.classes.dir=${build.dir}/classes
|
build.classes.dir=${build.dir}/classes
|
||||||
build.classes.excludes=**/*.java,**/*.form
|
build.classes.excludes=**/*.java,**/*.form
|
||||||
# This directory is removed when the project is cleaned:
|
# This directory is removed when the project is cleaned:
|
||||||
build.dir=build
|
build.dir=build
|
||||||
build.generated.dir=${build.dir}/generated
|
build.generated.dir=${build.dir}/generated
|
||||||
build.generated.sources.dir=${build.dir}/generated-sources
|
build.generated.sources.dir=${build.dir}/generated-sources
|
||||||
# Only compile against the classpath explicitly listed here:
|
# Only compile against the classpath explicitly listed here:
|
||||||
build.sysclasspath=ignore
|
build.sysclasspath=ignore
|
||||||
build.test.classes.dir=${build.dir}/test/classes
|
build.test.classes.dir=${build.dir}/test/classes
|
||||||
build.test.results.dir=${build.dir}/test/results
|
build.test.results.dir=${build.dir}/test/results
|
||||||
# Uncomment to specify the preferred debugger connection transport:
|
# Uncomment to specify the preferred debugger connection transport:
|
||||||
#debug.transport=dt_socket
|
#debug.transport=dt_socket
|
||||||
debug.classpath=\
|
debug.classpath=\
|
||||||
${run.classpath}
|
${run.classpath}
|
||||||
debug.test.classpath=\
|
debug.test.classpath=\
|
||||||
${run.test.classpath}
|
${run.test.classpath}
|
||||||
# Files in build.classes.dir which should be excluded from distribution jar
|
# Files in build.classes.dir which should be excluded from distribution jar
|
||||||
dist.archive.excludes=
|
dist.archive.excludes=
|
||||||
# This directory is removed when the project is cleaned:
|
# This directory is removed when the project is cleaned:
|
||||||
dist.dir=dist
|
dist.dir=dist
|
||||||
dist.jar=${dist.dir}/SyMAT.jar
|
dist.jar=${dist.dir}/SyMAT.jar
|
||||||
dist.javadoc.dir=${dist.dir}/javadoc
|
dist.javadoc.dir=${dist.dir}/javadoc
|
||||||
endorsed.classpath=
|
endorsed.classpath=
|
||||||
excludes=
|
excludes=
|
||||||
file.reference.autocomplete-2.5.4.jar=lib/autocomplete-2.5.4.jar
|
file.reference.autocomplete-2.5.4.jar=lib/autocomplete-2.5.4.jar
|
||||||
file.reference.beautyeye_lnf.jar=lib/beautyeye_lnf.jar
|
file.reference.beautyeye_lnf.jar=lib/beautyeye_lnf.jar
|
||||||
file.reference.flamingo-6.3.jar=lib/flamingo-6.3.jar
|
file.reference.flamingo-6.3.jar=lib/flamingo-6.3.jar
|
||||||
file.reference.htmlcleaner-2.10.jar=lib/htmlcleaner-2.10.jar
|
file.reference.htmlcleaner-2.10.jar=lib/htmlcleaner-2.10.jar
|
||||||
file.reference.iText-4.2.0-com.itextpdf.jar=lib/iText-4.2.0-com.itextpdf.jar
|
file.reference.iText-4.2.0-com.itextpdf.jar=lib/iText-4.2.0-com.itextpdf.jar
|
||||||
file.reference.JavaPrettify-1.2.1.jar=lib\\JavaPrettify-1.2.1.jar
|
file.reference.JavaPrettify-1.2.1.jar=lib\\JavaPrettify-1.2.1.jar
|
||||||
file.reference.jmathplot.jar=lib/jmathplot.jar
|
file.reference.jmathplot.jar=lib/jmathplot.jar
|
||||||
file.reference.js-engine.jar=lib/js-engine.jar
|
file.reference.js-engine.jar=lib/js-engine.jar
|
||||||
file.reference.js.jar=lib/js.jar
|
file.reference.js.jar=lib/js.jar
|
||||||
file.reference.json-simple-1.1.1.jar=lib/json-simple-1.1.1.jar
|
file.reference.json-simple-1.1.1.jar=lib/json-simple-1.1.1.jar
|
||||||
file.reference.jython-standalone-2.7-b3.jar=lib/jython-standalone-2.7-b3.jar
|
file.reference.jython-standalone-2.7-b3.jar=lib/jython-standalone-2.7-b3.jar
|
||||||
file.reference.log4j-1.2.11.jar=lib/log4j-1.2.11.jar
|
file.reference.log4j-1.2.11.jar=lib/log4j-1.2.11.jar
|
||||||
file.reference.rsyntaxtextarea-2.5.6.jar=lib/rsyntaxtextarea-2.5.6.jar
|
file.reference.rsyntaxtextarea-2.5.6.jar=lib/rsyntaxtextarea-2.5.6.jar
|
||||||
file.reference.seaglasslookandfeel-0.2.jar=lib/seaglasslookandfeel-0.2.jar
|
file.reference.seaglasslookandfeel-0.2.jar=lib/seaglasslookandfeel-0.2.jar
|
||||||
file.reference.SyMAT-src=src
|
file.reference.SyMAT-src=src
|
||||||
file.reference.symja-2014-11-01.jar=lib/symja-2014-11-01.jar
|
file.reference.symja-2014-11-01.jar=lib/symja-2014-11-01.jar
|
||||||
file.reference.trident-6.3.jar=lib/trident-6.3.jar
|
file.reference.trident-6.3.jar=lib/trident-6.3.jar
|
||||||
includes=**
|
includes=**
|
||||||
jar.archive.disabled=${jnlp.enabled}
|
jar.archive.disabled=${jnlp.enabled}
|
||||||
jar.compress=false
|
jar.compress=false
|
||||||
jar.index=${jnlp.enabled}
|
jar.index=${jnlp.enabled}
|
||||||
javac.classpath=\
|
javac.classpath=\
|
||||||
${file.reference.autocomplete-2.5.4.jar}:\
|
${file.reference.autocomplete-2.5.4.jar}:\
|
||||||
${file.reference.beautyeye_lnf.jar}:\
|
${file.reference.beautyeye_lnf.jar}:\
|
||||||
${file.reference.flamingo-6.3.jar}:\
|
${file.reference.flamingo-6.3.jar}:\
|
||||||
${file.reference.htmlcleaner-2.10.jar}:\
|
${file.reference.htmlcleaner-2.10.jar}:\
|
||||||
${file.reference.iText-4.2.0-com.itextpdf.jar}:\
|
${file.reference.iText-4.2.0-com.itextpdf.jar}:\
|
||||||
${file.reference.jmathplot.jar}:\
|
${file.reference.jmathplot.jar}:\
|
||||||
${file.reference.js-engine.jar}:\
|
${file.reference.js-engine.jar}:\
|
||||||
${file.reference.js.jar}:\
|
${file.reference.js.jar}:\
|
||||||
${file.reference.json-simple-1.1.1.jar}:\
|
${file.reference.json-simple-1.1.1.jar}:\
|
||||||
${file.reference.jython-standalone-2.7-b3.jar}:\
|
${file.reference.jython-standalone-2.7-b3.jar}:\
|
||||||
${file.reference.log4j-1.2.11.jar}:\
|
${file.reference.log4j-1.2.11.jar}:\
|
||||||
${file.reference.rsyntaxtextarea-2.5.6.jar}:\
|
${file.reference.rsyntaxtextarea-2.5.6.jar}:\
|
||||||
${file.reference.seaglasslookandfeel-0.2.jar}:\
|
${file.reference.seaglasslookandfeel-0.2.jar}:\
|
||||||
${file.reference.symja-2014-11-01.jar}:\
|
${file.reference.symja-2014-11-01.jar}:\
|
||||||
${file.reference.trident-6.3.jar}:\
|
${file.reference.trident-6.3.jar}:\
|
||||||
${file.reference.JavaPrettify-1.2.1.jar}
|
${file.reference.JavaPrettify-1.2.1.jar}
|
||||||
# Space-separated list of extra javac options
|
# Space-separated list of extra javac options
|
||||||
javac.compilerargs=
|
javac.compilerargs=
|
||||||
javac.deprecation=false
|
javac.deprecation=false
|
||||||
javac.processorpath=\
|
javac.processorpath=\
|
||||||
${javac.classpath}
|
${javac.classpath}
|
||||||
javac.source=1.8
|
javac.source=1.8
|
||||||
javac.target=1.8
|
javac.target=1.8
|
||||||
javac.test.classpath=\
|
javac.test.classpath=\
|
||||||
${javac.classpath}:\
|
${javac.classpath}:\
|
||||||
${build.classes.dir}
|
${build.classes.dir}
|
||||||
javac.test.processorpath=\
|
javac.test.processorpath=\
|
||||||
${javac.test.classpath}
|
${javac.test.classpath}
|
||||||
javadoc.additionalparam=
|
javadoc.additionalparam=
|
||||||
javadoc.author=false
|
javadoc.author=false
|
||||||
javadoc.encoding=${source.encoding}
|
javadoc.encoding=${source.encoding}
|
||||||
javadoc.noindex=false
|
javadoc.noindex=false
|
||||||
javadoc.nonavbar=false
|
javadoc.nonavbar=false
|
||||||
javadoc.notree=false
|
javadoc.notree=false
|
||||||
javadoc.private=false
|
javadoc.private=false
|
||||||
javadoc.reference.flamingo-6.3.jar=lib/flamingo-6.3-javadoc.jar
|
javadoc.reference.flamingo-6.3.jar=lib/flamingo-6.3-javadoc.jar
|
||||||
javadoc.splitindex=true
|
javadoc.splitindex=true
|
||||||
javadoc.use=true
|
javadoc.use=true
|
||||||
javadoc.version=false
|
javadoc.version=false
|
||||||
javadoc.windowtitle=
|
javadoc.windowtitle=
|
||||||
jnlp.codebase.type=no.codebase
|
jnlp.codebase.type=no.codebase
|
||||||
jnlp.descriptor=application
|
jnlp.descriptor=application
|
||||||
jnlp.enabled=false
|
jnlp.enabled=false
|
||||||
jnlp.mixed.code=default
|
jnlp.mixed.code=default
|
||||||
jnlp.offline-allowed=false
|
jnlp.offline-allowed=false
|
||||||
jnlp.signed=false
|
jnlp.signed=false
|
||||||
jnlp.signing=
|
jnlp.signing=
|
||||||
jnlp.signing.alias=
|
jnlp.signing.alias=
|
||||||
jnlp.signing.keystore=
|
jnlp.signing.keystore=
|
||||||
main.class=net.apocalypselabs.symat.Main
|
main.class=net.apocalypselabs.symat.Main
|
||||||
# Optional override of default Codebase manifest attribute, use to prevent RIAs from being repurposed
|
# Optional override of default Codebase manifest attribute, use to prevent RIAs from being repurposed
|
||||||
manifest.custom.codebase=
|
manifest.custom.codebase=
|
||||||
# Optional override of default Permissions manifest attribute (supported values: sandbox, all-permissions)
|
# Optional override of default Permissions manifest attribute (supported values: sandbox, all-permissions)
|
||||||
manifest.custom.permissions=
|
manifest.custom.permissions=
|
||||||
manifest.file=manifest.mf
|
manifest.file=manifest.mf
|
||||||
meta.inf.dir=${src.dir}/META-INF
|
meta.inf.dir=${src.dir}/META-INF
|
||||||
mkdist.disabled=false
|
mkdist.disabled=false
|
||||||
platform.active=JDK_1.8
|
platform.active=default_platform
|
||||||
project.license=aplabs-oss_1
|
project.license=aplabs-oss_1
|
||||||
run.classpath=\
|
run.classpath=\
|
||||||
${javac.classpath}:\
|
${javac.classpath}:\
|
||||||
${build.classes.dir}
|
${build.classes.dir}
|
||||||
# Space-separated list of JVM arguments used when running the project.
|
# Space-separated list of JVM arguments used when running the project.
|
||||||
# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
|
# You may also define separate properties like run-sys-prop.name=value instead of -Dname=value.
|
||||||
# To set system properties for unit tests define test-sys-prop.name=value:
|
# To set system properties for unit tests define test-sys-prop.name=value:
|
||||||
run.jvmargs=
|
run.jvmargs=
|
||||||
run.test.classpath=\
|
run.test.classpath=\
|
||||||
${javac.test.classpath}:\
|
${javac.test.classpath}:\
|
||||||
${build.test.classes.dir}
|
${build.test.classes.dir}
|
||||||
source.encoding=UTF-8
|
source.encoding=UTF-8
|
||||||
src.dir=${file.reference.SyMAT-src}
|
src.dir=${file.reference.SyMAT-src}
|
||||||
|
@ -1,17 +1,16 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project xmlns="http://www.netbeans.org/ns/project/1">
|
<project xmlns="http://www.netbeans.org/ns/project/1">
|
||||||
<type>org.netbeans.modules.java.j2seproject</type>
|
<type>org.netbeans.modules.java.j2seproject</type>
|
||||||
<configuration>
|
<configuration>
|
||||||
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
|
<data xmlns="http://www.netbeans.org/ns/j2se-project/3">
|
||||||
<name>SyMAT</name>
|
<name>SyMAT</name>
|
||||||
<explicit-platform explicit-source-supported="true"/>
|
<source-roots>
|
||||||
<source-roots>
|
<root id="src.dir"/>
|
||||||
<root id="src.dir"/>
|
</source-roots>
|
||||||
</source-roots>
|
<test-roots/>
|
||||||
<test-roots/>
|
</data>
|
||||||
</data>
|
<libraries xmlns="http://www.netbeans.org/ns/ant-project-libraries/1">
|
||||||
<libraries xmlns="http://www.netbeans.org/ns/ant-project-libraries/1">
|
<definitions>.\lib\nblibraries.properties</definitions>
|
||||||
<definitions>.\lib\nblibraries.properties</definitions>
|
</libraries>
|
||||||
</libraries>
|
</configuration>
|
||||||
</configuration>
|
</project>
|
||||||
</project>
|
|
||||||
|
@ -1,73 +1,73 @@
|
|||||||
/*
|
/*
|
||||||
* This class is public domain because it is standalone and
|
* This class is public domain because it is standalone and
|
||||||
* is potentially useful to other projects.
|
* is potentially useful to other projects.
|
||||||
*
|
*
|
||||||
* If this cannot be placed in the public domain, it is licensed under
|
* If this cannot be placed in the public domain, it is licensed under
|
||||||
* the Creative Commons Zero license.
|
* the Creative Commons Zero license.
|
||||||
*
|
*
|
||||||
* Feel free to use it however you wish!
|
* Feel free to use it however you wish!
|
||||||
*/
|
*/
|
||||||
package net.apocalypselabs.symat;
|
package net.apocalypselabs.symat;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This class handles debug logging, so it's easy to disable.
|
* This class handles debug logging, so it's easy to disable.
|
||||||
*
|
*
|
||||||
* @author Skylar
|
* @author Skylar
|
||||||
*/
|
*/
|
||||||
public class Debug {
|
public class Debug {
|
||||||
|
|
||||||
// If output should be on or off
|
// If output should be on or off
|
||||||
public static boolean debug = true;
|
public static boolean debug = true;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Turn debug output on and off.
|
* Turn debug output on and off.
|
||||||
*
|
*
|
||||||
* @param b
|
* @param b
|
||||||
*/
|
*/
|
||||||
public static void setDebug(boolean b) {
|
public static void setDebug(boolean b) {
|
||||||
debug = b;
|
debug = b;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if debug output is enabled.
|
* Check if debug output is enabled.
|
||||||
*
|
*
|
||||||
* @return true if it is.
|
* @return true if it is.
|
||||||
*/
|
*/
|
||||||
public static boolean getDebug() {
|
public static boolean getDebug() {
|
||||||
return debug;
|
return debug;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Call System.out.println(data) if debug output enabled.
|
* Call System.out.println(data) if debug output enabled.
|
||||||
*
|
*
|
||||||
* @param data Data to print.
|
* @param data Data to print.
|
||||||
*/
|
*/
|
||||||
public static void println(Object data) {
|
public static void println(Object data) {
|
||||||
if (debug) {
|
if (debug) {
|
||||||
System.out.println(data);
|
System.out.println(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Call System.err.println(data) if debug output enabled.
|
* Call System.err.println(data) if debug output enabled.
|
||||||
*
|
*
|
||||||
* @param data Data to print.
|
* @param data Data to print.
|
||||||
*/
|
*/
|
||||||
public static void printerr(Object data) {
|
public static void printerr(Object data) {
|
||||||
if (debug) {
|
if (debug) {
|
||||||
System.err.println(data);
|
System.err.println(data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Call e.printStackTrace() if debug output enabled.
|
* Call e.printStackTrace() if debug output enabled.
|
||||||
*
|
*
|
||||||
* @param e an Exception.
|
* @param e an Exception.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings(value = {"CallToPrintStackTrace"})
|
@SuppressWarnings(value = {"CallToPrintStackTrace"})
|
||||||
public static void stacktrace(Exception e) {
|
public static void stacktrace(Exception e) {
|
||||||
if (debug) {
|
if (debug) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,279 +1,279 @@
|
|||||||
/*
|
/*
|
||||||
* CODE LICENSE =====================
|
* CODE LICENSE =====================
|
||||||
* Copyright (c) 2015, Apocalypse Laboratories
|
* Copyright (c) 2015, Apocalypse Laboratories
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Redistribution and use in source and binary forms, with or without modification,
|
* Redistribution and use in source and binary forms, with or without modification,
|
||||||
* are permitted provided that the following conditions are met:
|
* are permitted provided that the following conditions are met:
|
||||||
*
|
*
|
||||||
* 1. Redistributions of source code must retain the above copyright notice, this
|
* 1. Redistributions of source code must retain the above copyright notice, this
|
||||||
* list of conditions and the following disclaimer.
|
* list of conditions and the following disclaimer.
|
||||||
*
|
*
|
||||||
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
||||||
* this list of conditions and the following disclaimer in the documentation and/or
|
* this list of conditions and the following disclaimer in the documentation and/or
|
||||||
* other materials provided with the distribution.
|
* other materials provided with the distribution.
|
||||||
*
|
*
|
||||||
* 3. Neither the name of the copyright holder nor the names of its contributors
|
* 3. Neither the name of the copyright holder nor the names of its contributors
|
||||||
* may be used to endorse or promote products derived from this software without
|
* may be used to endorse or promote products derived from this software without
|
||||||
* specific prior written permission.
|
* specific prior written permission.
|
||||||
*
|
*
|
||||||
* 4. You adhere to the Media License detailed below. If you do not, this license
|
* 4. You adhere to the Media License detailed below. If you do not, this license
|
||||||
* is automatically revoked and you must purge all copies of the software you
|
* is automatically revoked and you must purge all copies of the software you
|
||||||
* possess, in source or binary form.
|
* possess, in source or binary form.
|
||||||
*
|
*
|
||||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||||
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
|
||||||
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||||
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||||
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||||
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
* ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
*
|
*
|
||||||
* MEDIA LICENSE ====================
|
* MEDIA LICENSE ====================
|
||||||
* All images and other graphical files (the "graphics") included with this
|
* All images and other graphical files (the "graphics") included with this
|
||||||
* software are copyright (c) 2015 Apocalypse Laboratories. You may not distribute
|
* software are copyright (c) 2015 Apocalypse Laboratories. You may not distribute
|
||||||
* the graphics or any program, source code repository, or other digital storage
|
* the graphics or any program, source code repository, or other digital storage
|
||||||
* media containing them without written permission from Apocalypse Laboratories.
|
* media containing them without written permission from Apocalypse Laboratories.
|
||||||
* This ban on distribution only applies to publicly available systems.
|
* This ban on distribution only applies to publicly available systems.
|
||||||
* A password-protected network file share, USB drive, or other storage scheme that
|
* A password-protected network file share, USB drive, or other storage scheme that
|
||||||
* cannot be easily accessed by the public is generally allowed. If in doubt,
|
* cannot be easily accessed by the public is generally allowed. If in doubt,
|
||||||
* contact Apocalypse Laboratories. If Apocalypse Laboratories allows or denies
|
* contact Apocalypse Laboratories. If Apocalypse Laboratories allows or denies
|
||||||
* you permission, that decision is considered final and binding.
|
* you permission, that decision is considered final and binding.
|
||||||
*/
|
*/
|
||||||
package net.apocalypselabs.symat;
|
package net.apocalypselabs.symat;
|
||||||
|
|
||||||
import java.awt.Color;
|
import java.awt.Color;
|
||||||
import java.io.BufferedReader;
|
import java.io.BufferedReader;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FilenameFilter;
|
import java.io.FilenameFilter;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
import java.net.URL;
|
import java.net.URL;
|
||||||
import java.net.URLClassLoader;
|
import java.net.URLClassLoader;
|
||||||
import javax.swing.SwingUtilities;
|
import javax.swing.SwingUtilities;
|
||||||
import static net.apocalypselabs.symat.Main.API_URL;
|
import static net.apocalypselabs.symat.Main.API_URL;
|
||||||
import static net.apocalypselabs.symat.Main.APP_CODE;
|
import static net.apocalypselabs.symat.Main.APP_CODE;
|
||||||
import static net.apocalypselabs.symat.Main.VERSION_NAME;
|
import static net.apocalypselabs.symat.Main.VERSION_NAME;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Skylar
|
* @author Skylar
|
||||||
*/
|
*/
|
||||||
public class SplashScreen extends javax.swing.JFrame {
|
public class SplashScreen extends javax.swing.JFrame {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates new form SplashScreen
|
* Creates new form SplashScreen
|
||||||
*/
|
*/
|
||||||
public SplashScreen() {
|
public SplashScreen() {
|
||||||
initComponents();
|
initComponents();
|
||||||
setBackground(new Color(255, 255, 255, 0));
|
setBackground(new Color(255, 255, 255, 0));
|
||||||
setIconImages(Main.symatlogo);
|
setIconImages(Main.symatlogo);
|
||||||
setLocationRelativeTo(null);
|
setLocationRelativeTo(null);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method is called from within the constructor to initialize the form.
|
* This method is called from within the constructor to initialize the form.
|
||||||
* WARNING: Do NOT modify this code. The content of this method is always
|
* WARNING: Do NOT modify this code. The content of this method is always
|
||||||
* regenerated by the Form Editor.
|
* regenerated by the Form Editor.
|
||||||
*/
|
*/
|
||||||
@SuppressWarnings("unchecked")
|
@SuppressWarnings("unchecked")
|
||||||
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
|
||||||
private void initComponents() {
|
private void initComponents() {
|
||||||
|
|
||||||
jLayeredPane1 = new javax.swing.JLayeredPane();
|
jLayeredPane1 = new javax.swing.JLayeredPane();
|
||||||
dispLabel = new javax.swing.JLabel();
|
dispLabel = new javax.swing.JLabel();
|
||||||
jLabel1 = new javax.swing.JLabel();
|
jLabel1 = new javax.swing.JLabel();
|
||||||
jLabel2 = new javax.swing.JLabel();
|
jLabel2 = new javax.swing.JLabel();
|
||||||
jLabel3 = new javax.swing.JLabel();
|
jLabel3 = new javax.swing.JLabel();
|
||||||
jLabel4 = new javax.swing.JLabel();
|
jLabel4 = new javax.swing.JLabel();
|
||||||
|
|
||||||
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
|
setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
|
||||||
setTitle("SyMAT");
|
setTitle("SyMAT");
|
||||||
setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
|
setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));
|
||||||
setMaximumSize(new java.awt.Dimension(500, 400));
|
setMaximumSize(new java.awt.Dimension(500, 400));
|
||||||
setMinimumSize(new java.awt.Dimension(500, 400));
|
setMinimumSize(new java.awt.Dimension(500, 400));
|
||||||
setUndecorated(true);
|
setUndecorated(true);
|
||||||
setPreferredSize(new java.awt.Dimension(500, 400));
|
setPreferredSize(new java.awt.Dimension(500, 400));
|
||||||
setResizable(false);
|
setResizable(false);
|
||||||
setType(java.awt.Window.Type.POPUP);
|
setType(java.awt.Window.Type.POPUP);
|
||||||
addComponentListener(new java.awt.event.ComponentAdapter() {
|
addComponentListener(new java.awt.event.ComponentAdapter() {
|
||||||
public void componentShown(java.awt.event.ComponentEvent evt) {
|
public void componentShown(java.awt.event.ComponentEvent evt) {
|
||||||
formComponentShown(evt);
|
formComponentShown(evt);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
jLayeredPane1.setBackground(new java.awt.Color(255, 255, 255));
|
jLayeredPane1.setBackground(new java.awt.Color(255, 255, 255));
|
||||||
|
|
||||||
dispLabel.setFont(net.apocalypselabs.symat.Main.ubuntuRegular.deriveFont(14.0F));
|
dispLabel.setFont(net.apocalypselabs.symat.Main.ubuntuRegular.deriveFont(14.0F));
|
||||||
dispLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
dispLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||||
dispLabel.setText("Loading...");
|
dispLabel.setText("Loading...");
|
||||||
dispLabel.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
|
dispLabel.setHorizontalTextPosition(javax.swing.SwingConstants.LEFT);
|
||||||
dispLabel.setMaximumSize(new java.awt.Dimension(400, 320));
|
dispLabel.setMaximumSize(new java.awt.Dimension(400, 320));
|
||||||
jLayeredPane1.add(dispLabel);
|
jLayeredPane1.add(dispLabel);
|
||||||
dispLabel.setBounds(140, 280, 220, 70);
|
dispLabel.setBounds(140, 280, 220, 70);
|
||||||
|
|
||||||
jLabel1.setFont(net.apocalypselabs.symat.Main.ubuntuRegular.deriveFont(36.0F));
|
jLabel1.setFont(net.apocalypselabs.symat.Main.ubuntuRegular.deriveFont(36.0F));
|
||||||
jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
jLabel1.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
|
||||||
jLabel1.setText("<html>"+net.apocalypselabs.symat.Main.SYMAT+" <span style=\"color: #555555;\">"+net.apocalypselabs.symat.Main.VERSION_NAME+"</span>");
|
jLabel1.setText("<html>"+net.apocalypselabs.symat.Main.SYMAT+" <span style=\"color: #555555;\">"+net.apocalypselabs.symat.Main.VERSION_NAME+"</span>");
|
||||||
jLayeredPane1.add(jLabel1);
|
jLayeredPane1.add(jLabel1);
|
||||||
jLabel1.setBounds(100, 220, 300, 50);
|
jLabel1.setBounds(100, 220, 300, 50);
|
||||||
jLayeredPane1.setLayer(jLabel1, javax.swing.JLayeredPane.POPUP_LAYER);
|
jLayeredPane1.setLayer(jLabel1, javax.swing.JLayeredPane.POPUP_LAYER);
|
||||||
|
|
||||||
jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/apocalypselabs/symat/images/splashscreen.png"))); // NOI18N
|
jLabel2.setIcon(new javax.swing.ImageIcon(getClass().getResource("/net/apocalypselabs/symat/images/splashscreen.png"))); // NOI18N
|
||||||
jLabel2.setVerticalAlignment(javax.swing.SwingConstants.TOP);
|
jLabel2.setVerticalAlignment(javax.swing.SwingConstants.TOP);
|
||||||
jLayeredPane1.add(jLabel2);
|
jLayeredPane1.add(jLabel2);
|
||||||
jLabel2.setBounds(0, 0, 500, 400);
|
jLabel2.setBounds(0, 0, 500, 400);
|
||||||
|
|
||||||
jLabel3.setFont(net.apocalypselabs.symat.Main.ubuntuRegular.deriveFont(12.0F));
|
jLabel3.setFont(net.apocalypselabs.symat.Main.ubuntuRegular.deriveFont(12.0F));
|
||||||
jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
jLabel3.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||||
jLabel3.setText("Apocalypse Laboratories");
|
jLabel3.setText("Apocalypse Laboratories");
|
||||||
jLayeredPane1.add(jLabel3);
|
jLayeredPane1.add(jLabel3);
|
||||||
jLabel3.setBounds(10, 370, 250, 30);
|
jLabel3.setBounds(10, 370, 250, 30);
|
||||||
jLayeredPane1.setLayer(jLabel3, javax.swing.JLayeredPane.POPUP_LAYER);
|
jLayeredPane1.setLayer(jLabel3, javax.swing.JLayeredPane.POPUP_LAYER);
|
||||||
|
|
||||||
jLabel4.setFont(net.apocalypselabs.symat.Main.ubuntuRegular.deriveFont(12.0F));
|
jLabel4.setFont(net.apocalypselabs.symat.Main.ubuntuRegular.deriveFont(12.0F));
|
||||||
jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
jLabel4.setHorizontalAlignment(javax.swing.SwingConstants.TRAILING);
|
||||||
jLabel4.setText("symatapp.com");
|
jLabel4.setText("symatapp.com");
|
||||||
jLabel4.setMaximumSize(new java.awt.Dimension(118, 14));
|
jLabel4.setMaximumSize(new java.awt.Dimension(118, 14));
|
||||||
jLabel4.setMinimumSize(new java.awt.Dimension(118, 14));
|
jLabel4.setMinimumSize(new java.awt.Dimension(118, 14));
|
||||||
jLabel4.setPreferredSize(new java.awt.Dimension(118, 14));
|
jLabel4.setPreferredSize(new java.awt.Dimension(118, 14));
|
||||||
jLayeredPane1.add(jLabel4);
|
jLayeredPane1.add(jLabel4);
|
||||||
jLabel4.setBounds(380, 370, 110, 30);
|
jLabel4.setBounds(380, 370, 110, 30);
|
||||||
jLayeredPane1.setLayer(jLabel4, javax.swing.JLayeredPane.POPUP_LAYER);
|
jLayeredPane1.setLayer(jLabel4, javax.swing.JLayeredPane.POPUP_LAYER);
|
||||||
|
|
||||||
getContentPane().add(jLayeredPane1, java.awt.BorderLayout.CENTER);
|
getContentPane().add(jLayeredPane1, java.awt.BorderLayout.CENTER);
|
||||||
|
|
||||||
pack();
|
pack();
|
||||||
}// </editor-fold>//GEN-END:initComponents
|
}// </editor-fold>//GEN-END:initComponents
|
||||||
|
|
||||||
private void formComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentShown
|
private void formComponentShown(java.awt.event.ComponentEvent evt) {//GEN-FIRST:event_formComponentShown
|
||||||
new Loader().start();
|
new Loader().start();
|
||||||
}//GEN-LAST:event_formComponentShown
|
}//GEN-LAST:event_formComponentShown
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Bootstrapping everything.
|
* Bootstrapping everything.
|
||||||
*/
|
*/
|
||||||
private class Loader extends Thread {
|
private class Loader extends Thread {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
setProgress("Starting up...");
|
setProgress("Starting up...");
|
||||||
if (PrefStorage.getSetting("quickstart").equals("yes")) {
|
if (PrefStorage.getSetting("quickstart").equals("yes")) {
|
||||||
Main.skipPython = true;
|
Main.skipPython = true;
|
||||||
Main.skipEditor = true;
|
Main.skipEditor = true;
|
||||||
}
|
}
|
||||||
if (!Main.skipPython) {
|
if (!Main.skipPython) {
|
||||||
// Python laggggsss when used for first time, this fixes the wait later.
|
// Python laggggsss when used for first time, this fixes the wait later.
|
||||||
System.out.println("Warming up Python engine, to skip run with argument 'skippython'");
|
System.out.println("Warming up Python engine, to skip run with argument 'skippython'");
|
||||||
setProgress("Initializing code engine...");
|
setProgress("Initializing code engine...");
|
||||||
try {
|
try {
|
||||||
CodeRunner python = new CodeRunner(true);
|
CodeRunner python = new CodeRunner(true);
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
// Ignore
|
// Ignore
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!Main.skipEditor) {
|
if (!Main.skipEditor) {
|
||||||
System.out.println("Preparing editor, to skip run with argument 'skipeditor'");
|
System.out.println("Preparing editor, to skip run with argument 'skipeditor'");
|
||||||
setProgress("Preparing editor...");
|
setProgress("Preparing editor...");
|
||||||
// Get editor going too
|
// Get editor going too
|
||||||
Editor edit = new Editor();
|
Editor edit = new Editor();
|
||||||
}
|
}
|
||||||
|
|
||||||
setProgress("Loading toolkits...");
|
setProgress("Loading toolkits...");
|
||||||
try {
|
try {
|
||||||
String fsep = System.getProperty("file.separator");
|
String fsep = System.getProperty("file.separator");
|
||||||
File dir = new File(System.getProperty("user.home") + fsep + ".symat" + fsep + "toolkits");
|
File dir = new File(System.getProperty("user.home") + fsep + ".symat" + fsep + "toolkits");
|
||||||
dir.mkdirs();
|
dir.mkdirs();
|
||||||
File[] files = dir.listFiles(new FilenameFilter() {
|
File[] files = dir.listFiles(new FilenameFilter() {
|
||||||
@Override
|
@Override
|
||||||
public boolean accept(File dir, String name) {
|
public boolean accept(File dir, String name) {
|
||||||
return name.endsWith(".jar");
|
return name.endsWith(".jar");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
for (File f : files) {
|
for (File f : files) {
|
||||||
addSoftwareLibrary(f);
|
addSoftwareLibrary(f);
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
Debug.stacktrace(ex);
|
Debug.stacktrace(ex);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!PrefStorage.getSetting("skipupdates").equals("yes")) {
|
if (!PrefStorage.getSetting("skipupdates").equals("yes")) {
|
||||||
setProgress("Checking for updates...");
|
setProgress("Checking for updates...");
|
||||||
checkUpdates();
|
checkUpdates();
|
||||||
}
|
}
|
||||||
|
|
||||||
setProgress("Loading main interface...");
|
setProgress("Loading main interface...");
|
||||||
Main main = new Main();
|
Main main = new Main();
|
||||||
setProgress("Done!");
|
setProgress("Done!");
|
||||||
dispose();
|
dispose();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Thanks to http://stackoverflow.com/a/9460999/2534036
|
// Thanks to http://stackoverflow.com/a/9460999/2534036
|
||||||
private void addSoftwareLibrary(File file) throws Exception {
|
private void addSoftwareLibrary(File file) throws Exception {
|
||||||
Method method = URLClassLoader.class.getDeclaredMethod("addURL", new Class[]{URL.class});
|
Method method = URLClassLoader.class.getDeclaredMethod("addURL", new Class[]{URL.class});
|
||||||
method.setAccessible(true);
|
method.setAccessible(true);
|
||||||
method.invoke(ClassLoader.getSystemClassLoader(), new Object[]{file.toURI().toURL()});
|
method.invoke(ClassLoader.getSystemClassLoader(), new Object[]{file.toURI().toURL()});
|
||||||
Debug.println("Loaded toolkit " + file.getName());
|
Debug.println("Loaded toolkit " + file.getName());
|
||||||
}
|
}
|
||||||
|
|
||||||
private void checkUpdates() {
|
private void checkUpdates() {
|
||||||
// Check for updates.
|
// Check for updates.
|
||||||
try {
|
try {
|
||||||
Debug.println("Checking for updates...");
|
Debug.println("Checking for updates...");
|
||||||
URL url = new URL(API_URL + "version.php");
|
URL url = new URL(API_URL + "version.php");
|
||||||
InputStream is = url.openStream();
|
InputStream is = url.openStream();
|
||||||
BufferedReader br = new BufferedReader(new InputStreamReader(is));
|
BufferedReader br = new BufferedReader(new InputStreamReader(is));
|
||||||
|
|
||||||
String line = br.readLine();
|
String line = br.readLine();
|
||||||
br.close();
|
br.close();
|
||||||
is.close();
|
is.close();
|
||||||
double version = Double.parseDouble(line.split("\\|")[0]);
|
double version = Double.parseDouble(line.split("\\|")[0]);
|
||||||
if (version > APP_CODE) {
|
if (version > APP_CODE) {
|
||||||
if (PrefStorage.getSetting("update-ignore")
|
if (PrefStorage.getSetting("update-ignore")
|
||||||
.equals(VERSION_NAME + "|" + line.split("\\|")[1])) {
|
.equals(VERSION_NAME + "|" + line.split("\\|")[1])) {
|
||||||
System.out.println("An update was found, "
|
System.out.println("An update was found, "
|
||||||
+ "but has been ignored by the user.");
|
+ "but has been ignored by the user.");
|
||||||
} else {
|
} else {
|
||||||
Debug.println("Update available.");
|
Debug.println("Update available.");
|
||||||
Main.updateString = line.split("\\|")[1];
|
Main.updateString = line.split("\\|")[1];
|
||||||
Main.updateAvailable = true;
|
Main.updateAvailable = true;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Debug.println("No updates found.");
|
Debug.println("No updates found.");
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.err.println("Fail: Cannot check update server. \n"
|
System.err.println("Fail: Cannot check update server. \n"
|
||||||
+ " Assuming local copy up-to-date.");
|
+ " Assuming local copy up-to-date.");
|
||||||
Debug.stacktrace(e);
|
Debug.stacktrace(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the progress text.
|
* Set the progress text.
|
||||||
*
|
*
|
||||||
* @param label The String to put on the label.
|
* @param label The String to put on the label.
|
||||||
*/
|
*/
|
||||||
private void setProgress(String label) {
|
private void setProgress(String label) {
|
||||||
final String lbl = label;
|
final String lbl = label;
|
||||||
SwingUtilities.invokeLater(new Runnable() {
|
SwingUtilities.invokeLater(new Runnable() {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
dispLabel.setText(lbl);
|
dispLabel.setText(lbl);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Variables declaration - do not modify//GEN-BEGIN:variables
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
||||||
private javax.swing.JLabel dispLabel;
|
private javax.swing.JLabel dispLabel;
|
||||||
private javax.swing.JLabel jLabel1;
|
private javax.swing.JLabel jLabel1;
|
||||||
private javax.swing.JLabel jLabel2;
|
private javax.swing.JLabel jLabel2;
|
||||||
private javax.swing.JLabel jLabel3;
|
private javax.swing.JLabel jLabel3;
|
||||||
private javax.swing.JLabel jLabel4;
|
private javax.swing.JLabel jLabel4;
|
||||||
private javax.swing.JLayeredPane jLayeredPane1;
|
private javax.swing.JLayeredPane jLayeredPane1;
|
||||||
// End of variables declaration//GEN-END:variables
|
// End of variables declaration//GEN-END:variables
|
||||||
}
|
}
|
||||||
|
@ -1,32 +1,32 @@
|
|||||||
/*function mtimes(a,b) {
|
/*function mtimes(a,b) {
|
||||||
var m = SyMAT_Functions.$mtimes(a,b);
|
var m = SyMAT_Functions.$mtimes(a,b);
|
||||||
var out;
|
var out;
|
||||||
for (var i = 0; i < m.length; i++) {
|
for (var i = 0; i < m.length; i++) {
|
||||||
for (var j = 0; j < m[i].length; j++) {
|
for (var j = 0; j < m[i].length; j++) {
|
||||||
out[i][j] = m[i][j];
|
out[i][j] = m[i][j];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
function mpower(a,b) {
|
function mpower(a,b) {
|
||||||
var m = SyMAT_Functions.$mpower(a,b);
|
var m = SyMAT_Functions.$mpower(a,b);
|
||||||
var out;
|
var out;
|
||||||
for (var i = 0; i < m.length; i++) {
|
for (var i = 0; i < m.length; i++) {
|
||||||
for (var j = 0; j < m[i].length; j++) {
|
for (var j = 0; j < m[i].length; j++) {
|
||||||
out[i][j] = m[i][j];
|
out[i][j] = m[i][j];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
|
||||||
function minvert(a) {
|
function minvert(a) {
|
||||||
var m = SyMAT_Functions.$minvert(a);
|
var m = SyMAT_Functions.$minvert(a);
|
||||||
var out;
|
var out;
|
||||||
for (var i = 0; i < m.length; i++) {
|
for (var i = 0; i < m.length; i++) {
|
||||||
for (var j = 0; j < m[i].length; j++) {
|
for (var j = 0; j < m[i].length; j++) {
|
||||||
out[i][j] = m[i][j];
|
out[i][j] = m[i][j];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return out;
|
return out;
|
||||||
}*/
|
}*/
|
@ -1,26 +1,26 @@
|
|||||||
/*
|
/*
|
||||||
Public domain.
|
Public domain.
|
||||||
*/
|
*/
|
||||||
.header {
|
.header {
|
||||||
|
|
||||||
}
|
}
|
||||||
.com {
|
.com {
|
||||||
color: green;
|
color: green;
|
||||||
}
|
}
|
||||||
|
|
||||||
.kwd {
|
.kwd {
|
||||||
color: blue;
|
color: blue;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pln {
|
.pln {
|
||||||
color: black;
|
color: black;
|
||||||
}
|
}
|
||||||
|
|
||||||
.lit {
|
.lit {
|
||||||
color: #0099cc;
|
color: #0099cc;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pun {
|
.pun {
|
||||||
color: black;
|
color: black;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
Loading…
Reference in New Issue