Skip to content

Commit f253877

Browse files
[[ Emscripten ]] Re-name the emscripten standalone engine to include the version
1 parent 7354194 commit f253877

4 files changed

Lines changed: 25 additions & 6 deletions

File tree

common.gypi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
'config/perl.gypi',
1111
'config/target_os.gypi',
1212
'config/thirdparty.gypi',
13+
'config/version.gypi',
1314
'config/yacc.gypi',
1415
],
1516
}

config/version.gypi

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
'variables':
3+
{
4+
'version_major': "<!(perl -n -e '/^BUILD_MAJOR_VERSION[[:blank:]]*=[[:blank:]]*(.*)$/ && print $1' <(DEPTH)/version)",
5+
'version_minor': "<!(perl -n -e '/^BUILD_MINOR_VERSION[[:blank:]]*=[[:blank:]]*(.*)$/ && print $1' <(DEPTH)/version)",
6+
'version_point': "<!(perl -n -e '/^BUILD_POINT_VERSION[[:blank:]]*=[[:blank:]]*(.*)$/ && print $1' <(DEPTH)/version)",
7+
'version_build': "<!(perl -n -e '/^BUILD_REVISION[[:blank:]]*=[[:blank:]]*(.*)$/ && print $1' <(DEPTH)/version)",
8+
9+
'version_string': "<!(perl -n -e '/^BUILD_SHORT_VERSION[[:blank:]]*=[[:blank:]]*(.*)$/ && print $1' <(DEPTH)/version)",
10+
11+
'git_revision': '<!(git rev-parse HEAD)',
12+
},
13+
}

engine/engine.gyp

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -771,6 +771,11 @@
771771
'standalone',
772772
],
773773

774+
'variables':
775+
{
776+
'version_suffix': '<(version_string)',
777+
},
778+
774779
'actions':
775780
[
776781
{
@@ -793,16 +798,16 @@
793798

794799
'outputs':
795800
[
796-
'<(PRODUCT_DIR)/standalone-community.js',
797-
'<(PRODUCT_DIR)/standalone-community.html',
798-
'<(PRODUCT_DIR)/standalone-community.html.mem',
801+
'<(PRODUCT_DIR)/standalone-community-<(version_suffix).js',
802+
'<(PRODUCT_DIR)/standalone-community-<(version_suffix).html',
803+
'<(PRODUCT_DIR)/standalone-community-<(version_suffix).html.mem',
799804
],
800805

801806
'action':
802807
[
803808
'./emscripten-javascriptify.sh',
804809
'<(PRODUCT_DIR)/standalone-community.bc',
805-
'<(PRODUCT_DIR)/standalone-community.html',
810+
'<(PRODUCT_DIR)/standalone-community-<(version_suffix).html',
806811
'src/em-exported.json',
807812
'src/em-whitelist.json',
808813
'src/em-preamble.js',

ide-support/revsaveasemscriptenstandalone.livecodescript

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,10 +183,10 @@ private function getEngineFiles
183183
local tFiles
184184

185185
-- Engine JavaScript
186-
put mapPath("standalone-" & revLicenseType() & ".js") into tFiles[1]
186+
put mapPath("standalone-" & revLicenseType() & "-" & the version & ".js") into tFiles[1]
187187

188188
-- Memory initialisation file
189-
put mapPath("standalone-" & revLicenseType() & ".html.mem") into tFiles[2]
189+
put mapPath("standalone-" & revLicenseType() & "-" & the version & ".html.mem") into tFiles[2]
190190

191191
return tFiles
192192
end getEngineFiles

0 commit comments

Comments
 (0)