218 Commits

Author SHA1 Message Date
John Stebbins
118b8a7431
configure: fix parsing debug and optimize options
required and optional arguments to an option requires setting nargs in
add_argument
2019-04-13 14:05:21 -04:00
Bradley Sepos
1f241d8f1a
make: Further improvements to feature enable/disable in configure.py.
Converts most of configure.py from optparse (deprecated) to argparse. Better fixes #1459.
2019-04-13 14:05:17 -04:00
Bradley Sepos
24563ab804
make: Require FFmpeg AAC on Linux and Windows.
FFmpeg AAC was originally disabled when FDK enabled, but this did not seem to work correctly. When I "fixed" the issuein 7b035348b714f945cff1ae2940332960a8eb0f00, WinGUI started throwing exceptions. This should fix the problem for now.
2019-04-12 09:54:56 -04:00
Bradley Sepos
7b035348b7
make: Disable features on unsupported platforms in configure.py.
Fixes #1459.
2019-04-04 20:01:58 -04:00
Bradley Sepos
4daf62b54a
contrib: Remove local pthreads-w32 in favor of winpthreads.
Cross-compiling for Windows now requires winpthreads which is part of the toolchain provided by scripts/mingw-w64-build, and similar packages provided by Linux distros.
2019-03-31 18:10:32 -04:00
Andrew Brezovsky
f2ee6cc73f make: decode bytes objects from subprocess stdout in configure.py Launcher class, resolves #2011
Signed-off-by: Andrew Brezovsky <abrezovsky@gmail.com>
2019-03-28 21:28:02 -04:00
Frederick Ding
22ee1a38ea Fix Py3 compat and logic/syntax in handling version.txt
The first fix addresses the problem that readlines() gives back a
list of strings, which do not have the `.decode()` method that bytes do.
But `_parseSession()` is used both for the bytes output by running
`repo-info.sh` and for the strings output by ingesting `version.txt`.
So we still need to handle the bytes case.

The second fix addresses syntax and logic problems. If a string is
not empty, `if self.hash` will check that it's non-empty (I don't think
`is not empty` actually works -- it has given me a NameError). And the
string comparison should be done by value equality, not reference
equality.
2019-02-28 06:25:07 -08:00
Bradley Sepos
5bff83c1da
configure: gtk: make: scripts: Make scripts compatible with Python 3. 2019-02-25 08:47:38 -05:00
Bradley Sepos
e563c0d806
configure: Move configured special encoders output before launch output. 2019-02-25 06:12:37 -05:00
Bradley Sepos
c7119499f5
configure: Enable hardware encoders by default on suitable platforms.
Print special encoders status at end of configure output, minor cosmetics.
2019-02-24 15:57:06 -05:00
John Stebbins
8c7c73ca5f
configure: fix conftest turds 2019-01-19 11:12:07 -08:00
John Stebbins
b09c99829c
configure: fix LDProbe cleanup on mingw
LDProbe tries to delete conftest, but should delete conftest.exe on
mingw.  So delete *both* in a try-catch block.
2019-01-06 12:10:30 -08:00
Yuichiro NAITO
e6081d225f
build: Respect CC environment variable on all platforms. 2018-11-26 17:59:40 -05:00
Yuichiro NAITO
9e71ecc647
build: Respect CC environment variable on FreeBSD.
Fixes #1674.

We use the compiler that CC environment variable indicates.
If CC is ommited, use gcc or clang which is installed.
If gcc is chosen, we need to add `-Wl,-rpath` option to make runtime linker
linking gcc's runtime libraries from installed path. For example, gcc7's
runtime libraries are installed in `/usr/local/lib/gcc7` by default.
And we also need to link libc++ first to make libc++ initializer is called
on runtime.
2018-11-26 17:59:40 -05:00
John Stebbins
da8a76a46e build: add 'PYTON.exe' to probed tools
This records in GNUmakefile what python executable was found by
configure.
2018-11-14 08:26:37 -08:00
Yuichiro NAITO
7767d0f28d
build: Allows to use clang/clang++ compiler on FreeBSD.
LOCALBASE variable is used to indicate where FreeBSD ports are installed.
default is /usr/local.
2018-08-22 06:10:32 -04:00
Yuichiro NAITO
f12ebd45ef
build: Fix to not pass --enable-nvenc to FFmpeg configure on FreeBSD.
Nvenc is not currently supported by Nvidia on FreeBSD. If it becomes supported on FreeBSD, please check nvidia-driver and FFmpeg.
2018-07-02 15:04:06 -04:00
Scott
dbf898635d
Add NVEnc encoder. (Round 3) (#1437)
Adding the Nvidia NVEnc H.264 and H.265 encoders.
Based on Initial work by sgothel

--enable-nvenc is the new compile time configure option to enable for builds.
2018-06-29 19:48:26 +01:00
Bradley Sepos
a426369977
contrib: make: Remove CMake contrib.
Still required, only HandBrake will not build it anymore.
2018-06-17 00:23:34 -04:00
Bradley Sepos
517ed0030f
contrib: make: Remove --enable-local-autotools and --enable-local-pkgconfig.
Closes #549.
2018-06-17 00:23:34 -04:00
Bradley Sepos
ca57c61aab
contrib: gtk: libhb: make: scripts: Remove yasm contrib. 2018-06-17 00:23:34 -04:00
John Stebbins
f33dc20059
build: move --flatpak option into configure "Build Options" 2018-06-07 15:01:33 -07:00
Bradley Sepos
0465678fff
contrib: build: Add AMF headers and --enable-vce.
#1144.
2018-06-03 16:24:43 -04:00
Bradley Sepos
1fb82b1a47
libhb: build: README: Replace instances of Libav with FFmpeg. 2018-05-29 19:09:16 -04:00
John Stebbins
e52abd8813 contrib: add lzma support
lzma may be used by the ffmpeg tiff decoder which can be used in
matroska files.
2018-05-29 14:29:29 -07:00
sr55
e449a63fd0
Build: Make --enable-qsv MinGW and Linux only. #1060 2018-01-23 16:52:10 +00:00
Yuichiro NAITO
560decf6c7
build: Add FreeBSD support.
Closes #1076.
2018-01-13 00:03:39 -05:00
Bradley Sepos
697da25ef3
build: More robust failure on missing or old nasm.
Since Linux and similar use system x264, avoid failure on missing/old nasm, since it should not be needed.
2018-01-10 02:43:36 -05:00
Bradley Sepos
680474d4df
build: Update configure.py to check for nasm >= 2.13.
Required for recent x264. Better to fail here than part-way through a build.
2018-01-10 01:39:54 -05:00
Bradley Sepos
c987dedc12
build: Fix configure to report success when REV=0 in version.txt.
Instead make sure we have a possibly sane HASH value.
2017-11-04 06:14:22 -04:00
Bradley Sepos
5e00431bd8 build: Configure options cosmetics. 2017-06-21 02:08:47 -04:00
Bradley Sepos
25baa3678c build: Always enable Libav AAC when building with mingw-w64. 2017-06-21 00:49:16 -04:00
cclauss
df8a5e76a3 configure: Modernize Python in configure.py.
file is a Python built-in (https://docs.python.org/2/library/functions.html?highlight=file#file) so it should be avoided as a variable name.
Use "with open" syntax to automate file close where possible.
os.getenv() will return None if the key is not in os.environ.
Use ternary if to simplify conditional assignment where it improves, not hinders, readability.

Closes #500.
2017-03-04 09:38:32 -05:00
Wouter van Kesteren
8c9400b676 Unbreak non-mingw cross.
Strings in python are immutable and it results in:

Traceback (most recent call last):
  File "make/configure.py", line 1592, in <module>
    action.run()
  File "make/configure.py", line 287, in run
    self._action()
  File "make/configure.py", line 506, in _action
    self.systemf[0] = self.systemf[0].upper()
TypeError: 'str' object does not support item assignment
2017-03-04 04:15:01 -05:00
Bradley Sepos
b60c0bf54e build: Gracefully exit configure where version info is not present.
configure.py fails hard when .git or version.txt are not present, usually when downloading a source archive from GitHub or other git-archive use. This allows configure to fail gracefully, printing instructions to work from a git clone or download a proper source archive.
2016-12-27 16:16:46 -05:00
Bradley Sepos
6ccbfa43e0 build: Add install, install-strip, and uninstall targets for Darwin/Mac.
Also refactor test.* convenience targets for Darwin/Mac.

Configure parameter --prefix now sets HandBrakeCLI install directory [/usr/local] like on other systems.
New configure parameter --xcode-prefix sets HandBrake.app install directory [/Applications]. Not used on other systems.
2016-12-22 02:55:27 -05:00
Bradley Sepos
061c7af8ba build: Really ensure tag suffix is not None in configure.py. 2016-12-18 16:37:27 -05:00
Bradley Sepos
90f66b178a build: Ensure tag suffix is not None in configure.py. 2016-12-18 16:27:02 -05:00
Chris Lamb
fc267da0fe build: Use UTC datetime for build info.
Makes build reproducible per https://wiki.debian.org/ReproducibleBuilds

Signed-off-by: Chris Lamb <chris@chris-lamb.co.uk>
2016-09-09 11:47:12 -04:00
John Stebbins
e7a320cb62 build: fix configure error created by flatpak commit 2016-08-31 08:56:28 -07:00
John Stebbins
a464833a79 LinGui: Add flatpak support (#231)
* LinGui: add --flatpak configure option

For building a linux flatpak bundle

* LinGui: add rules to build flatpak repo and bundles

* LinGui: add flatpak compatible icon

* LinGui: add flatpak compatible desktop file

* LinGui: add flatpak appdata xml

* pkg: disable building LinGui when creating cli flatpak

* pkg: clean flatpak build cache when updating source package

* pkg: fix source package build dependencies

Fixes errors when the git ref being packaged changes and you have not
manually deleted stage and pkg build directories.
2016-08-30 09:51:05 -07:00
Sean McGovern
e44e48382e configure: check for strerror_r() 2016-07-10 16:24:32 -04:00
Bradley Sepos
3bf86382ab build: Add download jobs option and progress display. 2016-05-25 15:45:05 -04:00
KonaBlend
12a591af07 Build: fix configure to escape $ for xcode 2016-05-25 15:45:05 -04:00
KonaBlend
abfbb15ef0 Build: add target contrib.fetch.test
- remove configure --df-exhaust-url
2016-05-25 15:45:04 -04:00
KonaBlend
4de3e38af5 Build: add configure --df-exhaust-url
Specifying this option will cause fetching to run through all
active URLs. Decent way to test all URLs.
2016-05-25 15:45:04 -04:00
KonaBlend
8a3e309341 Build: split fetch into df-fetch and df-verify
- moved common python code to lib/hb_distfile.py
- beautified tmpfile creation
- added stack-style resource management to df-fetch
- fixed contrib assumptions about single URL
2016-05-25 15:45:04 -04:00
KonaBlend
0310fab56d Build: add configure --verbose-fetch 2016-05-25 15:45:04 -04:00
KonaBlend
24d3dc934d Build: refactor fetch for contrib tarballs
Fetch is now python-based and runs on the same version as does
configure. The source script is make/fetch.py. New features:

MD5 hash tracking for tarballs. Data values for all contribs added.
Upon download, the file will be verified, and only then will it be moved
into place inside downloads/ . Files that exist before the build system
does a fetch will not be md5-checked.

Multiple URLs for tarballs. Each module may specify one or more URLs and
by convention the official HandBrake should be first when possible. Each
URL is tried in sequence, and if it fails for any reason, the next URL
is tried. If no URL succeeds, a hard-error is reported.

Network fetching may be disabled via configure options. --disable-fetch
will hard-error if a fetch is attempted. --accept-fetch-url=SPEC and
--deny-fetch-url=SPEC offer an ACL-style mechanism using regex to match
against URLs. For example, --accept-fecth-url='.*/download.handbrake.fr/.*'
would skip any non-matching URLs.

Build dependencies have been lightened. wget and curl are no longer
required. TODO: GTK packaging should also be able to remove those deps.
2016-05-25 15:45:03 -04:00
Bradley Sepos
12ffa792a5 build: Increase max logical CPU cores to 64. 2016-05-24 16:58:32 -04:00