37 Commits

Author SHA1 Message Date
Lucas Fernandes Nogueira
b01eac35f5 fix(android): use unescaped Android package id for the proguard rules (#1386) 2024-10-11 08:52:31 -03:00
Hamir Mahal
4a5b6e8dc9 style: simplify string formatting for readability (#1381) 2024-10-04 05:02:09 +03:00
Sebastian Neubauer
0218ace91c fix(android): avoid rebuilds if nothing changed (#1342)
* fix(android): avoid rebuilds if nothing changed

Unconditionally overwriting files where the build reruns if they changed
leads to rebuilds every time.
Only overwrite a file if its content is different to not rebuild in such
a case.

* Update build.rs

---------

Co-authored-by: Lucas Fernandes Nogueira <lucas@tauri.app>
2024-08-16 16:06:14 -03:00
efdx
fe70052dbf fix: incorrect linux target name (#1229)
* fix: Incorrect linux target name

The target configuration leaves it possible for gtk to not be found. It
is my understanding, that the "unknown-linux" is supposed to be "linux".

Fix it by changing the checked target name to "linux".

Signed-off-by: Esa Laakso <esa.laakso@fidelix.com>

* remove unused aliases

* Update build.rs

---------

Signed-off-by: Esa Laakso <esa.laakso@fidelix.com>
Co-authored-by: Amr Bashir <amr.bashir2015@gmail.com>
2024-04-22 15:53:50 +02:00
Lucas Fernandes Nogueira
f0e82d3aa2 fix: use TARGET env var instead of cfg_aliases so cross compiling works (#1217)
* fix cfg

* remove cfg_aliases

* add change file

* fix linux detection

* Discard changes to src/wkwebview/mod.rs

* Discard changes to Cargo.toml

* Update Cargo.toml

* Update build.rs
2024-04-15 09:06:58 +02:00
Ngo Iok Ui (Wu Yu Wei)
15ae3c78b0 Add cfg_aliases for easier feature configuration (#1077)
* Add cfg_aliases for easier feature configuration

* Add native feature flag to public

* Rename feature to os-webview

---------

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
2023-11-17 17:32:56 +09:00
Ngo Iok Ui (Wu Yu Wei)
783b14239d Refactor new method entry point to rwh (#1041)
* Refactor new method entry point to rwh

* Update doc and add change file

* Fix mac and ios compile error

* Add new_as_child

* Add rhw_04, 05 06 flags

* Update android port

* Remove winit CI

* Fix android bindings

* windows implementation

* Update Cargo.toml

* Fix macOS and iOS

* Fix Android

* fix is_child on WkWebView

* x11 impl

* expose `new_gtk`

* fix winit-gtk version

* remove undecorated resizing handling

* implement set_position and set_size for child gtk in x11

* fix macos

* more fixes

* one more time

* unreachable

* update actions

* fix windows

* some clippy

* Add documentation and fix clippy

* Fix windows clippy error

* Fix android biuld

* Fix documentation test

* Fix android again

* Reduce clippy noise

* use rc?

* refine some documentation, add set_visible

* fix set_visible

* impl set_visible on Windows

* fix doctests

* more set_visible fixes

* fix windows

* unsafe

* fix set size for child webviews

* fix initial visibility with new_gtk

* refine examples

* fix wpgu example

* fix examples on windows and macos

* use a better workaround

* make set_size work on x11

* Fix size in multiwebview example

* Add visible method on macOS and iOS

* remvoe `tao` from android backend and update documentation

* fix winit example

* Add new_as_content_view on macOS

* allow using raw-window-handle v0.5 [skip ci]

* change trait name [skip ci]

* fix linux impl [skip ci]

* fix android build [skip ci]

* fix windows build

* fix(macos): do not autoresize on child webview [skip ci]

* fix macos coordinates [skip ci]

* fix example [skip ci]

* fixed child on macos [skip ci]

* fix docs typos [skip ci]

* fix webview position when it's not a child [skip ci]

* replace new_as_content_view with new_as_subview

* with_as_subview instead of constructor [skip ci]

* fix position/size when as_subview is true

* lint & fmt

* Fix ios build

* Fix cargo test

* Fix mac build

* Update macOS contrusctors

* cargo fmt

* impl drop on Windows

* fix child transparency on Windows (still needs PRs in tao and winit)

* fix winit usage in the examples, use rwh_05 only for now

* fix tests

* add webview.focus

* fix dropping on Linux

* chore clean examples

* implement focus on Linux

* macos focus

---------

Co-authored-by: amrbashir <amr.bashir2015@gmail.com>
Co-authored-by: Lucas Nogueira <lucas@tauri.app>
Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
2023-11-07 20:30:35 +09:00
Lucas Fernandes Nogueira
cc934fe799 refactor(build): adjust rerun-if-changed instruction for Android files (#940)
* refactor(build): adjust rerun-if-changed instruction for Android files

Tauri will also need to write to the `WRY_ANDROID_KOTLIN_FILES_OUT_DIR` path, so watching for changes in the entire directory will result in unnecessary builds being triggered (always). Changing the instruction to be per file fixes this problem.

* fix println
2023-04-24 14:00:04 +02:00
Amr Bashir
ced4c0b445 feat: generate proguard rule file for android (#927)
* feat: generate proguard rule file for android

* remove `AppCompatActivity` from `proguard-wry.pro`
2023-04-17 15:57:45 +02:00
Lucas Fernandes Nogueira
1cf92e2b68 feat(build): rerun if kotlin out directory changes (#839) 2023-01-10 23:15:21 +08:00
DK Liao
ad168a22df Update license to 2023 (#835) 2023-01-07 14:28:40 +08:00
David Craven
dfe6a5e78a refactor: improve android env vars naming (#829)
* Improve naming.

* change file
2022-12-30 03:02:46 +02:00
Lucas Fernandes Nogueira
5b9f21d389 feat: improve build script panic messages (#807) 2022-12-12 22:09:03 +02:00
David Craven
cd08410bce Fix cross compilation. (#731)
* Fix cross compilation.

* Add .change file.
2022-10-29 09:58:25 +08:00
Lucas Fernandes Nogueira
3624414faa refactor: android environment variables are now optional (#688) 2022-09-05 15:41:28 -03:00
Lucas Fernandes Nogueira
bf39d9de1e feat(android): implement dialogs and permissions (#685) 2022-09-05 11:21:04 -03:00
Lucas Fernandes Nogueira
854d2226f4 fix(android): inject initialization scripts in HTML (#674) 2022-09-02 20:24:07 -03:00
Amr Bashir
917bb4309a chore: licenses (#675) 2022-08-27 10:07:03 +08:00
amrbashir
67fbd585e7 fix(android): comment out the auto-generated header in kotlin 2022-08-25 14:30:23 +02:00
Lucas Fernandes Nogueira
b1e8560c3f feat(android): define WebView class in kotlin (#672) 2022-08-24 16:50:16 -03:00
amrbashir
af7d349aa8 chore: add auto-generated header 2022-08-24 21:44:19 +02:00
Amr Bashir
b4789034dc feat(android): generate kotlin files at build time (#671)
* feat(android): generate kotlin files at build time

* changefile

* Update kotlin-files.md

* fix android ci

* Add option for extra code when generating files

* rerun build script when env changes

* change it to a class code, prepare var name for future additions

* Delete MainActivity.kt

* uppercase [skip ci]

* fix android detection

Co-authored-by: Lucas Nogueira <lucas@tauri.studio>
2022-08-24 20:20:02 +02:00
Lucas Fernandes Nogueira
c97499fb07 fix: cross compilation from macOS (#498) 2022-02-15 12:26:50 +08:00
Ngo Iok Ui (Wu Yu Wei)
c0d0a78b89 Add flags to support all other unix systems. (#352) 2021-07-21 18:13:54 +08:00
nothingismagick
db64fc69c4 feat/licenses (#155)
* chore(license): add template

Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com>

* chore(license): examples

Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com>

* chore(license): add SPDX licenses

Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com>

* chore(authors): name tauri programme

Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com>

* fix(cargo): proper license naming

Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com>
2021-04-14 19:10:39 +08:00
nothingismagick
fae4bbc7ab meta: toolchains & templates (#110)
* chore(tools): add rustfmt / toolchain

Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com>

* chore(.github)

Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com>

* chore(workflows): audit, clippy, fmt, udeps

Signed-off-by: Daniel Thompson-Yvetot <denjell@mailscript.com>

* Remove some files for simplicity

* cargo fmt

* cargo clippy

* Remove clippy ci check

There are several rules violate clippy but we use it for debug and compatibility for system api. So we have to remove it.

Co-authored-by: Ngo Iok Ui <wusyong9104@gmail.com>
2021-03-10 02:14:54 +08:00
Ngo Iok Ui
112074ab60 Initial webview2 impl 2021-02-20 03:41:27 +08:00
Ngo Iok Ui
a0980995f7 Add initial linux support 2021-02-04 06:57:34 +08:00
Yu-Wei Wu
c64b62790a Add initial macos support 2021-02-01 21:44:57 +08:00
Ngo Iok Ui
9e26b8b5d9 Cleanup 2021-01-30 14:38:20 +08:00
Ngo Iok Ui
5720335bfb Add minimum script logic 2021-01-29 20:29:09 +08:00
Ngo Iok Ui
722e1212a4 YES!!! BOOOOOOOOOOOOIIIIIIIIIIIIIII 2021-01-29 15:45:19 +08:00
Ngo Iok Ui
7f3321492f Update winrt-rs to windows-rs 2021-01-24 06:53:33 +08:00
Yu-Wei Wu
cdcae6ecda Add initial mac support 2021-01-23 21:44:21 +08:00
Ngo Iok Ui
4e4f5b39ec Add bind method on windows 2020-08-03 19:50:41 +08:00
Ngo Iok Ui
c9c9b9af21 Construct gtk interface 2020-07-20 17:33:19 +08:00
Ngo Iok Ui
c4e5448ef7 Init windows support 2020-07-19 05:29:01 +08:00