Add release and nobuild args to meson.py

This commit is contained in:
Florian Märkl 2018-08-26 14:43:06 +02:00
parent f3dba964d2
commit 7570cb2809
2 changed files with 13 additions and 8 deletions

View File

@ -53,7 +53,7 @@ before_build:
# Build config
build_script:
- cmd: if defined QMAKE ( call prepare_r2.bat && call build.bat )
- cmd: if defined MESON ( python meson.py --dist=%ARTIFACT_PATH% --backend=%BACKEND% --jupyter --webengine )
- cmd: if defined MESON ( python meson.py --release --dist=%ARTIFACT_PATH% --backend=%BACKEND% --jupyter --webengine )
after_build:
- ps: $env:py_version = (python --version).Split()[1]

View File

@ -56,13 +56,14 @@ def build(args):
defines.append('-Dradare2:r2_datdir=radare2/share')
r2_meson_mod.meson(os.path.join(ROOT, 'src'), cutter_builddir,
prefix=cutter_builddir, backend=args.backend,
release=True, shared=False, options=defines)
log.info('Building cutter')
if args.backend == 'ninja':
r2_meson_mod.ninja(cutter_builddir)
else:
project = os.path.join(cutter_builddir, 'Cutter.sln')
r2_meson_mod.msbuild(project, '/m')
release=args.release, shared=False, options=defines)
if not args.nobuild:
log.info('Building cutter')
if args.backend == 'ninja':
r2_meson_mod.ninja(cutter_builddir)
else:
project = os.path.join(cutter_builddir, 'Cutter.sln')
r2_meson_mod.msbuild(project, '/m')
def main():
set_global_vars()
@ -76,6 +77,10 @@ def main():
help='Enable Jupyter support')
parser.add_argument('--webengine', action='store_true',
help='Enable QtWebEngine support')
parser.add_argument('--release', action='store_true',
help='Set the build as Release (remove debug info)')
parser.add_argument('--nobuild', action='store_true',
help='Only run meson and do not build.')
if os.name == 'nt':
parser.add_argument('--dist', help='dist directory')
args = parser.parse_args()