haXe & Eclipse build settings
Monday 16 January 2006 – Filed under: Software – 2 Comments
I’ve recently started exploring Nicolas Cannasse’s latest innovation: haXe. You can work with this new programming language in Eclipse using the HXDT plugin. I’ve been working on some basic build settings to enable easy compilation of haXe projects from within Eclipse.
If you’re new to haXe, I recommend you check out the official website first.
Next, what software do you need to get to know haXe using Eclipse?
After installing these apps (I’m not going into the details in this article, it’s all pretty straightforward), the first thing that came to my attention was the fact that the HXDT plugin doesn’t (yet) support haXe compiler integration. That means that you cannot click ‘Run’ or ‘Debug’ and have HXDT instruct haXe to compile your project and run it for you.
You will need to make a seperate External Tools > Program profile in Eclipse for each haXe project you will be creating with HXDT to get this to work. I will share my settings here, perhaps they come in handy when you start playing around with haXe. Click the thumbnail on the left to see the settings I’m using.
I have included the last line (the ‘Arguments line’) for easy copy-paste below. Note that the -main Hello part refers to my main class file, you have to change that setting to reflect your project.
-cp "${project_loc}" -swf ${project_loc}\bin\hello.swf -fplayer 8 -main Hello
There’s one thing I haven’t done yet: automatically launch the .swf file that is generated with this task. Perhaps it would be possible to do that using ANT, but I haven’t had time to figue that part out yet.
By the way, the guys working on HXDT recently posted a nice list of improvements for HXDT version 0.2.0, including compiler integration, making this solution obsolete. Until then, this solution may streamline your workflow with haXe a bit.
« previously: Measure Map, first impression next: Screenweaver goes Eclipse! »
2 Responses
Leave a Reply
Recent Articles
- Running Google Chrome OS under Parallels
- AS3 Tweetr library suffers from the Twitpocalypse bug
- Digital TV on Mac Mini, part 2
- Digital TV on Mac Mini, part 1
- New bike
- FLV Player 2.0.25 released
- No custom headers for Flash file upload. Why?
- Building AIR with FDT
Advertisement
Categories
- Art & Design (4)
- Flash (38)
- FLV Player (9)
- Software (17)
- User Experience Design (3)
- Various (10)
- Work (6)
Thursday 19 July 2007 at 08:47
Actually you really don’t need to crete one external tool per project.
You can pass variables to a .sh script like ${project-name} when executing it from the eclipse external tools menu.
So you just need one script which takes project name and path as paramaters, what eclipse can do.
Thursday 19 July 2007 at 09:00
to be more precise : create an external with /bin/sh as location, ${project_loc} as a working directory, and use the -c option of sh, so in the arguments you can ut something like : -c “/Users/me/Sites/Eclipse/.compilation-bash-scripts/buildAndRun.sh ${project_loc} ${project_name}”
When doing something like this, the buildAndRun.sh file you created will receive ${project_loc} and ${project_name} as two variables that will be accessible as $1 and $2 in the .sh script…
Dunno if i’m really clear, sorry for my english i’m french :p… but it’s actually a really good way to avoid creating one external tool per project.