Order build for multiple OS

I would want to know which is the build order when performed for multiple OS.

Thanks.

Seems to me to be random :-/

If you are just doing a build from witin the IDE, you can’t. Why does the build order matter?

[quote=116600:@Sergio Grande]I would want to know which is the build order when performed for multiple OS.

Thanks.[/quote]
Deliberately randomized
Why would it matter ?

I have a build script attached to just one build target. It executes git, get’s the revision code, builds a few versioning properties. I don’t want to perform the operation 3 times, so I just place the build script on one build target… I’ll compile for all three platforms when doing a release.

Sometimes Linux runs first, other times OS X, other times Windows. So, when my build script doesn’t run w/the first build, the first build has incorrect versioning information.

I could copy the build script to all three platforms, but why do the same work three times. If I knew which built first, then I could solve that problem pretty easily.

It would actually be nice to have a “Pre-Build” and “Post-Build” target to add scripts to, BTW :slight_smile: For example, Post-Build could run unit tests, zip packages up, upload to website, etc… Another nice feature to have, will create a FR for it, would be a context menu to execute a XojoScript that exists in your project. For example, right now you can add a “Build Script” to your project and put it anywhere you want, not part of any given Platform, nor in the Build Settings. It would be pretty handy to Right Click > Execute Script.

I ask myself why ramdom? And why not in the same order always? It’s not a problem for me, just curious.

i have the scripts run 3 times (or how ever many platforms I am targetting). I just try to make it so the scripts will only affect the one target if possible (copying files, signing app, etc). if I am updating the common parts (like shortversion of the app), then it gets done multiple times.

make sense now. I always wondered why it did it in a different order all the time.

I guess when I look at it, It is not a big issue to run it 3 times, but in my versioning, I’m running multiple shell commands, and in some cases determining if I am running on Windows, Linux or OS X to determine what commands to run and how to run them. It doesn’t cost a lot, but the programmer in me still says why repeat all this work.

[quote=116664:@Jeremy Cowgar]I have a build script attached to just one build target. It executes git, get’s the revision code, builds a few versioning properties. I don’t want to perform the operation 3 times, so I just place the build script on one build target… I’ll compile for all three platforms when doing a release.

Sometimes Linux runs first, other times OS X, other times Windows. So, when my build script doesn’t run w/the first build, the first build has incorrect versioning information.

I could copy the build script to all three platforms, but why do the same work three times. If I knew which built first, then I could solve that problem pretty easily.
[/quote]
You cannot predict which runs first
If you build one target then you have the same issue as the pre build / post build, if its in another target, won’t run either.

Drag scripts above / below the “Build” step in any target and theres you “pre and post” build steps for that target

An “alias” of a step that you can put in other targets so you maintain one step but can refer to it in multiple targets would be useful but yes if you built all 3 it would run the step 3 times

We had some industrious users at one time that did some fun little hacks because the order was predictable
So its not predictable any longer

So you choose the easy way to solve your issue ?

:slight_smile:

For us, a predictable order would be perfect:

We maintain the same versioning number for our Apps in Windows and OS X, and our apps check the ‘new version’ on our databases.

If we have the autoincremental numbering in one plattform and update it on our database, but the builds are not yet there, our apps will start to download an incorrect version.

If we package our Apps and upload to server for each plattform individually, we have almost the same problem.

To solve those issues and not make our scripts innecesarily complex, we autoincremental App versioning in the first plattform script, and in the post-builds process of the latest script, we package our apps in .zip files and upload them to our servers, and once done, update the database versioning number.

Currently we ‘Build and cancel’ until our desired platform builds first, but reading your answers it seems that you are not going to change this, so we will have to refactor and split our scripts and shell scripts, and maybe maintain a plattform independent versioning number …

Maybe a universal Pre Build that runs BEFORE any plattform build and a Post Build that runs AFTER all build plattforms ?

[quote=116690:@Norman Palardy]Drag scripts above / below the “Build” step in any target and theres you “pre and post” build steps for that target

[/quote]

I do know of those, but I was speaking of a Pre/Post Build for the Build Process, not each individual target, i.e.

Pre-Build
Build Linux
Build OS X
Build Windows
Post-Build

I believe that would solve Raimon’s problem too.

Yes
Builds are not in any defined order

So unlikely to happen that I’d say it won’t

Write one IDE script that invoked the builds in whatever order you desire
Then use that script to run your builds

YOU can control the order VERY explicitly already

Literally you can run one script
dim s as string
s = BuildApp( 3 ) // Win32
s = BuildApp( 4 ) // Linux
s = BuildApp( 6 ) // OS X Carbon
s = BuildApp( 7 ) // OS X Cocoa

fixed order done !

[quote=117677:@Norman Palardy]Write one IDE script that invoked the builds in whatever order you desire
Then use that script to run your builds[/quote]

That is where it’d be nice to be able to save the Build Script in your project, and simply Right Click and say Execute. You can already save the build script in the project, but you can not execute it that way, you have to create a new script, paste in the contents and run.

I think Norman means for you to put your run-me-once build script in your first build target and then use an IDE script to build them in the order you desire.

I like the way the OP has gone quiet over his original post…

Save the script next to your project and its a project specific script
Then every time you open that project that script will be available in the IDE Scripts menu

Nope
create a script
save it next to your project in a “scripts” directory
now you can run that script from the IDE scripts menu
and YOU can build in whatever order you want AND all the build steps in each target will also be executed in the order you set them up
Combinations of IDE scripting and build automation let you do all kinds of things that would go beyond what we could ever build into the IDE

See User Guide - Framework about page 208 and onwards

[quote=117718:@Norman Palardy]Save the script next to your project and its a project specific script
Then every time you open that project that script will be available in the IDE Scripts menu[/quote]

Silly me! I remember reading that now that you mention it. I am very glad to have been reminded.

Thanks Norman!

teach a man to fish … :slight_smile: