Skip to content

Commit 7a1edfe

Browse files
committed
Website: document the DBE's 'ARCH' env-var.
1 parent 825b344 commit 7a1edfe

File tree

2 files changed

+18
-12
lines changed

2 files changed

+18
-12
lines changed

rakefile

+7-7
Original file line numberDiff line numberDiff line change
@@ -195,19 +195,19 @@ task :ci do
195195
ENV['MODIFIER'] = platform_modifier[2]
196196
end
197197
case ENV['HOST']
198-
when 'macOS'
199-
# Do nothing
198+
when 'linux'
199+
ENV['URHO3D_DEPLOYMENT_TARGET'] = 'generic' if /linux|mingw/ =~ ENV['PLATFORM']
200+
if ENV['MODIFIER'] == 'clang'
201+
ENV['CC'] = 'clang'
202+
ENV['CXX'] = 'clang++'
203+
end
200204
when 'windows'
201205
if ENV['MODIFIER'] == 'gcc'
202206
ENV['URHO3D_DEPLOYMENT_TARGET'] = 'generic'
203207
ENV['GENERATOR'] = 'mingw'
204208
end
205209
else
206-
ENV['URHO3D_DEPLOYMENT_TARGET'] = 'generic' if /linux|mingw/ =~ ENV['PLATFORM']
207-
if /clang/ =~ ENV['MODIFIER']
208-
ENV['CC'] = 'clang'
209-
ENV['CXX'] = 'clang++'
210-
end
210+
# Do nothing
211211
end
212212
ENV['BUILD_TREE'] = 'build/ci'
213213
ENV['CMAKE_BUILD_TYPE'] = ENV['BUILD_TYPE'] == 'dbg' ? 'Debug' : 'Release' if /dbg|rel/ =~ ENV['BUILD_TYPE']

website/docs/getting-started/quick-start.mdx

+11-5
Original file line numberDiff line numberDiff line change
@@ -91,8 +91,8 @@ script/dockerized.sh linux rake build install
9191
```bash
9292
git clone https://github.com/urho3d/Urho3D.git
9393
cd Urho3D
94-
# Install Urho3D library to a default install location, modify the "RPI_ABI" build option accordingly
95-
RPI_ABI=RPI4 script/dockerized.sh rpi rake build install
94+
# Install Urho3D library to a default install location, use the 32-bit compiler toolchain
95+
ARCH=32 script/dockerized.sh rpi rake build install
9696
```
9797

9898
</TabItem>
@@ -183,8 +183,8 @@ script/dockerized.sh linux
183183
# Create a new UrhoApp
184184
script/dockerized.sh rpi rake new[PiUrhoApp,demo]
185185
cd demo/PiUrhoApp
186-
# Build the newly generated UrhoApp, modify the "RPI_ABI" build option accordingly
187-
RPI_ABI=RPI4 script/dockerized.sh rpi
186+
# Build the newly generated UrhoApp, use the 32-bit compiler toolchain
187+
ARCH=32 script/dockerized.sh rpi
188188
```
189189

190190
</TabItem>
@@ -218,7 +218,7 @@ This is not a copy/paste error. You can build your new UrhoApp exactly the same
218218

219219
:::
220220

221-
You can pass optional build options to the build system by using environment variables. One easy way to do that is to set them just in time on the same line before the actual command to be invoked. For example, `RPI_ABI=RPI4 script/dockerized.sh rpi`. See the Build Options section for more information.
221+
Below is a sample screencast using DBE for Android platform.
222222

223223
<div className={'text--center'}>
224224
<img src={'/img/docs/quick-start-screencast.svg'} alt={'Screencast'}/>
@@ -290,6 +290,12 @@ ls $(dbe rake info['build_tree'])/bin
290290

291291
The build artifacts for Android platform in the AAR or in the APK format can be found in the `build/outputs/aar/` or `build/outputs/apk/` directory, respectively, relative to the Android library or Android app module.
292292

293+
## Build Environment Variables
294+
295+
You can pass Urho3D build options to the build system by using environment variables. One easy way to do that is to set them just in time on the same line before the actual command to be invoked. For example, `ARM_ABI_FLAGS='-mcpu=cortex-a53' script/dockerized.sh arm`. See the Urho3D Build Options section for all available build options.
296+
297+
On top of that, DBE also recognizes `ARCH` environment variable to select between 32-bit and 64-bit (default) compiler toolchain. This is applicable to Arm, Linux, RPI, and Windows platforms. For example, use `ARCH=32 script/dockerized.sh rpi` to target 32-bit RPI platform.
298+
293299
## Don't have docker engine?
294300

295301
Fret not! The next section describes how to prepare the build environment the conventional way for each target platform.

0 commit comments

Comments
 (0)