implement (cross-)compilation via meson
This commit is contained in:
parent
43fb4e028d
commit
ad5bd38f9d
|
|
@ -361,3 +361,5 @@ MigrationBackup/
|
|||
|
||||
# Fody - auto-generated XML schema
|
||||
FodyWeavers.xsd
|
||||
|
||||
*.swp
|
||||
|
|
|
|||
26
README.md
26
README.md
|
|
@ -3,9 +3,29 @@
|
|||
Useful for setups where the clipboard is not enough.
|
||||
See [here](https://github.com/45Tatami/native-inserter) for an example of the receiving server side.
|
||||
|
||||
Requires Visual Studio 2019. Drop into VS, build x86 or x64 depending on which Textractor architecture you use.
|
||||
Drop resulting dll into Textractor extension window.
|
||||
|
||||
Configuration done at runtime via interface.
|
||||
|
||||

|
||||
|
||||
## Building
|
||||
|
||||
Requires Visual Studio 2019 or meson. Drop into VS, build x86 or x64 depending on which Textractor architecture you use.
|
||||
Drop resulting dll into Textractor extension window.
|
||||
|
||||
### meson
|
||||
|
||||
```
|
||||
meson setup build
|
||||
ninja -Cbuild
|
||||
```
|
||||
|
||||
Project includes example cross-compilation definition files for a mingw32 toolchain under `cross`.
|
||||
|
||||
|
||||
```
|
||||
# x86/32bit
|
||||
meson setup --cross-file=cross/i686-w64-mingw32.txt build
|
||||
|
||||
# x86_64/64bit
|
||||
meson setup --cross-file=cross/x86_64-w64-mingw32.txt build
|
||||
```
|
||||
|
|
|
|||
|
|
@ -0,0 +1,13 @@
|
|||
[binaries]
|
||||
c = 'i686-w64-mingw32-gcc'
|
||||
cpp = 'i686-w64-mingw32-g++'
|
||||
ar = 'i686-w64-mingw32-ar'
|
||||
strip = 'i686-w64-mingw32-strip'
|
||||
windres = 'i686-w64-mingw32-windres'
|
||||
exe_wrapper = 'wine'
|
||||
|
||||
[host_machine]
|
||||
system = 'windows'
|
||||
cpu_family = 'x86'
|
||||
cpu = 'i686'
|
||||
endian = 'little'
|
||||
|
|
@ -0,0 +1,13 @@
|
|||
[binaries]
|
||||
c = 'x86_64-w64-mingw32-gcc'
|
||||
cpp = 'x86_64-w64-mingw32-g++'
|
||||
ar = 'x86_64-w64-mingw32-ar'
|
||||
strip = 'x86_64-w64-mingw32-strip'
|
||||
windres = 'x86_64-w64-mingw32-windres'
|
||||
exe_wrapper = 'wine64'
|
||||
|
||||
[host_machine]
|
||||
system = 'windows'
|
||||
cpu_family = 'x86_64'
|
||||
cpu = 'x86_64'
|
||||
endian = 'little'
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
project('Textractor-TCPSender', 'cpp',
|
||||
default_options : ['cpp_std=c++17'])
|
||||
|
||||
add_project_arguments('-DUNICODE', language : 'cpp')
|
||||
|
||||
compiler = meson.get_compiler('cpp')
|
||||
|
||||
src = files(
|
||||
'TCPSender/TCPSender.cpp',
|
||||
'TCPSender/ExtensionImpl.cpp'
|
||||
)
|
||||
|
||||
windows = import('windows')
|
||||
src += windows.compile_resources('TCPSender/resource.rc')
|
||||
|
||||
deps = []
|
||||
deps += compiler.find_library('ws2_32')
|
||||
|
||||
library('tcpsender', src,
|
||||
dependencies : deps)
|
||||
Loading…
Reference in New Issue