Skip to content

Instantly share code, notes, and snippets.

@jcward
Last active August 29, 2015 14:15
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jcward/7608910e6f227cd477c5 to your computer and use it in GitHub Desktop.
Save jcward/7608910e6f227cd477c5 to your computer and use it in GitHub Desktop.
Setup testing of hxcpp / hxScout
Instructions for testing hxScout with hxcpp.
FYI, I've tested this using Haxe 3.1.3, OpenFL 2.1.7 (the legacy version, aka _v2, aka not next) in Windows 7. Your mileage may vary. All this is under heavy development, so it may cease working at some point.
1) Git checkout (or download) jcward's hxcpp (integration branch), hxtelemetry, and hxScout:
https://github.com/jcward/hxScout/archive/master.zip
https://github.com/jcward/hxtelemetry/archive/master.zip
https://github.com/jcward/hxcpp/archive/integration.zip
unzip them to your dev folder (e.g. C:\dev or wherever you work).
2) Set haxelib to use these versions:
cd C:\dev\hxtelemetry-master
haxelib dev hxtelemetry .
cd C:\dev\hxcpp-integration
haxelib dev hxcpp .
3) Rebuild my hxcpp for your platform:
cd C:\dev\hxcpp-integration\project
neko build.n clean
neko build.n
4) Rather than checkout and rebuild/setup my entire openfl branch, just make a backup of your Stage.hx in your OpenFL lib folder and use mine instead:
cd \HaxeToolkit\haxe\lib\openfl\2,1,7\openfl\_v2\display
copy Stage.hx Stage.hx.orig
Download my Stage.hx and place it in that folder: https://github.com/jcward/openfl/raw/hxt_prototyping/openfl/_v2/display/Stage.hx
You can review the diffs for this file here: https://github.com/jcward/openfl/compare/hxt_prototyping
It's a modification to the main __render() loop to enable timing the render process and ENTER_FRAME event handlers. It's a very early prototype, more work will be done to measure more events handlers.
5) Build and run hxScout
cd \dev\hxScout-master\src\client
lime test windows
5) Build and run the hxtelemetry test DisplayingABitmap
cd \dev\hxtelemetry-master\test\DisplayingABitmap
lime test windows
Notes:
- All this is under heavy development and may change at any time. Thanks for testing, and LMK if you have questions.
- hxcpp is the only target currently supported, but I hope we can add more in the future.
- OpenFL is the first framework I've instrumented for profiling, but any haxe hxcpp app can be profiled, such as Lime, NME, Snow and even command-line applications (see the test/wastealloc testcase).
- hxScout still says things like "actionscript" and "SWF files", per it's Adobe Scout roots. I know, it's on the todo list.
- I don't plan on migrating to newer versions of Haxe/OpenFL/etc until I have it in a fairly solid place.
- I've seen both hxScout and the testcase crash randomly, but lmk if you see this (and if any action reproduces it -- even better if you can run it with a debugger and get a stack trace!)
- Once things are very stable, I'll try to work with the project maintainers to get these updates pushed back to the official repos so you don't have to check out my version of hxcpp / overwite openfl Stage.hx.
- FYI this change to Stage.hx introduces a dependency on hxtelemetry that isn't properly tracked. You can then only run OpenFL projects that depend on hxtelemetry. See the project.xml file of test/DisplayingABitmap.
- To revert step 3 and get back to your haxelib version of hxcpp, run: haxelib dev hxcpp
- To revert step 4, restore your backup of Stage.hx:
cd \HaxeToolkit\haxe\lib\openfl\2,1,7\openfl\_v2\display
copy Stage.hx.orig Stage.hx
@mpoint4u
Copy link

Hello Jeff, thanks for the instructions ... I will give it a try this evening ... I'll report, how it went, and where eventual hickups have occurred ... I'll try on Windows first & then have a try on MacOSX ...

@mpoint4u
Copy link

first roadblock hit, just not able to install & setup OpenFL 2.1.7 on Windows7 ... because there is an openfl.exe file in the templates/bin - subfolder missing ... does that mean, I have to build it for myself? ... sometimes i hate this stuff ... !!

@mpoint4u
Copy link

could you copy over your version of openfl.exe (from version 2.1.7 somewhere), otherwise I have to use my 'good old version' 2.0.1 (which works nice most of the times), or go for some newer stuff (like 2.2.7 - as this is the first version, where Joshua added his compiled openfl.exe again to the repo... )
thanks, sorry for bothering ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment