+ Please enter your name below ð
+
+
+ Greet
+ éįĨ
+
+ č·åææįŊåĒåé
+
+
+ æūįĪš debugger
+ éč debugger
+
+
+
+
diff --git a/app/wails/frontend/tsconfig.json b/app/wails/frontend/tsconfig.json
new file mode 100644
index 0000000..2726733
--- /dev/null
+++ b/app/wails/frontend/tsconfig.json
@@ -0,0 +1,34 @@
+{
+ "compilerOptions": {
+ "target": "ESNext",
+ "useDefineForClassFields": true,
+ "module": "ESNext",
+ "moduleResolution": "Node",
+ "strict": true,
+ "jsx": "preserve",
+ "sourceMap": true,
+ "resolveJsonModule": true,
+ "isolatedModules": false,
+ "esModuleInterop": true,
+ "lib": [
+ "ESNext",
+ "DOM"
+ ],
+ "baseUrl": ".",
+ "paths": {
+ "frontend/*": ["*"],
+ "src/*": ["src/*"],
+ }
+ },
+ "include": [
+ "src/**/*.ts",
+ "src/**/*.d.ts",
+ "src/**/*.tsx",
+ "src/**/*.vue"
+ ],
+ "references": [
+ {
+ "path": "./tsconfig.node.json"
+ }
+ ]
+}
diff --git a/app/wails/frontend/tsconfig.node.json b/app/wails/frontend/tsconfig.node.json
new file mode 100644
index 0000000..e16b968
--- /dev/null
+++ b/app/wails/frontend/tsconfig.node.json
@@ -0,0 +1,12 @@
+{
+ "compilerOptions": {
+ "composite": true,
+ "module": "ESNext",
+ "moduleResolution": "Node",
+ "allowSyntheticDefaultImports": true
+ },
+ "include": [
+ "wails-plugin.ts",
+ "vite.config.ts"
+ ]
+}
diff --git a/app/wails/frontend/vite.config.js b/app/wails/frontend/vite.config.js
index 37d511e..c0a8f8e 100644
--- a/app/wails/frontend/vite.config.js
+++ b/app/wails/frontend/vite.config.js
@@ -1,8 +1,15 @@
import {defineConfig} from "vite";
import vuePlugin from "@vitejs/plugin-vue";
+import path from "path"
export default defineConfig({
plugins: [
vuePlugin()
- ]
+ ],
+ resolve: {
+ alias: {
+ "frontend": path.resolve(__dirname, "./"),
+ "src": path.resolve(__dirname, "./src")
+ }
+ }
})
diff --git a/app/wails/frontend/wailsjs/go/env/Env.d.ts b/app/wails/frontend/wailsjs/go/env/Env.d.ts
new file mode 100644
index 0000000..6678d68
--- /dev/null
+++ b/app/wails/frontend/wailsjs/go/env/Env.d.ts
@@ -0,0 +1,4 @@
+// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Ã MODIWL
+// This file is automatically generated. DO NOT EDIT
+
+export function GetAllEnv():Promise<{[key: string]: string}>;
diff --git a/app/wails/frontend/wailsjs/go/env/Env.js b/app/wails/frontend/wailsjs/go/env/Env.js
new file mode 100644
index 0000000..02082fb
--- /dev/null
+++ b/app/wails/frontend/wailsjs/go/env/Env.js
@@ -0,0 +1,7 @@
+// @ts-check
+// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Ã MODIWL
+// This file is automatically generated. DO NOT EDIT
+
+export function GetAllEnv() {
+ return window['go']['env']['Env']['GetAllEnv']();
+}
diff --git a/app/wails/frontend/yarn.lock b/app/wails/frontend/yarn.lock
index 0dab064..0576dfb 100644
--- a/app/wails/frontend/yarn.lock
+++ b/app/wails/frontend/yarn.lock
@@ -529,6 +529,11 @@ element-plus@^2.3.7:
memoize-one "^6.0.0"
normalize-wheel-es "^1.2.0"
+eruda@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.npmmirror.com/eruda/-/eruda-3.0.0.tgz#d54b2c9c727f1604796a82c4b62975d1e9988ef1"
+ integrity sha512-6L8A8aBHOQv0rqeBlNdJEl/hl6OAdLVRtJlVmBIlIJ6Fe1a92HFXO58jHLC0vFyuKV0deTjYjRaWwLo9lJ9K9A==
+
esbuild@^0.17.5:
version "0.17.19"
resolved "https://registry.npmmirror.com/esbuild/-/esbuild-0.17.19.tgz#087a727e98299f0462a3d0bcdd9cd7ff100bd955"
diff --git a/app/wails/lib/env/env.go b/app/wails/lib/env/env.go
new file mode 100644
index 0000000..526f689
--- /dev/null
+++ b/app/wails/lib/env/env.go
@@ -0,0 +1,25 @@
+package env
+
+import (
+ "os"
+ "strings"
+)
+
+type Env struct {
+}
+
+func (e *Env) GetAllEnv() map[string]string {
+ m := make(map[string]string, 0)
+
+ for _, e := range os.Environ() {
+ envs := strings.SplitN(e, "=", 2)
+
+ if len(envs) != 2 {
+ m[envs[0]] = ""
+ } else {
+ m[envs[0]] = envs[1]
+ }
+ }
+
+ return m
+}
diff --git a/app/wails/lib/general_test.go b/app/wails/lib/general_test.go
index f05ac11..1605248 100644
--- a/app/wails/lib/general_test.go
+++ b/app/wails/lib/general_test.go
@@ -4,6 +4,7 @@ import (
"bytes"
"fmt"
"github.com/gen2brain/beeep"
+ "os"
"os/exec"
"strings"
"testing"
@@ -39,3 +40,20 @@ func TestBeeepNotify(t *testing.T) {
time.Sleep(1 * time.Second)
}
+
+func TestEnv(t *testing.T) {
+ for _, e := range os.Environ() {
+ parts := strings.SplitN(e, "=", 2)
+
+ if len(parts) != 2 {
+ continue
+ } else {
+ println(parts[0], parts[1])
+ }
+ }
+}
+
+func TestJavaEnv(t *testing.T) {
+ fmt.Println(os.Getenv("java_home"))
+ fmt.Println(os.Getenv("JAVA_HOME"))
+}
diff --git a/app/wails/main.go b/app/wails/main.go
index fb3e3cd..337d7f3 100644
--- a/app/wails/main.go
+++ b/app/wails/main.go
@@ -1,6 +1,7 @@
package main
import (
+ "changeme/lib/env"
"embed"
"github.com/wailsapp/wails/v2"
@@ -27,6 +28,7 @@ func main() {
OnStartup: app.startup,
Bind: []interface{}{
app,
+ &env.Env{},
},
Debug: options.Debug{
OpenInspectorOnStartup: true,