Skip to content

Commit 2d93696

Browse files
committed
Merge remote-tracking branch 'origin/master' into orxpy-v2
2 parents cf7ff52 + 2463257 commit 2d93696

File tree

132 files changed

+1856
-1121
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

132 files changed

+1856
-1121
lines changed

.extern

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
e0b9300c29fa
1+
03cccb9d2b2c

.github/workflows/main.yml

+103-33
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
1-
name: BuildAll
1+
name: Build All
22
on: push
3+
env:
4+
ORX: ${{github.workspace}}/code
35
jobs:
4-
56
# Visual Studio
67
build-vs:
78
name: Visual Studio
89
strategy:
910
matrix:
11+
os:
12+
- windows
1013
version:
1114
# - 2017 # Not supported by GitHub hosted runners
1215
- 2019
@@ -18,18 +21,21 @@ jobs:
1821
platform:
1922
# - x86 # Not supported by GitHub hosted runners
2023
- x64
21-
runs-on:
22-
- windows-${{matrix.version}}
24+
include:
25+
- os: windows
26+
runner: windows-latest
27+
setup: setup.bat
28+
runs-on: ${{matrix.runner}}
2329
steps:
2430
- uses: actions/checkout@v4
2531
- uses: microsoft/setup-msbuild@v2
2632
with:
2733
msbuild-architecture: ${{matrix.platform}}
28-
- name: Set ORX environment variable
29-
run: echo ORX=%CD%\code>> %GITHUB_ENV%
30-
shell: cmd
3134
- name: Setup
32-
run: ./setup.bat
35+
uses: ./.github/workflows/setup
36+
with:
37+
os: ${{matrix.os}}
38+
setup: ${{matrix.setup}}
3339
- name: Build engine
3440
run: msbuild code\build\windows\vs${{matrix.version}}\orx.sln -m -t:rebuild -property:Configuration=${{matrix.config}}
3541
- name: Build tutorials
@@ -82,28 +88,14 @@ jobs:
8288
platform: 32 # Not supported by GitHub hosted runners
8389
- os: mac
8490
platform: 32 # Not supported by GitHub hosted runners
85-
runs-on:
86-
- ${{matrix.runner}}
91+
runs-on: ${{matrix.runner}}
8792
steps:
8893
- uses: actions/checkout@v4
89-
- name: Add 32bit architecture
90-
run: sudo dpkg --add-architecture i386
91-
if: matrix.os == 'linux'
92-
- name: Update OS (apt)
93-
run: sudo apt-get -qq update
94-
if: matrix.os == 'linux'
95-
- name: Install OS deps
96-
run: sudo apt-get -y install gcc-multilib g++-multilib freeglut3-dev freeglut3-dev:i386 libxrandr-dev libxrandr-dev:i386
97-
if: matrix.os == 'linux'
98-
- name: Set ORX environment variable
99-
run: echo ORX=%CD%\code>> %GITHUB_ENV%
100-
shell: cmd
101-
if: matrix.os == 'windows'
102-
- name: Set ORX environment variable
103-
run: echo ORX=$PWD/code>> $GITHUB_ENV
104-
if: matrix.os != 'windows'
10594
- name: Setup
106-
run: ./${{matrix.setup}}
95+
uses: ./.github/workflows/setup
96+
with:
97+
os: ${{matrix.os}}
98+
setup: ${{matrix.setup}}
10799
- name: Build engine
108100
working-directory: code/build/${{matrix.os}}/gmake
109101
run: ${{matrix.make}} config=${{matrix.config}}${{matrix.platform}}
@@ -132,6 +124,8 @@ jobs:
132124
name: iOS
133125
strategy:
134126
matrix:
127+
os:
128+
- mac
135129
config:
136130
- Debug
137131
- Profile
@@ -140,21 +134,35 @@ jobs:
140134
- os
141135
- simulator
142136
include:
137+
- os: mac
138+
runner: macos-latest
139+
setup: setup.sh
143140
- platform: simulator
144141
extra: -destination 'platform=iOS Simulator,name=iPhone 15'
145-
runs-on: macos-latest
142+
runs-on: ${{matrix.runner}}
146143
steps:
147144
- uses: actions/checkout@v4
148145
- name: Setup
149-
run: ./setup.sh
146+
uses: ./.github/workflows/setup
147+
with:
148+
os: ${{matrix.os}}
149+
setup: ${{matrix.setup}}
150150
- name: Build engine
151151
working-directory: code/build/ios/xcode/orx-ios.xcodeproj
152152
run: xcodebuild -workspace project.xcworkspace -scheme orxLIB -configuration=${{matrix.config}} -sdk iphone${{matrix.platform}} ${{matrix.extra}}
153153

154154
# Android
155155
build-android:
156156
name: Android
157-
runs-on: ubuntu-latest
157+
strategy:
158+
matrix:
159+
os:
160+
- linux
161+
include:
162+
- os: linux
163+
runner: ubuntu-latest
164+
setup: setup.sh
165+
runs-on: ${{matrix.runner}}
158166
steps:
159167
- uses: actions/checkout@v4
160168
- name: Set up JDK 17
@@ -164,13 +172,75 @@ jobs:
164172
distribution: 'temurin'
165173
- name: Set up Android SDK
166174
uses: android-actions/setup-android@v3
167-
- name: Set ORX environment variable
168-
run: echo ORX=$PWD/code>> $GITHUB_ENV
169175
- name: Setup
170-
run: ./setup.sh
176+
uses: ./.github/workflows/setup
177+
with:
178+
os: ${{matrix.os}}
179+
setup: ${{matrix.setup}}
171180
- name: Build engine
172181
working-directory: code/build/android
173182
run: ./gradlew clean assemble publishAllPublicationsToOrxRepository
174183
- name: Build demo
175184
working-directory: code/demo/android
176185
run: ./gradlew clean assemble
186+
187+
# Web
188+
build-web:
189+
name: Web (HTML5)
190+
strategy:
191+
matrix:
192+
os:
193+
- windows
194+
- linux
195+
- mac
196+
config:
197+
- debug
198+
- profile
199+
- release
200+
include:
201+
- os: windows
202+
runner: windows-latest
203+
setup: setup.bat
204+
init: init.bat
205+
make: mingw32-make
206+
emsdk_env: emsdk/emsdk_env.ps1
207+
- os: linux
208+
runner: ubuntu-latest
209+
setup: setup.sh
210+
init: init.sh
211+
make: make
212+
emsdk_env: emsdk/emsdk_env.sh
213+
- os: mac
214+
runner: macos-latest
215+
setup: setup.sh
216+
init: init.sh
217+
make: make
218+
emsdk_env: emsdk/emsdk_env.sh
219+
runs-on: ${{matrix.runner}}
220+
steps:
221+
- uses: actions/checkout@v4
222+
- name: Install Emscripten
223+
run: |
224+
git clone https://github.com/emscripten-core/emsdk.git
225+
cd emsdk
226+
./emsdk install latest
227+
./emsdk activate latest
228+
- name: Setup
229+
uses: ./.github/workflows/setup
230+
with:
231+
os: ${{matrix.os}}
232+
setup: ${{matrix.setup}}
233+
- name: Build engine
234+
working-directory: code/build/${{matrix.os}}/gmake
235+
run: |
236+
. ../../../../${{matrix.emsdk_env}}
237+
${{matrix.make}} config=release64 CFLAGS=-D__orxHEADLESS__
238+
emmake make config=${{matrix.config}}web
239+
- name: Create project
240+
run: ./${{matrix.init}} test
241+
- name: Build project
242+
working-directory: test/build/${{matrix.os}}/gmake
243+
run: |
244+
. ../../../../${{matrix.emsdk_env}}
245+
${{matrix.make}} config=release64
246+
emmake make config=${{matrix.config}}web

.github/workflows/setup/action.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Setup
2+
inputs:
3+
os:
4+
required: true
5+
type: string
6+
setup:
7+
required: true
8+
type: string
9+
runs:
10+
using: 'composite'
11+
steps:
12+
- name: Update OS (deps)
13+
run: |
14+
sudo dpkg --add-architecture i386
15+
sudo apt-get -qq update
16+
sudo apt-get -y install gcc-multilib g++-multilib freeglut3-dev freeglut3-dev:i386 libxrandr-dev libxrandr-dev:i386
17+
shell: bash
18+
if: inputs.os == 'linux'
19+
- name: Set ORX environment variable
20+
run: echo ORX=%CD%\code>> %GITHUB_ENV%
21+
shell: cmd
22+
if: inputs.os == 'windows'
23+
- name: Cache extern
24+
uses: actions/cache@v4
25+
with:
26+
path: cache
27+
key: orx-extern
28+
- name: Setup
29+
run: ./${{inputs.setup}}
30+
shell: bash

.vscode/tasks.json

+12-2
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,13 @@
7171
}
7272
},
7373
{
74-
"label": "Build orx (debug, profile, release)",
74+
"label": "Build orx (debug, profile, release, web)",
7575
"dependsOrder": "sequence",
7676
"dependsOn": [
7777
"Build orx (debug)",
7878
"Build orx (profile)",
79-
"Build orx (release)"
79+
"Build orx (release)",
80+
"Build orx (web)"
8081
],
8182
"problemMatcher": "$gcc"
8283
},
@@ -124,6 +125,15 @@
124125
"command": "mingw32-make.exe -j config=release64"
125126
}
126127
},
128+
{
129+
"label": "Build orx (web)",
130+
"dependsOn": [
131+
"Build orx (release)"
132+
],
133+
"group": "build",
134+
"type": "shell",
135+
"command": "emmake make -j config=releaseweb"
136+
},
127137
{
128138
"label": "Run bounce demo (debug)",
129139
"dependsOn": [

README.html

+7-2
Original file line numberDiff line numberDiff line change
@@ -1221,7 +1221,7 @@
12211221
color: var(--color-danger-fg);
12221222
}
12231223
</style><title>README</title></head><body><article class="markdown-body"><p align="center">
1224-
<a href="https://orx-project.org" rel="nofollow"><img src="/C:/workspace/orx/logo.svg" alt="Orx Engine" width="400" height="auto" style="max-width: 100%;"></a>
1224+
<a href="https://orx-project.org" rel="nofollow"><img src="/C:/workspace/orx/logo.png" alt="Orx Engine" width="400" height="auto" style="max-width: 100%;"></a>
12251225
<br>
12261226
<strong>A (HEAVILY) DATA-DRIVEN 2D GAME ENGINE</strong>
12271227
</p>
@@ -1234,7 +1234,7 @@
12341234
</p>
12351235
<p align="center">
12361236
<a href="https://orx-project.org" rel="nofollow"><img src="https://camo.githubusercontent.com/8a4af2e34c57dde5f954dca6e40b51223dfa01dba5a49670ef1b7965474147d0/68747470733a2f2f696d672e736869656c64732e696f2f776562736974653f75726c3d68747470732533412532462532466f72782d70726f6a6563742e6f7267" alt="site" data-canonical-src="https://img.shields.io/website?url=https%3A%2F%2Forx-project.org" style="max-width: 100%;"></a>
1237-
<a href="https://wiki.orx-project.org" rel="nofollow"><img src="https://camo.githubusercontent.com/c8c225d76fd37faa8289c0d2b8826722b528c81ec393977399817210f2dee694/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f706c6174666f726d732d77696e646f77732532302537432532306c696e75782532302537432532306d6163253230253743253230616e64726f6964253230253743253230696f732d726564" alt="platforms" data-canonical-src="https://img.shields.io/badge/platforms-windows%20%7C%20linux%20%7C%20mac%20%7C%20android%20%7C%20ios-red" style="max-width: 100%;"></a>
1237+
<a href="https://wiki.orx-project.org" rel="nofollow"><img src="https://camo.githubusercontent.com/38124bd081453633b8d3500c2194ed1bcbdc183143019827e3197b30d589579e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f706c6174666f726d732d77696e646f77732532302537432532306c696e75782532302537432532306d61632532302537432532307765622f68746d6c35253230253743253230616e64726f6964253230253743253230696f732d726564" alt="platforms" data-canonical-src="https://img.shields.io/badge/platforms-windows%20%7C%20linux%20%7C%20mac%20%7C%20web/html5%20%7C%20android%20%7C%20ios-red" style="max-width: 100%;"></a>
12381238
<a href="https://github.com/orx/orx/releases"><img src="https://camo.githubusercontent.com/ab9053b92c4edff02ed5a3467a714ae400ccffc26a6aa42dfb011ad2d6ce142a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6f72782f6f72783f636f6c6f723d6f72616e6765" alt="releases" data-canonical-src="https://img.shields.io/github/v/release/orx/orx?color=orange" style="max-width: 100%;"></a>
12391239
</p>
12401240
<p align="center">
@@ -1303,6 +1303,7 @@
13031303
<li>Linux (x86/x86-64 with codelite, codeblocks and GNU makefile)</li>
13041304
<li>Windows (x86/x86-64 with vs2017, vs2019 &amp; vs2022, x86/x86-64 mingw-w64 (14.2.0) with codelite, codeblocks and GNU makefile)</li>
13051305
<li>MacOS X (x86/x86-64 with xcode or x86/x86-64 with codelite, codeblocks and GNU makefile), version 10.6+</li>
1306+
<li>Web/HTML5 (Emscripten)</li>
13061307
<li>Android (Gradle build files, simulator &amp; device)</li>
13071308
<li>iOS (iPhone/iPod Touch/iPad, simulator &amp; device with xcode)</li>
13081309
</ul>
@@ -1534,6 +1535,10 @@
15341535
<td>orx is being compiled for Linux</td>
15351536
</tr>
15361537
<tr>
1538+
<td align="center"><code>__orxWEB__</code></td>
1539+
<td>orx is being compiled for Web/HTML5</td>
1540+
</tr>
1541+
<tr>
15371542
<td align="center"><code>__orxIOS__</code></td>
15381543
<td>orx is being compiled for iOS</td>
15391544
</tr>

README.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<p align="center">
2-
<a href="https://orx-project.org"><img src="./logo.svg" alt="Orx Engine" width="400" height="auto"></a>
2+
<a href="https://orx-project.org"><img src="./logo.png" alt="Orx Engine" width="400" height="auto"></a>
33
<br />
44
<strong>A (HEAVILY) DATA-DRIVEN 2D GAME ENGINE</strong>
55
</p>
@@ -14,7 +14,7 @@
1414

1515
<p align="center">
1616
<a href="https://orx-project.org"><img src="https://img.shields.io/website?url=https%3A%2F%2Forx-project.org" alt="site"></a>
17-
<a href="https://wiki.orx-project.org"><img src="https://img.shields.io/badge/platforms-windows%20%7C%20linux%20%7C%20mac%20%7C%20android%20%7C%20ios-red" alt="platforms"></a>
17+
<a href="https://wiki.orx-project.org"><img src="https://img.shields.io/badge/platforms-windows%20%7C%20linux%20%7C%20mac%20%7C%20web/html5%20%7C%20android%20%7C%20ios-red" alt="platforms"></a>
1818
<a href="https://github.com/orx/orx/releases"><img src="https://img.shields.io/github/v/release/orx/orx?color=orange" alt="releases"></a>
1919
</p>
2020

@@ -102,6 +102,7 @@ The engine compiles for, and is tested on:
102102
- Linux (x86/x86-64 with codelite, codeblocks and GNU makefile)
103103
- Windows (x86/x86-64 with vs2017, vs2019 & vs2022, x86/x86-64 mingw-w64 (14.2.0) with codelite, codeblocks and GNU makefile)
104104
- MacOS X (x86/x86-64 with xcode or x86/x86-64 with codelite, codeblocks and GNU makefile), version 10.6+
105+
- Web/HTML5 (Emscripten)
105106
- Android (Gradle build files, simulator & device)
106107
- iOS (iPhone/iPod Touch/iPad, simulator & device with xcode)
107108

@@ -269,6 +270,7 @@ for which you're compiling. Here's a quick list of these flags:
269270
`__orxWINDOWS__` | orx is being compiled for Windows
270271
`__orxMAC__` | orx is being compiled for MacOS X
271272
`__orxLINUX__` | orx is being compiled for Linux
273+
`__orxWEB__` | orx is being compiled for Web/HTML5
272274
`__orxIOS__` | orx is being compiled for iOS
273275
`__orxANDROID__` | orx is being compiled for Android
274276
`__orxCPP__` | orx is being compiled with a C++ compiler

0 commit comments

Comments
 (0)