Remove webview submodule, include webview.h directly

Closes #64
This commit is contained in:
zxey
2019-09-09 21:33:46 +02:00
parent 47287de107
commit f9bf450eef
7 changed files with 2290 additions and 26 deletions

3
.gitmodules vendored
View File

@@ -1,3 +0,0 @@
[submodule "webview-sys/webview"]
path = webview-sys/webview
url = https://github.com/Freaky/webview.git

View File

@@ -1,6 +1,6 @@
[package]
name = "web-view"
version = "0.4.4"
version = "0.4.5"
authors = ["Boscop"]
readme = "README.md"
license = "MIT"
@@ -12,7 +12,7 @@ exclude = ["examples/todo-ps/dist/**/*", "examples/elm-counter/index.html"]
[dependencies]
urlencoding = "1.0"
webview-sys = { path = "webview-sys", version = "0.1.3" }
webview-sys = { path = "webview-sys", version = "0.1.4" }
boxfnonce = "0.1"
[features]

View File

@@ -1,6 +1,6 @@
[package]
name = "webview-sys"
version = "0.1.3"
version = "0.1.4"
authors = ["Boscop"]
license = "MIT"
repository = "https://github.com/Boscop/web-view"

21
webview-sys/LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2017 Serge Zaitsev
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -1,30 +1,13 @@
extern crate cc;
extern crate pkg_config;
use std::{
env,
path::{Path, PathBuf},
process::Command,
};
use std::env;
fn main() {
let webview_path: PathBuf = match env::var("WEBVIEW_DIR") {
Ok(path) => path.into(),
Err(_) => {
// Initialize webview submodule if user forgot to clone parent repository with --recursive.
if !Path::new("webview/.git").exists() {
let _ = Command::new("git")
.args(&["submodule", "update", "--init"])
.status();
}
"webview".into()
}
};
let mut build = cc::Build::new();
build
.include(&webview_path)
.include("webview.h")
.file("webview.c")
.flag_if_supported("-std=c11")
.flag_if_supported("-w");

2264
webview-sys/webview.h Normal file

File diff suppressed because it is too large Load Diff