mirror of
https://github.com/rizinorg/cutter.git
synced 2024-12-18 19:06:10 +00:00
Add release and nobuild args to meson.py
This commit is contained in:
parent
f3dba964d2
commit
7570cb2809
@ -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]
|
||||
|
19
meson.py
19
meson.py
@ -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()
|
||||
|
Loading…
Reference in New Issue
Block a user