Skip to content

Commit e26e6a7

Browse files
committed
Add Flatpak and Mingw support files
1 parent 4ca7d62 commit e26e6a7

File tree

6 files changed

+172
-0
lines changed

6 files changed

+172
-0
lines changed

flatpak/OCPNsenc

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
here=$(dirname $(readlink -fn $0))
3+
export PATH=$PATH:$here
4+
export LD_LIBRARY_PATH="${here}/../lib:$LD_LIBRARY_PATH"
5+
exec $here/OCPNsenc.prog $@

flatpak/README.md

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
s63 flatpak README
2+
---------------------
3+
4+
This is the flatpak packaging of the s63, to be managed
5+
by opencpn's new plugin installer.
6+
7+
8+
Testing
9+
-------
10+
- The plugin requires extended permissions. Do (initial setup):
11+
12+
$ flatpak override --user --allow=devel
13+
14+
- Install flatpak and flatpak-builder as described in https://flatpak.org/
15+
- Enable the flathub repo and install platform packages:
16+
17+
$ flatpak --user remote-add --if-not-exists \
18+
flathub https://dl.flathub.org/repo/flathub.flatpakrepo
19+
$ flatpak --user install org.freedesktop.Platform//18.08
20+
$ flatpak --user install org.freedesktop.Sdk//18.08
21+
$ flatpak --user install org.flatpak.Builder
22+
23+
- Install opencpn from the beta testing repo:
24+
25+
$ flatpak --user remote-add --no-gpg-verify plug-mgr \
26+
http://opencpn.duckdns.org/opencpn-beta/website/repo
27+
$ flatpak --user install plug-mgr org.opencpn.OpenCPN
28+
29+
- Build plugin tarball and metadata from the ci branch:
30+
31+
$ cd build
32+
$ cmake -DOCPN_FLATPAK=ON ..
33+
$ make flatpak-build
34+
$ make package
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
id: org.opencpn.OpenCPN.Plugin.s63
2+
runtime: org.opencpn.OpenCPN
3+
runtime-version: master
4+
sdk: org.freedesktop.Sdk//18.08
5+
build-extension: true
6+
separate-locales: false
7+
appstream-compose: false
8+
modules:
9+
- name: s63
10+
no-autogen: true
11+
cmake: true
12+
build-options:
13+
cflags: -fPIC
14+
cxxflags: -fPIC -DFLATPAK
15+
config-opts:
16+
- -DPREFIX:PATH=/app/extensions/s63
17+
post-install:
18+
- >
19+
mv /app/extensions/s63/bin/OCPNsenc
20+
/app/extensions/s63/bin/OCPNsenc.prog
21+
- install -t /app/extensions/s63/bin/ -m 755 OCPNsenc
22+
sources:
23+
- type: git
24+
url: ..
25+
branch: master
26+
- type: file
27+
path: OCPNsenc

mingw/fedora/README.md

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
What's here?
2+
============
3+
4+
Tools to build a windows 32-bit executable using the mingw toolchain.
5+
6+
How?
7+
====
8+
$ sudo dnf copr enable leamas/opencpn-mingw
9+
$ sudo dnf builddep opencpn-deps.spec
10+
$ cd ../..
11+
$ rm -rf build; mkdir build
12+
$ cd build;
13+
$ cmake -DCMAKE_TOOLCHAIN_FILE=../mingw/fedora/toolchain.cmake ..
14+
$ make
15+
$ make package
16+
17+
Notes:
18+
=====
19+
The build requires updated packages, notably wx3GTK, available at
20+
https://copr.fedorainfracloud.org/coprs/leamas/opencpn-mingw.
21+
The copr enable command above sets up access to this repo.

mingw/fedora/opencpn-deps.spec

+67
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
Name: opencpn-deps
2+
Version: 0.1
3+
Release: 1%{?dist}
4+
Summary: Empty package with opencpn build dependencies
5+
6+
License: MIT
7+
URL: https://github.com/leamas/opencpn
8+
9+
BuildRequires: binutils
10+
BuildRequires: cmake
11+
BuildRequires: gettext
12+
BuildRequires: git
13+
BuildRequires: make
14+
BuildRequires: mingw-binutils-generic
15+
BuildRequires: mingw-filesystem-base
16+
BuildRequires: mingw32-binutils
17+
BuildRequires: mingw32-bzip2
18+
BuildRequires: mingw32-cairo
19+
BuildRequires: mingw32-curl
20+
BuildRequires: mingw32-expat
21+
BuildRequires: mingw32-filesystem
22+
BuildRequires: mingw32-fontconfig
23+
BuildRequires: mingw32-freetype
24+
BuildRequires: mingw32-gcc
25+
BuildRequires: mingw32-gcc-c++
26+
BuildRequires: mingw32-cpp
27+
BuildRequires: mingw32-gettext
28+
BuildRequires: mingw32-headers
29+
BuildRequires: mingw32-glib2
30+
BuildRequires: mingw32-gtk2
31+
BuildRequires: mingw32-libarchive
32+
BuildRequires: mingw32-libffi
33+
BuildRequires: mingw32-libpng
34+
BuildRequires: mingw32-libtiff
35+
BuildRequires: mingw32-libxml2
36+
BuildRequires: mingw32-nsiswrapper
37+
BuildRequires: mingw32-openssl
38+
BuildRequires: mingw32-pcre
39+
BuildRequires: mingw32-pixman
40+
BuildRequires: mingw32-sqlite
41+
BuildRequires: mingw32-win-iconv
42+
BuildRequires: mingw32-wxWidgets3 >= 3.0.2
43+
BuildRequires: mingw32-xz-libs
44+
45+
%description
46+
47+
Empty package used to catch build dependencies for opencpn using
48+
the mingw tools to create a Windows 32-bit executable
49+
50+
Use dnf builddep opencpn-deps.spec to install the dependencies.
51+
52+
%prep
53+
54+
55+
%build
56+
57+
58+
%install
59+
60+
61+
%files
62+
%doc COPYING
63+
64+
65+
%changelog
66+
* Fri Mar 01 2019 Alec Leamas <[email protected]> - 0.1-1
67+
- Initial release

mingw/fedora/toolchain.cmake

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# the name of the target operating system
2+
SET(CMAKE_SYSTEM_NAME Windows)
3+
4+
# which compilers to use for C and C++
5+
SET(CMAKE_C_COMPILER i686-w64-mingw32-gcc)
6+
SET(CMAKE_CXX_COMPILER i686-w64-mingw32-c++)
7+
SET(CMAKE_RC_COMPILER i686-w64-mingw32-windres)
8+
9+
# here is the target environment located
10+
SET(CMAKE_FIND_ROOT_PATH
11+
/usr/i686-w64-mingw32 /usr/i686-w64-mingw32/sys-root/mingw)
12+
13+
# adjust the default behaviour of the FIND_XXX() commands:
14+
# search headers and libraries in the target environment, search
15+
# programs in the host environment
16+
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
17+
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
18+
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)

0 commit comments

Comments
 (0)