Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compiling webview-sys with edge on ci #3

Closed
eliassjogreen opened this issue Mar 11, 2020 · 7 comments
Closed

Compiling webview-sys with edge on ci #3

eliassjogreen opened this issue Mar 11, 2020 · 7 comments

Comments

@eliassjogreen
Copy link
Member

Currently it throws a fat linker error but it should be solvable.

@eliassjogreen
Copy link
Member Author

eliassjogreen commented Mar 11, 2020

Log

@markkovari
Copy link

markkovari commented Mar 11, 2020

The raw output of the build error from the log entry2020-03-10T23:42:24.7314141Z
As far I understood from related issues the problems are with the windows-rust bindings.
Similar issues can be found here:
davisking/dlib#1448
https://social.msdn.microsoft.com/Forums/windows/en-US/d0026ac6-0f14-495e-b5c6-19648a97cba4/mismatch-detected-for-runtimelibrary-value-mddynamicrelease-doesnt-match-value?forum=vclanguage
It seems it will be somewhere in the cmake section and specially in the windows part of it.

@eliassjogreen
Copy link
Member Author

Somehow webview_edge.cpp differs from webview_mshtml.c in the way it's linked creating the linker mismatch error.

@eliassjogreen
Copy link
Member Author

Probably caused by the cpp version being different:
.flag_if_supported("/std:c++17");

Linker Tools Error LNK2038:

Indicates the version of the C++ Standard Library and C runtime that's used by an app or library. Code that uses one version of the C++ Standard Library or C runtime is incompatible with code that uses a different version. For more information, see /MD, /MT, /LD (Use Run-Time Library).

@IllusionPerdu
Copy link

Hello in my local computer i can compile with edge when i create a file ".cargo\config" with

[target.x86_64-pc-windows-msvc]
rustflags = ["-Ctarget-feature=+crt-static"]

@eliassjogreen
Copy link
Member Author

I tried that yesterday but using it as an environmental variable. It compiled but did not use edge over ie. Can you confirm that it uses edge?

@IllusionPerdu
Copy link

IllusionPerdu commented Mar 17, 2020

and i have change the webview2 inmultiple.ts with (for test)

const webview2 = new WebView({
  title: "Multiple deno_webview example",
  url: `data:text/html,
    <html>
    <body>
      <h1 id="h1">2 Nav</h1>
      <script>var elem = document.getElementById("h1"); elem.innerHTML = window.navigator.userAgent;</script>
    </body>
    </html>
    `,
  width: 800,
  height: 600,
  resizable: true,
  debug: true,
  frameless: false
});

I set the dev with set DEV=file://./target/release

and exec the exmple with deno -A --reload examples\multiple.ts

the window 2 content is
Mozilla/5.0 (Windows NT 10.0; Win64; x64; WebView/3.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 Edge/18.19041

Yes it's work ;)

PS : if i execute with your deno -A scripts/dev.ts example.ts it's recompile with IE

Sorry for my bad english !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants