Build .hxproj from command line?

343 views
Skip to first unread message

Alejandro Ramallo

unread,
Feb 1, 2016, 4:10:48 PM2/1/16
to Haxe
I'm working on a simple little MVC framework for personal use, and want to be able to manage multiple projects within FlashDevelop, one for the server-sided code and another for client-side javascript stuff.

However, FlashDevelop doesn't appear to be able to build multiple projects at the same time. This is a problem, especially since FD doesn't even support multiple instances by default, because it means that I'd have to close and reopen FD any time I want to build a subproject.

This is my current project layout:

> /
-->MyMVCProject.hxproj
-->src/
---->src/controllers
---->src/models
---->sc/framework_stuff
-->client/
---->client/client.hxproj
---->client/views
------>client/views/scripts

So the client project (including source files and .hxproj, and views) is a subdirectory of the "main" project. When the client.hxproj is built, it will output all the built javascript files to the relevant client/views/scripts folder, and then a post-build script will copy it out to the correct server location for testing. This is fine when client.hxproj is the one that is currently open in flashdevelop, but since it is in a subdirectory of the main project, it means that I cannot work on the "main" server-sided code.

My ideal workflow for this framework would be as follows:
  1. Run a project generation script which will generate the file/folder structure above so I can start working
  2. Work on both the server-sided .hx files AND client-sided .hx files in flashdevelop at the same time (which is currently possible since the client code is in a subdirectory, so it all shows up in FD's "Project" panel)
  3. When you want to test a change, run the regular test/build command in FD by pressing F5 or clicking the blue arrow:
    1. Pre-build script will compile the client.hxproj in the subdirectory (this is what I need help with!)
    2. FD will then build the regular server-sided (active) .hxproj as usual
    3. Post-build script will automatically copy all the files to the server for testing and open your browser
  4. GOTO step 2, rinse, and repeat

This would be easy if the haxe compiler could understand .hxproj files, but that doesn't appear to be the case. So is there some way to invoke FlashDevelop's build system from the command line to build an .hxproj file? Or is there a better way to do what I'm trying to do (without using a different IDE)?

Gama11

unread,
Feb 1, 2016, 4:46:28 PM2/1/16
to Haxe
 This is a problem, especially since FD doesn't even support multiple instances by default, because it means that I'd have to close and reopen FD any time I want to build a subproject.

Actually, FlashDevelop has a multiple instance setting in the installer.

Alejandro Ramallo

unread,
Feb 1, 2016, 4:50:05 PM2/1/16
to Haxe
Still, it'd be nice to not have to manually run two (or more) builds on two separate windows every time I want to test my program.

Philippe Elsass

unread,
Feb 1, 2016, 5:00:37 PM2/1/16
to Haxe
FD builds are run using FDBuild, a command line tool included in FD.
If you look at the Output panel you'll see the actual command line - just omit the "IPC" option and you can automate that.

--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/d/optout.



--
Philippe

Alejandro Ramallo

unread,
Feb 1, 2016, 5:09:33 PM2/1/16
to Haxe
Awesome! That was easier than I expected, thanks!
Reply all
Reply to author
Forward
0 new messages