website

#astro#js#html#css

git clone https://git.pyrossh.dev/website

木 Personal website of pyrossh. Built with astrojs, shiki, vite.


5e60934 — pyrossh 2025-06-03T22:39:10+05:30
add tauri

Generated files not shown: bun.lock, src-tauri/Cargo.lock

Files changed (66) hide show
  1. .gitignore +25 -0
  2. .vscode/extensions.json +7 -2
  3. package.json +2 -0
  4. src-tauri/.gitignore +7 -0
  5. src-tauri/Cargo.toml +25 -0
  6. src-tauri/build.rs +3 -0
  7. src-tauri/capabilities/default.json +10 -0
  8. src-tauri/gen/android/.editorconfig +12 -0
  9. src-tauri/gen/android/.gitignore +19 -0
  10. src-tauri/gen/android/app/.gitignore +6 -0
  11. src-tauri/gen/android/app/build.gradle.kts +69 -0
  12. src-tauri/gen/android/app/proguard-rules.pro +21 -0
  13. src-tauri/gen/android/app/src/main/AndroidManifest.xml +37 -0
  14. src-tauri/gen/android/app/src/main/java/dev/pyrossh/app/MainActivity.kt +3 -0
  15. src-tauri/gen/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml +30 -0
  16. src-tauri/gen/android/app/src/main/res/drawable/ic_launcher_background.xml +170 -0
  17. src-tauri/gen/android/app/src/main/res/layout/activity_main.xml +18 -0
  18. src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  19. src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png +0 -0
  20. src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  21. src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  22. src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png +0 -0
  23. src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  24. src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  25. src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png +0 -0
  26. src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  27. src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  28. src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png +0 -0
  29. src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  30. src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  31. src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png +0 -0
  32. src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  33. src-tauri/gen/android/app/src/main/res/values-night/themes.xml +6 -0
  34. src-tauri/gen/android/app/src/main/res/values/colors.xml +10 -0
  35. src-tauri/gen/android/app/src/main/res/values/strings.xml +4 -0
  36. src-tauri/gen/android/app/src/main/res/values/themes.xml +6 -0
  37. src-tauri/gen/android/app/src/main/res/xml/file_paths.xml +5 -0
  38. src-tauri/gen/android/build.gradle.kts +22 -0
  39. src-tauri/gen/android/buildSrc/build.gradle.kts +23 -0
  40. src-tauri/gen/android/buildSrc/src/main/java/dev/pyrossh/app/kotlin/BuildTask.kt +52 -0
  41. src-tauri/gen/android/buildSrc/src/main/java/dev/pyrossh/app/kotlin/RustPlugin.kt +85 -0
  42. src-tauri/gen/android/gradle.properties +24 -0
  43. src-tauri/gen/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  44. src-tauri/gen/android/gradle/wrapper/gradle-wrapper.properties +6 -0
  45. src-tauri/gen/android/gradlew +185 -0
  46. src-tauri/gen/android/gradlew.bat +89 -0
  47. src-tauri/gen/android/settings.gradle +3 -0
  48. src-tauri/icons/128x128.png +0 -0
  49. src-tauri/icons/[email protected] +0 -0
  50. src-tauri/icons/32x32.png +0 -0
  51. src-tauri/icons/Square107x107Logo.png +0 -0
  52. src-tauri/icons/Square142x142Logo.png +0 -0
  53. src-tauri/icons/Square150x150Logo.png +0 -0
  54. src-tauri/icons/Square284x284Logo.png +0 -0
  55. src-tauri/icons/Square30x30Logo.png +0 -0
  56. src-tauri/icons/Square310x310Logo.png +0 -0
  57. src-tauri/icons/Square44x44Logo.png +0 -0
  58. src-tauri/icons/Square71x71Logo.png +0 -0
  59. src-tauri/icons/Square89x89Logo.png +0 -0
  60. src-tauri/icons/StoreLogo.png +0 -0
  61. src-tauri/icons/icon.icns +0 -0
  62. src-tauri/icons/icon.ico +0 -0
  63. src-tauri/icons/icon.png +0 -0
  64. src-tauri/src/lib.rs +14 -0
  65. src-tauri/src/main.rs +6 -0
  66. src-tauri/tauri.conf.json +33 -0
.gitignore CHANGED
@@ -31,3 +31,28 @@ pnpm-debug.log*
31
31
  /playwright-report/
32
32
  /blob-report/
33
33
  /playwright/.cache/
34
+
35
+ # Logs
36
+ logs
37
+ *.log
38
+ npm-debug.log*
39
+ yarn-debug.log*
40
+ yarn-error.log*
41
+ pnpm-debug.log*
42
+ lerna-debug.log*
43
+
44
+ node_modules
45
+ dist
46
+ dist-ssr
47
+ *.local
48
+
49
+ # Editor directories and files
50
+ .vscode/*
51
+ !.vscode/extensions.json
52
+ .idea
53
+ .DS_Store
54
+ *.suo
55
+ *.ntvs*
56
+ *.njsproj
57
+ *.sln
58
+ *.sw?
.vscode/extensions.json CHANGED
@@ -1,4 +1,9 @@
1
1
  {
2
+ "recommendations": [
2
- "recommendations": ["astro-build.astro-vscode", "unifiedjs.vscode-mdx"],
3
+ "astro-build.astro-vscode",
4
+ "unifiedjs.vscode-mdx",
5
+ "tauri-apps.tauri-vscode",
6
+ "rust-lang.rust-analyzer"
7
+ ],
3
8
  "unwantedRecommendations": []
4
- }
9
+ }
package.json CHANGED
@@ -3,6 +3,7 @@
3
3
  "type": "module",
4
4
  "version": "0.0.1",
5
5
  "scripts": {
6
+ "tauri": "tauri",
6
7
  "dev": "astro dev",
7
8
  "build": "astro build"
8
9
  },
@@ -16,6 +17,7 @@
16
17
  "timeago.js": "^4.0.2"
17
18
  },
18
19
  "devDependencies": {
20
+ "@tauri-apps/cli": "^2",
19
21
  "@playwright/test": "^1.52.0",
20
22
  "@types/node": "^22.15.3"
21
23
  }
src-tauri/.gitignore ADDED
@@ -0,0 +1,7 @@
1
+ # Generated by Cargo
2
+ # will have compiled files and executables
3
+ /target/
4
+
5
+ # Generated by Tauri
6
+ # will have schema files for capabilities auto-completion
7
+ /gen/schemas
src-tauri/Cargo.toml ADDED
@@ -0,0 +1,25 @@
1
+ [package]
2
+ name = "app"
3
+ version = "0.1.0"
4
+ description = "A Tauri App"
5
+ authors = ["you"]
6
+ edition = "2021"
7
+
8
+ # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
9
+
10
+ [lib]
11
+ # The `_lib` suffix may seem redundant but it is necessary
12
+ # to make the lib name unique and wouldn't conflict with the bin name.
13
+ # This seems to be only an issue on Windows, see https://github.com/rust-lang/cargo/issues/8519
14
+ name = "app_lib"
15
+ crate-type = ["staticlib", "cdylib", "rlib"]
16
+
17
+ [build-dependencies]
18
+ tauri-build = { version = "2", features = [] }
19
+
20
+ [dependencies]
21
+ tauri = { version = "2", features = [] }
22
+ tauri-plugin-opener = "2"
23
+ serde = { version = "1", features = ["derive"] }
24
+ serde_json = "1"
25
+
src-tauri/build.rs ADDED
@@ -0,0 +1,3 @@
1
+ fn main() {
2
+ tauri_build::build()
3
+ }
src-tauri/capabilities/default.json ADDED
@@ -0,0 +1,10 @@
1
+ {
2
+ "$schema": "../gen/schemas/desktop-schema.json",
3
+ "identifier": "default",
4
+ "description": "Capability for the main window",
5
+ "windows": ["main"],
6
+ "permissions": [
7
+ "core:default",
8
+ "opener:default"
9
+ ]
10
+ }
src-tauri/gen/android/.editorconfig ADDED
@@ -0,0 +1,12 @@
1
+ # EditorConfig is awesome: https://EditorConfig.org
2
+
3
+ # top-most EditorConfig file
4
+ root = true
5
+
6
+ [*]
7
+ indent_style = space
8
+ indent_size = 2
9
+ end_of_line = lf
10
+ charset = utf-8
11
+ trim_trailing_whitespace = false
12
+ insert_final_newline = false
src-tauri/gen/android/.gitignore ADDED
@@ -0,0 +1,19 @@
1
+ *.iml
2
+ .gradle
3
+ /local.properties
4
+ /.idea/caches
5
+ /.idea/libraries
6
+ /.idea/modules.xml
7
+ /.idea/workspace.xml
8
+ /.idea/navEditor.xml
9
+ /.idea/assetWizardSettings.xml
10
+ .DS_Store
11
+ build
12
+ /captures
13
+ .externalNativeBuild
14
+ .cxx
15
+ local.properties
16
+ key.properties
17
+
18
+ /.tauri
19
+ /tauri.settings.gradle
src-tauri/gen/android/app/.gitignore ADDED
@@ -0,0 +1,6 @@
1
+ /src/main/java/dev/pyrossh/app/generated
2
+ /src/main/jniLibs/**/*.so
3
+ /src/main/assets/tauri.conf.json
4
+ /tauri.build.gradle.kts
5
+ /proguard-tauri.pro
6
+ /tauri.properties
src-tauri/gen/android/app/build.gradle.kts ADDED
@@ -0,0 +1,69 @@
1
+ import java.util.Properties
2
+
3
+ plugins {
4
+ id("com.android.application")
5
+ id("org.jetbrains.kotlin.android")
6
+ id("rust")
7
+ }
8
+
9
+ val tauriProperties = Properties().apply {
10
+ val propFile = file("tauri.properties")
11
+ if (propFile.exists()) {
12
+ propFile.inputStream().use { load(it) }
13
+ }
14
+ }
15
+
16
+ android {
17
+ compileSdk = 34
18
+ namespace = "dev.pyrossh.app"
19
+ defaultConfig {
20
+ manifestPlaceholders["usesCleartextTraffic"] = "false"
21
+ applicationId = "dev.pyrossh.app"
22
+ minSdk = 24
23
+ targetSdk = 34
24
+ versionCode = tauriProperties.getProperty("tauri.android.versionCode", "1").toInt()
25
+ versionName = tauriProperties.getProperty("tauri.android.versionName", "1.0")
26
+ }
27
+ buildTypes {
28
+ getByName("debug") {
29
+ manifestPlaceholders["usesCleartextTraffic"] = "true"
30
+ isDebuggable = true
31
+ isJniDebuggable = true
32
+ isMinifyEnabled = false
33
+ packaging { jniLibs.keepDebugSymbols.add("*/arm64-v8a/*.so")
34
+ jniLibs.keepDebugSymbols.add("*/armeabi-v7a/*.so")
35
+ jniLibs.keepDebugSymbols.add("*/x86/*.so")
36
+ jniLibs.keepDebugSymbols.add("*/x86_64/*.so")
37
+ }
38
+ }
39
+ getByName("release") {
40
+ isMinifyEnabled = true
41
+ proguardFiles(
42
+ *fileTree(".") { include("**/*.pro") }
43
+ .plus(getDefaultProguardFile("proguard-android-optimize.txt"))
44
+ .toList().toTypedArray()
45
+ )
46
+ }
47
+ }
48
+ kotlinOptions {
49
+ jvmTarget = "1.8"
50
+ }
51
+ buildFeatures {
52
+ buildConfig = true
53
+ }
54
+ }
55
+
56
+ rust {
57
+ rootDirRel = "../../../"
58
+ }
59
+
60
+ dependencies {
61
+ implementation("androidx.webkit:webkit:1.6.1")
62
+ implementation("androidx.appcompat:appcompat:1.6.1")
63
+ implementation("com.google.android.material:material:1.8.0")
64
+ testImplementation("junit:junit:4.13.2")
65
+ androidTestImplementation("androidx.test.ext:junit:1.1.4")
66
+ androidTestImplementation("androidx.test.espresso:espresso-core:3.5.0")
67
+ }
68
+
69
+ apply(from = "tauri.build.gradle.kts")
src-tauri/gen/android/app/proguard-rules.pro ADDED
@@ -0,0 +1,21 @@
1
+ # Add project specific ProGuard rules here.
2
+ # You can control the set of applied configuration files using the
3
+ # proguardFiles setting in build.gradle.
4
+ #
5
+ # For more details, see
6
+ # http://developer.android.com/guide/developing/tools/proguard.html
7
+
8
+ # If your project uses WebView with JS, uncomment the following
9
+ # and specify the fully qualified class name to the JavaScript interface
10
+ # class:
11
+ #-keepclassmembers class fqcn.of.javascript.interface.for.webview {
12
+ # public *;
13
+ #}
14
+
15
+ # Uncomment this to preserve the line number information for
16
+ # debugging stack traces.
17
+ #-keepattributes SourceFile,LineNumberTable
18
+
19
+ # If you keep the line number information, uncomment this to
20
+ # hide the original source file name.
21
+ #-renamesourcefileattribute SourceFile
src-tauri/gen/android/app/src/main/AndroidManifest.xml ADDED
@@ -0,0 +1,37 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android">
3
+ <uses-permission android:name="android.permission.INTERNET" />
4
+
5
+ <!-- AndroidTV support -->
6
+ <uses-feature android:name="android.software.leanback" android:required="false" />
7
+
8
+ <application
9
+ android:icon="@mipmap/ic_launcher"
10
+ android:label="@string/app_name"
11
+ android:theme="@style/Theme.app"
12
+ android:usesCleartextTraffic="${usesCleartextTraffic}">
13
+ <activity
14
+ android:configChanges="orientation|keyboardHidden|keyboard|screenSize|locale|smallestScreenSize|screenLayout|uiMode"
15
+ android:launchMode="singleTask"
16
+ android:label="@string/main_activity_title"
17
+ android:name=".MainActivity"
18
+ android:exported="true">
19
+ <intent-filter>
20
+ <action android:name="android.intent.action.MAIN" />
21
+ <category android:name="android.intent.category.LAUNCHER" />
22
+ <!-- AndroidTV support -->
23
+ <category android:name="android.intent.category.LEANBACK_LAUNCHER" />
24
+ </intent-filter>
25
+ </activity>
26
+
27
+ <provider
28
+ android:name="androidx.core.content.FileProvider"
29
+ android:authorities="${applicationId}.fileprovider"
30
+ android:exported="false"
31
+ android:grantUriPermissions="true">
32
+ <meta-data
33
+ android:name="android.support.FILE_PROVIDER_PATHS"
34
+ android:resource="@xml/file_paths" />
35
+ </provider>
36
+ </application>
37
+ </manifest>
src-tauri/gen/android/app/src/main/java/dev/pyrossh/app/MainActivity.kt ADDED
@@ -0,0 +1,3 @@
1
+ package dev.pyrossh.app
2
+
3
+ class MainActivity : TauriActivity()
src-tauri/gen/android/app/src/main/res/drawable-v24/ic_launcher_foreground.xml ADDED
@@ -0,0 +1,30 @@
1
+ <vector xmlns:android="http://schemas.android.com/apk/res/android"
2
+ xmlns:aapt="http://schemas.android.com/aapt"
3
+ android:width="108dp"
4
+ android:height="108dp"
5
+ android:viewportWidth="108"
6
+ android:viewportHeight="108">
7
+ <path android:pathData="M31,63.928c0,0 6.4,-11 12.1,-13.1c7.2,-2.6 26,-1.4 26,-1.4l38.1,38.1L107,108.928l-32,-1L31,63.928z">
8
+ <aapt:attr name="android:fillColor">
9
+ <gradient
10
+ android:endX="85.84757"
11
+ android:endY="92.4963"
12
+ android:startX="42.9492"
13
+ android:startY="49.59793"
14
+ android:type="linear">
15
+ <item
16
+ android:color="#44000000"
17
+ android:offset="0.0" />
18
+ <item
19
+ android:color="#00000000"
20
+ android:offset="1.0" />
21
+ </gradient>
22
+ </aapt:attr>
23
+ </path>
24
+ <path
25
+ android:fillColor="#FFFFFF"
26
+ android:fillType="nonZero"
27
+ android:pathData="M65.3,45.828l3.8,-6.6c0.2,-0.4 0.1,-0.9 -0.3,-1.1c-0.4,-0.2 -0.9,-0.1 -1.1,0.3l-3.9,6.7c-6.3,-2.8 -13.4,-2.8 -19.7,0l-3.9,-6.7c-0.2,-0.4 -0.7,-0.5 -1.1,-0.3C38.8,38.328 38.7,38.828 38.9,39.228l3.8,6.6C36.2,49.428 31.7,56.028 31,63.928h46C76.3,56.028 71.8,49.428 65.3,45.828zM43.4,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2c-0.3,-0.7 -0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C45.3,56.528 44.5,57.328 43.4,57.328L43.4,57.328zM64.6,57.328c-0.8,0 -1.5,-0.5 -1.8,-1.2s-0.1,-1.5 0.4,-2.1c0.5,-0.5 1.4,-0.7 2.1,-0.4c0.7,0.3 1.2,1 1.2,1.8C66.5,56.528 65.6,57.328 64.6,57.328L64.6,57.328z"
28
+ android:strokeWidth="1"
29
+ android:strokeColor="#00000000" />
30
+ </vector>
src-tauri/gen/android/app/src/main/res/drawable/ic_launcher_background.xml ADDED
@@ -0,0 +1,170 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <vector xmlns:android="http://schemas.android.com/apk/res/android"
3
+ android:width="108dp"
4
+ android:height="108dp"
5
+ android:viewportWidth="108"
6
+ android:viewportHeight="108">
7
+ <path
8
+ android:fillColor="#3DDC84"
9
+ android:pathData="M0,0h108v108h-108z" />
10
+ <path
11
+ android:fillColor="#00000000"
12
+ android:pathData="M9,0L9,108"
13
+ android:strokeWidth="0.8"
14
+ android:strokeColor="#33FFFFFF" />
15
+ <path
16
+ android:fillColor="#00000000"
17
+ android:pathData="M19,0L19,108"
18
+ android:strokeWidth="0.8"
19
+ android:strokeColor="#33FFFFFF" />
20
+ <path
21
+ android:fillColor="#00000000"
22
+ android:pathData="M29,0L29,108"
23
+ android:strokeWidth="0.8"
24
+ android:strokeColor="#33FFFFFF" />
25
+ <path
26
+ android:fillColor="#00000000"
27
+ android:pathData="M39,0L39,108"
28
+ android:strokeWidth="0.8"
29
+ android:strokeColor="#33FFFFFF" />
30
+ <path
31
+ android:fillColor="#00000000"
32
+ android:pathData="M49,0L49,108"
33
+ android:strokeWidth="0.8"
34
+ android:strokeColor="#33FFFFFF" />
35
+ <path
36
+ android:fillColor="#00000000"
37
+ android:pathData="M59,0L59,108"
38
+ android:strokeWidth="0.8"
39
+ android:strokeColor="#33FFFFFF" />
40
+ <path
41
+ android:fillColor="#00000000"
42
+ android:pathData="M69,0L69,108"
43
+ android:strokeWidth="0.8"
44
+ android:strokeColor="#33FFFFFF" />
45
+ <path
46
+ android:fillColor="#00000000"
47
+ android:pathData="M79,0L79,108"
48
+ android:strokeWidth="0.8"
49
+ android:strokeColor="#33FFFFFF" />
50
+ <path
51
+ android:fillColor="#00000000"
52
+ android:pathData="M89,0L89,108"
53
+ android:strokeWidth="0.8"
54
+ android:strokeColor="#33FFFFFF" />
55
+ <path
56
+ android:fillColor="#00000000"
57
+ android:pathData="M99,0L99,108"
58
+ android:strokeWidth="0.8"
59
+ android:strokeColor="#33FFFFFF" />
60
+ <path
61
+ android:fillColor="#00000000"
62
+ android:pathData="M0,9L108,9"
63
+ android:strokeWidth="0.8"
64
+ android:strokeColor="#33FFFFFF" />
65
+ <path
66
+ android:fillColor="#00000000"
67
+ android:pathData="M0,19L108,19"
68
+ android:strokeWidth="0.8"
69
+ android:strokeColor="#33FFFFFF" />
70
+ <path
71
+ android:fillColor="#00000000"
72
+ android:pathData="M0,29L108,29"
73
+ android:strokeWidth="0.8"
74
+ android:strokeColor="#33FFFFFF" />
75
+ <path
76
+ android:fillColor="#00000000"
77
+ android:pathData="M0,39L108,39"
78
+ android:strokeWidth="0.8"
79
+ android:strokeColor="#33FFFFFF" />
80
+ <path
81
+ android:fillColor="#00000000"
82
+ android:pathData="M0,49L108,49"
83
+ android:strokeWidth="0.8"
84
+ android:strokeColor="#33FFFFFF" />
85
+ <path
86
+ android:fillColor="#00000000"
87
+ android:pathData="M0,59L108,59"
88
+ android:strokeWidth="0.8"
89
+ android:strokeColor="#33FFFFFF" />
90
+ <path
91
+ android:fillColor="#00000000"
92
+ android:pathData="M0,69L108,69"
93
+ android:strokeWidth="0.8"
94
+ android:strokeColor="#33FFFFFF" />
95
+ <path
96
+ android:fillColor="#00000000"
97
+ android:pathData="M0,79L108,79"
98
+ android:strokeWidth="0.8"
99
+ android:strokeColor="#33FFFFFF" />
100
+ <path
101
+ android:fillColor="#00000000"
102
+ android:pathData="M0,89L108,89"
103
+ android:strokeWidth="0.8"
104
+ android:strokeColor="#33FFFFFF" />
105
+ <path
106
+ android:fillColor="#00000000"
107
+ android:pathData="M0,99L108,99"
108
+ android:strokeWidth="0.8"
109
+ android:strokeColor="#33FFFFFF" />
110
+ <path
111
+ android:fillColor="#00000000"
112
+ android:pathData="M19,29L89,29"
113
+ android:strokeWidth="0.8"
114
+ android:strokeColor="#33FFFFFF" />
115
+ <path
116
+ android:fillColor="#00000000"
117
+ android:pathData="M19,39L89,39"
118
+ android:strokeWidth="0.8"
119
+ android:strokeColor="#33FFFFFF" />
120
+ <path
121
+ android:fillColor="#00000000"
122
+ android:pathData="M19,49L89,49"
123
+ android:strokeWidth="0.8"
124
+ android:strokeColor="#33FFFFFF" />
125
+ <path
126
+ android:fillColor="#00000000"
127
+ android:pathData="M19,59L89,59"
128
+ android:strokeWidth="0.8"
129
+ android:strokeColor="#33FFFFFF" />
130
+ <path
131
+ android:fillColor="#00000000"
132
+ android:pathData="M19,69L89,69"
133
+ android:strokeWidth="0.8"
134
+ android:strokeColor="#33FFFFFF" />
135
+ <path
136
+ android:fillColor="#00000000"
137
+ android:pathData="M19,79L89,79"
138
+ android:strokeWidth="0.8"
139
+ android:strokeColor="#33FFFFFF" />
140
+ <path
141
+ android:fillColor="#00000000"
142
+ android:pathData="M29,19L29,89"
143
+ android:strokeWidth="0.8"
144
+ android:strokeColor="#33FFFFFF" />
145
+ <path
146
+ android:fillColor="#00000000"
147
+ android:pathData="M39,19L39,89"
148
+ android:strokeWidth="0.8"
149
+ android:strokeColor="#33FFFFFF" />
150
+ <path
151
+ android:fillColor="#00000000"
152
+ android:pathData="M49,19L49,89"
153
+ android:strokeWidth="0.8"
154
+ android:strokeColor="#33FFFFFF" />
155
+ <path
156
+ android:fillColor="#00000000"
157
+ android:pathData="M59,19L59,89"
158
+ android:strokeWidth="0.8"
159
+ android:strokeColor="#33FFFFFF" />
160
+ <path
161
+ android:fillColor="#00000000"
162
+ android:pathData="M69,19L69,89"
163
+ android:strokeWidth="0.8"
164
+ android:strokeColor="#33FFFFFF" />
165
+ <path
166
+ android:fillColor="#00000000"
167
+ android:pathData="M79,19L79,89"
168
+ android:strokeWidth="0.8"
169
+ android:strokeColor="#33FFFFFF" />
170
+ </vector>
src-tauri/gen/android/app/src/main/res/layout/activity_main.xml ADDED
@@ -0,0 +1,18 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
3
+ xmlns:app="http://schemas.android.com/apk/res-auto"
4
+ xmlns:tools="http://schemas.android.com/tools"
5
+ android:layout_width="match_parent"
6
+ android:layout_height="match_parent"
7
+ tools:context=".MainActivity">
8
+
9
+ <TextView
10
+ android:layout_width="wrap_content"
11
+ android:layout_height="wrap_content"
12
+ android:text="Hello World!"
13
+ app:layout_constraintBottom_toBottomOf="parent"
14
+ app:layout_constraintLeft_toLeftOf="parent"
15
+ app:layout_constraintRight_toRightOf="parent"
16
+ app:layout_constraintTop_toTopOf="parent" />
17
+
18
+ </androidx.constraintlayout.widget.ConstraintLayout>
src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher.png ADDED
Binary file
src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher_foreground.png ADDED
Binary file
src-tauri/gen/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png ADDED
Binary file
src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher.png ADDED
Binary file
src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher_foreground.png ADDED
Binary file
src-tauri/gen/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png ADDED
Binary file
src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png ADDED
Binary file
src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher_foreground.png ADDED
Binary file
src-tauri/gen/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png ADDED
Binary file
src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png ADDED
Binary file
src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_foreground.png ADDED
Binary file
src-tauri/gen/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png ADDED
Binary file
src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png ADDED
Binary file
src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_foreground.png ADDED
Binary file
src-tauri/gen/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png ADDED
Binary file
src-tauri/gen/android/app/src/main/res/values-night/themes.xml ADDED
@@ -0,0 +1,6 @@
1
+ <resources xmlns:tools="http://schemas.android.com/tools">
2
+ <!-- Base application theme. -->
3
+ <style name="Theme.app" parent="Theme.MaterialComponents.DayNight.NoActionBar">
4
+ <!-- Customize your theme here. -->
5
+ </style>
6
+ </resources>
src-tauri/gen/android/app/src/main/res/values/colors.xml ADDED
@@ -0,0 +1,10 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <resources>
3
+ <color name="purple_200">#FFBB86FC</color>
4
+ <color name="purple_500">#FF6200EE</color>
5
+ <color name="purple_700">#FF3700B3</color>
6
+ <color name="teal_200">#FF03DAC5</color>
7
+ <color name="teal_700">#FF018786</color>
8
+ <color name="black">#FF000000</color>
9
+ <color name="white">#FFFFFFFF</color>
10
+ </resources>
src-tauri/gen/android/app/src/main/res/values/strings.xml ADDED
@@ -0,0 +1,4 @@
1
+ <resources>
2
+ <string name="app_name">app</string>
3
+ <string name="main_activity_title">app</string>
4
+ </resources>
src-tauri/gen/android/app/src/main/res/values/themes.xml ADDED
@@ -0,0 +1,6 @@
1
+ <resources xmlns:tools="http://schemas.android.com/tools">
2
+ <!-- Base application theme. -->
3
+ <style name="Theme.app" parent="Theme.MaterialComponents.DayNight.NoActionBar">
4
+ <!-- Customize your theme here. -->
5
+ </style>
6
+ </resources>
src-tauri/gen/android/app/src/main/res/xml/file_paths.xml ADDED
@@ -0,0 +1,5 @@
1
+ <?xml version="1.0" encoding="utf-8"?>
2
+ <paths xmlns:android="http://schemas.android.com/apk/res/android">
3
+ <external-path name="my_images" path="." />
4
+ <cache-path name="my_cache_images" path="." />
5
+ </paths>
src-tauri/gen/android/build.gradle.kts ADDED
@@ -0,0 +1,22 @@
1
+ buildscript {
2
+ repositories {
3
+ google()
4
+ mavenCentral()
5
+ }
6
+ dependencies {
7
+ classpath("com.android.tools.build:gradle:8.5.1")
8
+ classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.9.25")
9
+ }
10
+ }
11
+
12
+ allprojects {
13
+ repositories {
14
+ google()
15
+ mavenCentral()
16
+ }
17
+ }
18
+
19
+ tasks.register("clean").configure {
20
+ delete("build")
21
+ }
22
+
src-tauri/gen/android/buildSrc/build.gradle.kts ADDED
@@ -0,0 +1,23 @@
1
+ plugins {
2
+ `kotlin-dsl`
3
+ }
4
+
5
+ gradlePlugin {
6
+ plugins {
7
+ create("pluginsForCoolKids") {
8
+ id = "rust"
9
+ implementationClass = "RustPlugin"
10
+ }
11
+ }
12
+ }
13
+
14
+ repositories {
15
+ google()
16
+ mavenCentral()
17
+ }
18
+
19
+ dependencies {
20
+ compileOnly(gradleApi())
21
+ implementation("com.android.tools.build:gradle:8.5.1")
22
+ }
23
+
src-tauri/gen/android/buildSrc/src/main/java/dev/pyrossh/app/kotlin/BuildTask.kt ADDED
@@ -0,0 +1,52 @@
1
+ import java.io.File
2
+ import org.apache.tools.ant.taskdefs.condition.Os
3
+ import org.gradle.api.DefaultTask
4
+ import org.gradle.api.GradleException
5
+ import org.gradle.api.logging.LogLevel
6
+ import org.gradle.api.tasks.Input
7
+ import org.gradle.api.tasks.TaskAction
8
+
9
+ open class BuildTask : DefaultTask() {
10
+ @Input
11
+ var rootDirRel: String? = null
12
+ @Input
13
+ var target: String? = null
14
+ @Input
15
+ var release: Boolean? = null
16
+
17
+ @TaskAction
18
+ fun assemble() {
19
+ val executable = """/opt/homebrew/bin/bun""";
20
+ try {
21
+ runTauriCli(executable)
22
+ } catch (e: Exception) {
23
+ if (Os.isFamily(Os.FAMILY_WINDOWS)) {
24
+ runTauriCli("$executable.cmd")
25
+ } else {
26
+ throw e;
27
+ }
28
+ }
29
+ }
30
+
31
+ fun runTauriCli(executable: String) {
32
+ val rootDirRel = rootDirRel ?: throw GradleException("rootDirRel cannot be null")
33
+ val target = target ?: throw GradleException("target cannot be null")
34
+ val release = release ?: throw GradleException("release cannot be null")
35
+ val args = listOf("tauri", "android", "android-studio-script");
36
+
37
+ project.exec {
38
+ workingDir(File(project.projectDir, rootDirRel))
39
+ executable(executable)
40
+ args(args)
41
+ if (project.logger.isEnabled(LogLevel.DEBUG)) {
42
+ args("-vv")
43
+ } else if (project.logger.isEnabled(LogLevel.INFO)) {
44
+ args("-v")
45
+ }
46
+ if (release) {
47
+ args("--release")
48
+ }
49
+ args(listOf("--target", target))
50
+ }.assertNormalExitValue()
51
+ }
52
+ }
src-tauri/gen/android/buildSrc/src/main/java/dev/pyrossh/app/kotlin/RustPlugin.kt ADDED
@@ -0,0 +1,85 @@
1
+ import com.android.build.api.dsl.ApplicationExtension
2
+ import org.gradle.api.DefaultTask
3
+ import org.gradle.api.Plugin
4
+ import org.gradle.api.Project
5
+ import org.gradle.kotlin.dsl.configure
6
+ import org.gradle.kotlin.dsl.get
7
+
8
+ const val TASK_GROUP = "rust"
9
+
10
+ open class Config {
11
+ lateinit var rootDirRel: String
12
+ }
13
+
14
+ open class RustPlugin : Plugin<Project> {
15
+ private lateinit var config: Config
16
+
17
+ override fun apply(project: Project) = with(project) {
18
+ config = extensions.create("rust", Config::class.java)
19
+
20
+ val defaultAbiList = listOf("arm64-v8a", "armeabi-v7a", "x86", "x86_64");
21
+ val abiList = (findProperty("abiList") as? String)?.split(',') ?: defaultAbiList
22
+
23
+ val defaultArchList = listOf("arm64", "arm", "x86", "x86_64");
24
+ val archList = (findProperty("archList") as? String)?.split(',') ?: defaultArchList
25
+
26
+ val targetsList = (findProperty("targetList") as? String)?.split(',') ?: listOf("aarch64", "armv7", "i686", "x86_64")
27
+
28
+ extensions.configure<ApplicationExtension> {
29
+ @Suppress("UnstableApiUsage")
30
+ flavorDimensions.add("abi")
31
+ productFlavors {
32
+ create("universal") {
33
+ dimension = "abi"
34
+ ndk {
35
+ abiFilters += abiList
36
+ }
37
+ }
38
+ defaultArchList.forEachIndexed { index, arch ->
39
+ create(arch) {
40
+ dimension = "abi"
41
+ ndk {
42
+ abiFilters.add(defaultAbiList[index])
43
+ }
44
+ }
45
+ }
46
+ }
47
+ }
48
+
49
+ afterEvaluate {
50
+ for (profile in listOf("debug", "release")) {
51
+ val profileCapitalized = profile.replaceFirstChar { it.uppercase() }
52
+ val buildTask = tasks.maybeCreate(
53
+ "rustBuildUniversal$profileCapitalized",
54
+ DefaultTask::class.java
55
+ ).apply {
56
+ group = TASK_GROUP
57
+ description = "Build dynamic library in $profile mode for all targets"
58
+ }
59
+
60
+ tasks["mergeUniversal${profileCapitalized}JniLibFolders"].dependsOn(buildTask)
61
+
62
+ for (targetPair in targetsList.withIndex()) {
63
+ val targetName = targetPair.value
64
+ val targetArch = archList[targetPair.index]
65
+ val targetArchCapitalized = targetArch.replaceFirstChar { it.uppercase() }
66
+ val targetBuildTask = project.tasks.maybeCreate(
67
+ "rustBuild$targetArchCapitalized$profileCapitalized",
68
+ BuildTask::class.java
69
+ ).apply {
70
+ group = TASK_GROUP
71
+ description = "Build dynamic library in $profile mode for $targetArch"
72
+ rootDirRel = config.rootDirRel
73
+ target = targetName
74
+ release = profile == "release"
75
+ }
76
+
77
+ buildTask.dependsOn(targetBuildTask)
78
+ tasks["merge$targetArchCapitalized${profileCapitalized}JniLibFolders"].dependsOn(
79
+ targetBuildTask
80
+ )
81
+ }
82
+ }
83
+ }
84
+ }
85
+ }
src-tauri/gen/android/gradle.properties ADDED
@@ -0,0 +1,24 @@
1
+ # Project-wide Gradle settings.
2
+ # IDE (e.g. Android Studio) users:
3
+ # Gradle settings configured through the IDE *will override*
4
+ # any settings specified in this file.
5
+ # For more details on how to configure your build environment visit
6
+ # http://www.gradle.org/docs/current/userguide/build_environment.html
7
+ # Specifies the JVM arguments used for the daemon process.
8
+ # The setting is particularly useful for tweaking memory settings.
9
+ org.gradle.jvmargs=-Xmx2048m -Dfile.encoding=UTF-8
10
+ # When configured, Gradle will run in incubating parallel mode.
11
+ # This option should only be used with decoupled projects. More details, visit
12
+ # http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
13
+ # org.gradle.parallel=true
14
+ # AndroidX package structure to make it clearer which packages are bundled with the
15
+ # Android operating system, and which are packaged with your app"s APK
16
+ # https://developer.android.com/topic/libraries/support-library/androidx-rn
17
+ android.useAndroidX=true
18
+ # Kotlin code style for this project: "official" or "obsolete":
19
+ kotlin.code.style=official
20
+ # Enables namespacing of each library's R class so that its R class includes only the
21
+ # resources declared in the library itself and none from the library's dependencies,
22
+ # thereby reducing the size of the R class for that library
23
+ android.nonTransitiveRClass=true
24
+ android.nonFinalResIds=false
src-tauri/gen/android/gradle/wrapper/gradle-wrapper.jar ADDED
Binary file
src-tauri/gen/android/gradle/wrapper/gradle-wrapper.properties ADDED
@@ -0,0 +1,6 @@
1
+ #Tue May 10 19:22:52 CST 2022
2
+ distributionBase=GRADLE_USER_HOME
3
+ distributionUrl=https\://services.gradle.org/distributions/gradle-8.9-bin.zip
4
+ distributionPath=wrapper/dists
5
+ zipStorePath=wrapper/dists
6
+ zipStoreBase=GRADLE_USER_HOME
src-tauri/gen/android/gradlew ADDED
@@ -0,0 +1,185 @@
1
+ #!/usr/bin/env sh
2
+
3
+ #
4
+ # Copyright 2015 the original author or authors.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+
19
+ ##############################################################################
20
+ ##
21
+ ## Gradle start up script for UN*X
22
+ ##
23
+ ##############################################################################
24
+
25
+ # Attempt to set APP_HOME
26
+ # Resolve links: $0 may be a link
27
+ PRG="$0"
28
+ # Need this for relative symlinks.
29
+ while [ -h "$PRG" ] ; do
30
+ ls=`ls -ld "$PRG"`
31
+ link=`expr "$ls" : '.*-> \(.*\)$'`
32
+ if expr "$link" : '/.*' > /dev/null; then
33
+ PRG="$link"
34
+ else
35
+ PRG=`dirname "$PRG"`"/$link"
36
+ fi
37
+ done
38
+ SAVED="`pwd`"
39
+ cd "`dirname \"$PRG\"`/" >/dev/null
40
+ APP_HOME="`pwd -P`"
41
+ cd "$SAVED" >/dev/null
42
+
43
+ APP_NAME="Gradle"
44
+ APP_BASE_NAME=`basename "$0"`
45
+
46
+ # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
47
+ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
48
+
49
+ # Use the maximum available, or set MAX_FD != -1 to use that value.
50
+ MAX_FD="maximum"
51
+
52
+ warn () {
53
+ echo "$*"
54
+ }
55
+
56
+ die () {
57
+ echo
58
+ echo "$*"
59
+ echo
60
+ exit 1
61
+ }
62
+
63
+ # OS specific support (must be 'true' or 'false').
64
+ cygwin=false
65
+ msys=false
66
+ darwin=false
67
+ nonstop=false
68
+ case "`uname`" in
69
+ CYGWIN* )
70
+ cygwin=true
71
+ ;;
72
+ Darwin* )
73
+ darwin=true
74
+ ;;
75
+ MINGW* )
76
+ msys=true
77
+ ;;
78
+ NONSTOP* )
79
+ nonstop=true
80
+ ;;
81
+ esac
82
+
83
+ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
84
+
85
+
86
+ # Determine the Java command to use to start the JVM.
87
+ if [ -n "$JAVA_HOME" ] ; then
88
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
89
+ # IBM's JDK on AIX uses strange locations for the executables
90
+ JAVACMD="$JAVA_HOME/jre/sh/java"
91
+ else
92
+ JAVACMD="$JAVA_HOME/bin/java"
93
+ fi
94
+ if [ ! -x "$JAVACMD" ] ; then
95
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
96
+
97
+ Please set the JAVA_HOME variable in your environment to match the
98
+ location of your Java installation."
99
+ fi
100
+ else
101
+ JAVACMD="java"
102
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
103
+
104
+ Please set the JAVA_HOME variable in your environment to match the
105
+ location of your Java installation."
106
+ fi
107
+
108
+ # Increase the maximum file descriptors if we can.
109
+ if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
110
+ MAX_FD_LIMIT=`ulimit -H -n`
111
+ if [ $? -eq 0 ] ; then
112
+ if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
113
+ MAX_FD="$MAX_FD_LIMIT"
114
+ fi
115
+ ulimit -n $MAX_FD
116
+ if [ $? -ne 0 ] ; then
117
+ warn "Could not set maximum file descriptor limit: $MAX_FD"
118
+ fi
119
+ else
120
+ warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
121
+ fi
122
+ fi
123
+
124
+ # For Darwin, add options to specify how the application appears in the dock
125
+ if $darwin; then
126
+ GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
127
+ fi
128
+
129
+ # For Cygwin or MSYS, switch paths to Windows format before running java
130
+ if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
131
+ APP_HOME=`cygpath --path --mixed "$APP_HOME"`
132
+ CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133
+
134
+ JAVACMD=`cygpath --unix "$JAVACMD"`
135
+
136
+ # We build the pattern for arguments to be converted via cygpath
137
+ ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
138
+ SEP=""
139
+ for dir in $ROOTDIRSRAW ; do
140
+ ROOTDIRS="$ROOTDIRS$SEP$dir"
141
+ SEP="|"
142
+ done
143
+ OURCYGPATTERN="(^($ROOTDIRS))"
144
+ # Add a user-defined pattern to the cygpath arguments
145
+ if [ "$GRADLE_CYGPATTERN" != "" ] ; then
146
+ OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
147
+ fi
148
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
149
+ i=0
150
+ for arg in "$@" ; do
151
+ CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
152
+ CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
153
+
154
+ if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
155
+ eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
156
+ else
157
+ eval `echo args$i`="\"$arg\""
158
+ fi
159
+ i=`expr $i + 1`
160
+ done
161
+ case $i in
162
+ 0) set -- ;;
163
+ 1) set -- "$args0" ;;
164
+ 2) set -- "$args0" "$args1" ;;
165
+ 3) set -- "$args0" "$args1" "$args2" ;;
166
+ 4) set -- "$args0" "$args1" "$args2" "$args3" ;;
167
+ 5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
168
+ 6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
169
+ 7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
170
+ 8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
171
+ 9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
172
+ esac
173
+ fi
174
+
175
+ # Escape application args
176
+ save () {
177
+ for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
178
+ echo " "
179
+ }
180
+ APP_ARGS=`save "$@"`
181
+
182
+ # Collect all arguments for the java command, following the shell quoting and substitution rules
183
+ eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
184
+
185
+ exec "$JAVACMD" "$@"
src-tauri/gen/android/gradlew.bat ADDED
@@ -0,0 +1,89 @@
1
+ @rem
2
+ @rem Copyright 2015 the original author or authors.
3
+ @rem
4
+ @rem Licensed under the Apache License, Version 2.0 (the "License");
5
+ @rem you may not use this file except in compliance with the License.
6
+ @rem You may obtain a copy of the License at
7
+ @rem
8
+ @rem https://www.apache.org/licenses/LICENSE-2.0
9
+ @rem
10
+ @rem Unless required by applicable law or agreed to in writing, software
11
+ @rem distributed under the License is distributed on an "AS IS" BASIS,
12
+ @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ @rem See the License for the specific language governing permissions and
14
+ @rem limitations under the License.
15
+ @rem
16
+
17
+ @if "%DEBUG%" == "" @echo off
18
+ @rem ##########################################################################
19
+ @rem
20
+ @rem Gradle startup script for Windows
21
+ @rem
22
+ @rem ##########################################################################
23
+
24
+ @rem Set local scope for the variables with windows NT shell
25
+ if "%OS%"=="Windows_NT" setlocal
26
+
27
+ set DIRNAME=%~dp0
28
+ if "%DIRNAME%" == "" set DIRNAME=.
29
+ set APP_BASE_NAME=%~n0
30
+ set APP_HOME=%DIRNAME%
31
+
32
+ @rem Resolve any "." and ".." in APP_HOME to make it shorter.
33
+ for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34
+
35
+ @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
36
+ set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
37
+
38
+ @rem Find java.exe
39
+ if defined JAVA_HOME goto findJavaFromJavaHome
40
+
41
+ set JAVA_EXE=java.exe
42
+ %JAVA_EXE% -version >NUL 2>&1
43
+ if "%ERRORLEVEL%" == "0" goto execute
44
+
45
+ echo.
46
+ echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
47
+ echo.
48
+ echo Please set the JAVA_HOME variable in your environment to match the
49
+ echo location of your Java installation.
50
+
51
+ goto fail
52
+
53
+ :findJavaFromJavaHome
54
+ set JAVA_HOME=%JAVA_HOME:"=%
55
+ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
56
+
57
+ if exist "%JAVA_EXE%" goto execute
58
+
59
+ echo.
60
+ echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
61
+ echo.
62
+ echo Please set the JAVA_HOME variable in your environment to match the
63
+ echo location of your Java installation.
64
+
65
+ goto fail
66
+
67
+ :execute
68
+ @rem Setup the command line
69
+
70
+ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
71
+
72
+
73
+ @rem Execute Gradle
74
+ "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
75
+
76
+ :end
77
+ @rem End local scope for the variables with windows NT shell
78
+ if "%ERRORLEVEL%"=="0" goto mainEnd
79
+
80
+ :fail
81
+ rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
82
+ rem the _cmd.exe /c_ return code!
83
+ if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
84
+ exit /b 1
85
+
86
+ :mainEnd
87
+ if "%OS%"=="Windows_NT" endlocal
88
+
89
+ :omega
src-tauri/gen/android/settings.gradle ADDED
@@ -0,0 +1,3 @@
1
+ include ':app'
2
+
3
+ apply from: 'tauri.settings.gradle'
src-tauri/icons/128x128.png ADDED
Binary file
src-tauri/icons/[email protected] ADDED
Binary file
src-tauri/icons/32x32.png ADDED
Binary file
src-tauri/icons/Square107x107Logo.png ADDED
Binary file
src-tauri/icons/Square142x142Logo.png ADDED
Binary file
src-tauri/icons/Square150x150Logo.png ADDED
Binary file
src-tauri/icons/Square284x284Logo.png ADDED
Binary file
src-tauri/icons/Square30x30Logo.png ADDED
Binary file
src-tauri/icons/Square310x310Logo.png ADDED
Binary file
src-tauri/icons/Square44x44Logo.png ADDED
Binary file
src-tauri/icons/Square71x71Logo.png ADDED
Binary file
src-tauri/icons/Square89x89Logo.png ADDED
Binary file
src-tauri/icons/StoreLogo.png ADDED
Binary file
src-tauri/icons/icon.icns ADDED
Binary file
src-tauri/icons/icon.ico ADDED
Binary file
src-tauri/icons/icon.png ADDED
Binary file
src-tauri/src/lib.rs ADDED
@@ -0,0 +1,14 @@
1
+ // Learn more about Tauri commands at https://tauri.app/develop/calling-rust/
2
+ #[tauri::command]
3
+ fn greet(name: &str) -> String {
4
+ format!("Hello, {}! You've been greeted from Rust!", name)
5
+ }
6
+
7
+ #[cfg_attr(mobile, tauri::mobile_entry_point)]
8
+ pub fn run() {
9
+ tauri::Builder::default()
10
+ .plugin(tauri_plugin_opener::init())
11
+ .invoke_handler(tauri::generate_handler![greet])
12
+ .run(tauri::generate_context!())
13
+ .expect("error while running tauri application");
14
+ }
src-tauri/src/main.rs ADDED
@@ -0,0 +1,6 @@
1
+ // Prevents additional console window on Windows in release, DO NOT REMOVE!!
2
+ #![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
3
+
4
+ fn main() {
5
+ app_lib::run()
6
+ }
src-tauri/tauri.conf.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "$schema": "https://schema.tauri.app/config/2",
3
+ "productName": "app",
4
+ "version": "0.1.0",
5
+ "identifier": "dev.pyrossh.app",
6
+ "build": {
7
+ "frontendDist": "../dist"
8
+ },
9
+ "app": {
10
+ "withGlobalTauri": true,
11
+ "windows": [
12
+ {
13
+ "title": "app",
14
+ "width": 800,
15
+ "height": 600
16
+ }
17
+ ],
18
+ "security": {
19
+ "csp": null
20
+ }
21
+ },
22
+ "bundle": {
23
+ "active": true,
24
+ "targets": "all",
25
+ "icon": [
26
+ "icons/32x32.png",
27
+ "icons/128x128.png",
28
+ "icons/[email protected]",
29
+ "icons/icon.icns",
30
+ "icons/icon.ico"
31
+ ]
32
+ }
33
+ }