Alice Community  

Go Back   Alice Community > Alice 3 > How Do I?

Reply
 
Thread Tools Display Modes
3.0 & NetBeans Plugin
Old
lanceA
Guest
 
Status:
Posts: n/a
Default 3.0 & NetBeans Plugin - 06-29-2009, 02:29 PM

Gabe,
Great strides appear to be occuring by those people working with the NetBeans plugin. One thing pointed out by DrJim a while ago is that even though you can create an Alice 3.0 beta project in NetBeans, when it is run it still requires that Alice 3.0 be installed on the end-users machine.

I'm aware Alice 3.0 has priority at the moment and not the NetBeans Plugin but if possible, in a future release of the plugin I would like to see this requirement removed. Today I removed Alice 3.0 from a computer, created an icon on my Desktop (which ran a batch file) and tried to run a Netbeans project. I received the error message: "Cannot find Alice Move and Turn Gallery in it's expected location: c:Program Files/Alice/3.beta0000/galery". (Prior to removing Alice this worked properly every time the icon was clicked.)

When NetBeans creates an Alice 3 project I note that it creates a lib folder which has several jar files including moveandturn.jar. I looked inside this file and note that there are .class files for virtually every Alice object, i.e., Carousel, mole, LennonBeetle,cow etc. I'm assuming these class files contain the code governing all Alice object's move and turn capabilities.

The error message concerning the "...Alice/3.beta.0000/gallery" appears to be asking for the actual objects themselves which includes visual representation in order to display the object on the screen (.png file).

I'm probably off-base on a lot of the above but it would be nice at some point down the line if the plugin could also place in the lib folder that it creates, the appropriate gallery file for the objects in the program. Perhaps by somehow reading the imported file such as:
import org.alice.apis.moveandturn.gallery.animals.Cow;

Just something to consider down the line. It would be nice if a Alice user could zip-up an Alice 3.0 project, email it to her friends and not require that the friend download Alice. Just a thought for the development team when they have a spare moment in 2010-2011.

Last edited by lanceA; 06-29-2009 at 02:37 PM. Reason: Normal typos
   
Reply With Quote
Old
DrJim
Guest
 
Status:
Posts: n/a
Default 06-29-2009, 03:35 PM

Quote:
Originally Posted by lanceA View Post
Today I removed Alice 3.0 from a computer, created an icon on my Desktop (which ran a batch file) and tried to run a Netbeans project. I received the error message: "Cannot find Alice Move and Turn Gallery in it's expected location: c:Program Files/Alice/3.beta0000/galery".
This is exactly the same message I received when I tried to run a NetBeans .jar file on a machine without Alice 3 installed. (The identical procedure did work on another machine with Alice 3 and the JRE - but not the development kit - installed.)

I'm working on some ideas along the line that Lance sugests and if I have any success (it's not really one of my top priorities) I'll post the results. The CMU team will have to give a reading on the legal issues before something could be released as a package - plus it would also be nice if there was a user friendly installer for the package. (It would even be nicer if lines of working and bug free code could grow at a faster rate than the lines in a "wish list" - but I've never seen that happen.)
   
Reply With Quote
Old
arevira
Guest
 
Status:
Posts: n/a
Default 07-01-2009, 11:41 PM

The solution is to copy the gallery tree (C:\Program Files\Alice3Beta\gallery) under the dist folder of the project you built with NetBeans

Rename the gallery folder in C:\Program Files\Alice3Beta\gallery to, say, C:\Program Files\Alice3Beta\ignore_gallery

Run your project (AliceProjectWizardProject.jar)

As LanceA and DrJim pointed out, your Alice project will complain about the fact that it cannot find the gallery (because you renamed it in the previous step) Click on the button to set the new location of the gallery (the button on the left in the dialog window). Select the gallery folder inside the dist folder of your project.

You only need to do this once. Next time you run your project it will use the gallery under your dist folder.

IF you also copy all the DLLs into your dist folder AND adjust the java.library.path variable to point to the copied DLLs under your dist folder (I would suggest to create a folder called dll under dist to keep things tidy) THEN you should be able to remove Alice3.0 from the computer and run your project without problems.

There's got to be a way of doing this by editing a config file or setting a special variable, but I have had no time to investigate this.

However, as DrJim pointed out elsewhere, the gallery is about 2/3 of the Alice3.0 installation, so it might just be easier to install Alice3.0 IDE in the machine you are deploying your project...Uff

If you plan NOT to remove Alice3.0 from the machine, in order to create more project, I would suggest to revert the name change of the original gallery folder (from C:\Program Files\Alice3Beta\ignore_gallery to C:\Program Files\Alice3Beta\gallery) so the IDE can find its own gallery.

Last edited by arevira; 07-01-2009 at 11:47 PM. Reason: typos
   
Reply With Quote
Old
DrJim
Guest
 
Status:
Posts: n/a
Default 07-03-2009, 05:24 AM

Quote:
Originally Posted by arevira View Post
However, as DrJim pointed out elsewhere, the gallery is about 2/3 of the Alice3.0 installation, so it might just be easier to install Alice3.0 IDE in the machine you are deploying your project...Uff
If you just wanted to support a single project - such as a really neat game - you could obviously deleate a lot more of the gallery. This might be helpful if you wanted to share your work with friends who had no interest in learning Alice.

I'm not too sure about the legal aspects of doing this directly - at a minimum you would need to include the three EULA's with your distributed file. One nice thing about downloading and installing Alice 3 and then deleting what you don't need is that, by doing so, you will already have agreed to all the proprietary restrictions, whatever they are. (I think I signed away the rights to my oldest child - but if anyone can enforce that, good luck. )
   
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump



Copyright ©2024, Carnegie Mellon University
Alice 2.x © 1999-2012, Alice 3.x © 2008-2012, Carnegie Mellon University. All rights reserved.