This repository has been archived by the owner on Dec 10, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathmix.exs
133 lines (112 loc) · 3.36 KB
/
mix.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
defmodule WebengineKiosk.MixProject do
use Mix.Project
@version "0.3.0"
@source_url "https://github.com/nerves-web-kiosk/webengine_kiosk"
def project do
[
app: :webengine_kiosk,
version: @version,
elixir: "~> 1.6",
description: description(),
package: package(),
source_url: @source_url,
compilers: [:elixir_make | Mix.compilers()],
make_targets: ["all"],
make_clean: ["clean"],
make_error_message: make_help(),
docs: docs(),
dialyzer: [
flags: [:unmatched_returns, :error_handling, :race_conditions, :underspecs]
],
deps: deps()
]
end
def application do
[
extra_applications: [:logger],
mod: {WebengineKiosk.Application, []}
]
end
defp description do
"Display and control web pages on a local fullscreen browser"
end
defp package do
[
files: [
"lib",
"src",
"assets",
"test",
"mix.exs",
"README.md",
"LICENSE",
"CHANGELOG.md",
"Makefile"
],
licenses: ["Apache-2.0", "LGPL-3.0-only"],
links: %{"GitHub" => @source_url}
]
end
defp deps do
[
{:system_registry, "~> 0.8", optional: true},
{:elixir_make, "~> 0.6", runtime: false},
{:ex_doc, "~> 0.19", only: [:dev, :test], runtime: false},
{:dialyxir, "~> 1.0.0-rc.6", only: :dev, runtime: false}
]
end
defp docs do
[
extras: ["README.md"],
main: "readme",
source_ref: "v#{@version}",
source_url: @source_url
]
end
defp using_nerves? do
System.get_env("CROSSCOMPILE") != nil
end
defp make_help do
"""
Please look above this message for the compiler error before filing an
issue. The first error after the text `==> webengine_kiosk` is usually the
most helpful.
The webengine_kiosk library requires the Qt framework to build.
""" <> make_help_os(:os.type(), using_nerves?())
end
defp make_help_os({:unix, :darwin}, _nerves) do
"""
To install Qt using Homebrew, run `brew install qt`. Homebrew doesn't add
qt to your path, so you'll need to add it or set the QMAKE environment
variable. For example, `export QMAKE=/usr/local/opt/qt/bin/qmake`.
"""
end
defp make_help_os({:unix, _}, true) do
"""
Please install Qt using your system's package manager or via source. Since
this is a Nerves-based project, only `qmake` is needed. For Ubuntu, this
looks like:
sudo apt install qt5-qmake
Another option is to set the `QMAKE` environment variable to the path to
the qmake binary:
QMAKE=~/Qt/5.11.1/gcc_64/bin/qmake
"""
end
defp make_help_os({:unix, _}, false) do
"""
Please install Qt using your system's package manager or via source. Be
sure to install the development headers and libraries for Qt Webengine.
For Ubuntu, this looks like:
sudo apt install qt5-default qtwebengine5-dev qtmultimedia5-dev
"""
end
defp make_help_os({other, _}, _nerves) do
"""
I'm not familiar with installing Qt5 on #{inspect(other)}. Please install
Qt5 using your platform's package manager or from source and consider
making an issue or a PR to #{@source_url} to benefit other users.
If you're getting an error that `qmake` isn't found, try setting the
`QMAKE` environment variable to the path to `qmake`.
"""
end
end