This commit is contained in:
Nikita
2024-08-27 16:19:24 +03:00
parent 31b6cc4b7f
commit 139aa744b9
9 changed files with 5416 additions and 76 deletions
+1 -4
View File
@@ -1,7 +1,4 @@
# Generated by Cargo # Generated by Cargo
# will have compiled files and executables # will have compiled files and executables
/target/ /target/
WixTools
# Generated by Tauri
# will have schema files for capabilities auto-completion
/gen/schemas
+5330
View File
File diff suppressed because it is too large Load Diff
+17 -12
View File
@@ -1,22 +1,27 @@
[package] [package]
name = "learn-anything" name = "learn-anything-app"
version = "0.1.0" version = "0.0.0"
description = "A Tauri App" description = "Learn Anything App"
authors = ["you"] authors = ["you"]
license = ""
repository = ""
edition = "2021" edition = "2021"
rust-version = "1.57"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
name = "learn_anything_lib"
crate-type = ["lib", "cdylib", "staticlib"]
[build-dependencies] [build-dependencies]
tauri-build = { version = "2.0.0-rc", features = [] } tauri-build = { version = "1.5", features = [] }
[dependencies] [dependencies]
tauri = { version = "2.0.0-rc", features = [] } serde_json = "1.0"
tauri-plugin-shell = "2.0.0-rc" serde = { version = "1.0", features = ["derive"] }
serde = { version = "1", features = ["derive"] } tauri = { version = "1.7", features = ["api-all"] }
serde_json = "1"
[features]
# by default Tauri runs in production mode
# when `tauri dev` runs it is executed with `cargo run --no-default-features` if `devPath` is an URL
default = ["custom-protocol"]
# this feature is used used for production builds where `devPath` points to the filesystem
# DO NOT remove this
custom-protocol = ["tauri/custom-protocol"]
+1 -1
View File
@@ -1,3 +1,3 @@
fn main() { fn main() {
tauri_build::build() tauri_build::build()
} }
-10
View File
@@ -1,10 +0,0 @@
{
"$schema": "../gen/schemas/desktop-schema.json",
"identifier": "default",
"description": "Capability for the main window",
"windows": ["main"],
"permissions": [
"core:default",
"shell:allow-open"
]
}
Binary file not shown.
-14
View File
@@ -1,14 +0,0 @@
// Learn more about Tauri commands at https://tauri.app/v1/guides/features/command
#[tauri::command]
fn greet(name: &str) -> String {
format!("Hello, {}! You've been greeted from Rust!", name)
}
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.plugin(tauri_plugin_shell::init())
.invoke_handler(tauri::generate_handler![greet])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}
+7 -3
View File
@@ -1,6 +1,10 @@
// Prevents additional console window on Windows in release, DO NOT REMOVE!! #![cfg_attr(
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")] all(not(debug_assertions), target_os = "windows"),
windows_subsystem = "windows"
)]
fn main() { fn main() {
learn_anything_lib::run() tauri::Builder::default()
.run(tauri::generate_context!())
.expect("error while running tauri application");
} }
+60 -32
View File
@@ -1,34 +1,62 @@
{ {
"productName": "learn-anything", "$schema": "..\\node_modules/@tauri-apps/cli\\schema.json",
"version": "0.1.0", "build": {
"identifier": "xyz.learn-anything", "beforeBuildCommand": "npm run next-build",
"build": { "beforeDevCommand": "npm run next dev",
"beforeDevCommand": "bun run dev", "devPath": "http://localhost:3000",
"devUrl": "http://localhost:1420", "distDir": "../dist"
"beforeBuildCommand": "bun run build", },
"frontendDist": "../dist" "package": {
}, "productName": "learn-anything-app",
"app": { "version": "0.1.0"
"windows": [ },
{ "tauri": {
"title": "learn-anything", "allowlist": {
"width": 800, "all": true
"height": 600 },
} "bundle": {
], "active": true,
"security": { "category": "DeveloperTool",
"csp": null "copyright": "",
} "deb": {
}, "depends": []
"bundle": { },
"active": true, "externalBin": [],
"targets": "all", "icon": ["icons/32x32.png", "icons/128x128.png", "icons/128x128@2x.png", "icons/icon.icns", "icons/icon.ico"],
"icon": [ "identifier": "com.das.dev",
"icons/32x32.png", "longDescription": "",
"icons/128x128.png", "macOS": {
"icons/128x128@2x.png", "entitlements": null,
"icons/icon.icns", "exceptionDomain": "",
"icons/icon.ico" "frameworks": [],
] "providerShortName": null,
} "signingIdentity": null
},
"resources": [],
"shortDescription": "",
"targets": "all",
"windows": {
"certificateThumbprint": null,
"digestAlgorithm": "sha256",
"timestampUrl": ""
}
},
"security": {
"csp": null
},
"updater": {
"active": false
},
"windows": [
{
"transparent": false,
"decorations": true,
"fullscreen": false,
"height": 600,
"resizable": true,
"title": "Learn Anything",
"width": 800
}
]
}
} }