Skip to content

How to use NetBeans with Greta

Brice Donval edited this page Jan 13, 2020 · 2 revisions

This page is dedicated to developers to install, compile and make development on Greta Project. NetBeans use many templates to help developers to code easily. But its default managment is to simplistic for the development of Greta. That's why we must take care on some stuff when we create a new NetBeans project in Greta.

Table of Contents

How to install Greta and compile it with NetBeans

Installation:

  1. Install TortoiseSVN and checkout : https://hotline.isir.upmc.fr/svn/Greta/trunk/
  2. Install Java 64 bits http://java.com/fr/download/manual.jsp
  3. Install NetBeans https://netbeans.org/downloads/ version all
Configuration files modification
  1. Open <GRETA_DIR>/bin/Player/Lib/External/Win64/Plugins_DX9.cfg and <GRETA_DIR>/bin/Player/Lib/External/Win64/Plugins_OpenGL.cfg
  2. Change "PluginFolder" value to absolute path
NetBeans configuration :
  1. Open NetBeans and right click on project space (left of NetBeans window)
  2. Select Project Group/New Group and choose the name that you want to give to your project
  3. Select Folder of Projects and browse in the directory (previously get from SVN) /trunk/VIB
  1. Compile the project All_Javadoc by clicking right on it
  2. Do the same for compiling Modular

Set your correct @author tag

Make this step only once.

  1. In the NetBeans menu, choose "Tools" -> "Templates" to open the template manager
  2. Clic on "Settings" button. It opens the User.properties file.
  3. Add the line with you name using the correct case
    user=Firstname Lastname

Template to include the license in the code

Make this step only once.

  1. In the NetBeans menu, choose "Tools" -> "Templates" to open the template manager
  2. select the "Licenses" folder and clic on "Add..." button
  3. choose the file <GRETA_DIR>/license-greta.txt
  4. select the "Licenses" folder and clic on "Add..." button
  5. choose the file <GRETA_DIR>/license-greta-auxiliary.txt
If you don't do it, you will have some (benign) error when creating a new class.

Create a library

  1. create a new project with NetBeans, and choose "Java Class Library" then choose a good name and path
  2. edit the file <myProject>/build.xml :
    insert (and check relative path !) :
    <import file="../../nbbuild.xml"/>
    /!\ it must be added before the line :
    <import file="nbproject/build-impl.xml"/>
  3. edit the file <myProject>/nbproject/project.properties :
    add lines :
compile.on.save=true
project.license=greta
change the values (and check relative path!):
application.vendor=Catherine Pelachaud
dist.dir=../../bin/Common/Lib/Internal
javac.source=1.8
javac.target=1.8
first: because it's Catherine's. second : set the final destination of the jar
if your version of NetBeans is lower than 7.x, you must add the line : mkdist.disabled=true
4. save the two files
5. shut down NetBeans and restart it

Create an executable

(it's almost the same)

  1. create a new project with NetBeans, and choose "Java Application" then choose a good name and path
  2. edit the file <myProject>/build.xml:
    insert (and check relative path !) :
    <import file="../../nbbuild.xml"/>
    /!\ it must be added before the line :
    <import file="nbproject/build-impl.xml"/>
  3. edit the file <myProject>/nbproject/project.properties:
    add lines :
compile.on.save=true
work.dir=../../bin
project.license=greta
change the values (and check relative path !):
application.vendor=Catherine Pelachaud
dist.dir=../../bin
javac.source=1.8
javac.target=1.8
first: because it's Catherine's. second : set the final destination of the jar
4. save the two files
5. shut down NetBeans and restart it

Link an existing library to a project

  1. right clic on the project name in NetBeans and select "Properties"
  2. on the pop up window, choose "Libraries"
  3. choose the "Compile" tab if it is not already the case
  4. to add an existing Greta projet :
    • clic on "Add Project..." button
    • choose the good one
    • check if the corresponding jar is in a good folder (<GRETA_DIR>/bin/Common/Lib/Internal for libraries, <GRETA_DIR>/bin for executables) else it's probably necessary to change the target project (here or here)
  5. to add an external jar :
    • make sure that this one is in <GRETA_DIR>/bin/Common/Lib/External/ folder
    • clic on "Add JAR/Folder" button
    • choose the good one (in the good folder)
    • before validating you choice, select "Relative Path"

Getting started with Greta

Greta Architecture

Quick start

Advanced

Functionalities

Core functionality

Auxiliary functionalities

Preview functionality

Nothing to show here

Previous functionality (possibly it still works, but not supported anymore)

Clone this wiki locally