From 913582e1dfd01b354977d459039e0dea5e74bfdc Mon Sep 17 00:00:00 2001 From: Tom Daffin Date: Sat, 7 Nov 2020 06:35:08 -0700 Subject: [PATCH] Code review changes --- README.md | 8 ++++---- desktop.py | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 6475635..a672d20 100644 --- a/README.md +++ b/README.md @@ -34,13 +34,13 @@ export MONO_SOURCE_ROOT=$HOME/git/mono In order to compile mono into Godot for deskop you will need to first build for desktop (see 'Desktop' below), and then Base Class Libraries (see 'Base Class library' below). -Then run the 'copy_bcl' action of the same desktop script you ran configure and make on, specifying the same target platforms you used before. This will copy the bcl runtime into the runtime directories that the subsequent Godot build (using `copy_mono_root=yes`) expects to find them in. +Then run the 'copy-bcl' action of the same desktop script you ran configure and make on, specifying the same target platforms you used before. This will copy the bcl runtime into the runtime directories that the subsequent Godot build (using `copy_mono_root=yes`) expects to find them in. e.g. -`./linux.py copy_bcl --target=x86 --target=x86_64` +`./linux.py copy-bcl --target=x86 --target=x86_64` -Then you'll need to compile Godot using `copy_mono_root=yes` and `mono_static=yes` +Then you'll need to compile Godot using `copy_mono_root=yes` e.g. -`scons -j6 target=release_debug tools=yes module_mono_enabled=yes copy_mono_root=yes mono_static=yes mono_prefix="$HOME/mono-installs/desktop-linux-x86_64-release"` +`scons -j6 target=release_debug tools=yes module_mono_enabled=yes copy_mono_root=yes mono_prefix="$HOME/mono-installs/desktop-linux-x86_64-release"` ## Desktop diff --git a/desktop.py b/desktop.py index 52eb5fd..beb0b23 100755 --- a/desktop.py +++ b/desktop.py @@ -203,6 +203,8 @@ def copy_bcl(opts: DesktopOpts, product: str, target_platform: str, target: str) from bcl import get_profile_install_dirs dest_dir = path_join(opts.install_dir, '%s-%s-%s' % (product, target, opts.configuration), 'lib/mono/4.5') for src_dir in get_profile_install_dirs(opts, 'desktop'): + if not os.path.isdir(src_dir): + raise BuildError('BCL source directory does not exist: %s. The BCL must be built prior to this.' % src_dir) copy_tree(src_dir, dest_dir) def clean(opts: DesktopOpts, product: str, target_platform: str, target: str): @@ -221,14 +223,14 @@ def run_main(raw_args, target_platform): actions = OrderedDict() actions['configure'] = configure actions['make'] = make - actions['copy_bcl'] = copy_bcl + actions['copy-bcl'] = copy_bcl actions['clean'] = clean parser = cmd_utils.build_arg_parser(description='Builds the Mono runtime for the Desktop') default_help = 'default: %(default)s' - parser.add_argument('action', choices=['configure', 'make', 'copy_bcl', 'clean']) + parser.add_argument('action', choices=['configure', 'make', 'copy-bcl', 'clean']) parser.add_argument('--target', choices=targets[target_platform], action='append', required=True) parser.add_argument('--with-llvm', action='store_true', default=False, help=default_help)