From 0bd27fb698033243378dab4913ee99224f6f6783 Mon Sep 17 00:00:00 2001 From: Bert van der Weerd Date: Thu, 10 Jun 2021 00:14:09 +0200 Subject: [PATCH] Added pybuild_lw.py --- .gitignore | 1 + pybuild.py | 51 +++------------------------------------------------ pybuild_lw.py | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 53 insertions(+), 48 deletions(-) create mode 100644 pybuild_lw.py diff --git a/.gitignore b/.gitignore index 586bb29..a8af971 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,4 @@ /tmp.nsi /tmp-permissive.nsi /tmp-strict.nsi +/__pycache__ \ No newline at end of file diff --git a/pybuild.py b/pybuild.py index dd678d1..070237d 100644 --- a/pybuild.py +++ b/pybuild.py @@ -10,6 +10,8 @@ import optparse import sys import os +import pybuild_lw + parser = optparse.OptionParser() parser.add_option('-x', '--cross', dest='cross_compile', default=False, action="store_true") @@ -19,22 +21,12 @@ parser.add_option('-s', '--src', dest='src', default='releas parser.add_option('-t', '--distro', dest='distro', default='win') options, remainder = parser.parse_args() - -#print("[debug] ----------") -#print("[debug] --cross = ", options.cross_compile) -#print("[debug] --no-execute = ", options.no_execute) -#print("[debug] --src = ", options.src) -#print("[debug] --distro = ", options.distro) -#print("[debug] ----------") - - def beep(): print('\a') - def enter_srcdir(): dir = "firefox-{}".format(pkgver) if options.src == 'nightly': @@ -264,44 +256,7 @@ if len(remainder) > 0: beep() else: # Print help message - print("""# Use: - - pybuild [] clean | all | - -# Options: - - -n,--no-execute - print commands, don't execute them - -l,--no-librewolf - skip LibreWolf specific stages. - -x,--cross - crosscompile from linux, implies -t win - -s,--src - release,nightly,tor-browser - (default=release) - -t,--distro - deb,rpm,win (default=win) - -# Targets: - - all - all steps from fetch to producing setup.exe - clean - clean everything, including extracted/fetched sources - - fetch - wget or hg clone or git pull - extract - nop if not wget - lw_do_patches - [librewolf] patch the source - build - build the browser - lw_post_build - [librewolf] insert our settings - package - package the browser into zip/apk - lw_artifacts - [librewolf] build setup.exe - -# Utilities: - - git_subs - git update submodules - git_init - put the source folder in a .git repository - - deps_deb - install dependencies with apt - deps_rpm - install dependencies with dnf - deps_pkg - install dependencies on freebsd - - rustup - update rust - mach_env - create mach environment -""") + print(pybuild_lw.help_message) diff --git a/pybuild_lw.py b/pybuild_lw.py new file mode 100644 index 0000000..b1e4be0 --- /dev/null +++ b/pybuild_lw.py @@ -0,0 +1,49 @@ + + + + + +# +# Large multiline strings +# + + + +help_message = """# Use: + + pybuild [] clean | all | | + +# Options: + + -n,--no-execute - print commands, don't execute them + -l,--no-librewolf - skip LibreWolf specific stages. + -x,--cross - crosscompile from linux, implies -t win + -s,--src - release,nightly,tor-browser + (default=release) + -t,--distro - deb,rpm,win (default=win) + +# Targets: + + all - all steps from fetch to producing setup.exe + clean - clean everything, including extracted/fetched sources + + fetch - wget or hg clone or git pull + extract - nop if not wget + lw_do_patches - [librewolf] patch the source + build - build the browser + lw_post_build - [librewolf] insert our settings + package - package the browser into zip/apk + lw_artifacts - [librewolf] build setup.exe + +# Utilities: + + git_subs - git update submodules + git_init - put the source folder in a .git repository + + deps_deb - install dependencies with apt + deps_rpm - install dependencies with dnf + deps_pkg - install dependencies on freebsd + + rustup - update rust + mach_env - create mach environment +"""