├── doc ├── install.pdf └── install.docx ├── bin ├── arduino2.0.0.nbm ├── arduino2.0.1.nbm ├── arduino2.0.2.nbm └── arduino2.0.3.nbm ├── src ├── arduino-plugin │ ├── src │ │ └── arduino │ │ │ ├── help.png │ │ │ ├── Arduino.png │ │ │ ├── ArduinoProject.zip │ │ │ ├── ArduinoDescription.html │ │ │ ├── Bundle.properties │ │ │ ├── ArduinoWizardPanel.java │ │ │ ├── ArduinoWizardIterator.java │ │ │ ├── ArduinoPanelVisual.form │ │ │ └── ArduinoPanelVisual.java │ ├── manifest.mf │ ├── nbproject │ │ ├── project.properties │ │ ├── genfiles.properties │ │ ├── platform.properties │ │ ├── build-impl.xml │ │ └── project.xml │ ├── build.xml │ └── doc │ │ └── license.txt └── arduino-project │ ├── main.cpp │ ├── nbproject │ ├── private │ │ ├── Makefile-variables.mk │ │ ├── private.xml │ │ ├── launcher.properties │ │ └── configurations.xml │ ├── project.xml │ ├── Makefile-variables.mk │ ├── Package-Debug.bash │ ├── Package-Release.bash │ ├── Makefile-Release.mk │ ├── Makefile-Debug.mk │ ├── configurations.xml │ └── Makefile-impl.mk │ ├── .dep.inc │ └── Makefile └── .gitignore /doc/install.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaquesclaudino/arduino-netbeans/HEAD/doc/install.pdf -------------------------------------------------------------------------------- /doc/install.docx: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaquesclaudino/arduino-netbeans/HEAD/doc/install.docx -------------------------------------------------------------------------------- /bin/arduino2.0.0.nbm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaquesclaudino/arduino-netbeans/HEAD/bin/arduino2.0.0.nbm -------------------------------------------------------------------------------- /bin/arduino2.0.1.nbm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaquesclaudino/arduino-netbeans/HEAD/bin/arduino2.0.1.nbm -------------------------------------------------------------------------------- /bin/arduino2.0.2.nbm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaquesclaudino/arduino-netbeans/HEAD/bin/arduino2.0.2.nbm -------------------------------------------------------------------------------- /bin/arduino2.0.3.nbm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaquesclaudino/arduino-netbeans/HEAD/bin/arduino2.0.3.nbm -------------------------------------------------------------------------------- /src/arduino-plugin/src/arduino/help.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaquesclaudino/arduino-netbeans/HEAD/src/arduino-plugin/src/arduino/help.png -------------------------------------------------------------------------------- /src/arduino-plugin/src/arduino/Arduino.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaquesclaudino/arduino-netbeans/HEAD/src/arduino-plugin/src/arduino/Arduino.png -------------------------------------------------------------------------------- /src/arduino-plugin/src/arduino/ArduinoProject.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaquesclaudino/arduino-netbeans/HEAD/src/arduino-plugin/src/arduino/ArduinoProject.zip -------------------------------------------------------------------------------- /src/arduino-project/main.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | 3 | extern HardwareSerial Serial; 4 | 5 | void setup() { 6 | 7 | } 8 | 9 | void loop() { 10 | 11 | } -------------------------------------------------------------------------------- /src/arduino-project/nbproject/private/Makefile-variables.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Generated - do not edit! 3 | # 4 | # NOCDDL 5 | # 6 | # Debug configuration 7 | # Release configuration 8 | -------------------------------------------------------------------------------- /src/arduino-plugin/manifest.mf: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | OpenIDE-Module: arduino 3 | OpenIDE-Module-Localizing-Bundle: arduino/Bundle.properties 4 | OpenIDE-Module-Specification-Version: 2.0.3 5 | 6 | -------------------------------------------------------------------------------- /src/arduino-project/.dep.inc: -------------------------------------------------------------------------------- 1 | # This code depends on make tool being used 2 | DEPFILES=$(wildcard $(addsuffix .d, ${OBJECTFILES} ${TESTOBJECTFILES})) 3 | ifneq (${DEPFILES},) 4 | include ${DEPFILES} 5 | endif 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /src/arduino-project/build/ 2 | /src/arduino-project/dist/ 3 | /src/arduino-netbeans/nbproject/private/ 4 | /src/arduino-netbeans/build/ 5 | /src/arduino-plugin/nbproject/private/ 6 | /src/arduino-project/lib/ -------------------------------------------------------------------------------- /src/arduino-plugin/src/arduino/ArduinoDescription.html: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 9 | 10 | 11 | Arduino empty project 12 | 13 | 14 | -------------------------------------------------------------------------------- /src/arduino-plugin/nbproject/project.properties: -------------------------------------------------------------------------------- 1 | auxiliary.org-netbeans-spi-editor-hints-projects.perProjectHintSettingsFile=nbproject/cfg_hints.xml 2 | javac.source=1.7 3 | javac.compilerargs=-Xlint -Xlint:-serial 4 | license.file=doc/license.txt 5 | nbm.homepage=https://github.com/jaquesclaudino/arduino-netbeans 6 | nbm.module.author=Jaques Claudino 7 | nbm.description=Arduino NetBeans Plugin 8 | keystore=nbproject/private/keystore 9 | nbm_alias=arduino-netbeans 10 | -------------------------------------------------------------------------------- /src/arduino-plugin/build.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Builds, tests, and runs the project Arduino. 7 | 8 | 9 | -------------------------------------------------------------------------------- /src/arduino-plugin/nbproject/genfiles.properties: -------------------------------------------------------------------------------- 1 | build.xml.data.CRC32=7b07b4d1 2 | build.xml.script.CRC32=430f413c 3 | build.xml.stylesheet.CRC32=a56c6a5b@2.55.1 4 | # This file is used by a NetBeans-based IDE to track changes in generated files such as build-impl.xml. 5 | # Do not edit this file. You may delete it but then the IDE will never regenerate such files for you. 6 | nbproject/build-impl.xml.data.CRC32=1f39b61a 7 | nbproject/build-impl.xml.script.CRC32=f5024184 8 | nbproject/build-impl.xml.stylesheet.CRC32=238281d1@2.71.1 9 | -------------------------------------------------------------------------------- /src/arduino-project/nbproject/private/private.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 1 5 | 0 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /src/arduino-plugin/nbproject/platform.properties: -------------------------------------------------------------------------------- 1 | cluster.path=\ 2 | ${nbplatform.active.dir}/apisupport:\ 3 | ${nbplatform.active.dir}/cnd:\ 4 | ${nbplatform.active.dir}/dlight:\ 5 | ${nbplatform.active.dir}/enterprise:\ 6 | ${nbplatform.active.dir}/ergonomics:\ 7 | ${nbplatform.active.dir}/groovy:\ 8 | ${nbplatform.active.dir}/harness:\ 9 | ${nbplatform.active.dir}/ide:\ 10 | ${nbplatform.active.dir}/java:\ 11 | ${nbplatform.active.dir}/javacard:\ 12 | ${nbplatform.active.dir}/javafx:\ 13 | ${nbplatform.active.dir}/mobility:\ 14 | ${nbplatform.active.dir}/nb:\ 15 | ${nbplatform.active.dir}/php:\ 16 | ${nbplatform.active.dir}/platform:\ 17 | ${nbplatform.active.dir}/profiler:\ 18 | ${nbplatform.active.dir}/webcommon:\ 19 | ${nbplatform.active.dir}/websvccommon 20 | nbplatform.active=default 21 | -------------------------------------------------------------------------------- /src/arduino-project/nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.cnd.makeproject 4 | 5 | 6 | arduino-project 7 | 8 | cpp 9 | 10 | UTF-8 11 | 12 | 13 | 14 | 15 | Debug 16 | 1 17 | 18 | 19 | Release 20 | 1 21 | 22 | 23 | 24 | false 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /src/arduino-project/nbproject/Makefile-variables.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Generated - do not edit! 3 | # 4 | # NOCDDL 5 | # 6 | CND_BASEDIR=`pwd` 7 | CND_BUILDDIR=build 8 | CND_DISTDIR=dist 9 | # Debug configuration 10 | CND_PLATFORM_Debug=Arduino-Linux 11 | CND_ARTIFACT_DIR_Debug=dist/Debug/Arduino-Linux 12 | CND_ARTIFACT_NAME_Debug=arduino-project 13 | CND_ARTIFACT_PATH_Debug=dist/Debug/Arduino-Linux/arduino-project 14 | CND_PACKAGE_DIR_Debug=dist/Debug/Arduino-Linux/package 15 | CND_PACKAGE_NAME_Debug=arduino-project.tar 16 | CND_PACKAGE_PATH_Debug=dist/Debug/Arduino-Linux/package/arduino-project.tar 17 | # Release configuration 18 | CND_PLATFORM_Release=Arduino-Windows 19 | CND_ARTIFACT_DIR_Release=dist/Release/Arduino-Windows 20 | CND_ARTIFACT_NAME_Release=arduinoproject 21 | CND_ARTIFACT_PATH_Release=dist/Release/Arduino-Windows/arduinoproject 22 | CND_PACKAGE_DIR_Release=dist/Release/Arduino-Windows/package 23 | CND_PACKAGE_NAME_Release=arduinoproject.tar 24 | CND_PACKAGE_PATH_Release=dist/Release/Arduino-Windows/package/arduinoproject.tar 25 | # 26 | # include compiler specific variables 27 | # 28 | # dmake command 29 | ROOT:sh = test -f nbproject/private/Makefile-variables.mk || \ 30 | (mkdir -p nbproject/private && touch nbproject/private/Makefile-variables.mk) 31 | # 32 | # gmake command 33 | .PHONY: $(shell test -f nbproject/private/Makefile-variables.mk || (mkdir -p nbproject/private && touch nbproject/private/Makefile-variables.mk)) 34 | # 35 | include nbproject/private/Makefile-variables.mk 36 | -------------------------------------------------------------------------------- /src/arduino-project/nbproject/Package-Debug.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash -x 2 | 3 | # 4 | # Generated - do not edit! 5 | # 6 | 7 | # Macros 8 | TOP=`pwd` 9 | CND_PLATFORM=Arduino-Linux 10 | CND_CONF=Debug 11 | CND_DISTDIR=dist 12 | CND_BUILDDIR=build 13 | CND_DLIB_EXT=so 14 | NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging 15 | TMPDIRNAME=tmp-packaging 16 | OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/arduino-project 17 | OUTPUT_BASENAME=arduino-project 18 | PACKAGE_TOP_DIR=arduino-project/ 19 | 20 | # Functions 21 | function checkReturnCode 22 | { 23 | rc=$? 24 | if [ $rc != 0 ] 25 | then 26 | exit $rc 27 | fi 28 | } 29 | function makeDirectory 30 | # $1 directory path 31 | # $2 permission (optional) 32 | { 33 | mkdir -p "$1" 34 | checkReturnCode 35 | if [ "$2" != "" ] 36 | then 37 | chmod $2 "$1" 38 | checkReturnCode 39 | fi 40 | } 41 | function copyFileToTmpDir 42 | # $1 from-file path 43 | # $2 to-file path 44 | # $3 permission 45 | { 46 | cp "$1" "$2" 47 | checkReturnCode 48 | if [ "$3" != "" ] 49 | then 50 | chmod $3 "$2" 51 | checkReturnCode 52 | fi 53 | } 54 | 55 | # Setup 56 | cd "${TOP}" 57 | mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package 58 | rm -rf ${NBTMPDIR} 59 | mkdir -p ${NBTMPDIR} 60 | 61 | # Copy files and create directories and links 62 | cd "${TOP}" 63 | makeDirectory "${NBTMPDIR}/arduino-project/bin" 64 | copyFileToTmpDir "${OUTPUT_PATH}" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}" 0755 65 | 66 | 67 | # Generate tar file 68 | cd "${TOP}" 69 | rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/arduino-project.tar 70 | cd ${NBTMPDIR} 71 | tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/arduino-project.tar * 72 | checkReturnCode 73 | 74 | # Cleanup 75 | cd "${TOP}" 76 | rm -rf ${NBTMPDIR} 77 | -------------------------------------------------------------------------------- /src/arduino-project/nbproject/Package-Release.bash: -------------------------------------------------------------------------------- 1 | #!/bin/bash -x 2 | 3 | # 4 | # Generated - do not edit! 5 | # 6 | 7 | # Macros 8 | TOP=`pwd` 9 | CND_PLATFORM=Arduino-Windows 10 | CND_CONF=Release 11 | CND_DISTDIR=dist 12 | CND_BUILDDIR=build 13 | CND_DLIB_EXT=dll 14 | NBTMPDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM}/tmp-packaging 15 | TMPDIRNAME=tmp-packaging 16 | OUTPUT_PATH=${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/arduinoproject 17 | OUTPUT_BASENAME=arduinoproject 18 | PACKAGE_TOP_DIR=arduinoproject/ 19 | 20 | # Functions 21 | function checkReturnCode 22 | { 23 | rc=$? 24 | if [ $rc != 0 ] 25 | then 26 | exit $rc 27 | fi 28 | } 29 | function makeDirectory 30 | # $1 directory path 31 | # $2 permission (optional) 32 | { 33 | mkdir -p "$1" 34 | checkReturnCode 35 | if [ "$2" != "" ] 36 | then 37 | chmod $2 "$1" 38 | checkReturnCode 39 | fi 40 | } 41 | function copyFileToTmpDir 42 | # $1 from-file path 43 | # $2 to-file path 44 | # $3 permission 45 | { 46 | cp "$1" "$2" 47 | checkReturnCode 48 | if [ "$3" != "" ] 49 | then 50 | chmod $3 "$2" 51 | checkReturnCode 52 | fi 53 | } 54 | 55 | # Setup 56 | cd "${TOP}" 57 | mkdir -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package 58 | rm -rf ${NBTMPDIR} 59 | mkdir -p ${NBTMPDIR} 60 | 61 | # Copy files and create directories and links 62 | cd "${TOP}" 63 | makeDirectory "${NBTMPDIR}/arduinoproject/bin" 64 | copyFileToTmpDir "${OUTPUT_PATH}.exe" "${NBTMPDIR}/${PACKAGE_TOP_DIR}bin/${OUTPUT_BASENAME}.exe" 0755 65 | 66 | 67 | # Generate tar file 68 | cd "${TOP}" 69 | rm -f ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/arduinoproject.tar 70 | cd ${NBTMPDIR} 71 | tar -vcf ../../../../${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/package/arduinoproject.tar * 72 | checkReturnCode 73 | 74 | # Cleanup 75 | cd "${TOP}" 76 | rm -rf ${NBTMPDIR} 77 | -------------------------------------------------------------------------------- /src/arduino-plugin/src/arduino/Bundle.properties: -------------------------------------------------------------------------------- 1 | LBL_CreateProjectStep=Name and Location 2 | ArduinoPanelVisual.projectNameLabel.text=Project &Name: 3 | ArduinoPanelVisual.projectLocationLabel.text=Project &Location: 4 | ArduinoPanelVisual.browseButton.actionCommand=BROWSE 5 | ArduinoPanelVisual.browseButton.text=Br&owse... 6 | ArduinoPanelVisual.createdFolderLabel.text=Project &Folder: 7 | OpenIDE-Module-Display-Category=Arduino 8 | OpenIDE-Module-Long-Description=\ 9 | https://github.com/jaquesclaudino/arduino-netbeans 10 | OpenIDE-Module-Name=arduino-plugin 11 | OpenIDE-Module-Short-Description=Project template for develop and upload Arduino sketches 12 | ArduinoPanelVisual.projectNameLabel.text_1=Project &Name: 13 | ArduinoPanelVisual.createdFolderLabel.text_1=Project &Folder: 14 | ArduinoPanelVisual.browseButton.actionCommand_1=BROWSE 15 | ArduinoPanelVisual.browseButton.text_1=Br&owse... 16 | ArduinoPanelVisual.projectLocationLabel.text_1=Project &Location: 17 | ArduinoPanelVisual.projectLocationLabel.text_2=Project &Location: 18 | ArduinoPanelVisual.projectNameLabel.text_2=Project &Name: 19 | ArduinoPanelVisual.createdFolderLabel.text_2=Project &Folder: 20 | ArduinoPanelVisual.browseButton.actionCommand_2=BROWSE 21 | ArduinoPanelVisual.browseButton.text_2=Br&owse... 22 | ArduinoPanelVisual.projectLocationLabel.text_3=Project &Location: 23 | ArduinoPanelVisual.projectNameLabel.text_3=Project &Name: 24 | ArduinoPanelVisual.createdFolderLabel.text_3=Project &Folder: 25 | ArduinoPanelVisual.browseButton.actionCommand_3=BROWSE 26 | ArduinoPanelVisual.browseButton.text_3=Br&owse... 27 | ArduinoPanelVisual.arduino.board=Board: 28 | ArduinoPanelVisual.jLabel2.text=Serial port: 29 | ArduinoPanelVisual.jLabel3.text=Arduino folder: 30 | ArduinoPanelVisual.jLabel4.text=Libraries: 31 | ArduinoPanelVisual.jTextFieldSerialPort.text=COM3 32 | ArduinoPanelVisual.jTextFieldArduinoFolder.text=C:\\arduino-1.6.7 33 | ArduinoPanelVisual.jButtonHelpArduinoFolder.text= 34 | ArduinoPanelVisual.jButtonHelpLibraries.text= 35 | ArduinoPanelVisual.jTextAreaLibraries.text=Firmata; 36 | -------------------------------------------------------------------------------- /src/arduino-project/nbproject/Makefile-Release.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Generated Makefile - do not edit! 3 | # 4 | # Edit the Makefile in the project folder instead (../Makefile). Each target 5 | # has a -pre and a -post target defined where you can add customized code. 6 | # 7 | # This makefile implements configuration specific macros and targets. 8 | 9 | 10 | # Environment 11 | MKDIR=mkdir 12 | CP=cp 13 | GREP=grep 14 | NM=nm 15 | CCADMIN=CCadmin 16 | RANLIB=ranlib 17 | CC=avr-gcc 18 | CCC=avr-g++ 19 | CXX=avr-g++ 20 | FC=gfortran 21 | AS=avr-as 22 | 23 | # Macros 24 | CND_PLATFORM=Arduino-Windows 25 | CND_DLIB_EXT=dll 26 | CND_CONF=Release 27 | CND_DISTDIR=dist 28 | CND_BUILDDIR=build 29 | 30 | # Include project Makefile 31 | include Makefile 32 | 33 | # Object Directory 34 | OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM} 35 | 36 | # Object Files 37 | OBJECTFILES= \ 38 | ${OBJECTDIR}/main.o 39 | 40 | 41 | # C Compiler Flags 42 | CFLAGS= 43 | 44 | # CC Compiler Flags 45 | CCFLAGS= 46 | CXXFLAGS= 47 | 48 | # Fortran Compiler Flags 49 | FFLAGS= 50 | 51 | # Assembler Flags 52 | ASFLAGS= 53 | 54 | # Link Libraries and Options 55 | LDLIBSOPTIONS= 56 | 57 | # Build Targets 58 | .build-conf: ${BUILD_SUBPROJECTS} 59 | "${MAKE}" -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/arduinoproject.exe 60 | 61 | ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/arduinoproject.exe: ${OBJECTFILES} 62 | ${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM} 63 | ${LINK.cc} -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/arduinoproject ${OBJECTFILES} ${LDLIBSOPTIONS} 64 | 65 | ${OBJECTDIR}/main.o: main.cpp 66 | ${MKDIR} -p ${OBJECTDIR} 67 | ${RM} $@.d 68 | $(COMPILE.cc) -O2 -MMD -MP -MF $@.d -o ${OBJECTDIR}/main.o main.cpp 69 | 70 | # Subprojects 71 | .build-subprojects: 72 | 73 | # Clean Targets 74 | .clean-conf: ${CLEAN_SUBPROJECTS} 75 | ${RM} -r ${CND_BUILDDIR}/${CND_CONF} 76 | ${RM} ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/arduinoproject.exe 77 | 78 | # Subprojects 79 | .clean-subprojects: 80 | 81 | # Enable dependency checking 82 | .dep.inc: .depcheck-impl 83 | 84 | include .dep.inc 85 | -------------------------------------------------------------------------------- /src/arduino-project/nbproject/Makefile-Debug.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Generated Makefile - do not edit! 3 | # 4 | # Edit the Makefile in the project folder instead (../Makefile). Each target 5 | # has a -pre and a -post target defined where you can add customized code. 6 | # 7 | # This makefile implements configuration specific macros and targets. 8 | 9 | 10 | # Environment 11 | MKDIR=mkdir 12 | CP=cp 13 | GREP=grep 14 | NM=nm 15 | CCADMIN=CCadmin 16 | RANLIB=ranlib 17 | CC=avr-gcc 18 | CCC=avr-g++ 19 | CXX=avr-g++ 20 | FC=gfortran 21 | AS=avr-as 22 | 23 | # Macros 24 | CND_PLATFORM=Arduino-Linux 25 | CND_DLIB_EXT=so 26 | CND_CONF=Debug 27 | CND_DISTDIR=dist 28 | CND_BUILDDIR=build 29 | 30 | # Include project Makefile 31 | include Makefile 32 | 33 | # Object Directory 34 | OBJECTDIR=${CND_BUILDDIR}/${CND_CONF}/${CND_PLATFORM} 35 | 36 | # Object Files 37 | OBJECTFILES= \ 38 | ${OBJECTDIR}/main.o 39 | 40 | 41 | # C Compiler Flags 42 | CFLAGS=${FLAGS_GCC} 43 | 44 | # CC Compiler Flags 45 | CCFLAGS=${FLAGS_GPP} 46 | CXXFLAGS=${FLAGS_GPP} 47 | 48 | # Fortran Compiler Flags 49 | FFLAGS= 50 | 51 | # Assembler Flags 52 | ASFLAGS= 53 | 54 | # Link Libraries and Options 55 | LDLIBSOPTIONS= 56 | 57 | # Build Targets 58 | .build-conf: ${BUILD_SUBPROJECTS} 59 | "${MAKE}" -f nbproject/Makefile-${CND_CONF}.mk ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/arduino-project 60 | 61 | ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/arduino-project: ${OBJECTFILES} 62 | ${MKDIR} -p ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM} 63 | avr-gcc -o ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/arduino-project ${OBJECTFILES} ${LDLIBSOPTIONS} ${FLAGS_LINKER} 64 | 65 | ${OBJECTDIR}/main.o: main.cpp 66 | ${MKDIR} -p ${OBJECTDIR} 67 | ${RM} "$@.d" 68 | $(COMPILE.cc) -g -I${INCLUDE} -MMD -MP -MF "$@.d" -o ${OBJECTDIR}/main.o main.cpp 69 | 70 | # Subprojects 71 | .build-subprojects: 72 | 73 | # Clean Targets 74 | .clean-conf: ${CLEAN_SUBPROJECTS} 75 | ${RM} -r ${CND_BUILDDIR}/${CND_CONF} 76 | ${RM} ${CND_DISTDIR}/${CND_CONF}/${CND_PLATFORM}/arduino-project 77 | 78 | # Subprojects 79 | .clean-subprojects: 80 | 81 | # Enable dependency checking 82 | .dep.inc: .depcheck-impl 83 | 84 | include .dep.inc 85 | -------------------------------------------------------------------------------- /src/arduino-plugin/nbproject/build-impl.xml: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /src/arduino-project/nbproject/private/launcher.properties: -------------------------------------------------------------------------------- 1 | # Launchers File syntax: 2 | # 3 | # [Must-have property line] 4 | # launcher1.runCommand= 5 | # [Optional extra properties] 6 | # launcher1.displayName= 7 | # launcher1.buildCommand= 8 | # launcher1.runDir= 9 | # launcher1.symbolFiles= 10 | # launcher1.env.= 11 | # (If this value is quoted with ` it is handled as a native command which execution result will become the value) 12 | # [Common launcher properties] 13 | # common.runDir= 14 | # (This value is overwritten by a launcher specific runDir value if the latter exists) 15 | # common.env.= 16 | # (Environment variables from common launcher are merged with launcher specific variables) 17 | # common.symbolFiles= 18 | # (This value is overwritten by a launcher specific symbolFiles value if the latter exists) 19 | # 20 | # In runDir, symbolFiles and env fields you can use these macroses: 21 | # ${PROJECT_DIR} - project directory absolute path 22 | # ${OUTPUT_PATH} - linker output path (relative to project directory path) 23 | # ${OUTPUT_BASENAME}- linker output filename 24 | # ${TESTDIR} - test files directory (relative to project directory path) 25 | # ${OBJECTDIR} - object files directory (relative to project directory path) 26 | # ${CND_DISTDIR} - distribution directory (relative to project directory path) 27 | # ${CND_BUILDDIR} - build directory (relative to project directory path) 28 | # ${CND_PLATFORM} - platform name 29 | # ${CND_CONF} - configuration name 30 | # ${CND_DLIB_EXT} - dynamic library extension 31 | # 32 | # All the project launchers must be listed in the file! 33 | # 34 | # launcher1.runCommand=... 35 | # launcher2.runCommand=... 36 | # ... 37 | # common.runDir=... 38 | # common.env.KEY=VALUE 39 | 40 | # launcher1.runCommand= -------------------------------------------------------------------------------- /src/arduino-plugin/src/arduino/ArduinoWizardPanel.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | package arduino; 7 | 8 | import java.awt.Component; 9 | import java.util.HashSet; 10 | import java.util.Set; 11 | import javax.swing.event.ChangeEvent; 12 | import javax.swing.event.ChangeListener; 13 | import org.openide.WizardDescriptor; 14 | import org.openide.WizardValidationException; 15 | import org.openide.util.HelpCtx; 16 | import org.openide.util.NbBundle; 17 | 18 | /** 19 | * Panel just asking for basic info. 20 | */ 21 | public class ArduinoWizardPanel implements WizardDescriptor.Panel, 22 | WizardDescriptor.ValidatingPanel, WizardDescriptor.FinishablePanel { 23 | 24 | private WizardDescriptor wizardDescriptor; 25 | private ArduinoPanelVisual component; 26 | 27 | public ArduinoWizardPanel() { 28 | } 29 | 30 | public Component getComponent() { 31 | if (component == null) { 32 | component = new ArduinoPanelVisual(this); 33 | component.setName(NbBundle.getMessage(ArduinoWizardPanel.class, "LBL_CreateProjectStep")); 34 | } 35 | return component; 36 | } 37 | 38 | public HelpCtx getHelp() { 39 | return new HelpCtx(ArduinoWizardPanel.class); 40 | } 41 | 42 | public boolean isValid() { 43 | getComponent(); 44 | return component.valid(wizardDescriptor); 45 | } 46 | 47 | private final Set listeners = new HashSet(1); // or can use ChangeSupport in NB 6.0 48 | 49 | public final void addChangeListener(ChangeListener l) { 50 | synchronized (listeners) { 51 | listeners.add(l); 52 | } 53 | } 54 | 55 | public final void removeChangeListener(ChangeListener l) { 56 | synchronized (listeners) { 57 | listeners.remove(l); 58 | } 59 | } 60 | 61 | protected final void fireChangeEvent() { 62 | Set ls; 63 | synchronized (listeners) { 64 | ls = new HashSet(listeners); 65 | } 66 | ChangeEvent ev = new ChangeEvent(this); 67 | for (ChangeListener l : ls) { 68 | l.stateChanged(ev); 69 | } 70 | } 71 | 72 | public void readSettings(Object settings) { 73 | wizardDescriptor = (WizardDescriptor) settings; 74 | component.read(wizardDescriptor); 75 | } 76 | 77 | public void storeSettings(Object settings) { 78 | WizardDescriptor d = (WizardDescriptor) settings; 79 | component.store(d); 80 | } 81 | 82 | public boolean isFinishPanel() { 83 | return true; 84 | } 85 | 86 | public void validate() throws WizardValidationException { 87 | getComponent(); 88 | component.validate(wizardDescriptor); 89 | } 90 | 91 | } 92 | -------------------------------------------------------------------------------- /src/arduino-project/nbproject/private/configurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | Makefile 4 | 5 | 6 | 7 | localhost 8 | 2 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | gdb 24 | 25 | 26 | 27 | "${OUTPUT_PATH}" 28 | make upload 29 | 30 | make upload 31 | 32 | true 33 | 0 34 | 0 35 | 36 | 37 | 38 | 39 | 40 | 41 | localhost 42 | 3 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | gdb 58 | 59 | 60 | 61 | "${OUTPUT_PATH}" 62 | make upload 63 | 64 | make upload 65 | 66 | true 67 | 0 68 | 0 69 | 70 | 71 | 72 | 73 | 74 | 75 | -------------------------------------------------------------------------------- /src/arduino-project/nbproject/configurations.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 7 | 8 | 11 | 12 | 15 | main.cpp 16 | 17 | 21 | 22 | 26 | Makefile 27 | 28 | 29 | Makefile 30 | 31 | 32 | 33 | Arduino|WinAVR 34 | true 35 | false 36 | 37 | 38 | 39 | 40 | ${INCLUDE} 41 | 42 | ${FLAGS_GCC} 43 | 44 | 45 | 46 | ${INCLUDE} 47 | 48 | ${FLAGS_GPP} 49 | 50 | 51 | avr-gcc 52 | ${FLAGS_LINKER} 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | default 61 | true 62 | false 63 | 64 | 65 | 66 | 5 67 | 68 | 69 | 5 70 | 71 | 72 | 5 73 | 74 | 75 | 5 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | -------------------------------------------------------------------------------- /src/arduino-plugin/nbproject/project.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | org.netbeans.modules.apisupport.project 4 | 5 | 6 | arduino 7 | 8 | 9 | 10 | org.netbeans.api.templates 11 | 12 | 13 | 14 | 1.6.1 15 | 16 | 17 | 18 | org.netbeans.modules.projectapi 19 | 20 | 21 | 22 | 1 23 | 1.46.1 24 | 25 | 26 | 27 | org.netbeans.modules.projectuiapi 28 | 29 | 30 | 31 | 1 32 | 1.57.1.8 33 | 34 | 35 | 36 | org.openide.awt 37 | 38 | 39 | 40 | 7.46.1 41 | 42 | 43 | 44 | org.openide.dialogs 45 | 46 | 47 | 48 | 7.25.1 49 | 50 | 51 | 52 | org.openide.filesystems 53 | 54 | 55 | 56 | 7.62.1 57 | 58 | 59 | 60 | org.openide.loaders 61 | 62 | 63 | 64 | 7.37.3 65 | 66 | 67 | 68 | org.openide.util 69 | 70 | 71 | 72 | 8.25.2 73 | 74 | 75 | 76 | org.openide.util.lookup 77 | 78 | 79 | 80 | 8.18.1 81 | 82 | 83 | 84 | org.openide.util.ui 85 | 86 | 87 | 88 | 9.4.1 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | -------------------------------------------------------------------------------- /src/arduino-project/nbproject/Makefile-impl.mk: -------------------------------------------------------------------------------- 1 | # 2 | # Generated Makefile - do not edit! 3 | # 4 | # Edit the Makefile in the project folder instead (../Makefile). Each target 5 | # has a pre- and a post- target defined where you can add customization code. 6 | # 7 | # This makefile implements macros and targets common to all configurations. 8 | # 9 | # NOCDDL 10 | 11 | 12 | # Building and Cleaning subprojects are done by default, but can be controlled with the SUB 13 | # macro. If SUB=no, subprojects will not be built or cleaned. The following macro 14 | # statements set BUILD_SUB-CONF and CLEAN_SUB-CONF to .build-reqprojects-conf 15 | # and .clean-reqprojects-conf unless SUB has the value 'no' 16 | SUB_no=NO 17 | SUBPROJECTS=${SUB_${SUB}} 18 | BUILD_SUBPROJECTS_=.build-subprojects 19 | BUILD_SUBPROJECTS_NO= 20 | BUILD_SUBPROJECTS=${BUILD_SUBPROJECTS_${SUBPROJECTS}} 21 | CLEAN_SUBPROJECTS_=.clean-subprojects 22 | CLEAN_SUBPROJECTS_NO= 23 | CLEAN_SUBPROJECTS=${CLEAN_SUBPROJECTS_${SUBPROJECTS}} 24 | 25 | 26 | # Project Name 27 | PROJECTNAME=arduino-project 28 | 29 | # Active Configuration 30 | DEFAULTCONF=Debug 31 | CONF=${DEFAULTCONF} 32 | 33 | # All Configurations 34 | ALLCONFS=Debug Release 35 | 36 | 37 | # build 38 | .build-impl: .build-pre .validate-impl .depcheck-impl 39 | @#echo "=> Running $@... Configuration=$(CONF)" 40 | "${MAKE}" -f nbproject/Makefile-${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .build-conf 41 | 42 | 43 | # clean 44 | .clean-impl: .clean-pre .validate-impl .depcheck-impl 45 | @#echo "=> Running $@... Configuration=$(CONF)" 46 | "${MAKE}" -f nbproject/Makefile-${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .clean-conf 47 | 48 | 49 | # clobber 50 | .clobber-impl: .clobber-pre .depcheck-impl 51 | @#echo "=> Running $@..." 52 | for CONF in ${ALLCONFS}; \ 53 | do \ 54 | "${MAKE}" -f nbproject/Makefile-$${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .clean-conf; \ 55 | done 56 | 57 | # all 58 | .all-impl: .all-pre .depcheck-impl 59 | @#echo "=> Running $@..." 60 | for CONF in ${ALLCONFS}; \ 61 | do \ 62 | "${MAKE}" -f nbproject/Makefile-$${CONF}.mk QMAKE=${QMAKE} SUBPROJECTS=${SUBPROJECTS} .build-conf; \ 63 | done 64 | 65 | # build tests 66 | .build-tests-impl: .build-impl .build-tests-pre 67 | @#echo "=> Running $@... Configuration=$(CONF)" 68 | "${MAKE}" -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .build-tests-conf 69 | 70 | # run tests 71 | .test-impl: .build-tests-impl .test-pre 72 | @#echo "=> Running $@... Configuration=$(CONF)" 73 | "${MAKE}" -f nbproject/Makefile-${CONF}.mk SUBPROJECTS=${SUBPROJECTS} .test-conf 74 | 75 | # dependency checking support 76 | .depcheck-impl: 77 | @echo "# This code depends on make tool being used" >.dep.inc 78 | @if [ -n "${MAKE_VERSION}" ]; then \ 79 | echo "DEPFILES=\$$(wildcard \$$(addsuffix .d, \$${OBJECTFILES} \$${TESTOBJECTFILES}))" >>.dep.inc; \ 80 | echo "ifneq (\$${DEPFILES},)" >>.dep.inc; \ 81 | echo "include \$${DEPFILES}" >>.dep.inc; \ 82 | echo "endif" >>.dep.inc; \ 83 | else \ 84 | echo ".KEEP_STATE:" >>.dep.inc; \ 85 | echo ".KEEP_STATE_FILE:.make.state.\$${CONF}" >>.dep.inc; \ 86 | fi 87 | 88 | # configuration validation 89 | .validate-impl: 90 | @if [ ! -f nbproject/Makefile-${CONF}.mk ]; \ 91 | then \ 92 | echo ""; \ 93 | echo "Error: can not find the makefile for configuration '${CONF}' in project ${PROJECTNAME}"; \ 94 | echo "See 'make help' for details."; \ 95 | echo "Current directory: " `pwd`; \ 96 | echo ""; \ 97 | fi 98 | @if [ ! -f nbproject/Makefile-${CONF}.mk ]; \ 99 | then \ 100 | exit 1; \ 101 | fi 102 | 103 | 104 | # help 105 | .help-impl: .help-pre 106 | @echo "This makefile supports the following configurations:" 107 | @echo " ${ALLCONFS}" 108 | @echo "" 109 | @echo "and the following targets:" 110 | @echo " build (default target)" 111 | @echo " clean" 112 | @echo " clobber" 113 | @echo " all" 114 | @echo " help" 115 | @echo "" 116 | @echo "Makefile Usage:" 117 | @echo " make [CONF=] [SUB=no] build" 118 | @echo " make [CONF=] [SUB=no] clean" 119 | @echo " make [SUB=no] clobber" 120 | @echo " make [SUB=no] all" 121 | @echo " make help" 122 | @echo "" 123 | @echo "Target 'build' will build a specific configuration and, unless 'SUB=no'," 124 | @echo " also build subprojects." 125 | @echo "Target 'clean' will clean a specific configuration and, unless 'SUB=no'," 126 | @echo " also clean subprojects." 127 | @echo "Target 'clobber' will remove all built files from all configurations and," 128 | @echo " unless 'SUB=no', also from subprojects." 129 | @echo "Target 'all' will will build all configurations and, unless 'SUB=no'," 130 | @echo " also build subprojects." 131 | @echo "Target 'help' prints this message." 132 | @echo "" 133 | 134 | -------------------------------------------------------------------------------- /src/arduino-project/Makefile: -------------------------------------------------------------------------------- 1 | # Arduino NetBeans plugin: https://github.com/jaquesclaudino/arduino-netbeans 2 | 3 | #COM_PORT = /dev/ttyACM0 4 | #BAUD_RATE = 115200 5 | #ARDUINO_VERSION = 167 6 | #ARDUINO_BASE_DIR = /home/jaques/opt/arduino-1.6.7 7 | #INCLUDE_LIBS=Firmata;../hardware/arduino/avr/libraries/SoftwareSerial; 8 | 9 | # Arduino Uno: 10 | #ARDUINO_MODEL = atmega328p 11 | #ARDUINO_PROGRAMMER = arduino 12 | #ARDUINO_PINS_DIR = ${ARDUINO_BASE_DIR}/hardware/arduino/avr/variants/standard 13 | 14 | # Arduino Mega 2560: 15 | #ARDUINO_MODEL = atmega2560 16 | #ARDUINO_PROGRAMMER = wiring 17 | #ARDUINO_PINS_DIR = ${ARDUINO_BASE_DIR}/hardware/arduino/variants/mega 18 | 19 | # Arduino Duemilanove: 20 | #BAUD_RATE = 57600 21 | 22 | ############################# END OF USER CHANGES ############################# 23 | 24 | ARDUINO_CORE_DIR = ${ARDUINO_BASE_DIR}/hardware/arduino/avr/cores/arduino 25 | ARDUINO_LIB_DIR = ${ARDUINO_BASE_DIR}/libraries 26 | LIB_CORE_DIR = lib/core 27 | LIB_LIBS_DIR = lib/libs 28 | ARDUINO_LIB_CORE = ${LIB_CORE_DIR}/arduinocore.a 29 | ARDUINO_LIB_LIBS = ${LIB_LIBS_DIR}/arduinolibs.a 30 | AVR_DUDE = ${ARDUINO_BASE_DIR}/hardware/tools/avr/bin/avrdude -C ${ARDUINO_BASE_DIR}/hardware/tools/avr/etc/avrdude.conf 31 | 32 | INCLUDE = -c -g \ 33 | -I${ARDUINO_CORE_DIR} \ 34 | -I${ARDUINO_PINS_DIR} \ 35 | $(patsubst %,-I${ARDUINO_LIB_DIR}/%,$(subst ;, ,$(INCLUDE_LIBS))) 36 | 37 | FLAGS_GCC = -c -g -Os -Wall -ffunction-sections -fdata-sections -mmcu=${ARDUINO_MODEL} -DF_CPU=16000000L -MMD -DUSB_VID=null -DUSB_PID=null -DARDUINO=${ARDUINO_VERSION} 38 | FLAGS_GPP = ${FLAGS_GCC} -fno-exceptions 39 | FLAGS_LINKER = ${ARDUINO_LIB_CORE} ${ARDUINO_LIB_LIBS} -Os -Wl,--gc-sections,--relax -mmcu=${ARDUINO_MODEL} -lm 40 | CMD_AVR_GCC = avr-gcc ${FLAGS_GCC} ${INCLUDE} 41 | CMD_AVR_GPP = avr-g++ ${FLAGS_GPP} ${INCLUDE} 42 | CMD_AVR_AR = avr-ar rcs 43 | 44 | CORE_CPP_SOURCES = $(wildcard ${ARDUINO_CORE_DIR}/*.cpp) 45 | CORE_C_SOURCES = $(wildcard ${ARDUINO_CORE_DIR}/*.c) 46 | COBJECTS=$(CORE_CPP_SOURCES:.cpp=.cpp.o) $(CORE_C_SOURCES:.c=.c.o) 47 | CORE_OBJECTS=$(subst ${ARDUINO_CORE_DIR},${LIB_CORE_DIR},${COBJECTS}) 48 | 49 | LIB_CPP_SOURCES = $(wildcard $(patsubst %,${ARDUINO_LIB_DIR}/%/*.cpp,$(subst ;, ,$(INCLUDE_LIBS)))) 50 | LIB_C_SOURCES = $(wildcard $(patsubst %,${ARDUINO_LIB_DIR}/%/*.c,$(subst ;, ,$(INCLUDE_LIBS))) ) 51 | LOBJECTS=$(LIB_CPP_SOURCES:.cpp=.cpp.o) $(LIB_C_SOURCES:.c=.c.o) 52 | LIB_OBJECTS=$(subst ${ARDUINO_LIB_DIR},${LIB_LIBS_DIR},${LOBJECTS}) 53 | 54 | # Environment 55 | MKDIR=mkdir 56 | CP=cp 57 | CCADMIN=CCadmin 58 | 59 | # build 60 | build: .build-post 61 | ${ARDUINO_LIB_CORE}: ${CORE_OBJECTS} 62 | ${CMD_AVR_AR} ${ARDUINO_LIB_CORE} ${CORE_OBJECTS} 63 | 64 | ${ARDUINO_LIB_LIBS}: ${LIB_OBJECTS} 65 | ${CMD_AVR_AR} ${ARDUINO_LIB_LIBS} ${CORE_OBJECTS} ${LIB_OBJECTS} 66 | 67 | libraries: ${ARDUINO_LIB_CORE} ${ARDUINO_LIB_LIBS} 68 | 69 | ${LIB_CORE_DIR}/%.cpp.o: ${ARDUINO_CORE_DIR}/%.cpp 70 | mkdir -p $(dir $@) 71 | ${CMD_AVR_GPP} $< -o $@ 72 | 73 | ${LIB_CORE_DIR}/%.c.o: ${ARDUINO_CORE_DIR}/%.c 74 | mkdir -p $(dir $@) 75 | ${CMD_AVR_GCC} $< -o $@ 76 | 77 | ${LIB_LIBS_DIR}/%.cpp.o: ${ARDUINO_LIB_DIR}/%.cpp 78 | mkdir -p $(dir $@) 79 | ${CMD_AVR_GPP} $< -o $@ 80 | 81 | ${LIB_LIBS_DIR}/%.c.o: ${ARDUINO_LIB_DIR}/%.c 82 | mkdir -p $(dir $@) 83 | ${CMD_AVR_GCC} $< -o $@ 84 | 85 | .build-pre: .build-pre-pre libraries 86 | 87 | #Unconditional Build 88 | .build-pre-pre: 89 | ifeq "$(wildcard $(ARDUINO_BASE_DIR))" "" 90 | echo "Folder $(ARDUINO_BASE_DIR) not found. Please fix it on Makefile. Remember the path can not contain spaces." 91 | test -d ${ARDUINO_BASE_DIR} 92 | endif 93 | 94 | .build-post: .build-impl 95 | avr-objcopy -O ihex ${CND_ARTIFACT_PATH_${CONF}} ${CND_ARTIFACT_PATH_${CONF}}.hex 96 | avr-size --mcu=${ARDUINO_MODEL} -C ${CND_ARTIFACT_PATH_${CONF}} 97 | 98 | #upload: .build-post 99 | upload: 100 | ${AVR_DUDE} -v -p${ARDUINO_MODEL} -c${ARDUINO_PROGRAMMER} -P ${COM_PORT} -b${BAUD_RATE} -D -Uflash:w:${CND_ARTIFACT_PATH_${CONF}}.hex:i 101 | 102 | 103 | # clean 104 | clean: .clean-post 105 | 106 | .clean-pre: 107 | # Add your pre 'clean' code here... 108 | 109 | .clean-post: .clean-impl 110 | # Add your post 'clean' code here... 111 | 112 | 113 | # clobber 114 | clobber: .clobber-post 115 | 116 | .clobber-pre: 117 | # Add your pre 'clobber' code here... 118 | 119 | .clobber-post: .clobber-impl 120 | # Add your post 'clobber' code here... 121 | 122 | 123 | # all 124 | all: .all-post 125 | 126 | .all-pre: 127 | # Add your pre 'all' code here... 128 | 129 | .all-post: .all-impl 130 | # Add your post 'all' code here... 131 | 132 | 133 | # build tests 134 | build-tests: .build-tests-post 135 | 136 | .build-tests-pre: 137 | # Add your pre 'build-tests' code here... 138 | 139 | .build-tests-post: .build-tests-impl 140 | # Add your post 'build-tests' code here... 141 | 142 | 143 | # run tests 144 | test: .test-post 145 | 146 | .test-pre: build-tests 147 | # Add your pre 'test' code here... 148 | 149 | .test-post: .test-impl 150 | # Add your post 'test' code here... 151 | 152 | 153 | # help 154 | help: .help-post 155 | 156 | .help-pre: 157 | # Add your pre 'help' code here... 158 | 159 | .help-post: .help-impl 160 | # Add your post 'help' code here... 161 | 162 | 163 | # include project implementation makefile 164 | include nbproject/Makefile-impl.mk 165 | 166 | # include project make variables 167 | include nbproject/Makefile-variables.mk 168 | -------------------------------------------------------------------------------- /src/arduino-plugin/src/arduino/ArduinoWizardIterator.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | package arduino; 7 | 8 | import java.awt.Component; 9 | import java.io.ByteArrayInputStream; 10 | import java.io.ByteArrayOutputStream; 11 | import java.io.File; 12 | import java.io.FileOutputStream; 13 | import java.io.IOException; 14 | import java.io.InputStream; 15 | import java.io.OutputStream; 16 | import java.io.PrintWriter; 17 | import java.text.MessageFormat; 18 | import java.util.Enumeration; 19 | import java.util.LinkedHashSet; 20 | import java.util.NoSuchElementException; 21 | import java.util.Set; 22 | import java.util.zip.ZipEntry; 23 | import java.util.zip.ZipInputStream; 24 | import javax.swing.JComponent; 25 | import javax.swing.event.ChangeListener; 26 | import org.netbeans.api.project.ProjectManager; 27 | import org.netbeans.api.templates.TemplateRegistration; 28 | import org.netbeans.spi.project.ui.support.ProjectChooser; 29 | import org.netbeans.spi.project.ui.templates.support.Templates; 30 | import org.openide.WizardDescriptor; 31 | import org.openide.filesystems.FileObject; 32 | import org.openide.filesystems.FileUtil; 33 | import org.openide.util.Exceptions; 34 | import org.openide.util.NbBundle; 35 | import org.openide.util.NbBundle.Messages; 36 | import org.openide.xml.XMLUtil; 37 | import org.w3c.dom.Document; 38 | import org.w3c.dom.Element; 39 | import org.w3c.dom.NodeList; 40 | import org.xml.sax.InputSource; 41 | 42 | // TODO define position attribute 43 | @TemplateRegistration(folder = "Project/Arduino", displayName = "#Arduino_displayName", description = "ArduinoDescription.html", iconBase = "arduino/Arduino.png", content = "ArduinoProject.zip") 44 | @Messages("Arduino_displayName=Arduino Project") 45 | public class ArduinoWizardIterator implements WizardDescriptor./*Progress*/InstantiatingIterator { 46 | 47 | private int index; 48 | private WizardDescriptor.Panel[] panels; 49 | private WizardDescriptor wiz; 50 | 51 | public ArduinoWizardIterator() { 52 | } 53 | 54 | public static ArduinoWizardIterator createIterator() { 55 | return new ArduinoWizardIterator(); 56 | } 57 | 58 | private WizardDescriptor.Panel[] createPanels() { 59 | return new WizardDescriptor.Panel[]{ 60 | new ArduinoWizardPanel(),}; 61 | } 62 | 63 | private String[] createSteps() { 64 | return new String[]{ 65 | NbBundle.getMessage(ArduinoWizardIterator.class, "LBL_CreateProjectStep") 66 | }; 67 | } 68 | 69 | public Set/**/ instantiate(/*ProgressHandle handle*/) throws IOException { 70 | Set resultSet = new LinkedHashSet(); 71 | File dirF = FileUtil.normalizeFile((File) wiz.getProperty("projdir")); 72 | dirF.mkdirs(); 73 | 74 | FileObject template = Templates.getTemplate(wiz); 75 | FileObject dir = FileUtil.toFileObject(dirF); 76 | unZipFile(template.getInputStream(), dir, wiz); 77 | 78 | // Always open top dir as a project: 79 | resultSet.add(dir); 80 | // Look for nested projects to open as well: 81 | Enumeration e = dir.getFolders(true); 82 | while (e.hasMoreElements()) { 83 | FileObject subfolder = e.nextElement(); 84 | if (ProjectManager.getDefault().isProject(subfolder)) { 85 | resultSet.add(subfolder); 86 | } 87 | } 88 | 89 | File parent = dirF.getParentFile(); 90 | if (parent != null && parent.exists()) { 91 | ProjectChooser.setProjectsFolder(parent); 92 | } 93 | 94 | return resultSet; 95 | } 96 | 97 | public void initialize(WizardDescriptor wiz) { 98 | this.wiz = wiz; 99 | index = 0; 100 | panels = createPanels(); 101 | // Make sure list of steps is accurate. 102 | String[] steps = createSteps(); 103 | for (int i = 0; i < panels.length; i++) { 104 | Component c = panels[i].getComponent(); 105 | if (steps[i] == null) { 106 | // Default step name to component name of panel. 107 | // Mainly useful for getting the name of the target 108 | // chooser to appear in the list of steps. 109 | steps[i] = c.getName(); 110 | } 111 | if (c instanceof JComponent) { // assume Swing components 112 | JComponent jc = (JComponent) c; 113 | // Step #. 114 | // TODO if using org.openide.dialogs >= 7.8, can use WizardDescriptor.PROP_*: 115 | jc.putClientProperty("WizardPanel_contentSelectedIndex", new Integer(i)); 116 | // Step name (actually the whole list for reference). 117 | jc.putClientProperty("WizardPanel_contentData", steps); 118 | } 119 | } 120 | } 121 | 122 | public void uninitialize(WizardDescriptor wiz) { 123 | this.wiz.putProperty("projdir", null); 124 | this.wiz.putProperty("name", null); 125 | this.wiz = null; 126 | panels = null; 127 | } 128 | 129 | public String name() { 130 | return MessageFormat.format("{0} of {1}", 131 | new Object[]{new Integer(index + 1), new Integer(panels.length)}); 132 | } 133 | 134 | public boolean hasNext() { 135 | return index < panels.length - 1; 136 | } 137 | 138 | public boolean hasPrevious() { 139 | return index > 0; 140 | } 141 | 142 | public void nextPanel() { 143 | if (!hasNext()) { 144 | throw new NoSuchElementException(); 145 | } 146 | index++; 147 | } 148 | 149 | public void previousPanel() { 150 | if (!hasPrevious()) { 151 | throw new NoSuchElementException(); 152 | } 153 | index--; 154 | } 155 | 156 | public WizardDescriptor.Panel current() { 157 | return panels[index]; 158 | } 159 | 160 | // If nothing unusual changes in the middle of the wizard, simply: 161 | public final void addChangeListener(ChangeListener l) { 162 | } 163 | 164 | public final void removeChangeListener(ChangeListener l) { 165 | } 166 | 167 | private static void unZipFile(InputStream source, FileObject projectRoot, WizardDescriptor wiz) throws IOException { 168 | try { 169 | ZipInputStream str = new ZipInputStream(source); 170 | ZipEntry entry; 171 | while ((entry = str.getNextEntry()) != null) { 172 | if (entry.isDirectory()) { 173 | FileUtil.createFolder(projectRoot, entry.getName()); 174 | } else { 175 | FileObject fo = FileUtil.createData(projectRoot, entry.getName()); 176 | 177 | /*try (PrintWriter pw = new PrintWriter(new FileOutputStream(new File("/home/jaques/arduino-netbeans.log"),true))) { 178 | pw.println(entry.getName()); 179 | }*/ 180 | 181 | if ("nbproject/project.xml".equals(entry.getName())) { 182 | // Special handling for setting name of Ant-based projects; customize as needed: 183 | filterProjectXML(fo, str, projectRoot.getName()); 184 | } else if ("Makefile".equals(entry.getName())) { 185 | filterMakefile(fo, str, wiz); 186 | } else { 187 | writeFile(str, fo); 188 | } 189 | } 190 | } 191 | } finally { 192 | source.close(); 193 | } 194 | } 195 | 196 | private static void writeFile(ZipInputStream str, FileObject fo) throws IOException { 197 | OutputStream out = fo.getOutputStream(); 198 | try { 199 | FileUtil.copy(str, out); 200 | } finally { 201 | out.close(); 202 | } 203 | } 204 | 205 | private static void filterProjectXML(FileObject fo, ZipInputStream str, String name) throws IOException { 206 | try { 207 | ByteArrayOutputStream baos = new ByteArrayOutputStream(); 208 | FileUtil.copy(str, baos); 209 | Document doc = XMLUtil.parse(new InputSource(new ByteArrayInputStream(baos.toByteArray())), false, false, null, null); 210 | NodeList nl = doc.getDocumentElement().getElementsByTagName("name"); 211 | if (nl != null) { 212 | for (int i = 0; i < nl.getLength(); i++) { 213 | Element el = (Element) nl.item(i); 214 | if (el.getParentNode() != null && "data".equals(el.getParentNode().getNodeName())) { 215 | NodeList nl2 = el.getChildNodes(); 216 | if (nl2.getLength() > 0) { 217 | nl2.item(0).setNodeValue(name); 218 | } 219 | break; 220 | } 221 | } 222 | } 223 | OutputStream out = fo.getOutputStream(); 224 | try { 225 | XMLUtil.write(doc, out, "UTF-8"); 226 | } finally { 227 | out.close(); 228 | } 229 | } catch (Exception ex) { 230 | Exceptions.printStackTrace(ex); 231 | writeFile(str, fo); 232 | } 233 | 234 | } 235 | 236 | private static void filterMakefile(FileObject fo, ZipInputStream str, WizardDescriptor wiz) throws IOException { 237 | try { 238 | ByteArrayOutputStream baos = new ByteArrayOutputStream(); 239 | FileUtil.copy(str, baos); 240 | 241 | try (PrintWriter pw = new PrintWriter(new FileOutputStream(new File(fo.getPath()),true))) { 242 | pw.print("COM_PORT = "); 243 | pw.println(wiz.getProperty("comport")); 244 | 245 | pw.println("BAUD_RATE = 115200"); 246 | pw.println("ARDUINO_VERSION = 167"); 247 | 248 | pw.print("ARDUINO_BASE_DIR = "); 249 | String basedir = wiz.getProperty("basedir").toString().trim().replaceAll("\\\\", "/"); 250 | pw.println(basedir); 251 | 252 | pw.print("INCLUDE_LIBS = "); 253 | String libraries = wiz.getProperty("libraries").toString().trim().replaceAll("\r", "").replace("\n", ""); 254 | if (libraries.isEmpty()) { 255 | pw.println("Firmata;"); 256 | } else { 257 | pw.println(libraries); 258 | } 259 | 260 | if (wiz.getProperty("board").equals("Arduino Mega 2560")) { 261 | pw.println("ARDUINO_MODEL = atmega2560"); 262 | pw.println("ARDUINO_PROGRAMMER = wiring"); 263 | pw.println("ARDUINO_PINS_DIR = ${ARDUINO_BASE_DIR}/hardware/arduino/avr/variants/mega"); 264 | 265 | } else { //Arduino Uno: 266 | pw.println("ARDUINO_MODEL = atmega328p"); 267 | pw.println("ARDUINO_PROGRAMMER = arduino"); 268 | pw.println("ARDUINO_PINS_DIR = ${ARDUINO_BASE_DIR}/hardware/arduino/avr/variants/standard"); 269 | } 270 | 271 | pw.println(); 272 | pw.println(baos.toString()); 273 | } 274 | 275 | } catch (Exception ex) { 276 | Exceptions.printStackTrace(ex); 277 | writeFile(str, fo); 278 | } 279 | 280 | } 281 | 282 | } 283 | -------------------------------------------------------------------------------- /src/arduino-plugin/src/arduino/ArduinoPanelVisual.form: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 | 208 | 209 | 210 | 211 | 212 | 213 | 214 | 215 | 216 | 217 | 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 227 | 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 237 | 238 | 239 | 240 | 241 | 242 | 243 | 244 | 245 | 246 | 247 | 248 | 249 | 250 | 251 | 252 | 253 | 254 | 255 | 256 | 257 | 258 |
259 | -------------------------------------------------------------------------------- /src/arduino-plugin/src/arduino/ArduinoPanelVisual.java: -------------------------------------------------------------------------------- 1 | /* 2 | * To change this license header, choose License Headers in Project Properties. 3 | * To change this template file, choose Tools | Templates 4 | * and open the template in the editor. 5 | */ 6 | package arduino; 7 | 8 | import java.io.File; 9 | import javax.swing.JFileChooser; 10 | import javax.swing.JOptionPane; 11 | import javax.swing.JPanel; 12 | import javax.swing.event.DocumentEvent; 13 | import javax.swing.event.DocumentListener; 14 | import javax.swing.text.Document; 15 | import org.netbeans.spi.project.ui.support.ProjectChooser; 16 | import org.openide.WizardDescriptor; 17 | import org.openide.WizardValidationException; 18 | import org.openide.filesystems.FileUtil; 19 | import org.openide.util.NbPreferences; 20 | 21 | public class ArduinoPanelVisual extends JPanel implements DocumentListener { 22 | 23 | public static final String PROP_PROJECT_NAME = "projectName"; 24 | 25 | private ArduinoWizardPanel panel; 26 | 27 | public ArduinoPanelVisual(ArduinoWizardPanel panel) { 28 | initComponents(); 29 | this.panel = panel; 30 | // Register listener on the textFields to make the automatic updates 31 | projectNameTextField.getDocument().addDocumentListener(this); 32 | projectLocationTextField.getDocument().addDocumentListener(this); 33 | jTextFieldArduinoFolder.getDocument().addDocumentListener(this); 34 | } 35 | 36 | public String getProjectName() { 37 | return this.projectNameTextField.getText(); 38 | } 39 | 40 | /** 41 | * This method is called from within the constructor to initialize the form. 42 | * WARNING: Do NOT modify this code. The content of this method is always 43 | * regenerated by the Form Editor. 44 | */ 45 | // //GEN-BEGIN:initComponents 46 | private void initComponents() { 47 | 48 | projectNameLabel = new javax.swing.JLabel(); 49 | projectNameTextField = new javax.swing.JTextField(); 50 | projectLocationLabel = new javax.swing.JLabel(); 51 | projectLocationTextField = new javax.swing.JTextField(); 52 | browseButton = new javax.swing.JButton(); 53 | createdFolderLabel = new javax.swing.JLabel(); 54 | createdFolderTextField = new javax.swing.JTextField(); 55 | jLabel1 = new javax.swing.JLabel(); 56 | jComboBoxBoard = new javax.swing.JComboBox<>(); 57 | jLabel2 = new javax.swing.JLabel(); 58 | jLabel3 = new javax.swing.JLabel(); 59 | jTextFieldSerialPort = new javax.swing.JTextField(); 60 | jTextFieldArduinoFolder = new javax.swing.JTextField(); 61 | jLabel4 = new javax.swing.JLabel(); 62 | jButtonHelpArduinoFolder = new javax.swing.JButton(); 63 | jScrollPane1 = new javax.swing.JScrollPane(); 64 | jTextAreaLibraries = new javax.swing.JTextArea(); 65 | jButtonHelpLibraries = new javax.swing.JButton(); 66 | 67 | projectNameLabel.setLabelFor(projectNameTextField); 68 | org.openide.awt.Mnemonics.setLocalizedText(projectNameLabel, org.openide.util.NbBundle.getMessage(ArduinoPanelVisual.class, "ArduinoPanelVisual.projectNameLabel.text")); // NOI18N 69 | 70 | projectLocationLabel.setLabelFor(projectLocationTextField); 71 | org.openide.awt.Mnemonics.setLocalizedText(projectLocationLabel, org.openide.util.NbBundle.getMessage(ArduinoPanelVisual.class, "ArduinoPanelVisual.projectLocationLabel.text")); // NOI18N 72 | 73 | org.openide.awt.Mnemonics.setLocalizedText(browseButton, org.openide.util.NbBundle.getMessage(ArduinoPanelVisual.class, "ArduinoPanelVisual.browseButton.text")); // NOI18N 74 | browseButton.setActionCommand(org.openide.util.NbBundle.getMessage(ArduinoPanelVisual.class, "ArduinoPanelVisual.browseButton.actionCommand")); // NOI18N 75 | browseButton.addActionListener(new java.awt.event.ActionListener() { 76 | public void actionPerformed(java.awt.event.ActionEvent evt) { 77 | browseButtonActionPerformed(evt); 78 | } 79 | }); 80 | 81 | createdFolderLabel.setLabelFor(createdFolderTextField); 82 | org.openide.awt.Mnemonics.setLocalizedText(createdFolderLabel, org.openide.util.NbBundle.getMessage(ArduinoPanelVisual.class, "ArduinoPanelVisual.createdFolderLabel.text")); // NOI18N 83 | 84 | createdFolderTextField.setEditable(false); 85 | 86 | org.openide.awt.Mnemonics.setLocalizedText(jLabel1, org.openide.util.NbBundle.getMessage(ArduinoPanelVisual.class, "ArduinoPanelVisual.arduino.board")); // NOI18N 87 | 88 | jComboBoxBoard.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "Arduino Uno", "Arduino Mega 2560" })); 89 | 90 | org.openide.awt.Mnemonics.setLocalizedText(jLabel2, org.openide.util.NbBundle.getMessage(ArduinoPanelVisual.class, "ArduinoPanelVisual.jLabel2.text")); // NOI18N 91 | 92 | org.openide.awt.Mnemonics.setLocalizedText(jLabel3, org.openide.util.NbBundle.getMessage(ArduinoPanelVisual.class, "ArduinoPanelVisual.jLabel3.text")); // NOI18N 93 | 94 | jTextFieldSerialPort.setText(org.openide.util.NbBundle.getMessage(ArduinoPanelVisual.class, "ArduinoPanelVisual.jTextFieldSerialPort.text")); // NOI18N 95 | 96 | jTextFieldArduinoFolder.setText(org.openide.util.NbBundle.getMessage(ArduinoPanelVisual.class, "ArduinoPanelVisual.jTextFieldArduinoFolder.text")); // NOI18N 97 | 98 | org.openide.awt.Mnemonics.setLocalizedText(jLabel4, org.openide.util.NbBundle.getMessage(ArduinoPanelVisual.class, "ArduinoPanelVisual.jLabel4.text")); // NOI18N 99 | 100 | jButtonHelpArduinoFolder.setIcon(new javax.swing.ImageIcon(getClass().getResource("/arduino/help.png"))); // NOI18N 101 | org.openide.awt.Mnemonics.setLocalizedText(jButtonHelpArduinoFolder, org.openide.util.NbBundle.getMessage(ArduinoPanelVisual.class, "ArduinoPanelVisual.jButtonHelpArduinoFolder.text")); // NOI18N 102 | jButtonHelpArduinoFolder.addActionListener(new java.awt.event.ActionListener() { 103 | public void actionPerformed(java.awt.event.ActionEvent evt) { 104 | jButtonHelpArduinoFolderActionPerformed(evt); 105 | } 106 | }); 107 | 108 | jTextAreaLibraries.setColumns(10); 109 | jTextAreaLibraries.setLineWrap(true); 110 | jTextAreaLibraries.setRows(5); 111 | jTextAreaLibraries.setText(org.openide.util.NbBundle.getMessage(ArduinoPanelVisual.class, "ArduinoPanelVisual.jTextAreaLibraries.text")); // NOI18N 112 | jScrollPane1.setViewportView(jTextAreaLibraries); 113 | 114 | jButtonHelpLibraries.setIcon(new javax.swing.ImageIcon(getClass().getResource("/arduino/help.png"))); // NOI18N 115 | org.openide.awt.Mnemonics.setLocalizedText(jButtonHelpLibraries, org.openide.util.NbBundle.getMessage(ArduinoPanelVisual.class, "ArduinoPanelVisual.jButtonHelpLibraries.text")); // NOI18N 116 | jButtonHelpLibraries.addActionListener(new java.awt.event.ActionListener() { 117 | public void actionPerformed(java.awt.event.ActionEvent evt) { 118 | jButtonHelpLibrariesActionPerformed(evt); 119 | } 120 | }); 121 | 122 | javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this); 123 | this.setLayout(layout); 124 | layout.setHorizontalGroup( 125 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 126 | .addGroup(layout.createSequentialGroup() 127 | .addContainerGap() 128 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 129 | .addComponent(projectNameLabel) 130 | .addComponent(projectLocationLabel) 131 | .addComponent(createdFolderLabel) 132 | .addComponent(jLabel1) 133 | .addComponent(jLabel2) 134 | .addComponent(jLabel3) 135 | .addComponent(jLabel4)) 136 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 137 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) 138 | .addComponent(jTextFieldSerialPort, javax.swing.GroupLayout.Alignment.LEADING) 139 | .addComponent(jComboBoxBoard, javax.swing.GroupLayout.Alignment.LEADING, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) 140 | .addComponent(projectNameTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 191, Short.MAX_VALUE) 141 | .addComponent(projectLocationTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 191, Short.MAX_VALUE) 142 | .addComponent(createdFolderTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 191, Short.MAX_VALUE) 143 | .addComponent(jTextFieldArduinoFolder) 144 | .addComponent(jScrollPane1)) 145 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 146 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 147 | .addComponent(browseButton) 148 | .addComponent(jButtonHelpArduinoFolder) 149 | .addComponent(jButtonHelpLibraries)) 150 | .addContainerGap()) 151 | ); 152 | layout.setVerticalGroup( 153 | layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 154 | .addGroup(layout.createSequentialGroup() 155 | .addContainerGap() 156 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 157 | .addComponent(projectNameLabel) 158 | .addComponent(projectNameTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 159 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 160 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 161 | .addComponent(projectLocationLabel) 162 | .addComponent(projectLocationTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 163 | .addComponent(browseButton)) 164 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 165 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 166 | .addComponent(createdFolderLabel) 167 | .addComponent(createdFolderTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 168 | .addGap(18, 18, 18) 169 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 170 | .addComponent(jLabel1) 171 | .addComponent(jComboBoxBoard, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 172 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 173 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 174 | .addComponent(jLabel2) 175 | .addComponent(jTextFieldSerialPort, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) 176 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 177 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 178 | .addComponent(jButtonHelpArduinoFolder, javax.swing.GroupLayout.Alignment.TRAILING) 179 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) 180 | .addComponent(jLabel3) 181 | .addComponent(jTextFieldArduinoFolder, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) 182 | .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) 183 | .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) 184 | .addComponent(jLabel4) 185 | .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) 186 | .addComponent(jButtonHelpLibraries)) 187 | .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) 188 | ); 189 | }// //GEN-END:initComponents 190 | 191 | private void browseButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_browseButtonActionPerformed 192 | String command = evt.getActionCommand(); 193 | if ("BROWSE".equals(command)) { 194 | JFileChooser chooser = new JFileChooser(); 195 | FileUtil.preventFileChooserSymlinkTraversal(chooser, null); 196 | chooser.setDialogTitle("Select Project Location"); 197 | chooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY); 198 | String path = this.projectLocationTextField.getText(); 199 | if (path.length() > 0) { 200 | File f = new File(path); 201 | if (f.exists()) { 202 | chooser.setSelectedFile(f); 203 | } 204 | } 205 | if (JFileChooser.APPROVE_OPTION == chooser.showOpenDialog(this)) { 206 | File projectDir = chooser.getSelectedFile(); 207 | projectLocationTextField.setText(FileUtil.normalizeFile(projectDir).getAbsolutePath()); 208 | } 209 | panel.fireChangeEvent(); 210 | } 211 | 212 | }//GEN-LAST:event_browseButtonActionPerformed 213 | 214 | private void jButtonHelpArduinoFolderActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonHelpArduinoFolderActionPerformed 215 | JOptionPane.showMessageDialog(null, "Original Arduino IDE folder. ATTENTION: The path can not contain spaces."); 216 | }//GEN-LAST:event_jButtonHelpArduinoFolderActionPerformed 217 | 218 | private void jButtonHelpLibrariesActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonHelpLibrariesActionPerformed 219 | JOptionPane.showMessageDialog(null, "Arduino libraries subfolders. Example:\nFirmata;Ethernet/src;Ethernet/src/utility;../hardware/arduino/avr/libraries/SoftwareSerial;"); 220 | }//GEN-LAST:event_jButtonHelpLibrariesActionPerformed 221 | 222 | // Variables declaration - do not modify//GEN-BEGIN:variables 223 | private javax.swing.JButton browseButton; 224 | private javax.swing.JLabel createdFolderLabel; 225 | private javax.swing.JTextField createdFolderTextField; 226 | private javax.swing.JButton jButtonHelpArduinoFolder; 227 | private javax.swing.JButton jButtonHelpLibraries; 228 | private javax.swing.JComboBox jComboBoxBoard; 229 | private javax.swing.JLabel jLabel1; 230 | private javax.swing.JLabel jLabel2; 231 | private javax.swing.JLabel jLabel3; 232 | private javax.swing.JLabel jLabel4; 233 | private javax.swing.JScrollPane jScrollPane1; 234 | private javax.swing.JTextArea jTextAreaLibraries; 235 | private javax.swing.JTextField jTextFieldArduinoFolder; 236 | private javax.swing.JTextField jTextFieldSerialPort; 237 | private javax.swing.JLabel projectLocationLabel; 238 | private javax.swing.JTextField projectLocationTextField; 239 | private javax.swing.JLabel projectNameLabel; 240 | private javax.swing.JTextField projectNameTextField; 241 | // End of variables declaration//GEN-END:variables 242 | 243 | @Override 244 | public void addNotify() { 245 | super.addNotify(); 246 | //same problem as in 31086, initial focus on Cancel button 247 | projectNameTextField.requestFocus(); 248 | } 249 | 250 | boolean valid(WizardDescriptor wizardDescriptor) { 251 | 252 | if (projectNameTextField.getText().length() == 0) { 253 | // TODO if using org.openide.dialogs >= 7.8, can use WizardDescriptor.PROP_ERROR_MESSAGE: 254 | wizardDescriptor.putProperty("WizardPanel_errorMessage", 255 | "Project Name is not a valid folder name."); 256 | return false; // Display name not specified 257 | } 258 | File f = FileUtil.normalizeFile(new File(projectLocationTextField.getText()).getAbsoluteFile()); 259 | if (!f.isDirectory()) { 260 | String message = "Project Folder is not a valid path."; 261 | wizardDescriptor.putProperty("WizardPanel_errorMessage", message); 262 | return false; 263 | } 264 | final File destFolder = FileUtil.normalizeFile(new File(createdFolderTextField.getText()).getAbsoluteFile()); 265 | 266 | File projLoc = destFolder; 267 | while (projLoc != null && !projLoc.exists()) { 268 | projLoc = projLoc.getParentFile(); 269 | } 270 | if (projLoc == null || !projLoc.canWrite()) { 271 | wizardDescriptor.putProperty("WizardPanel_errorMessage", 272 | "Project Folder cannot be created."); 273 | return false; 274 | } 275 | 276 | if (FileUtil.toFileObject(projLoc) == null) { 277 | String message = "Project Folder is not a valid path."; 278 | wizardDescriptor.putProperty("WizardPanel_errorMessage", message); 279 | return false; 280 | } 281 | 282 | File[] kids = destFolder.listFiles(); 283 | if (destFolder.exists() && kids != null && kids.length > 0) { 284 | // Folder exists and is not empty 285 | wizardDescriptor.putProperty("WizardPanel_errorMessage", 286 | "Project Folder already exists and is not empty."); 287 | return false; 288 | } 289 | 290 | if (jTextFieldArduinoFolder.getText().contains(" ")) { 291 | wizardDescriptor.putProperty("WizardPanel_errorMessage", 292 | "Arduino folder path can not contain spaces."); 293 | return false; 294 | } 295 | 296 | wizardDescriptor.putProperty("WizardPanel_errorMessage", ""); 297 | return true; 298 | } 299 | 300 | void store(WizardDescriptor d) { 301 | String name = projectNameTextField.getText().trim(); 302 | String folder = createdFolderTextField.getText().trim(); 303 | 304 | d.putProperty("projdir", new File(folder)); 305 | d.putProperty("name", name); 306 | 307 | setStringProperty(d, "board", jComboBoxBoard.getModel().getSelectedItem().toString()); 308 | setStringProperty(d, "comport", jTextFieldSerialPort.getText()); 309 | setStringProperty(d, "basedir", jTextFieldArduinoFolder.getText()); 310 | setStringProperty(d, "libraries", jTextAreaLibraries.getText()); 311 | } 312 | 313 | private void setStringProperty(WizardDescriptor setting, String key, String value) { 314 | NbPreferences.forModule(ArduinoWizardPanel.class).put(key, value); 315 | setting.putProperty(key, value); 316 | } 317 | 318 | private String getStringProperty(String key, String defaultValue) { 319 | String value = NbPreferences.forModule(ArduinoWizardPanel.class).get(key, defaultValue); 320 | if (value != null && !value.isEmpty()) { 321 | return value; 322 | } 323 | return defaultValue; 324 | } 325 | 326 | void read(WizardDescriptor settings) { 327 | File projectLocation = (File) settings.getProperty("projdir"); 328 | if (projectLocation == null || projectLocation.getParentFile() == null || !projectLocation.getParentFile().isDirectory()) { 329 | projectLocation = ProjectChooser.getProjectsFolder(); 330 | } else { 331 | projectLocation = projectLocation.getParentFile(); 332 | } 333 | this.projectLocationTextField.setText(projectLocation.getAbsolutePath()); 334 | 335 | this.jComboBoxBoard.setSelectedItem(getStringProperty("board", "Arduino Uno")); 336 | this.jTextFieldSerialPort.setText(getStringProperty("comport", "COM3")); 337 | this.jTextFieldArduinoFolder.setText(getStringProperty("basedir", "C:/arduino-1.6.7")); 338 | this.jTextAreaLibraries.setText(getStringProperty("libraries", "Firmata;")); 339 | 340 | String projectName = (String) settings.getProperty("name"); 341 | if (projectName == null) { 342 | projectName = "Arduino"; 343 | } 344 | this.projectNameTextField.setText(projectName); 345 | this.projectNameTextField.selectAll(); 346 | } 347 | 348 | void validate(WizardDescriptor d) throws WizardValidationException { 349 | // nothing to validate 350 | } 351 | 352 | // Implementation of DocumentListener -------------------------------------- 353 | public void changedUpdate(DocumentEvent e) { 354 | updateTexts(e); 355 | if (this.projectNameTextField.getDocument() == e.getDocument()) { 356 | firePropertyChange(PROP_PROJECT_NAME, null, this.projectNameTextField.getText()); 357 | } 358 | } 359 | 360 | public void insertUpdate(DocumentEvent e) { 361 | updateTexts(e); 362 | if (this.projectNameTextField.getDocument() == e.getDocument()) { 363 | firePropertyChange(PROP_PROJECT_NAME, null, this.projectNameTextField.getText()); 364 | } 365 | } 366 | 367 | public void removeUpdate(DocumentEvent e) { 368 | updateTexts(e); 369 | if (this.projectNameTextField.getDocument() == e.getDocument()) { 370 | firePropertyChange(PROP_PROJECT_NAME, null, this.projectNameTextField.getText()); 371 | } 372 | } 373 | 374 | /** 375 | * Handles changes in the Project name and project directory, 376 | */ 377 | private void updateTexts(DocumentEvent e) { 378 | 379 | Document doc = e.getDocument(); 380 | 381 | if (doc == projectNameTextField.getDocument() || doc == projectLocationTextField.getDocument()) { 382 | // Change in the project name 383 | 384 | String projectName = projectNameTextField.getText(); 385 | String projectFolder = projectLocationTextField.getText(); 386 | 387 | //if (projectFolder.trim().length() == 0 || projectFolder.equals(oldName)) { 388 | createdFolderTextField.setText(projectFolder + File.separatorChar + projectName); 389 | //} 390 | 391 | } 392 | panel.fireChangeEvent(); // Notify that the panel changed 393 | } 394 | 395 | } 396 | -------------------------------------------------------------------------------- /src/arduino-plugin/doc/license.txt: -------------------------------------------------------------------------------- 1 | This module is an plugin for NetBeans and is open-source. 2 | 3 | LICENSE: The Common Development and Distribution License 4 | (CDDL), Version 1.0 or the GNU General Public License 5 | (GPL) with "CLASSPATH" EXCEPTION govern your use of: 6 | NetBeans software. NetBeans software also makes use of 7 | additional libraries made available for use and distribution 8 | by other parties, including open-source projects. 9 | 10 | ------------------------------------------------------------ 11 | 12 | LICENSE: 13 | 14 | COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL) Version 1.0 15 | 16 | 1. Definitions. 17 | 18 | 1.1. "Contributor" means each individual or entity that 19 | creates or contributes to the creation of Modifications. 20 | 21 | 1.2. "Contributor Version" means the combination of the 22 | Original Software, prior Modifications used by a 23 | Contributor (if any), and the Modifications made by that 24 | particular Contributor. 25 | 26 | 1.3. "Covered Software" means (a) the Original Software, or 27 | (b) Modifications, or (c) the combination of files 28 | containing Original Software with files containing 29 | Modifications, in each case including portions thereof. 30 | 31 | 1.4. "Executable" means the Covered Software in any form 32 | other than Source Code. 33 | 34 | 1.5. "Initial Developer" means the individual or entity 35 | that first makes Original Software available under this 36 | License. 37 | 38 | 1.6. "Larger Work" means a work which combines Covered 39 | Software or portions thereof with code not governed by the 40 | terms of this License. 41 | 42 | 1.7. "License" means this document. 43 | 44 | 1.8. "Licensable" means having the right to grant, to the 45 | maximum extent possible, whether at the time of the initial 46 | grant or subsequently acquired, any and all of the rights 47 | conveyed herein. 48 | 49 | 1.9. "Modifications" means the Source Code and Executable 50 | form of any of the following: 51 | 52 | A. Any file that results from an addition to, 53 | deletion from or modification of the contents of a 54 | file containing Original Software or previous 55 | Modifications; 56 | 57 | B. Any new file that contains any part of the 58 | Original Software or previous Modification; or 59 | 60 | C. Any new file that is contributed or otherwise made 61 | available under the terms of this License. 62 | 63 | 1.10. "Original Software" means the Source Code and 64 | Executable form of computer software code that is 65 | originally released under this License. 66 | 67 | 1.11. "Patent Claims" means any patent claim(s), now owned 68 | or hereafter acquired, including without limitation, 69 | method, process, and apparatus claims, in any patent 70 | Licensable by grantor. 71 | 72 | 1.12. "Source Code" means (a) the common form of computer 73 | software code in which modifications are made and (b) 74 | associated documentation included in or with such code. 75 | 76 | 1.13. "You" (or "Your") means an individual or a legal 77 | entity exercising rights under, and complying with all of 78 | the terms of, this License. For legal entities, "You" 79 | includes any entity which controls, is controlled by, or is 80 | under common control with You. For purposes of this 81 | definition, "control" means (a) the power, direct or 82 | indirect, to cause the direction or management of such 83 | entity, whether by contract or otherwise, or (b) ownership 84 | of more than fifty percent (50%) of the outstanding shares 85 | or beneficial ownership of such entity. 86 | 87 | 2. License Grants. 88 | 89 | 2.1. The Initial Developer Grant. 90 | 91 | Conditioned upon Your compliance with Section 3.1 below and 92 | subject to third party intellectual property claims, the 93 | Initial Developer hereby grants You a world-wide, 94 | royalty-free, non-exclusive license: 95 | 96 | (a) under intellectual property rights (other than 97 | patent or trademark) Licensable by Initial Developer, 98 | to use, reproduce, modify, display, perform, 99 | sublicense and distribute the Original Software (or 100 | portions thereof), with or without Modifications, 101 | and/or as part of a Larger Work; and 102 | 103 | (b) under Patent Claims infringed by the making, 104 | using or selling of Original Software, to make, have 105 | made, use, practice, sell, and offer for sale, and/or 106 | otherwise dispose of the Original Software (or 107 | portions thereof). 108 | 109 | (c) The licenses granted in Sections 2.1(a) and (b) 110 | are effective on the date Initial Developer first 111 | distributes or otherwise makes the Original Software 112 | available to a third party under the terms of this 113 | License. 114 | 115 | (d) Notwithstanding Section 2.1(b) above, no patent 116 | license is granted: (1) for code that You delete from 117 | the Original Software, or (2) for infringements 118 | caused by: (i) the modification of the Original 119 | Software, or (ii) the combination of the Original 120 | Software with other software or devices. 121 | 122 | 2.2. Contributor Grant. 123 | 124 | Conditioned upon Your compliance with Section 3.1 below and 125 | subject to third party intellectual property claims, each 126 | Contributor hereby grants You a world-wide, royalty-free, 127 | non-exclusive license: 128 | 129 | (a) under intellectual property rights (other than 130 | patent or trademark) Licensable by Contributor to 131 | use, reproduce, modify, display, perform, sublicense 132 | and distribute the Modifications created by such 133 | Contributor (or portions thereof), either on an 134 | unmodified basis, with other Modifications, as 135 | Covered Software and/or as part of a Larger Work; and 136 | 137 | (b) under Patent Claims infringed by the making, 138 | using, or selling of Modifications made by that 139 | Contributor either alone and/or in combination with 140 | its Contributor Version (or portions of such 141 | combination), to make, use, sell, offer for sale, 142 | have made, and/or otherwise dispose of: (1) 143 | Modifications made by that Contributor (or portions 144 | thereof); and (2) the combination of Modifications 145 | made by that Contributor with its Contributor Version 146 | (or portions of such combination). 147 | 148 | (c) The licenses granted in Sections 2.2(a) and 149 | 2.2(b) are effective on the date Contributor first 150 | distributes or otherwise makes the Modifications 151 | available to a third party. 152 | 153 | (d) Notwithstanding Section 2.2(b) above, no patent 154 | license is granted: (1) for any code that Contributor 155 | has deleted from the Contributor Version; (2) for 156 | infringements caused by: (i) third party 157 | modifications of Contributor Version, or (ii) the 158 | combination of Modifications made by that Contributor 159 | with other software (except as part of the 160 | Contributor Version) or other devices; or (3) under 161 | Patent Claims infringed by Covered Software in the 162 | absence of Modifications made by that Contributor. 163 | 164 | 3. Distribution Obligations. 165 | 166 | 3.1. Availability of Source Code. 167 | 168 | Any Covered Software that You distribute or otherwise make 169 | available in Executable form must also be made available in 170 | Source Code form and that Source Code form must be 171 | distributed only under the terms of this License. You must 172 | include a copy of this License with every copy of the 173 | Source Code form of the Covered Software You distribute or 174 | otherwise make available. You must inform recipients of any 175 | such Covered Software in Executable form as to how they can 176 | obtain such Covered Software in Source Code form in a 177 | reasonable manner on or through a medium customarily used 178 | for software exchange. 179 | 180 | 3.2. Modifications. 181 | 182 | The Modifications that You create or to which You 183 | contribute are governed by the terms of this License. You 184 | represent that You believe Your Modifications are Your 185 | original creation(s) and/or You have sufficient rights to 186 | grant the rights conveyed by this License. 187 | 188 | 3.3. Required Notices. 189 | 190 | You must include a notice in each of Your Modifications 191 | that identifies You as the Contributor of the Modification. 192 | You may not remove or alter any copyright, patent or 193 | trademark notices contained within the Covered Software, or 194 | any notices of licensing or any descriptive text giving 195 | attribution to any Contributor or the Initial Developer. 196 | 197 | 3.4. Application of Additional Terms. 198 | 199 | You may not offer or impose any terms on any Covered 200 | Software in Source Code form that alters or restricts the 201 | applicable version of this License or the recipients' 202 | rights hereunder. You may choose to offer, and to charge a 203 | fee for, warranty, support, indemnity or liability 204 | obligations to one or more recipients of Covered Software. 205 | However, you may do so only on Your own behalf, and not on 206 | behalf of the Initial Developer or any Contributor. You 207 | must make it absolutely clear that any such warranty, 208 | support, indemnity or liability obligation is offered by 209 | You alone, and You hereby agree to indemnify the Initial 210 | Developer and every Contributor for any liability incurred 211 | by the Initial Developer or such Contributor as a result of 212 | warranty, support, indemnity or liability terms You offer. 213 | 214 | 3.5. Distribution of Executable Versions. 215 | 216 | You may distribute the Executable form of the Covered 217 | Software under the terms of this License or under the terms 218 | of a license of Your choice, which may contain terms 219 | different from this License, provided that You are in 220 | compliance with the terms of this License and that the 221 | license for the Executable form does not attempt to limit 222 | or alter the recipient's rights in the Source Code form 223 | from the rights set forth in this License. If You 224 | distribute the Covered Software in Executable form under a 225 | different license, You must make it absolutely clear that 226 | any terms which differ from this License are offered by You 227 | alone, not by the Initial Developer or Contributor. You 228 | hereby agree to indemnify the Initial Developer and every 229 | Contributor for any liability incurred by the Initial 230 | Developer or such Contributor as a result of any such terms 231 | You offer. 232 | 233 | 3.6. Larger Works. 234 | 235 | You may create a Larger Work by combining Covered Software 236 | with other code not governed by the terms of this License 237 | and distribute the Larger Work as a single product. In such 238 | a case, You must make sure the requirements of this License 239 | are fulfilled for the Covered Software. 240 | 241 | 4. Versions of the License. 242 | 243 | 4.1. New Versions. 244 | 245 | Sun Microsystems, Inc. is the initial license steward and 246 | may publish revised and/or new versions of this License 247 | from time to time. Each version will be given a 248 | distinguishing version number. Except as provided in 249 | Section 4.3, no one other than the license steward has the 250 | right to modify this License. 251 | 252 | 4.2. Effect of New Versions. 253 | 254 | You may always continue to use, distribute or otherwise 255 | make the Covered Software available under the terms of the 256 | version of the License under which You originally received 257 | the Covered Software. If the Initial Developer includes a 258 | notice in the Original Software prohibiting it from being 259 | distributed or otherwise made available under any 260 | subsequent version of the License, You must distribute and 261 | make the Covered Software available under the terms of the 262 | version of the License under which You originally received 263 | the Covered Software. Otherwise, You may also choose to 264 | use, distribute or otherwise make the Covered Software 265 | available under the terms of any subsequent version of the 266 | License published by the license steward. 267 | 268 | 4.3. Modified Versions. 269 | 270 | When You are an Initial Developer and You want to create a 271 | new license for Your Original Software, You may create and 272 | use a modified version of this License if You: (a) rename 273 | the license and remove any references to the name of the 274 | license steward (except to note that the license differs 275 | from this License); and (b) otherwise make it clear that 276 | the license contains terms which differ from this License. 277 | 278 | 5. DISCLAIMER OF WARRANTY. 279 | 280 | COVERED SOFTWARE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" 281 | BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, 282 | INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED 283 | SOFTWARE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR 284 | PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND 285 | PERFORMANCE OF THE COVERED SOFTWARE IS WITH YOU. SHOULD ANY 286 | COVERED SOFTWARE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE 287 | INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE COST OF 288 | ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER OF 289 | WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF 290 | ANY COVERED SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS 291 | DISCLAIMER. 292 | 293 | 6. TERMINATION. 294 | 295 | 6.1. This License and the rights granted hereunder will 296 | terminate automatically if You fail to comply with terms 297 | herein and fail to cure such breach within 30 days of 298 | becoming aware of the breach. Provisions which, by their 299 | nature, must remain in effect beyond the termination of 300 | this License shall survive. 301 | 302 | 6.2. If You assert a patent infringement claim (excluding 303 | declaratory judgment actions) against Initial Developer or 304 | a Contributor (the Initial Developer or Contributor against 305 | whom You assert such claim is referred to as "Participant") 306 | alleging that the Participant Software (meaning the 307 | Contributor Version where the Participant is a Contributor 308 | or the Original Software where the Participant is the 309 | Initial Developer) directly or indirectly infringes any 310 | patent, then any and all rights granted directly or 311 | indirectly to You by such Participant, the Initial 312 | Developer (if the Initial Developer is not the Participant) 313 | and all Contributors under Sections 2.1 and/or 2.2 of this 314 | License shall, upon 60 days notice from Participant 315 | terminate prospectively and automatically at the expiration 316 | of such 60 day notice period, unless if within such 60 day 317 | period You withdraw Your claim with respect to the 318 | Participant Software against such Participant either 319 | unilaterally or pursuant to a written agreement with 320 | Participant. 321 | 322 | 6.3. If You assert a patent infringement claim against 323 | Participant alleging that the Participant Software directly 324 | or indirectly infringes any patent where such claim is 325 | resolved (such as by license or settlement) prior to the 326 | initiation of patent infringement litigation, then the 327 | reasonable value of the licenses granted by such Participant 328 | under Sections 2.1 or 2.2 shall be taken into account in 329 | determining the amount or value of any payment or license. 330 | 331 | 6.4. In the event of termination under Sections 6.1 or 6.2 332 | above, all end user licenses that have been validly granted 333 | by You or any distributor hereunder prior to termination 334 | (excluding licenses granted to You by any distributor) 335 | shall survive termination. 336 | 337 | 7. LIMITATION OF LIABILITY. 338 | 339 | UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT 340 | (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE 341 | INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF 342 | COVERED SOFTWARE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE 343 | LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR 344 | CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT 345 | LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK 346 | STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER 347 | COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN 348 | INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF 349 | LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL 350 | INJURY RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT 351 | APPLICABLE LAW PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO 352 | NOT ALLOW THE EXCLUSION OR LIMITATION OF INCIDENTAL OR 353 | CONSEQUENTIAL DAMAGES, SO THIS EXCLUSION AND LIMITATION MAY NOT 354 | APPLY TO YOU. 355 | 356 | 8. U.S. GOVERNMENT END USERS. 357 | 358 | The Covered Software is a "commercial item," as that term is 359 | defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial 360 | computer software" (as that term is defined at 48 C.F.R. 361 | § 252.227-7014(a)(1)) and "commercial computer software 362 | documentation" as such terms are used in 48 C.F.R. 12.212 (Sept. 363 | 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 364 | through 227.7202-4 (June 1995), all U.S. Government End Users 365 | acquire Covered Software with only those rights set forth herein. 366 | This U.S. Government Rights clause is in lieu of, and supersedes, 367 | any other FAR, DFAR, or other clause or provision that addresses 368 | Government rights in computer software under this License. 369 | 370 | 9. MISCELLANEOUS. 371 | 372 | This License represents the complete agreement concerning subject 373 | matter hereof. If any provision of this License is held to be 374 | unenforceable, such provision shall be reformed only to the 375 | extent necessary to make it enforceable. This License shall be 376 | governed by the law of the jurisdiction specified in a notice 377 | contained within the Original Software (except to the extent 378 | applicable law, if any, provides otherwise), excluding such 379 | jurisdiction's conflict-of-law provisions. Any litigation 380 | relating to this License shall be subject to the jurisdiction of 381 | the courts located in the jurisdiction and venue specified in a 382 | notice contained within the Original Software, with the losing 383 | party responsible for costs, including, without limitation, court 384 | costs and reasonable attorneys' fees and expenses. The 385 | application of the United Nations Convention on Contracts for the 386 | International Sale of Goods is expressly excluded. Any law or 387 | regulation which provides that the language of a contract shall 388 | be construed against the drafter shall not apply to this License. 389 | You agree that You alone are responsible for compliance with the 390 | United States export administration regulations (and the export 391 | control laws and regulation of any other countries) when You use, 392 | distribute or otherwise make available any Covered Software. 393 | 394 | 10. RESPONSIBILITY FOR CLAIMS. 395 | 396 | As between Initial Developer and the Contributors, each party is 397 | responsible for claims and damages arising, directly or 398 | indirectly, out of its utilization of rights under this License 399 | and You agree to work with Initial Developer and Contributors to 400 | distribute such responsibility on an equitable basis. Nothing 401 | herein is intended or shall be deemed to constitute any admission 402 | of liability. 403 | 404 | NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND 405 | DISTRIBUTION LICENSE (CDDL) 406 | 407 | The code released under the CDDL shall be governed by the laws 408 | of the State of California (excluding conflict-of-law provisions). 409 | Any litigation relating to this License shall be subject to the 410 | jurisdiction of the Federal Courts of the Northern District of 411 | California and the state courts of the State of California, with 412 | venue lying in Santa Clara County, California. 413 | 414 | 415 | The GNU General Public License (GPL) 416 | Version 2, June 1991 417 | 418 | Copyright (C) 1989, 1991 Free Software Foundation, Inc. 419 | 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 420 | Everyone is permitted to copy and distribute verbatim 421 | copies of this license document, but changing it is not 422 | allowed. 423 | 424 | Preamble 425 | 426 | The licenses for most software are designed to take away 427 | your freedom to share and change it. By contrast, the GNU 428 | General Public License is intended to guarantee your freedom 429 | to share and change free software--to make sure the software 430 | is free for all its users. This General Public License 431 | applies to most of the Free Software Foundation's software 432 | and to any other program whose authors commit to using it. 433 | (Some other Free Software Foundation software is covered by 434 | the GNU Library General Public License instead.) You can 435 | apply it to your programs, too. 436 | 437 | When we speak of free software, we are referring to freedom, 438 | not price. Our General Public Licenses are designed to make 439 | sure that you have the freedom to distribute copies of free 440 | software (and charge for this service if you wish), that you 441 | receive source code or can get it if you want it, that you 442 | can change the software or use pieces of it in new free 443 | programs; and that you know you can do these things. 444 | 445 | To protect your rights, we need to make restrictions that 446 | forbid anyone to deny you these rights or to ask you to 447 | surrender the rights. These restrictions translate to 448 | certain responsibilities for you if you distribute copies of 449 | the software, or if you modify it. 450 | 451 | For example, if you distribute copies of such a program, 452 | whether gratis or for a fee, you must give the recipients 453 | all the rights that you have. You must make sure that they, 454 | too, receive or can get the source code. And you must show 455 | them these terms so they know their rights. 456 | 457 | We protect your rights with two steps: (1) copyright the 458 | software, and (2) offer you this license which gives you 459 | legal permission to copy, distribute and/or modify the 460 | software. 461 | 462 | Also, for each author's protection and ours, we want to make 463 | certain that everyone understands that there is no warranty 464 | for this free software. If the software is modified by 465 | someone else and passed on, we want its recipients to know 466 | that what they have is not the original, so that any 467 | problems introduced by others will not reflect on the 468 | original authors' reputations. 469 | 470 | Finally, any free program is threatened constantly by 471 | software patents. We wish to avoid the danger that 472 | redistributors of a free program will individually obtain 473 | patent licenses, in effect making the program proprietary. 474 | To prevent this, we have made it clear that any patent must 475 | be licensed for everyone's free use or not licensed at all. 476 | 477 | The precise terms and conditions for copying, distribution 478 | and modification follow. 479 | 480 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND 481 | MODIFICATION 482 | 483 | 0. This License applies to any program or other work which 484 | contains a notice placed by the copyright holder saying it 485 | may be distributed under the terms of this General Public 486 | License. The "Program", below, refers to any such program or 487 | work, and a "work based on the Program" means either the 488 | Program or any derivative work under copyright law: that is 489 | to say, a work containing the Program or a portion of it, 490 | either verbatim or with modifications and/or translated into 491 | another language. (Hereinafter, translation is included 492 | without limitation in the term "modification".) Each 493 | licensee is addressed as "you". 494 | 495 | Activities other than copying, distribution and modification 496 | are not covered by this License; they are outside its scope. 497 | The act of running the Program is not restricted, and the 498 | output from the Program is covered only if its contents 499 | constitute a work based on the Program (independent of 500 | having been made by running the Program). Whether that is 501 | true depends on what the Program does. 502 | 503 | 1. You may copy and distribute verbatim copies of the 504 | Program's source code as you receive it, in any medium, 505 | provided that you conspicuously and appropriately publish on 506 | each copy an appropriate copyright notice and disclaimer of 507 | warranty; keep intact all the notices that refer to this 508 | License and to the absence of any warranty; and give any 509 | other recipients of the Program a copy of this License along 510 | with the Program. 511 | 512 | You may charge a fee for the physical act of transferring a 513 | copy, and you may at your option offer warranty protection 514 | in exchange for a fee. 515 | 516 | 2. You may modify your copy or copies of the Program or any 517 | portion of it, thus forming a work based on the Program, and 518 | copy and distribute such modifications or work under the 519 | terms of Section 1 above, provided that you also meet all of 520 | these conditions: 521 | 522 | a) You must cause the modified files to carry prominent 523 | notices stating that you changed the files and the date 524 | of any change. 525 | 526 | b) You must cause any work that you distribute or 527 | publish, that in whole or in part contains or is derived 528 | from the Program or any part thereof, to be licensed as 529 | a whole at no charge to all third parties under the 530 | terms of this License. 531 | 532 | c) If the modified program normally reads commands 533 | interactively when run, you must cause it, when started 534 | running for such interactive use in the most ordinary 535 | way, to print or display an announcement including an 536 | appropriate copyright notice and a notice that there is 537 | no warranty (or else, saying that you provide a 538 | warranty) and that users may redistribute the program 539 | under these conditions, and telling the user how to view 540 | a copy of this License. (Exception: if the Program 541 | itself is interactive but does not normally print such 542 | an announcement, your work based on the Program is not 543 | required to print an announcement.) 544 | 545 | These requirements apply to the modified work as a whole. If 546 | identifiable sections of that work are not derived from the 547 | Program, and can be reasonably considered independent and 548 | separate works in themselves, then this License, and its 549 | terms, do not apply to those sections when you distribute 550 | them as separate works. But when you distribute the same 551 | sections as part of a whole which is a work based on the 552 | Program, the distribution of the whole must be on the terms 553 | of this License, whose permissions for other licensees 554 | extend to the entire whole, and thus to each and every part 555 | regardless of who wrote it. 556 | 557 | Thus, it is not the intent of this section to claim rights 558 | or contest your rights to work written entirely by you; 559 | rather, the intent is to exercise the right to control the 560 | distribution of derivative or collective works based on the 561 | Program. 562 | 563 | In addition, mere aggregation of another work not based on 564 | the Program with the Program (or with a work based on the 565 | Program) on a volume of a storage or distribution medium 566 | does not bring the other work under the scope of this 567 | License. 568 | 569 | 3. You may copy and distribute the Program (or a work based 570 | on it, under Section 2) in object code or executable form 571 | under the terms of Sections 1 and 2 above provided that you 572 | also do one of the following: 573 | 574 | a) Accompany it with the complete corresponding 575 | machine-readable source code, which must be distributed 576 | under the terms of Sections 1 and 2 above on a medium 577 | customarily used for software interchange; or, 578 | 579 | b) Accompany it with a written offer, valid for at least 580 | three years, to give any third party, for a charge no 581 | more than your cost of physically performing source 582 | distribution, a complete machine-readable copy of the 583 | corresponding source code, to be distributed under the 584 | terms of Sections 1 and 2 above on a medium customarily 585 | used for software interchange; or, 586 | 587 | c) Accompany it with the information you received as to 588 | the offer to distribute corresponding source code. (This 589 | alternative is allowed only for noncommercial 590 | distribution and only if you received the program in 591 | object code or executable form with such an offer, in 592 | accord with Subsection b above.) 593 | 594 | The source code for a work means the preferred form of the 595 | work for making modifications to it. For an executable work, 596 | complete source code means all the source code for all 597 | modules it contains, plus any associated interface 598 | definition files, plus the scripts used to control 599 | compilation and installation of the executable. However, as 600 | a special exception, the source code distributed need not 601 | include anything that is normally distributed (in either 602 | source or binary form) with the major components (compiler, 603 | kernel, and so on) of the operating system on which the 604 | executable runs, unless that component itself accompanies 605 | the executable. 606 | 607 | If distribution of executable or object code is made by 608 | offering access to copy from a designated place, then 609 | offering equivalent access to copy the source code from the 610 | same place counts as distribution of the source code, even 611 | though third parties are not compelled to copy the source 612 | along with the object code. 613 | 614 | 4. You may not copy, modify, sublicense, or distribute the 615 | Program except as expressly provided under this License. Any 616 | attempt otherwise to copy, modify, sublicense or distribute 617 | the Program is void, and will automatically terminate your 618 | rights under this License. However, parties who have 619 | received copies, or rights, from you under this License will 620 | not have their licenses terminated so long as such parties 621 | remain in full compliance. 622 | 623 | 5. You are not required to accept this License, since you 624 | have not signed it. However, nothing else grants you 625 | permission to modify or distribute the Program or its 626 | derivative works. These actions are prohibited by law if you 627 | do not accept this License. Therefore, by modifying or 628 | distributing the Program (or any work based on the Program), 629 | you indicate your acceptance of this License to do so, and 630 | all its terms and conditions for copying, distributing or 631 | modifying the Program or works based on it. 632 | 633 | 6. Each time you redistribute the Program (or any work based 634 | on the Program), the recipient automatically receives a 635 | license from the original licensor to copy, distribute or 636 | modify the Program subject to these terms and conditions. 637 | You may not impose any further restrictions on the 638 | recipients' exercise of the rights granted herein. You are 639 | not responsible for enforcing compliance by third parties to 640 | this License. 641 | 642 | 7. If, as a consequence of a court judgment or allegation of 643 | patent infringement or for any other reason (not limited to 644 | patent issues), conditions are imposed on you (whether by 645 | court order, agreement or otherwise) that contradict the 646 | conditions of this License, they do not excuse you from the 647 | conditions of this License. If you cannot distribute so as 648 | to satisfy simultaneously your obligations under this 649 | License and any other pertinent obligations, then as a 650 | consequence you may not distribute the Program at all. For 651 | example, if a patent license would not permit royalty-free 652 | redistribution of the Program by all those who receive 653 | copies directly or indirectly through you, then the only way 654 | you could satisfy both it and this License would be to 655 | refrain entirely from distribution of the Program. 656 | 657 | If any portion of this section is held invalid or 658 | unenforceable under any particular circumstance, the balance 659 | of the section is intended to apply and the section as a 660 | whole is intended to apply in other circumstances. 661 | 662 | It is not the purpose of this section to induce you to 663 | infringe any patents or other property right claims or to 664 | contest validity of any such claims; this section has the 665 | sole purpose of protecting the integrity of the free 666 | software distribution system, which is implemented by public 667 | license practices. Many people have made generous 668 | contributions to the wide range of software distributed 669 | through that system in reliance on consistent application of 670 | that system; it is up to the author/donor to decide if he or 671 | she is willing to distribute software through any other 672 | system and a licensee cannot impose that choice. 673 | 674 | This section is intended to make thoroughly clear what is 675 | believed to be a consequence of the rest of this License. 676 | 677 | 8. If the distribution and/or use of the Program is 678 | restricted in certain countries either by patents or by 679 | copyrighted interfaces, the original copyright holder who 680 | places the Program under this License may add an explicit 681 | geographical distribution limitation excluding those 682 | countries, so that distribution is permitted only in or 683 | among countries not thus excluded. In such case, this 684 | License incorporates the limitation as if written in the 685 | body of this License. 686 | 687 | 9. The Free Software Foundation may publish revised and/or 688 | new versions of the General Public License from time to 689 | time. Such new versions will be similar in spirit to the 690 | present version, but may differ in detail to address new 691 | problems or concerns. 692 | 693 | Each version is given a distinguishing version number. If 694 | the Program specifies a version number of this License which 695 | applies to it and "any later version", you have the option 696 | of following the terms and conditions either of that version 697 | or of any later version published by the Free Software 698 | Foundation. If the Program does not specify a version number 699 | of this License, you may choose any version ever published 700 | by the Free Software Foundation. 701 | 702 | 10. If you wish to incorporate parts of the Program into 703 | other free programs whose distribution conditions are 704 | different, write to the author to ask for permission. For 705 | software which is copyrighted by the Free Software 706 | Foundation, write to the Free Software Foundation; we 707 | sometimes make exceptions for this. Our decision will be 708 | guided by the two goals of preserving the free status of all 709 | derivatives of our free software and of promoting the 710 | sharing and reuse of software generally. 711 | 712 | NO WARRANTY 713 | 714 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS 715 | NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY 716 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE 717 | COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM 718 | "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR 719 | IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 720 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 721 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE 722 | OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE 723 | DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, 724 | REPAIR OR CORRECTION. 725 | 726 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED 727 | TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY 728 | WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED 729 | ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, 730 | SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF 731 | THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT 732 | LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR 733 | LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE 734 | PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH 735 | HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF 736 | SUCH DAMAGES. 737 | 738 | END OF TERMS AND CONDITIONS 739 | 740 | How to Apply These Terms to Your New Programs 741 | 742 | If you develop a new program, and you want it to be of the 743 | greatest possible use to the public, the best way to achieve 744 | this is to make it free software which everyone can 745 | redistribute and change under these terms. 746 | 747 | To do so, attach the following notices to the program. It is 748 | safest to attach them to the start of each source file to 749 | most effectively convey the exclusion of warranty; and each 750 | file should have at least the "copyright" line and a pointer 751 | to where the full notice is found. 752 | 753 | One line to give the program's name and a brief idea of 754 | what it does. Copyright (C) 755 | 756 | This program is free software; you can redistribute it 757 | and/or modify it under the terms of the GNU General 758 | Public License as published by the Free Software 759 | Foundation; either version 2 of the License, or (at your 760 | option) any later version. 761 | 762 | This program is distributed in the hope that it will be 763 | useful, but WITHOUT ANY WARRANTY; without even the 764 | implied warranty of MERCHANTABILITY or FITNESS FOR A 765 | PARTICULAR PURPOSE. See the GNU General Public License 766 | for more details. 767 | 768 | You should have received a copy of the GNU General 769 | Public License along with this program; if not, write to 770 | the Free Software Foundation, Inc., 59 Temple Place, 771 | Suite 330, Boston, MA 02111-1307 USA 772 | 773 | Also add information on how to contact you by electronic and 774 | paper mail. 775 | 776 | If the program is interactive, make it output a short notice 777 | like this when it starts in an interactive mode: 778 | 779 | Gnomovision version 69, Copyright (C) year name of 780 | author Gnomovision comes with ABSOLUTELY NO WARRANTY; 781 | for details type `show w'. This is free software, and 782 | you are welcome to redistribute it under certain 783 | conditions; type `show c' for details. 784 | 785 | The hypothetical commands `show w' and `show c' should show 786 | the appropriate parts of the General Public License. Of 787 | course, the commands you use may be called something other 788 | than `show w' and `show c'; they could even be mouse-clicks 789 | or menu items--whatever suits your program. 790 | 791 | You should also get your employer (if you work as a 792 | programmer) or your school, if any, to sign a "copyright 793 | disclaimer" for the program, if necessary. Here is a sample; 794 | alter the names: 795 | 796 | Yoyodyne, Inc., hereby disclaims all copyright interest in 797 | the program `Gnomovision' (which makes passes at 798 | compilers) written by James Hacker. 799 | 800 | signature of Ty Coon, 1 April 1989 801 | Ty Coon, President of Vice 802 | 803 | This General Public License does not permit incorporating 804 | your program into proprietary programs. If your program is a 805 | subroutine library, you may consider it more useful to 806 | permit linking proprietary applications with the library. If 807 | this is what you want to do, use the GNU Library General 808 | Public License instead of this License. 809 | 810 | 811 | "CLASSPATH" EXCEPTION TO THE GPL VERSION 2 812 | 813 | 814 | Certain source files distributed by Sun Microsystems, Inc. 815 | are subject to the following clarification and special 816 | exception to the GPL Version 2, but only where Sun has expressly 817 | included in the particular source file's header the words 818 | "Sun designates this particular file as subject to the 819 | "Classpath" exception as provided by Sun in the License file 820 | that accompanied this code." 821 | 822 | Linking this library statically or dynamically with other 823 | modules is making a combined work based on this library. 824 | Thus, the terms and conditions of the GNU General Public 825 | License Version 2 cover the whole combination. 826 | 827 | As a special exception, the copyright holders of this 828 | library give you permission to link this library with 829 | independent modules to produce an executable, regardless of 830 | the license terms of these independent modules, and to copy 831 | and distribute the resulting executable under terms of your 832 | choice, provided that you also meet, for each linked 833 | independent module, the terms and conditions of the license 834 | of that module. An independent module is a module which is 835 | not derived from or based on this library. If you modify 836 | this library, you may extend this exception to your version 837 | of the library, but you are not obligated to do so. If you 838 | do not wish to do so, delete this exception statement from 839 | your version. --------------------------------------------------------------------------------