Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
godot
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
community
godot
Commits
65a78711
Unverified
Commit
65a78711
authored
Jun 03, 2020
by
Rémi Verschelde
Committed by
GitHub
Jun 03, 2020
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #39240 from akien-mga/scons-fix-multimedia-lib-deps
SCons: Validate dependencies for linked multimedia modules
parents
901832e2
7c743122
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
38 additions
and
12 deletions
+38
-12
SConstruct
SConstruct
+7
-8
methods.py
methods.py
+24
-0
config.py
modules/opus/config.py
+1
-1
config.py
modules/theora/config.py
+1
-1
config.py
modules/vorbis/config.py
+1
-1
config.py
modules/webm/config.py
+4
-1
No files found.
SConstruct
View file @
65a78711
...
...
@@ -86,6 +86,7 @@ env_base.__class__.add_library = methods.add_library
env_base
.
__class__
.
add_program
=
methods
.
add_program
env_base
.
__class__
.
CommandNoCache
=
methods
.
CommandNoCache
env_base
.
__class__
.
disable_warnings
=
methods
.
disable_warnings
env_base
.
__class__
.
module_check_dependencies
=
methods
.
module_check_dependencies
env_base
[
"x86_libtheora_opt_gcc"
]
=
False
env_base
[
"x86_libtheora_opt_vc"
]
=
False
...
...
@@ -607,14 +608,12 @@ if selected_platform in platform_list:
env
.
Append
(
CPPDEFINES
=
[
"MINIZIP_ENABLED"
])
editor_module_list
=
[
"regex"
]
for
x
in
editor_module_list
:
if
not
env
[
"module_"
+
x
+
"_enabled"
]:
if
env
[
"tools"
]:
print
(
"Build option 'module_"
+
x
+
"_enabled=no' cannot be used with 'tools=yes' (editor), "
"only with 'tools=no' (export template)."
)
Exit
(
255
)
if
env
[
"tools"
]
and
not
env
.
module_check_dependencies
(
"tools"
,
editor_module_list
):
print
(
"Build option 'module_"
+
x
+
"_enabled=no' cannot be used with 'tools=yes' (editor), "
"only with 'tools=no' (export template)."
)
Exit
(
255
)
if
not
env
[
"verbose"
]:
methods
.
no_verbose
(
sys
,
env
)
...
...
methods.py
View file @
65a78711
...
...
@@ -231,6 +231,30 @@ def disable_module(self):
self
.
disabled_modules
.
append
(
self
.
current_module
)
def
module_check_dependencies
(
self
,
module
,
dependencies
):
"""
Checks if module dependencies are enabled for a given module,
and prints a warning if they aren't.
Meant to be used in module `can_build` methods.
Returns a boolean (True if dependencies are satisfied).
"""
missing_deps
=
[]
for
dep
in
dependencies
:
opt
=
"module_{}_enabled"
.
format
(
dep
)
if
not
opt
in
self
or
not
self
[
opt
]:
missing_deps
.
append
(
dep
)
if
missing_deps
!=
[]:
print
(
"Disabling '{}' module as the following dependencies are not satisfied: {}"
.
format
(
module
,
", "
.
join
(
missing_deps
)
)
)
return
False
else
:
return
True
def
use_windows_spawn_fix
(
self
,
platform
=
None
):
if
os
.
name
!=
"nt"
:
...
...
modules/opus/config.py
View file @
65a78711
def
can_build
(
env
,
platform
):
return
True
return
env
.
module_check_dependencies
(
"opus"
,
[
"ogg"
])
def
configure
(
env
):
...
...
modules/theora/config.py
View file @
65a78711
def
can_build
(
env
,
platform
):
return
True
return
env
.
module_check_dependencies
(
"theora"
,
[
"ogg"
,
"vorbis"
])
def
configure
(
env
):
...
...
modules/vorbis/config.py
View file @
65a78711
def
can_build
(
env
,
platform
):
return
True
return
env
.
module_check_dependencies
(
"vorbis"
,
[
"ogg"
])
def
configure
(
env
):
...
...
modules/webm/config.py
View file @
65a78711
def
can_build
(
env
,
platform
):
return
platform
not
in
[
"iphone"
]
if
platform
in
[
"iphone"
]:
return
False
return
env
.
module_check_dependencies
(
"webm"
,
[
"ogg"
,
"opus"
,
"vorbis"
])
def
configure
(
env
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment