This commit is contained in:
Star 2024-10-25 14:22:54 +08:00
commit a39fa74ab3
4 changed files with 82 additions and 0 deletions

30
apigo.yml Normal file
View File

@ -0,0 +1,30 @@
name:
version: v0.0.1
main: main.js
target:
darwin: amd64 arm64
linux: amd64 arm64
windows: amd64
module:
apigo.cc/gojs/console: latest
apigo.cc/gojs/util: latest
apigo.cc/gojs/log: latest
apigo.cc/gojs/file: latest
apigo.cc/gojs/http: latest
apigo.cc/gojs/db: latest
apigo.cc/gojs/client: latest
modulealias:
extraimport:
cachefile:
sskey:
cgoenable: false
buildfrom: apigocc/gobuild
buildenv:
linux:
darwin:
windows:
- CGO_CPPFLAGS="-I%cd%include"
buildldflags:
linux:
darwin:
windows:

25
include/EventToken.h Normal file
View File

@ -0,0 +1,25 @@
#ifndef WEBVIEW_COMPAT_EVENTTOKEN_H
#define WEBVIEW_COMPAT_EVENTTOKEN_H
#ifdef _WIN32
// This compatibility header provides types used by MS WebView2. This header can
// be used as an alternative to the "EventToken.h" header normally provided by
// the Windows SDK. Depending on the MinGW distribution, this header may not be
// present, or it may be present with the name "eventtoken.h". The letter casing
// matters when cross-compiling on a system with case-sensitive file names.
#ifndef __eventtoken_h__
#ifdef __cplusplus
#include <cstdint>
#else
#include <stdint.h>
#endif
typedef struct EventRegistrationToken {
int64_t value;
} EventRegistrationToken;
#endif // __eventtoken_h__
#endif // _WIN32
#endif // WEBVIEW_COMPAT_EVENTTOKEN_H

10
main.js Normal file
View File

@ -0,0 +1,10 @@
import client from 'client'
function main() {
client.open({
title: 'Hello',
url: 'www/index.html',
width: 1024,
height: 720,
})
}

17
www/index.html Normal file
View File

@ -0,0 +1,17 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>
Hello World
</title>
</head>
<body>
<h1>
Hello World
</h1>
</body>
</html>