Prebuild command request?

Home / Forums / Marmalade Archive / General Development Questions / Prebuild command request?
5 replies [Last post]
by: JohnOKane
Status: Offline
Joined: 2009-10-31
Points: 1160

Hello. I've a few reasons to want to do this (run a python script to generate .cpp files from .h files in a testing framework I use, cxxtest; build a texture atlas). A prebuild command would make this pretty handy. I know there's already an undocumented post-build command. Or maybe there's a hack-around way of doing it?

by: drupaluser
Status: Offline
Joined: 2011-12-01
Points: 124350
Hi JohnOKane, Try using

Hi JohnOKane,

Try using e.g.

commands
{
"python myfile.py"
}

to the mkb, which will just execute the command specified as the mkb is parsed.

by: JohnOKane
Status: Offline
Joined: 2009-10-31
Points: 1160
Oh, that's handy, and solves

Oh, that's handy, and solves for the command-line continuous integration scenario. This is the same as invoking the given mac/win os's command line/shell?

A prebuild command, that's integrated with the build environments (scons, visualstudio, xcode) would be a touch better still though - since updating the tests/art scripts can be invoked upon compiling in the IDE rather than re-building the .mkb.

by: MladenM
Status: Offline
Joined: 2011-10-17
Points: 160
Visual Studio Unit Testing.

Visual Studio Unit Testing. Hi, I have question regarding using Visual Studio Unit testing. Can we use it on Marmalade projects?

To solve this, I probably need expert in compile scripts generated by Marmalade during creation of VisualStudio project.

To use Microsoft Visual Studio unit testing, you must set project to be "verifiable" (clr:safe) http://msdn.microsoft.com/en-US/library/k169s7dt%28v=VS.100%29.aspx and to set it in clr:safe http://msdn.microsoft.com/en-us/library/ykbbt679%28VS.80%29.aspx you must set couple of flags:
To change the compiler and linker settings
1.Display the project Property Page. For more information, see How to: Open Project Property Pages.
2.On the General page under the Configuration Properties node, set the Common Language Runtime Support property to Safe MSIL Common Language Runtime Support (/clr:safe).
3.On the Advanced page under the Linker node, set the CLR Image Type property to Force safe IL image (/CLRIMAGETYPE:SAFE).

Then it started asking to modify other flags (not compatible with clr:safe) until I got to /J flag, mentioned in *.vcxproj file as:
/S3Eproject /J /FI"C:\Users\mladen.matosevic\Documents\Try1\build_try1_vc10\temp_defines_release.h"
and
/S3Eproject /J /Fe"s3e-custom-tool='__invalid__rvct' tooltype=rvct_compiler --enum_is_int --unsigned_chars --interleave --diag_remark=1,9,111,174,128,177,196,381,550,611,815,1293,1295,1299,1300,1304,3017,3052,390 --apcs=/noropi --library_interface=aeabi_glibc --no-hide-all --no_unaligned_access --no_exceptions --fpu=softvfp --apcs=/interwork --cpu=4T --no-rvct -Jc:/MARMAL~1/5.1/s3e/h/std --asm --cppflag=--cpp -g -O0 --no_inline --diag_style=ide --default_extension=obj " /FD /FI"C:\Users\mladen.matosevic\Documents\Try1\build_try1_vc10\temp_defines_debug.h"

So, it goes beyond normal Visual Studio stuff.
Any luck, or too hard?

by: Chris D
Status: Offline
Joined: 2009-11-01
Points: 27010
LeeMcD, There is indeed a

LeeMcD,

There is indeed a post missing.

There is a way to run python scripts as part of the project creation process. For this functionality you need to add the following to the mkb:

extension
{
(extensions)
test
}

Whereas for example test.py must be situated in the extensions subdirectory (LOCATION IS FIXED!!!!!)

I will make sure, that this information is added to the documentation,

Chris

by: LeeMcD
Status: Offline
Joined: 2011-08-19
Points: 370
Is there a missing reply

Is there a missing reply between JohnOKane's 2 messages above? If so, I believe it contains the answer to a question I have (essentially JohnOKane's question in his first message.) Any chance we can restore it, or someone can re-post the answer here? I'm interested in executing a pre-build command.

Thanks,

Lee

Latest Posts

Latest Comments

Top Contributors

  • Chris D : 27,010
  • MonRoyals : 26,970
  • Salman : 26,720
  • Jez Hammond : 20,130
  • pjan : 11,150
  • gjw : 10,350
  • Paolo Oliverio : 9,640
  • Beaker_2 : 8,390
  • Kite : 8,210
  • bluescrn : 7,810