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"]
-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");
} }
+52 -24
View File
@@ -1,34 +1,62 @@
{ {
"productName": "learn-anything", "$schema": "..\\node_modules/@tauri-apps/cli\\schema.json",
"version": "0.1.0",
"identifier": "xyz.learn-anything",
"build": { "build": {
"beforeDevCommand": "bun run dev", "beforeBuildCommand": "npm run next-build",
"devUrl": "http://localhost:1420", "beforeDevCommand": "npm run next dev",
"beforeBuildCommand": "bun run build", "devPath": "http://localhost:3000",
"frontendDist": "../dist" "distDir": "../dist"
}, },
"app": { "package": {
"windows": [ "productName": "learn-anything-app",
{ "version": "0.1.0"
"title": "learn-anything", },
"width": 800, "tauri": {
"height": 600 "allowlist": {
} "all": true
],
"security": {
"csp": null
}
}, },
"bundle": { "bundle": {
"active": true, "active": true,
"category": "DeveloperTool",
"copyright": "",
"deb": {
"depends": []
},
"externalBin": [],
"icon": ["icons/32x32.png", "icons/128x128.png", "icons/128x128@2x.png", "icons/icon.icns", "icons/icon.ico"],
"identifier": "com.das.dev",
"longDescription": "",
"macOS": {
"entitlements": null,
"exceptionDomain": "",
"frameworks": [],
"providerShortName": null,
"signingIdentity": null
},
"resources": [],
"shortDescription": "",
"targets": "all", "targets": "all",
"icon": [ "windows": {
"icons/32x32.png", "certificateThumbprint": null,
"icons/128x128.png", "digestAlgorithm": "sha256",
"icons/128x128@2x.png", "timestampUrl": ""
"icons/icon.icns", }
"icons/icon.ico" },
"security": {
"csp": null
},
"updater": {
"active": false
},
"windows": [
{
"transparent": false,
"decorations": true,
"fullscreen": false,
"height": 600,
"resizable": true,
"title": "Learn Anything",
"width": 800
}
] ]
} }
} }