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