Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
101 changes: 30 additions & 71 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,26 +27,23 @@ You can download installation package for supported linux distributions in [Open

2. Install the required libraries

* autoconf
* automake
* binutils
* coreutils
* pkgconfig
* gettext-devel
* curl
* meson
* gcc-c++
* gettext-devel
* m4
* pkgconfig
* openssl-devel
* dbus-1-devel
* xz

(This command can make it easy on SuSE: grep -i buildrequires rpm/lib3270.spec | cut -d: -f2 | sudo xargs zypper in )

3. Configure and build
3. Setup, build and install

```shell
./autogen.sh
make clean
make all
meson setup .build
meson compile -C .build
meson install -C .build
```

## Building for Windows
Expand All @@ -70,48 +67,23 @@ You can download installation package for supported linux distributions in [Open
3. Install cross compilers

```shell
./lib3270/win/install-cross.sh --all (for 32 and 64 bits)
```

3. Configure build

```shell
./lib3270/win/win-configure.sh --64 (for 64 bits)
```

4. Build

```shell
cd lib3270
make clean
make all
zypper in \
pkgconfig \
gettext-devel \
mingw64-libcurl-devel \
mingw64-cross-meson \
mingw64-libopenssl-devel \
mingw64-cross-gcc-c++
```
### Windows native with MSYS2 (Using bundle script)

1. Install and update MSYS2

* Download and install [msys2](https://www.msys2.org/)
* Update msys:

```shell
pacman -Syu
```
Afther this close and reopen mingw shell.

2. Get lib3270 sources from git using the mingw shell

```shell
git clone https://github.com/PerryWerneck/lib3270.git ./lib3270
```

3. Run bundle script
3. Configure and build

```shell
cd lib3270
./win/bundle.msys --pre-reqs --build
meson setup --cross-file /usr/lib/rpm/macros.d/meson-mingw64-cross-file.txt .build
meson compile -C .build
```

### Windows native with MSYS2 (Manual)
### Windows native with MSYS2

1. Install and update MSYS2

Expand All @@ -130,7 +102,15 @@ You can download installation package for supported linux distributions in [Open
3. Install devel packages using pacman on mingw shell

```shell
pacman -S --needed zip dos2unix mingw-w64-x86_64-gcc automake autoconf make git pkgconf mingw-w64-x86_64-gettext gettext-devel mingw-w64-x86_64-openssl libtool
pacman -S \
dos2unix \
mingw-w64-x86_64-gcc \
mingw-w64-x86_64-meson \
mingw-w64-x86_64-iconv \
pkgconf \
mingw-w64-x86_64-gettext \
gettext-devel \
mingw-w64-x86_64-openssl
```

Afther this close and reopen mingw shell.
Expand All @@ -141,18 +121,10 @@ You can download installation package for supported linux distributions in [Open
git clone https://github.com/PerryWerneck/lib3270.git ./lib3270
```

5. Build library using the mingw shell
5. Build with packman

```shell
cd lib3270
./autogen.sh
make all
```

6. Install

```shell
make install
makepkg BUILDDIR=/tmp/pkg -p PKGBUILD.mingw
```

## Building for macOS
Expand Down Expand Up @@ -195,16 +167,3 @@ Uninstall
rm -fr "$(brew --cellar)/lib3270"
```

### Using jhbuild

1. Install jhbuild

https://wiki.gnome.org/Projects/GTK/OSX/Building

2. build

```shell
jhbuild --moduleset=https://raw.githubusercontent.com/PerryWerneck/lib3270/master/mac/lib3270.modules build lib3270
```


53 changes: 29 additions & 24 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,11 @@ if not libssl.found()
libssl = dependency('openssl', required: false)
endif

libssl = dependency('OpenSSL', required: false)
if not libssl.found()
libssl = dependency('openssl', required: false)
endif

lib_extra = [
dependency('threads'),
libintl,
Expand Down Expand Up @@ -380,14 +385,14 @@ if host_machine.system() == 'windows'
]
)

pkg.generate(
name: meson.project_name() + '-delayed',
description: project_description,
variables: pkg_variables,
libraries: [
'-l3270.delayed',
]
)
# pkg.generate(
# name: meson.project_name() + '-delayed',
# description: project_description,
# variables: pkg_variables,
# libraries: [
# '-l3270.delayed',
# ]
# )

else

Expand Down Expand Up @@ -518,22 +523,22 @@ if host_machine.system() == 'windows'
endif

# https://mesonbuild.com/Reference-manual_functions.html#custom_target
custom_target(
'delaylib',
depends: dynamic,
build_by_default: true,
command: [
dlltool,
'--input-def','lib3270.def',
'--dllname','lib3270.dll',
'--kill-at',
'--output-lib','lib3270.delayed.a'
],
output: 'lib3270.delayed.a',
install: true,
install_tag: 'devel',
install_dir: get_option('libdir')
)
#custom_target(
# 'delaylib',
# depends: dynamic,
# build_by_default: true,
# command: [
# dlltool,
# '--input-def','lib3270.def',
# '--dllname','lib3270.dll',
# '--kill-at',
# '--output-lib','lib3270.delayed.a'
# ],
# output: 'lib3270.delayed.a',
# install: true,
# install_tag: 'devel',
# install_dir: get_option('libdir')
#)

static = static_library(
'3270',
Expand Down
Loading
Loading