1
0
mirror of https://github.com/rkd77/elinks.git synced 2024-11-02 08:57:19 -04:00

[windows] build static

This commit is contained in:
Witold Filipczyk 2023-11-04 22:02:12 +01:00
parent 5a8ab5f039
commit d6f7e86623
3 changed files with 23 additions and 1 deletions

View File

@ -16,7 +16,7 @@ root = '/usr/x86_64-w64-mingw32'
# Directory that contains 'bin', 'lib', etc for the toolchain and system libraries # Directory that contains 'bin', 'lib', etc for the toolchain and system libraries
#sys_root = '/usr/i586-pc-msdosdjgpp/sys-include/' #sys_root = '/usr/i586-pc-msdosdjgpp/sys-include/'
need_exe_wrapper = true need_exe_wrapper = true
#elinks_wrapper = 'wine' elinks_wrapper = 'elinks_wine.py'
[host_machine] [host_machine]
system = 'windows' system = 'windows'

15
doc/tools/elinks_wine.py Normal file
View File

@ -0,0 +1,15 @@
#!/usr/bin/python3
import os
import sys
if __name__ == '__main__':
was_elinks = False
with os.popen('wine {0} {1}'.format(os.getenv('ELINKS_BINARY'), sys.argv[1]), 'r') as fi:
for line in fi:
if not was_elinks:
if not line.startswith('ELinks'):
continue
was_elinks = True
print(line, end='')
sys.exit(0)

View File

@ -50,11 +50,18 @@ endif
extra_cpp_args = extra_args extra_cpp_args = extra_args
extra_cpp_args += extracppflags extra_cpp_args += extracppflags
if get_option('static')
static_link_args = ['-static']
else
static_link_args = []
endif
elinks = executable( elinks = executable(
'elinks', srcs, 'elinks', srcs,
include_directories: incs, include_directories: incs,
dependencies: deps, dependencies: deps,
c_args: extra_args + extracflags, c_args: extra_args + extracflags,
cpp_args: extra_cpp_args, cpp_args: extra_cpp_args,
link_args: static_link_args,
install: true install: true
) )