Archive 17/01/2023.

Premake Scripts

Sinoid

Here’s an MIT’d dump of premake scripts for building significant portions of Urho3D:

Significant changes are made in some regards such as all of Detour, Recast, and DetourCrowd becoming one. The scripts as uploaded are meant to be dropped into the Git root of Urho3D.

Files and folders are likely missing from them as they include in-house things or platform bits that I can’t enforce, prune them out and you’ll be fine. I’d rather dump it as is than fuss for months about dumping it.

The provided scripts are really just windows scripts, but if you’re familiar with premake you’ll know how trite it is to change this.

To deal with Urho3D’s CMake-centric header copy stage you have to build symbolic links to those directories.

This isn’t for amateurs or hobbyists, these scripts are for hitting the ball to get rolling on consoles … hell, not fighting with Android-Studio’s garbage gradle implementation is relief enough.

green-zone

time to let dx9 die in peace

Ok, but compare it with Linux and others OS (without Windows)

Steam (August 2018):
Windows XP - 32 bit 0.18%
Ubuntu 18.04.1 LTS 64 bit - 0.16%

Statcounter (Jan 2018):
Windows XP - 3.36%
Other (no win) - 0.08%

NetMarketShare (Jan 2018):
Windows XP - 4.05%
Linux - 1.31%

I do not use DirectX (also for Windows), but this step need discussion (imho)

rku

Not a fan of premake but simplicity of these scripts is simply lovely! How does premake deal with crosscompiling? Is it possible to build a part of codebase with native compiler and rest of it with crosscompiler? How about targetting multiple archs/build configs (debug/release) with single build?

Sinoid

@rku, I don’t know the answers to those. All my work occurs out of Citrix-VMs that are spun-up on demand so even though premake is life here the reasons I can think of to do such a thing aren’t really applicable (outsourcing management firm, VMs for client segregation and for VMs from clients).

Single build depends on the premake target though, VS for instance still can’t queue multiple builds without plugins/macros to conceal the GUI interaction. If you meant a mixed solution with x86, x64, and Android as available targets, yes.

Although the scripts are quite clean, I can’t really attest to their viability in a multi-user / version-controlled environment as they’ve really just been my after-hours project (cleared). Git-ignore has been enough so far for just me versioning my own stuff locally, but it might not hold up.

Sinoid

@green-zone, DX9 is just a random opinion on why I neglected it from the build-scripts, tinted with western glasses. I wouldn’t be surprised if DX9 is actually a large appeal to Urho3D in locales where XP is still strong.

CaptainCN

How about Xmake(https://github.com/tboox/xmake).

xmake is a cross-platform build utility based on lua.

Sinoid

@CaptainCN, though I’ve never heard of Xmake before - there’s really no comment at all about the Urho3D build system here. It’s just a “here’s this thing, you might dig it, you might not, you might just like it’s existence as some kind of reference, but it’s another way to build”.

Xmake does look a little interesting, but it’d have to trump Premake in how easy it is to add toolchains, platforms, etc for me to really consider such a thing. Premake is pretty meh outside of how trivial it is to expand on the generators/toolchains.