mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-15 07:05:50 +01:00
Compare commits
594 commits
v3-alpha-f
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
51d30325fc |
||
|
|
f8595e3052 |
||
|
|
4d0abeb37c |
||
|
|
033650d792 |
||
|
|
4c49f27edf |
||
|
|
c84578721c |
||
|
|
354fee648e |
||
|
|
da3ce17161 |
||
|
|
bbd1b33122 |
||
|
|
ae40ca4ac1 |
||
|
|
093aa2d663 |
||
|
|
e906751c89 |
||
|
|
718fd92f85 |
||
|
|
01b661f6a5 |
||
|
|
896344eb66 |
||
|
|
8fd0340404 |
||
|
|
bc4ee373b5 | ||
|
|
5d39f1aa9a | ||
|
|
a27995940a |
||
|
|
4e8b705cda |
||
|
|
7ee2b2d856 |
||
|
|
696c55c6ee |
||
|
|
0357730294 |
||
|
|
158fd41a8b |
||
|
|
fc2b7309c1 |
||
|
|
18b3d0587f |
||
|
|
60d148e4b1 |
||
|
|
423f7e4498 |
||
|
|
4dbde817f4 |
||
|
|
95689bdeb7 |
||
|
|
7d4fe64352 |
||
|
|
e27e85aae9 | ||
|
|
dd7094e5d3 | ||
|
|
6630fa5647 |
||
|
|
7957d23c25 |
||
|
|
b25fe7496f |
||
|
|
00b0ce936d |
||
|
|
bc62140ac0 |
||
|
|
ebe8de8d2b |
||
|
|
6a2619880c |
||
|
|
db11f350cd |
||
|
|
216c9961a5 |
||
|
|
764f9bb175 |
||
|
|
23bd70e057 |
||
|
|
a0cb86ebff |
||
|
|
7aaa203c5f |
||
|
|
44a9d617e8 |
||
|
|
8e77d9358e |
||
|
|
7b8355a385 |
||
|
|
cb3305a2fc |
||
|
|
c73b2dd753 |
||
|
|
e37a7b9d4b |
||
|
|
ef7d3301c9 |
||
|
|
d16fd500df |
||
|
|
27afad59f6 |
||
|
|
4f71b22665 |
||
|
|
467f70ada7 |
||
|
|
9578b627fd |
||
|
|
4c464b3092 |
||
|
|
ba2c9989e6 |
||
|
|
9f3b00bed9 |
||
|
|
e0e96c3bf8 |
||
|
|
9125ef64be |
||
|
|
e5deb1611e |
||
|
|
8d73bec252 |
||
|
|
17bb94bbbf |
||
|
|
ac867f6587 | ||
|
|
cb1c2d86c0 | ||
|
|
8513b77fd8 | ||
|
|
9c78746441 | ||
|
|
7a383e080f | ||
|
|
9df647bb99 |
||
|
|
fc1c90e0ce |
||
|
|
385f1dafb9 |
||
|
|
70d2d52be4 |
||
|
|
6e9b6a1ee5 |
||
|
|
366e6afa3f |
||
|
|
de7a04b57a |
||
|
|
322088d3f8 |
||
|
|
f01afbc852 |
||
|
|
4df077f9b2 |
||
|
|
db22cb234d |
||
|
|
152ac2a7ce |
||
|
|
c113a068ad |
||
|
|
6943a56e8f |
||
|
|
909c16c517 | ||
|
|
5ee47ccf7b |
||
|
|
dfff549002 |
||
|
|
855dcadd79 | ||
|
|
2b8276da42 | ||
|
|
a35b676e05 | ||
|
|
45167ff743 | ||
|
|
140a110e6d |
||
|
|
bc3299fff6 |
||
|
|
1589a2f835 |
||
|
|
fcaff5e09d |
||
|
|
b489af776c |
||
|
|
b7f2d4a43b | ||
|
|
0015f8d3cb |
||
|
|
857f7b7518 |
||
|
|
ac00787202 |
||
|
|
4d7b0b487c |
||
|
|
d258771151 |
||
|
|
8aa187b393 |
||
|
|
ebe377f375 |
||
|
|
62f0d7eb26 |
||
|
|
04e1b05d10 |
||
|
|
03412f9cb0 |
||
|
|
2c2fd26bb5 | ||
|
|
ce7b1fc62b |
||
|
|
91d5da6124 |
||
|
|
612e0853bf |
||
|
|
ae2d97543f |
||
|
|
0dc77a2893 |
||
|
|
559ff6e2f4 |
||
|
|
254a5a652e |
||
|
|
34517218f0 |
||
|
|
82b3420e53 |
||
|
|
b393cf03a3 |
||
|
|
43bfb094c2 |
||
|
|
6cbe626e7f |
||
|
|
e6b725b106 |
||
|
|
0282768c10 |
||
|
|
6544005892 |
||
|
|
ffd98d68da |
||
|
|
7002f2e943 |
||
|
|
72662cf05f | ||
|
|
d9f4a1883f | ||
|
|
7f3358d6a8 | ||
|
|
25f19e03c8 | ||
|
|
6486f9d9b2 | ||
|
|
3798b74c7e | ||
|
|
8b5fb90dae | ||
|
|
3f925105cb | ||
|
|
03758a01e3 | ||
|
|
dbcf85c50c | ||
|
|
c9392806ac | ||
|
|
a8a1f362cb | ||
|
|
82d958747a | ||
|
|
3b59c3f3b9 | ||
|
|
73ade6e94f | ||
|
|
ae8171e9fe | ||
|
|
9640e16c12 | ||
|
|
36a1f7b52b | ||
|
|
d2d9acbdf6 | ||
|
|
b987c1b413 |
||
|
|
1ec3708f68 |
||
|
|
a0937fd3ef |
||
|
|
e753157ad2 |
||
|
|
6b35e06780 | ||
|
|
01be6e3d1f |
||
|
|
466719d160 | ||
|
|
095e8be923 |
||
|
|
4597d7fa64 |
||
|
|
136273503e |
||
|
|
ca3e4f6c45 |
||
|
|
52515277a0 |
||
|
|
ae621d2883 |
||
|
|
832db6d10b |
||
|
|
be7608e079 |
||
|
|
e1282a6371 |
||
|
|
fd71325a42 |
||
|
|
bd8c88e8ac |
||
|
|
8e51d6d32f |
||
|
|
b3bb856ed1 |
||
|
|
2936e8b98e |
||
|
|
539effb6b5 |
||
|
|
d3d87d09aa |
||
|
|
c68c85a384 |
||
|
|
3248f2fd31 |
||
|
|
ac1479afa2 |
||
|
|
0c24aa4313 |
||
|
|
2bd3de1f7f |
||
|
|
0744756695 |
||
|
|
594e2bf60f |
||
|
|
151beed7e8 |
||
|
|
6af1028856 |
||
|
|
a93c52e182 |
||
|
|
49a4193887 |
||
|
|
1bc5a2758f |
||
|
|
0581290cfe |
||
|
|
105c10aee7 | ||
|
|
d1838f42bf |
||
|
|
30d7cccf50 |
||
|
|
19c8d98ed3 |
||
|
|
ce5f733457 | ||
|
|
312146c70e | ||
|
|
4788263b9a |
||
|
|
a220d53a91 |
||
|
|
de29a0bd6f |
||
|
|
467bbfc4e5 |
||
|
|
741ff242f7 |
||
|
|
83ec246f63 |
||
|
|
af659850fc |
||
|
|
9a10be69ae |
||
|
|
797016d736 |
||
|
|
fc1cf90574 | ||
|
|
b12dcb054b | ||
|
|
f8998da78d |
||
|
|
bc7b816c37 |
||
|
|
194b0586ba |
||
|
|
2f389d99a8 |
||
|
|
5b1caf0d08 |
||
|
|
8dc509f49b |
||
|
|
3930f58203 |
||
|
|
ba9ab72893 |
||
|
|
27c9737ecd |
||
|
|
f9392e9980 |
||
|
|
6ac0bcdf7f | ||
|
|
125c4ab485 |
||
|
|
92a25c7dfd | ||
|
|
dadf638c00 |
||
|
|
e7643b8605 | ||
|
|
9763cd3465 | ||
|
|
7245b5b4d7 |
||
|
|
2acf32cd36 |
||
|
|
9c7dc05cea |
||
|
|
59d8650a0f |
||
|
|
00e2f16971 |
||
|
|
993fde17fe |
||
|
|
ae5e3f47a7 | ||
|
|
6bf875f2a2 | ||
|
|
61876448f7 | ||
|
|
202eecdf94 |
||
|
|
ecf1c41db4 | ||
|
|
915efa06bb | ||
|
|
4541cf0b3a | ||
|
|
538ba8daac |
||
|
|
c2db2e550f |
||
|
|
ea2bfa9bcd |
||
|
|
d4015123dd |
||
|
|
ef73a75c68 |
||
|
|
2478926274 |
||
|
|
e9100152e7 |
||
|
|
5df9ac1a53 | ||
|
|
6a3ba3d613 |
||
|
|
15191c3bbe |
||
|
|
6b288be2fa | ||
|
|
5f233f9dd6 |
||
|
|
a78e8c95ee | ||
|
|
4228eab052 |
||
|
|
267e4ec9fa |
||
|
|
aee6d99702 |
||
|
|
dab09a94d7 |
||
|
|
6381e520b9 |
||
|
|
36743ca76f |
||
|
|
a04a31be8c | ||
|
|
114c15197b | ||
|
|
fa4bf38b12 |
||
|
|
7d66f3c26a |
||
|
|
dbf7bba69f |
||
|
|
b2f84d041c |
||
|
|
76f806fe82 |
||
|
|
76e41a6211 |
||
|
|
471a50cd04 |
||
|
|
cacbf030d6 |
||
|
|
49ff9b62bf |
||
|
|
f56093ae27 |
||
|
|
8519d8f024 |
||
|
|
54438a7644 |
||
|
|
7aba2c3b95 |
||
|
|
5be7ee74f8 |
||
|
|
f6aba688a9 |
||
|
|
8624da51f8 |
||
|
|
0d81cd2831 |
||
|
|
3224db508d |
||
|
|
1fb6403e7d |
||
|
|
ba01492198 |
||
|
|
7e45e3d025 |
||
|
|
49b524d169 |
||
|
|
bedebe0c06 |
||
|
|
536422d508 |
||
|
|
fa7c6d80a2 |
||
|
|
3605fdf42f |
||
|
|
347d8cf861 |
||
|
|
89db2ad082 | ||
|
|
8d1e5188ad | ||
|
|
f07ead3fb2 | ||
|
|
d04fd9a35f | ||
|
|
bed3ec4163 | ||
|
|
98f3cc845f |
||
|
|
74fa41330e | ||
|
|
4a1d101d04 |
||
|
|
d824318a66 |
||
|
|
00be6f24d2 |
||
|
|
55b90a50bc |
||
|
|
f82c971cb0 | ||
|
|
2aea5e2dae | ||
|
|
481c145cd3 |
||
|
|
51c7453bd2 |
||
|
|
4598af4d7a |
||
|
|
c4fdfd6415 |
||
|
|
d9b99a990d |
||
|
|
d6383364ab |
||
|
|
3a4c3e7a7f |
||
|
|
caf05adff3 |
||
|
|
67afec3c2a |
||
|
|
7566ed4ba6 |
||
|
|
90be707d9c |
||
|
|
82fd9de339 |
||
|
|
461d34c620 |
||
|
|
ee2156ee2c |
||
|
|
d730c963f4 |
||
|
|
fc0aea1038 |
||
|
|
e219e3b65e |
||
|
|
42e77506d9 |
||
|
|
896a90f69e |
||
|
|
c27d2ceb8e |
||
|
|
dd4aa56310 |
||
|
|
6345b64a22 |
||
|
|
2c45ae69bb |
||
|
|
dade880064 |
||
|
|
bd57598c03 |
||
|
|
8deb8a04e7 |
||
|
|
93b49391c7 |
||
|
|
e5be3c5cfe |
||
|
|
63e1f3c09c |
||
|
|
39c922bc9f |
||
|
|
cadbccfb72 |
||
|
|
ba38474050 |
||
|
|
86e3d51c8e |
||
|
|
10e3a13d12 |
||
|
|
5df8ecc961 |
||
|
|
dca2064916 |
||
|
|
13d4b218e7 |
||
|
|
d1ba26a043 |
||
|
|
1c163422aa |
||
|
|
bdb415130b |
||
|
|
e573bf4df9 |
||
|
|
9772523f46 |
||
|
|
157c8fdbc7 |
||
|
|
758a63648e |
||
|
|
f2881822d2 |
||
|
|
bb4e95e22d |
||
|
|
5ebccf1ea6 |
||
|
|
f08f4be868 | ||
|
|
a964be1ada |
||
|
|
f33e627360 |
||
|
|
1b6ed1bc00 |
||
|
|
14cc9ec45b |
||
|
|
26ff639b62 |
||
|
|
10abe246b0 |
||
|
|
8a5a0506bf |
||
|
|
a2e32fe414 |
||
|
|
7a5e41f904 |
||
|
|
5b8594928b |
||
|
|
a6288c414e |
||
|
|
bd2c1ea73f |
||
|
|
429e94f4ce |
||
|
|
f302c8053c |
||
|
|
5d2b4308a8 |
||
|
|
f4b21a6b37 |
||
|
|
265d2e45db |
||
|
|
c3a7266001 |
||
|
|
3721d73423 |
||
|
|
d218384396 |
||
|
|
475534c132 |
||
|
|
8e810d59f0 |
||
|
|
1a2310265f |
||
|
|
87b1325dbc |
||
|
|
f8c8611219 |
||
|
|
4b6a8e17c5 |
||
|
|
868931fe72 |
||
|
|
3f83b42db5 |
||
|
|
9995dae4ad |
||
|
|
d36d1718d9 |
||
|
|
0f61873fe8 |
||
|
|
fe1f23b0fd |
||
|
|
2b35861aee |
||
|
|
ddf27038e1 |
||
|
|
5b091db26d |
||
|
|
fe9495d776 |
||
|
|
7a40cc59ca |
||
|
|
e941f36267 |
||
|
|
482f19e6b9 |
||
|
|
dd6eb0fa75 |
||
|
|
9efaedfe39 |
||
|
|
c4c0d64fd5 |
||
|
|
ffcfa1b0e7 |
||
|
|
3204287f96 |
||
|
|
9b01922a10 |
||
|
|
41b75975e8 |
||
|
|
78fbcbcf5f |
||
|
|
a4428022ec |
||
|
|
e09f9b171e |
||
|
|
5d532181d8 |
||
|
|
1d212f1f25 |
||
|
|
517d8d7897 |
||
|
|
b0dfa86ae9 |
||
|
|
a2eecfd784 |
||
|
|
5cd0caccc4 |
||
|
|
b40fd93edb |
||
|
|
fdbfdef4ac |
||
|
|
dd2287c6da |
||
|
|
50f9925b7b |
||
|
|
969e0a8a35 |
||
|
|
d96d3b0010 |
||
|
|
8b215a9b4c |
||
|
|
68bed5d197 |
||
|
|
022a5ffec4 |
||
|
|
7b4f5cbd6a |
||
|
|
8ed75cf22b |
||
|
|
d8209beb1a |
||
|
|
c9af48225e |
||
|
|
9a489b8920 |
||
|
|
82cfe8c474 |
||
|
|
6ff63535f2 |
||
|
|
a8299125a9 |
||
|
|
8e88e1454f |
||
|
|
9b900b7df0 |
||
|
|
dba98e5487 |
||
|
|
2f5398664f |
||
|
|
a7a4341f79 |
||
|
|
d4dabc1289 |
||
|
|
cf18fcfc1e |
||
|
|
035ede4701 |
||
|
|
0f66a98449 |
||
|
|
cb67c266cf |
||
|
|
8d2a353bce |
||
|
|
05bdeb0844 |
||
|
|
1193fe9799 |
||
|
|
daa71ce426 |
||
|
|
c1c4220978 |
||
|
|
f8e1ab3ee9 |
||
|
|
acc89e522e |
||
|
|
afceac13fa |
||
|
|
74509e247c |
||
|
|
d44b5e9c46 |
||
|
|
b7713da70e |
||
|
|
b8dae7a6e2 |
||
|
|
9a039b1dc9 |
||
|
|
c10dfbce78 |
||
|
|
66562bfebc |
||
|
|
facec0c2ac |
||
|
|
a7c10a1a83 |
||
|
|
2fe20071fb |
||
|
|
45002a0d82 |
||
|
|
9a069653e2 |
||
|
|
2481ff6a88 |
||
|
|
6d57fc6428 |
||
|
|
2dd964b469 |
||
|
|
372173664b |
||
|
|
faf36e8634 |
||
|
|
aad811391b |
||
|
|
bde4e5b699 |
||
|
|
40119e9a17 |
||
|
|
374e15650d |
||
|
|
32bbeb653e |
||
|
|
2c4b38e39d |
||
|
|
e7756e9274 |
||
|
|
1f74b337ff |
||
|
|
98c4b967a7 | ||
|
|
37aa2c4eff |
||
|
|
311aee30b2 |
||
|
|
9cafd85cda |
||
|
|
08a71de536 |
||
|
|
bc69b39ccd |
||
|
|
769a882e58 |
||
|
|
d3332f0b2c |
||
|
|
bf2d6d3241 |
||
|
|
3694dd2a55 |
||
|
|
c451adc424 | ||
|
|
4093c9ec64 |
||
|
|
839e42edde |
||
|
|
f2c4ada1e2 |
||
|
|
126f17a266 |
||
|
|
e4fd7df68b |
||
|
|
c5381dce70 |
||
|
|
964abcc6bd | ||
|
|
5d22da4126 |
||
|
|
e714dd92a8 |
||
|
|
3bf4ea5113 |
||
|
|
65cef2f206 |
||
|
|
bff2258aea |
||
|
|
8145b0e0c5 |
||
|
|
57e6834bd2 |
||
|
|
9c3f91bb48 |
||
|
|
d899621351 |
||
|
|
1957e2e86c |
||
|
|
1c8e2ee8fe |
||
|
|
741558532b |
||
|
|
772f870eb3 |
||
|
|
e29b375de5 |
||
|
|
72e12ef398 |
||
|
|
9903ba70d5 |
||
|
|
9b35616a20 |
||
|
|
a988691931 |
||
|
|
ad7f7f76bc |
||
|
|
55a7d317bd |
||
|
|
cec6551c5e |
||
|
|
3a230b563f |
||
|
|
f9aa4d3b60 |
||
|
|
b498cddcad |
||
|
|
3e5df3c7f1 |
||
|
|
9ccb17bfd0 |
||
|
|
12d6336421 |
||
|
|
cf2d16c1fd |
||
|
|
bf389e3914 |
||
|
|
f7c19469a7 |
||
|
|
f1265c527e |
||
|
|
b083d1d41c |
||
|
|
56fb047d89 |
||
|
|
ae4cb4e861 |
||
|
|
33172946ca |
||
|
|
3c7a2187db |
||
|
|
437ca0ffd5 |
||
|
|
162720423f |
||
|
|
946b6020c9 |
||
|
|
49a6b1aa3c |
||
|
|
4b4fcdd47c |
||
|
|
5c1d62bb6a |
||
|
|
97e60e181e |
||
|
|
1683e240d9 |
||
|
|
dc5f0b6e7b |
||
|
|
772f0215a6 |
||
|
|
435aa99656 |
||
|
|
8efaaffadb |
||
|
|
5f457dba8e |
||
|
|
3aaa1f8e34 |
||
|
|
aaa65ff7c2 |
||
|
|
5f412d0bfb |
||
|
|
aa8cd7ce67 |
||
|
|
ae99d7a973 |
||
|
|
a632ac5068 |
||
|
|
e3af0945d0 |
||
|
|
975c55a3d5 |
||
|
|
c3d57d05c3 | ||
|
|
e9cc68fe3a | ||
|
|
5d9fe49cf9 | ||
|
|
fd3d1801ed | ||
|
|
f517c8b980 |
||
|
|
73b547a730 |
||
|
|
6a8322cdb5 |
||
|
|
07fc8e3707 |
||
|
|
4cbc7f3eec |
||
|
|
a1f067377f |
||
|
|
3c5d850a30 |
||
|
|
92c9f546eb | ||
|
|
7d14a75ff3 |
||
|
|
5547792b68 |
||
|
|
b2839ed719 |
||
|
|
674042df36 |
||
|
|
b9de31e38e |
||
|
|
929dfb4123 |
||
|
|
11fdc6a558 |
||
|
|
801cf3c84a |
||
|
|
4efc8e358d | ||
|
|
9ce0ddb4f8 | ||
|
|
d88a741ce7 |
||
|
|
c76ced7daa |
||
|
|
fc46455526 |
||
|
|
70b7aa1ec2 |
||
|
|
03545e33d9 |
||
|
|
e32c2b05e4 |
||
|
|
57c04ba740 |
||
|
|
426a569c89 |
||
|
|
08e12de2a0 |
||
|
|
0a63215cde |
||
|
|
ae688aa07d |
||
|
|
e960798e85 |
||
|
|
93335d7661 |
||
|
|
d96ec5d332 |
||
|
|
0533d2e208 |
||
|
|
b328f60172 |
||
|
|
ac560a6526 |
||
|
|
2693de6822 |
||
|
|
3c39b674d3 |
||
|
|
afe922a4e3 |
||
|
|
c24bd5e3e8 |
||
|
|
a59f8b2cf3 |
||
|
|
30d17a760d |
||
|
|
6c46f6b41c |
||
|
|
42708e7f40 |
||
|
|
63c9baa466 |
||
|
|
ee4ce1d3ef |
||
|
|
a9fb0713a1 |
||
|
|
b42a18be6b |
||
|
|
3e938a10aa |
||
|
|
b9fc72bbc8 |
||
|
|
b5406cb13e |
||
|
|
d51268b8d0 |
||
|
|
4b376bcf0d |
||
|
|
8efa4698cf |
||
|
|
45c6f73132 |
||
|
|
d4500e89e2 |
||
|
|
7637833898 |
||
|
|
a774459cd7 |
||
|
|
90c9186dc6 |
||
|
|
79db5a4657 |
||
|
|
4257decf30 |
||
|
|
1f4b578bce |
||
|
|
d0b0b5d594 |
||
|
|
c0d2c0447c |
||
|
|
f6c82dcaba |
5152 changed files with 344236 additions and 126147 deletions
|
|
@ -158,7 +158,7 @@
|
|||
]
|
||||
},
|
||||
{
|
||||
"login": "codydbentley",
|
||||
"login": "sircodemane",
|
||||
"name": "Cody Bentley",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/6968902?v=4",
|
||||
"profile": "https://codybentley.dev/",
|
||||
|
|
|
|||
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
2
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
|
|
@ -70,7 +70,7 @@ body:
|
|||
validations:
|
||||
required: false
|
||||
- type: textarea
|
||||
id: systemetails
|
||||
id: systemdetails
|
||||
attributes:
|
||||
label: System Details
|
||||
description: Please add the output of `wails doctor`.
|
||||
|
|
|
|||
44
.github/file-labeler.yml
vendored
Normal file
44
.github/file-labeler.yml
vendored
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
# File path specific labels
|
||||
v2-only:
|
||||
- 'v2/**/*'
|
||||
|
||||
v3-alpha:
|
||||
- 'v3/**/*'
|
||||
|
||||
windows:
|
||||
- '**/*_windows.go'
|
||||
- 'v2/internal/frontend/desktop/windows/**/*'
|
||||
|
||||
macos:
|
||||
- '**/*_darwin.go'
|
||||
- 'v2/internal/frontend/desktop/darwin/**/*'
|
||||
|
||||
linux:
|
||||
- '**/*_linux.go'
|
||||
- 'v2/internal/frontend/desktop/linux/**/*'
|
||||
|
||||
cli:
|
||||
- 'v2/cmd/**/*'
|
||||
- 'v3/cmd/**/*'
|
||||
- '**/cli/**/*'
|
||||
- '**/commands/**/*'
|
||||
|
||||
documentation:
|
||||
- '**/*.md'
|
||||
- 'docs/**/*'
|
||||
- 'website/**/*'
|
||||
- 'mkdocs-website/**/*'
|
||||
|
||||
templates:
|
||||
- '**/templates/**/*'
|
||||
- '**/template/**/*'
|
||||
|
||||
runtime:
|
||||
- '**/runtime/**/*'
|
||||
- 'v2/internal/runtime/**/*'
|
||||
- 'v3/internal/runtime/**/*'
|
||||
|
||||
bindings:
|
||||
- 'v2/internal/binding/**/*'
|
||||
- 'v3/internal/generator/**/*'
|
||||
|
||||
144
.github/issue-labeler.yml
vendored
Normal file
144
.github/issue-labeler.yml
vendored
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
# Version labels
|
||||
v2-only:
|
||||
- '\[v2\]'
|
||||
- '\(v2\)'
|
||||
- 'v2:'
|
||||
- 'version 2'
|
||||
- 'wails v2'
|
||||
- 'using v2'
|
||||
- 'master branch'
|
||||
|
||||
v3-alpha:
|
||||
- '\[v3\]'
|
||||
- '\(v3\)'
|
||||
- 'v3:'
|
||||
- '\[v3-alpha\]'
|
||||
- '\(v3-alpha\)'
|
||||
- 'version 3'
|
||||
- 'wails v3'
|
||||
- 'using v3'
|
||||
- 'v3-alpha branch'
|
||||
|
||||
# Component labels
|
||||
webview2:
|
||||
- 'webview2'
|
||||
- 'windows'
|
||||
- 'microsoft edge'
|
||||
- 'edge browser'
|
||||
- 'IE'
|
||||
- 'Explorer'
|
||||
- 'browser crashes'
|
||||
|
||||
macos:
|
||||
- 'macOS'
|
||||
- 'mac OS'
|
||||
- 'OS X'
|
||||
- 'darwin'
|
||||
- 'cocoa'
|
||||
- 'Safari'
|
||||
- 'Catalyst'
|
||||
- 'Ventura'
|
||||
- 'Sonoma'
|
||||
- 'apple'
|
||||
|
||||
linux:
|
||||
- 'linux'
|
||||
- 'ubuntu'
|
||||
- 'debian'
|
||||
- 'fedora'
|
||||
- 'gtk'
|
||||
- 'webkitgtk'
|
||||
- 'webkit2gtk'
|
||||
- 'gnome'
|
||||
- 'x11'
|
||||
- 'wayland'
|
||||
|
||||
cli:
|
||||
- 'cli'
|
||||
- 'command line'
|
||||
- 'wails doctor'
|
||||
- 'wails init'
|
||||
- 'wails build'
|
||||
- 'wails dev'
|
||||
- 'template'
|
||||
- 'scaffolding'
|
||||
|
||||
# Type labels
|
||||
bug:
|
||||
- 'bug'
|
||||
- 'crash'
|
||||
- 'broken'
|
||||
- 'failure'
|
||||
- 'error'
|
||||
- 'failed'
|
||||
- 'panic'
|
||||
- 'segfault'
|
||||
- 'issue'
|
||||
- 'not working'
|
||||
- 'problem'
|
||||
|
||||
enhancement:
|
||||
- 'feature'
|
||||
- 'enhancement'
|
||||
- 'request'
|
||||
- 'add'
|
||||
- 'new'
|
||||
- 'improve'
|
||||
- 'functionality'
|
||||
- 'support for'
|
||||
- 'please add'
|
||||
- 'would be nice'
|
||||
|
||||
documentation:
|
||||
- 'docs'
|
||||
- 'documentation'
|
||||
- 'readme'
|
||||
- 'example'
|
||||
- 'tutorial'
|
||||
- 'guide'
|
||||
- 'explanation'
|
||||
- 'clarification'
|
||||
- 'instructions'
|
||||
|
||||
security:
|
||||
- 'security'
|
||||
- 'vulnerability'
|
||||
- 'exploit'
|
||||
- 'hack'
|
||||
- 'CVE'
|
||||
- 'secure'
|
||||
- 'encryption'
|
||||
- 'hardening'
|
||||
|
||||
performance:
|
||||
- 'performance'
|
||||
- 'slow'
|
||||
- 'speed'
|
||||
- 'memory leak'
|
||||
- 'cpu usage'
|
||||
- 'high memory'
|
||||
- 'lag'
|
||||
- 'freeze'
|
||||
- 'optimization'
|
||||
|
||||
# Priority labels
|
||||
high-priority:
|
||||
- 'urgent'
|
||||
- 'critical'
|
||||
- 'security'
|
||||
- 'high priority'
|
||||
- 'important'
|
||||
- 'production'
|
||||
- 'blocker'
|
||||
- 'blocking'
|
||||
|
||||
question:
|
||||
- 'how to'
|
||||
- 'how do i'
|
||||
- 'can I'
|
||||
- 'is it possible'
|
||||
- 'question'
|
||||
- 'help me'
|
||||
- 'need help'
|
||||
- 'assistance'
|
||||
- 'confused'
|
||||
22
.github/pull_request_template.md
vendored
22
.github/pull_request_template.md
vendored
|
|
@ -1,3 +1,21 @@
|
|||
|
||||
<!--
|
||||
|
||||
*********************************************************************
|
||||
* PLEASE READ BEFORE SUBMITTING YOUR PR *
|
||||
* YOUR PR MAY BE REJECTED IF IT DOES NOT FOLLOW THESE STEPS *
|
||||
*********************************************************************
|
||||
|
||||
- *DO NOT* submit PRs for v3 alpha enhancements, unless you have opened a post on the discord channel.
|
||||
All enhancements must be discussed first.
|
||||
The feedback guide for v3 is here: https://v3alpha.wails.io/getting-started/feedback/
|
||||
|
||||
- Before submitting your PR, please ensure you have created and linked the PR to an issue.
|
||||
- If a relevant issue already exists, please reference it in your PR by including `Fixes #<issue number>` in your PR description.
|
||||
- Please fill in the checklists.
|
||||
|
||||
-->
|
||||
|
||||
# Description
|
||||
|
||||
Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.
|
||||
|
|
@ -6,7 +24,7 @@ Fixes # (issue)
|
|||
|
||||
## Type of change
|
||||
|
||||
Please delete options that are not relevant.
|
||||
Please select the option that is relevant.
|
||||
|
||||
- [ ] Bug fix (non-breaking change which fixes an issue)
|
||||
- [ ] New feature (non-breaking change which adds functionality)
|
||||
|
|
@ -20,6 +38,8 @@ Please describe the tests that you ran to verify your changes. Provide instructi
|
|||
- [ ] Windows
|
||||
- [ ] macOS
|
||||
- [ ] Linux
|
||||
|
||||
If you checked Linux, please specify the distro and version.
|
||||
|
||||
## Test Configuration
|
||||
|
||||
|
|
|
|||
26
.github/stale.yml
vendored
26
.github/stale.yml
vendored
|
|
@ -1,7 +1,7 @@
|
|||
# Number of days of inactivity before an issue becomes stale
|
||||
daysUntilStale: 30
|
||||
daysUntilStale: 45
|
||||
# Number of days of inactivity before a stale issue is closed
|
||||
daysUntilClose: 7
|
||||
daysUntilClose: 10
|
||||
# Issues with these labels will never be considered stale
|
||||
exemptLabels:
|
||||
- pinned
|
||||
|
|
@ -9,14 +9,28 @@ exemptLabels:
|
|||
- onhold
|
||||
- inprogress
|
||||
- "Selected For Development"
|
||||
- bug
|
||||
- enhancement
|
||||
- v3-alpha
|
||||
- high-priority
|
||||
# Label to use when marking an issue as stale
|
||||
staleLabel: "Wont Fix"
|
||||
staleLabel: "stale"
|
||||
# Comment to post when marking an issue as stale. Set to `false` to disable
|
||||
markComment: >
|
||||
This issue has been automatically marked as stale because it has not had
|
||||
recent activity. It will be closed if no further activity occurs. Thank you
|
||||
for your contributions.
|
||||
recent activity. It will be closed if no further activity occurs within the next 10 days.
|
||||
|
||||
If this issue is still relevant, please add a comment to keep it open.
|
||||
Thank you for your contributions.
|
||||
# Comment to post when closing a stale issue. Set to `false` to disable
|
||||
closeComment: false
|
||||
closeComment: >
|
||||
This issue has been automatically closed due to lack of activity.
|
||||
Please feel free to reopen it if it's still relevant.
|
||||
exemptMilestones: true
|
||||
exemptAssignees: true
|
||||
# Only mark issues (not PRs)
|
||||
only: issues
|
||||
# Exempt issues created before a certain date
|
||||
exemptCreatedBefore: "2024-01-01T00:00:00Z"
|
||||
# Starts checking issues only after the specified date
|
||||
startDate: "2025-06-01T00:00:00Z"
|
||||
|
|
|
|||
33
.github/workflows/auto-label-issues.yml
vendored
Normal file
33
.github/workflows/auto-label-issues.yml
vendored
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
name: Auto Label Issues
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [opened, edited, reopened]
|
||||
pull_request:
|
||||
types: [opened, edited, reopened, synchronize]
|
||||
|
||||
jobs:
|
||||
auto-label:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
contents: read
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Label issues and PRs by content
|
||||
uses: github/issue-labeler@v3.4
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
configuration-path: .github/issue-labeler.yml
|
||||
enable-versioned-regex: 0
|
||||
include-title: 1
|
||||
|
||||
- name: Label issues and PRs by file paths
|
||||
uses: actions/labeler@v4
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
configuration-path: .github/file-labeler.yml
|
||||
sync-labels: true
|
||||
140
.github/workflows/build-and-test-alpha.yml
vendored
140
.github/workflows/build-and-test-alpha.yml
vendored
|
|
@ -1,140 +0,0 @@
|
|||
name: Build + Test v3 alpha
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [v3-alpha]
|
||||
paths-ignore:
|
||||
- 'mkdocs-website/**/*'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
test_go:
|
||||
name: Run Go Tests
|
||||
if: github.repository == 'wailsapp/wails'
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [windows-latest, macos-latest, ubuntu-latest]
|
||||
go-version: [1.21]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install linux dependencies
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev build-essential pkg-config
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
|
||||
- name: Install Task
|
||||
uses: arduino/setup-task@v1
|
||||
with:
|
||||
version: 3.x
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build Examples
|
||||
working-directory: ./v3
|
||||
run: task test:examples
|
||||
|
||||
- name: Run tests (mac)
|
||||
if: matrix.os == 'macos-latest'
|
||||
env:
|
||||
CGO_LDFLAGS: -framework UniformTypeIdentifiers -mmacosx-version-min=10.13
|
||||
working-directory: ./v3
|
||||
run: go test -v ./...
|
||||
|
||||
- name: Run tests (!mac)
|
||||
if: matrix.os != 'macos-latest'
|
||||
working-directory: ./v3
|
||||
run: go test -v ./...
|
||||
|
||||
test_js:
|
||||
name: Run JS Tests
|
||||
if: github.repository == 'wailsapp/wails'
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [18.x]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
working-directory: v2/internal/frontend/runtime
|
||||
|
||||
- name: Run tests
|
||||
run: npm test
|
||||
working-directory: v2/internal/frontend/runtime
|
||||
|
||||
test_templates:
|
||||
name: Test Templates
|
||||
needs: test_go
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
template:
|
||||
[
|
||||
svelte,
|
||||
svelte-ts,
|
||||
vue,
|
||||
vue-ts,
|
||||
react,
|
||||
react-ts,
|
||||
preact,
|
||||
preact-ts,
|
||||
lit,
|
||||
lit-ts,
|
||||
vanilla,
|
||||
vanilla-ts,
|
||||
]
|
||||
go-version: [1.21]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
|
||||
- name: Setup Golang caches
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.cache/go-build
|
||||
~/go/pkg/mod
|
||||
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-golang-
|
||||
|
||||
- name: Build Wails3 CLI
|
||||
run: |
|
||||
cd ./v3/cmd/wails3
|
||||
go install
|
||||
wails3 -help
|
||||
|
||||
- name: Install linux dependencies
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libayatana-appindicator3-dev build-essential pkg-config
|
||||
|
||||
- name: Generate template '${{ matrix.template }}'
|
||||
run: |
|
||||
go install github.com/go-task/task/v3/cmd/task@latest
|
||||
mkdir -p ./test-${{ matrix.template }}
|
||||
cd ./test-${{ matrix.template }}
|
||||
wails3 init -n ${{ matrix.template }} -t ${{ matrix.template }}
|
||||
cd ${{ matrix.template }}
|
||||
wails3 build
|
||||
201
.github/workflows/build-and-test-v3.yml
vendored
Normal file
201
.github/workflows/build-and-test-v3.yml
vendored
Normal file
|
|
@ -0,0 +1,201 @@
|
|||
name: Build + Test v3
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened, ready_for_review]
|
||||
branches:
|
||||
- v3-alpha
|
||||
paths:
|
||||
- 'v3/**'
|
||||
pull_request_review:
|
||||
types: [submitted]
|
||||
branches:
|
||||
- v3-alpha
|
||||
|
||||
jobs:
|
||||
check_approval:
|
||||
name: Check PR Approval
|
||||
runs-on: ubuntu-latest
|
||||
if: github.base_ref == 'v3-alpha'
|
||||
outputs:
|
||||
approved: ${{ steps.check.outputs.approved }}
|
||||
steps:
|
||||
- name: Check if PR is approved
|
||||
id: check
|
||||
run: |
|
||||
if [[ "${{ github.event.review.state }}" == "approved" || "${{ github.event.pull_request.approved }}" == "true" ]]; then
|
||||
echo "approved=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "approved=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
test_go:
|
||||
name: Run Go Tests v3
|
||||
needs: check_approval
|
||||
runs-on: ${{ matrix.os }}
|
||||
if: github.base_ref == 'v3-alpha'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
go-version: [1.24]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install linux dependencies
|
||||
uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
with:
|
||||
packages: libgtk-3-dev libwebkit2gtk-4.1-dev build-essential pkg-config xvfb x11-xserver-utils at-spi2-core xdg-desktop-portal-gtk
|
||||
version: 1.0
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
cache-dependency-path: "v3/go.sum"
|
||||
|
||||
- name: Install Task
|
||||
uses: arduino/setup-task@v2
|
||||
with:
|
||||
version: 3.x
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build Examples
|
||||
working-directory: v3
|
||||
run: task test:examples
|
||||
|
||||
- name: Run tests (mac)
|
||||
if: matrix.os == 'macos-latest'
|
||||
env:
|
||||
CGO_LDFLAGS: -framework UniformTypeIdentifiers -mmacosx-version-min=10.13
|
||||
working-directory: v3
|
||||
run: go test -v ./...
|
||||
|
||||
- name: Run tests (windows)
|
||||
if: matrix.os == 'windows-latest'
|
||||
working-directory: v3
|
||||
run: go test -v ./...
|
||||
|
||||
- name: Run tests (ubuntu)
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
working-directory: v3
|
||||
run: >
|
||||
xvfb-run --auto-servernum
|
||||
sh -c '
|
||||
dbus-update-activation-environment --systemd --all &&
|
||||
go test -v ./...
|
||||
'
|
||||
|
||||
- name: Typecheck binding generator output
|
||||
working-directory: v3
|
||||
run: task generator:test:check
|
||||
|
||||
test_js:
|
||||
name: Run JS Tests
|
||||
needs: check_approval
|
||||
runs-on: ubuntu-latest
|
||||
if: github.base_ref == 'v3-alpha'
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [20.x]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
working-directory: v2/internal/frontend/runtime
|
||||
|
||||
- name: Run tests
|
||||
run: npm test
|
||||
working-directory: v2/internal/frontend/runtime
|
||||
|
||||
test_templates:
|
||||
name: Test Templates
|
||||
needs: test_go
|
||||
runs-on: ${{ matrix.os }}
|
||||
if: github.base_ref == 'v3-alpha'
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
template:
|
||||
- svelte
|
||||
- svelte-ts
|
||||
- vue
|
||||
- vue-ts
|
||||
- react
|
||||
- react-ts
|
||||
- preact
|
||||
- preact-ts
|
||||
- lit
|
||||
- lit-ts
|
||||
- vanilla
|
||||
- vanilla-ts
|
||||
go-version: [1.24]
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install linux dependencies
|
||||
uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
with:
|
||||
packages: libgtk-3-dev libwebkit2gtk-4.1-dev build-essential pkg-config
|
||||
version: 1.0
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
cache-dependency-path: "v3/go.sum"
|
||||
|
||||
- name: Install Task
|
||||
uses: arduino/setup-task@v2
|
||||
with:
|
||||
version: 3.x
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Build Wails3 CLI
|
||||
working-directory: v3
|
||||
run: |
|
||||
task install
|
||||
wails3 doctor
|
||||
|
||||
- name: Generate template '${{ matrix.template }}'
|
||||
run: |
|
||||
mkdir -p ./test-${{ matrix.template }}
|
||||
cd ./test-${{ matrix.template }}
|
||||
wails3 init -n ${{ matrix.template }} -t ${{ matrix.template }}
|
||||
cd ${{ matrix.template }}
|
||||
wails3 build
|
||||
|
||||
build_results:
|
||||
if: ${{ always() }}
|
||||
runs-on: ubuntu-latest
|
||||
name: v3 Build Results
|
||||
needs: [test_go, test_js, test_templates]
|
||||
steps:
|
||||
- run: |
|
||||
go_result="${{ needs.test_go.result }}"
|
||||
js_result="${{ needs.test_js.result }}"
|
||||
templates_result="${{ needs.test_templates.result }}"
|
||||
|
||||
if [[ $go_result == "success" || $go_result == "skipped" ]] && \
|
||||
[[ $js_result == "success" || $js_result == "skipped" ]] && \
|
||||
[[ $templates_result == "success" || $templates_result == "skipped" ]]; then
|
||||
echo "All required jobs succeeded or were skipped"
|
||||
exit 0
|
||||
else
|
||||
echo "One or more required jobs failed"
|
||||
exit 1
|
||||
fi
|
||||
80
.github/workflows/build-and-test.yml
vendored
80
.github/workflows/build-and-test.yml
vendored
|
|
@ -2,7 +2,7 @@ name: Build + Test v2
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: [release/*, master]
|
||||
branches: [release/*, master, bugfix/*]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
|
@ -12,21 +12,30 @@ jobs:
|
|||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
go-version: [1.18, 1.19]
|
||||
os: [ubuntu-22.04, ubuntu-24.04, windows-latest, macos-latest]
|
||||
go-version: ['1.22']
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install linux dependencies
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev build-essential pkg-config
|
||||
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
if: matrix.os == 'ubuntu-22.04'
|
||||
with:
|
||||
packages: libgtk-3-dev libwebkit2gtk-4.0-dev build-essential pkg-config
|
||||
version: 1.0
|
||||
|
||||
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
if: matrix.os == 'ubuntu-24.04'
|
||||
with:
|
||||
packages: libgtk-3-dev libwebkit2gtk-4.1-dev build-essential pkg-config libegl1
|
||||
version: 1.0
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v3
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
cache-dependency-path: ./v2/go.sum
|
||||
|
||||
- name: Run tests (mac)
|
||||
if: matrix.os == 'macos-latest'
|
||||
|
|
@ -36,21 +45,26 @@ jobs:
|
|||
run: go test -v ./...
|
||||
|
||||
- name: Run tests (!mac)
|
||||
if: matrix.os != 'macos-latest'
|
||||
if: matrix.os != 'macos-latest' && matrix.os != 'ubuntu-24.04'
|
||||
working-directory: ./v2
|
||||
run: go test -v ./...
|
||||
|
||||
- name: Run tests (Ubuntu 24.04)
|
||||
if: matrix.os == 'ubuntu-24.04'
|
||||
working-directory: ./v2
|
||||
run: go test -v -tags webkit2_41 ./...
|
||||
|
||||
test_js:
|
||||
name: Run JS Tests
|
||||
if: github.repository == 'wailsapp/wails'
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [16.x]
|
||||
node-version: [20.x]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Use Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v3
|
||||
|
|
@ -72,7 +86,7 @@ jobs:
|
|||
strategy:
|
||||
fail-fast: true
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
os: [ubuntu-22.04, windows-latest, macos-latest, ubuntu-24.04]
|
||||
template:
|
||||
[
|
||||
svelte,
|
||||
|
|
@ -89,15 +103,16 @@ jobs:
|
|||
vanilla-ts,
|
||||
plain,
|
||||
]
|
||||
go-version: [1.18, 1.19]
|
||||
go-version: ['1.22']
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v3
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
cache-dependency-path: ./v2/go.sum
|
||||
|
||||
- name: Build Wails CLI
|
||||
run: |
|
||||
|
|
@ -105,14 +120,41 @@ jobs:
|
|||
go install
|
||||
wails -help
|
||||
|
||||
- name: Install linux dependencies
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev build-essential pkg-config
|
||||
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
if: matrix.os == 'ubuntu-22.04'
|
||||
with:
|
||||
packages: libgtk-3-dev libwebkit2gtk-4.0-dev build-essential pkg-config
|
||||
version: 1.0
|
||||
|
||||
- name: Generate template '${{ matrix.template }}'
|
||||
# - name: Install linux dependencies ( 22.04 )
|
||||
# if: matrix.os == 'ubuntu-22.04'
|
||||
# run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev build-essential pkg-config
|
||||
|
||||
- uses: awalsh128/cache-apt-pkgs-action@latest
|
||||
if: matrix.os == 'ubuntu-24.04'
|
||||
with:
|
||||
packages: libgtk-3-dev libwebkit2gtk-4.1-dev build-essential pkg-config libegl1
|
||||
version: 1.0
|
||||
|
||||
# - name: Install linux dependencies ( 24.04 )
|
||||
# if: matrix.os == 'ubuntu-24.04'
|
||||
# run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev build-essential pkg-config
|
||||
|
||||
- name: Generate & Build template '${{ matrix.template }}'
|
||||
if: matrix.os != 'ubuntu-24.04'
|
||||
run: |
|
||||
mkdir -p ./test-${{ matrix.template }}
|
||||
cd ./test-${{ matrix.template }}
|
||||
wails init -n ${{ matrix.template }} -t ${{ matrix.template }} -ci
|
||||
cd ${{ matrix.template }}
|
||||
wails build -v 2
|
||||
|
||||
- name: Generate & Build template '${{ matrix.template }}' (ubuntu-24.04)
|
||||
if: matrix.os == 'ubuntu-24.04'
|
||||
run: |
|
||||
mkdir -p ./test-${{ matrix.template }}
|
||||
cd ./test-${{ matrix.template }}
|
||||
wails init -n ${{ matrix.template }} -t ${{ matrix.template }} -ci
|
||||
cd ${{ matrix.template }}
|
||||
wails build -v 2 -tags webkit2_41
|
||||
|
||||
|
|
|
|||
423
.github/workflows/build-cross-image.yml
vendored
Normal file
423
.github/workflows/build-cross-image.yml
vendored
Normal file
|
|
@ -0,0 +1,423 @@
|
|||
name: Build Cross-Compiler Image
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
branch:
|
||||
description: 'Branch containing Dockerfile'
|
||||
required: true
|
||||
default: 'v3-alpha'
|
||||
sdk_version:
|
||||
description: 'macOS SDK version'
|
||||
required: true
|
||||
default: '14.5'
|
||||
zig_version:
|
||||
description: 'Zig version'
|
||||
required: true
|
||||
default: '0.14.0'
|
||||
image_version:
|
||||
description: 'Image version tag'
|
||||
required: true
|
||||
default: 'latest'
|
||||
skip_tests:
|
||||
description: 'Skip cross-compilation tests'
|
||||
required: false
|
||||
default: 'false'
|
||||
type: boolean
|
||||
push:
|
||||
branches:
|
||||
- v3-alpha
|
||||
paths:
|
||||
- 'v3/internal/commands/build_assets/docker/Dockerfile.cross'
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io
|
||||
IMAGE_NAME: wailsapp/wails-cross
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
packages: write
|
||||
outputs:
|
||||
image_tag: ${{ steps.vars.outputs.image_version }}
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.branch || github.ref }}
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Set build variables
|
||||
id: vars
|
||||
run: |
|
||||
echo "sdk_version=${{ inputs.sdk_version || '14.5' }}" >> $GITHUB_OUTPUT
|
||||
echo "zig_version=${{ inputs.zig_version || '0.14.0' }}" >> $GITHUB_OUTPUT
|
||||
echo "image_version=${{ inputs.image_version || 'latest' }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Extract metadata
|
||||
id: meta
|
||||
uses: docker/metadata-action@v5
|
||||
with:
|
||||
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
tags: |
|
||||
type=raw,value=latest
|
||||
type=raw,value=${{ steps.vars.outputs.image_version }}
|
||||
type=raw,value=sdk-${{ steps.vars.outputs.sdk_version }}
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: v3/internal/commands/build_assets/docker
|
||||
file: v3/internal/commands/build_assets/docker/Dockerfile.cross
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: |
|
||||
${{ steps.meta.outputs.labels }}
|
||||
io.wails.zig.version=${{ steps.vars.outputs.zig_version }}
|
||||
io.wails.sdk.version=${{ steps.vars.outputs.sdk_version }}
|
||||
build-args: |
|
||||
ZIG_VERSION=${{ steps.vars.outputs.zig_version }}
|
||||
MACOS_SDK_VERSION=${{ steps.vars.outputs.sdk_version }}
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
||||
# Test cross-compilation for all platforms
|
||||
test-cross-compile:
|
||||
needs: build
|
||||
if: ${{ inputs.skip_tests != 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
# Darwin targets (Zig + macOS SDK) - no platform emulation needed
|
||||
- os: darwin
|
||||
arch: arm64
|
||||
platform: ""
|
||||
expected_file: "Mach-O 64-bit.*arm64"
|
||||
- os: darwin
|
||||
arch: amd64
|
||||
platform: ""
|
||||
expected_file: "Mach-O 64-bit.*x86_64"
|
||||
# Linux targets (GCC) - need platform to match architecture
|
||||
- os: linux
|
||||
arch: amd64
|
||||
platform: "linux/amd64"
|
||||
expected_file: "ELF 64-bit LSB.*x86-64"
|
||||
- os: linux
|
||||
arch: arm64
|
||||
platform: "linux/arm64"
|
||||
expected_file: "ELF 64-bit LSB.*ARM aarch64"
|
||||
# Windows targets (Zig + mingw) - no platform emulation needed
|
||||
- os: windows
|
||||
arch: amd64
|
||||
platform: ""
|
||||
expected_file: "PE32\\+ executable.*x86-64"
|
||||
- os: windows
|
||||
arch: arm64
|
||||
platform: ""
|
||||
expected_file: "PE32\\+ executable.*Aarch64"
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.branch || github.ref }}
|
||||
|
||||
- name: Set up QEMU
|
||||
if: matrix.platform != ''
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Log in to Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Create test CGO project
|
||||
run: |
|
||||
mkdir -p test-project
|
||||
cd test-project
|
||||
|
||||
# Create a minimal CGO test program
|
||||
cat > main.go << 'EOF'
|
||||
package main
|
||||
|
||||
/*
|
||||
#include <stdlib.h>
|
||||
|
||||
int add(int a, int b) {
|
||||
return a + b;
|
||||
}
|
||||
*/
|
||||
import "C"
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
result := C.add(1, 2)
|
||||
fmt.Printf("CGO test: 1 + 2 = %d\n", result)
|
||||
}
|
||||
EOF
|
||||
|
||||
cat > go.mod << 'EOF'
|
||||
module test-cgo
|
||||
|
||||
go 1.21
|
||||
EOF
|
||||
|
||||
- name: Build ${{ matrix.os }}/${{ matrix.arch }} (CGO)
|
||||
run: |
|
||||
cd test-project
|
||||
PLATFORM_FLAG=""
|
||||
if [ -n "${{ matrix.platform }}" ]; then
|
||||
PLATFORM_FLAG="--platform ${{ matrix.platform }}"
|
||||
fi
|
||||
|
||||
docker run --rm $PLATFORM_FLAG \
|
||||
-v "$(pwd):/app" \
|
||||
-e APP_NAME="test-cgo" \
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.build.outputs.image_tag || 'latest' }} \
|
||||
${{ matrix.os }} ${{ matrix.arch }}
|
||||
|
||||
- name: Verify binary format
|
||||
run: |
|
||||
cd test-project/bin
|
||||
ls -la
|
||||
|
||||
# Find the built binary
|
||||
if [ "${{ matrix.os }}" = "windows" ]; then
|
||||
BINARY=$(ls test-cgo-${{ matrix.os }}-${{ matrix.arch }}.exe 2>/dev/null || ls *.exe | head -1)
|
||||
else
|
||||
BINARY=$(ls test-cgo-${{ matrix.os }}-${{ matrix.arch }} 2>/dev/null || ls test-cgo* | grep -v '.exe' | head -1)
|
||||
fi
|
||||
|
||||
echo "Binary: $BINARY"
|
||||
FILE_OUTPUT=$(file "$BINARY")
|
||||
echo "File output: $FILE_OUTPUT"
|
||||
|
||||
# Verify the binary format matches expected
|
||||
if echo "$FILE_OUTPUT" | grep -qE "${{ matrix.expected_file }}"; then
|
||||
echo "✅ Binary format verified: ${{ matrix.os }}/${{ matrix.arch }}"
|
||||
else
|
||||
echo "❌ Binary format mismatch!"
|
||||
echo "Expected pattern: ${{ matrix.expected_file }}"
|
||||
echo "Got: $FILE_OUTPUT"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Check library dependencies (Linux only)
|
||||
if: matrix.os == 'linux'
|
||||
run: |
|
||||
cd test-project/bin
|
||||
BINARY=$(ls test-cgo-${{ matrix.os }}-${{ matrix.arch }} 2>/dev/null || ls test-cgo* | grep -v '.exe' | head -1)
|
||||
|
||||
echo "## Library Dependencies for $BINARY"
|
||||
echo ""
|
||||
|
||||
# Use readelf to show dynamic dependencies
|
||||
echo "### NEEDED libraries:"
|
||||
readelf -d "$BINARY" | grep NEEDED || echo "No dynamic dependencies (statically linked)"
|
||||
|
||||
# Verify expected libraries are linked
|
||||
echo ""
|
||||
echo "### Verifying required libraries..."
|
||||
NEEDED=$(readelf -d "$BINARY" | grep NEEDED)
|
||||
|
||||
MISSING=""
|
||||
for lib in libwebkit2gtk-4.1.so libgtk-3.so libglib-2.0.so libc.so; do
|
||||
if echo "$NEEDED" | grep -q "$lib"; then
|
||||
echo "✅ $lib"
|
||||
else
|
||||
echo "❌ $lib MISSING"
|
||||
MISSING="$MISSING $lib"
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -n "$MISSING" ]; then
|
||||
echo ""
|
||||
echo "ERROR: Missing required libraries:$MISSING"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Test non-CGO builds (pure Go cross-compilation)
|
||||
test-non-cgo:
|
||||
needs: build
|
||||
if: ${{ inputs.skip_tests != 'true' }}
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: darwin
|
||||
arch: arm64
|
||||
expected_file: "Mach-O 64-bit.*arm64"
|
||||
- os: darwin
|
||||
arch: amd64
|
||||
expected_file: "Mach-O 64-bit.*x86_64"
|
||||
- os: linux
|
||||
arch: amd64
|
||||
expected_file: "ELF 64-bit LSB"
|
||||
- os: linux
|
||||
arch: arm64
|
||||
expected_file: "ELF 64-bit LSB.*ARM aarch64"
|
||||
- os: windows
|
||||
arch: amd64
|
||||
expected_file: "PE32\\+ executable.*x86-64"
|
||||
- os: windows
|
||||
arch: arm64
|
||||
expected_file: "PE32\\+ executable.*Aarch64"
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ inputs.branch || github.ref }}
|
||||
|
||||
- name: Log in to Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Create test non-CGO project
|
||||
run: |
|
||||
mkdir -p test-project
|
||||
cd test-project
|
||||
|
||||
# Create a pure Go test program (no CGO)
|
||||
cat > main.go << 'EOF'
|
||||
package main
|
||||
|
||||
import "fmt"
|
||||
|
||||
func main() {
|
||||
fmt.Println("Pure Go cross-compilation test")
|
||||
}
|
||||
EOF
|
||||
|
||||
cat > go.mod << 'EOF'
|
||||
module test-pure-go
|
||||
|
||||
go 1.21
|
||||
EOF
|
||||
|
||||
- name: Build ${{ matrix.os }}/${{ matrix.arch }} (non-CGO)
|
||||
run: |
|
||||
cd test-project
|
||||
|
||||
# For non-CGO, we can use any platform since Go handles cross-compilation
|
||||
# We set CGO_ENABLED=0 to ensure pure Go build
|
||||
docker run --rm \
|
||||
-v "$(pwd):/app" \
|
||||
-e APP_NAME="test-pure-go" \
|
||||
-e CGO_ENABLED=0 \
|
||||
--entrypoint /bin/sh \
|
||||
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.build.outputs.image_tag || 'latest' }} \
|
||||
-c "GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build -o bin/test-pure-go-${{ matrix.os }}-${{ matrix.arch }}${{ matrix.os == 'windows' && '.exe' || '' }} ."
|
||||
|
||||
- name: Verify binary format
|
||||
run: |
|
||||
cd test-project/bin
|
||||
ls -la
|
||||
|
||||
# Find the built binary
|
||||
if [ "${{ matrix.os }}" = "windows" ]; then
|
||||
BINARY="test-pure-go-${{ matrix.os }}-${{ matrix.arch }}.exe"
|
||||
else
|
||||
BINARY="test-pure-go-${{ matrix.os }}-${{ matrix.arch }}"
|
||||
fi
|
||||
|
||||
echo "Binary: $BINARY"
|
||||
FILE_OUTPUT=$(file "$BINARY")
|
||||
echo "File output: $FILE_OUTPUT"
|
||||
|
||||
# Verify the binary format matches expected
|
||||
if echo "$FILE_OUTPUT" | grep -qE "${{ matrix.expected_file }}"; then
|
||||
echo "✅ Binary format verified: ${{ matrix.os }}/${{ matrix.arch }} (non-CGO)"
|
||||
else
|
||||
echo "❌ Binary format mismatch!"
|
||||
echo "Expected pattern: ${{ matrix.expected_file }}"
|
||||
echo "Got: $FILE_OUTPUT"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Check library dependencies (Linux only)
|
||||
if: matrix.os == 'linux'
|
||||
run: |
|
||||
cd test-project/bin
|
||||
BINARY="test-pure-go-${{ matrix.os }}-${{ matrix.arch }}"
|
||||
|
||||
echo "## Library Dependencies for $BINARY (non-CGO)"
|
||||
echo ""
|
||||
|
||||
# Non-CGO builds should have minimal dependencies (just libc or statically linked)
|
||||
echo "### NEEDED libraries:"
|
||||
readelf -d "$BINARY" | grep NEEDED || echo "No dynamic dependencies (statically linked)"
|
||||
|
||||
# Verify NO GTK/WebKit libraries (since CGO is disabled)
|
||||
NEEDED=$(readelf -d "$BINARY" | grep NEEDED || true)
|
||||
if echo "$NEEDED" | grep -q "libwebkit\|libgtk"; then
|
||||
echo "❌ ERROR: Non-CGO binary should not link to GTK/WebKit!"
|
||||
exit 1
|
||||
else
|
||||
echo "✅ Confirmed: No GTK/WebKit dependencies (expected for non-CGO)"
|
||||
fi
|
||||
|
||||
# Summary job
|
||||
test-summary:
|
||||
needs: [build, test-cross-compile, test-non-cgo]
|
||||
if: always() && inputs.skip_tests != 'true'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check test results
|
||||
run: |
|
||||
echo "## Cross-Compilation Test Results" >> $GITHUB_STEP_SUMMARY
|
||||
echo "" >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
if [ "${{ needs.test-cross-compile.result }}" = "success" ]; then
|
||||
echo "✅ **CGO Tests**: All passed" >> $GITHUB_STEP_SUMMARY
|
||||
else
|
||||
echo "❌ **CGO Tests**: Failed" >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
|
||||
if [ "${{ needs.test-non-cgo.result }}" = "success" ]; then
|
||||
echo "✅ **Non-CGO Tests**: All passed" >> $GITHUB_STEP_SUMMARY
|
||||
else
|
||||
echo "❌ **Non-CGO Tests**: Failed" >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
|
||||
echo "" >> $GITHUB_STEP_SUMMARY
|
||||
echo "### Tested Platforms" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| Platform | Architecture | CGO | Non-CGO |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "|----------|-------------|-----|---------|" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| Darwin | arm64 | ✅ | ✅ |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| Darwin | amd64 | ✅ | ✅ |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| Linux | arm64 | ✅ | ✅ |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| Linux | amd64 | ✅ | ✅ |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| Windows | arm64 | ✅ | ✅ |" >> $GITHUB_STEP_SUMMARY
|
||||
echo "| Windows | amd64 | ✅ | ✅ |" >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
# Fail if any test failed
|
||||
if [ "${{ needs.test-cross-compile.result }}" != "success" ] || [ "${{ needs.test-non-cgo.result }}" != "success" ]; then
|
||||
echo ""
|
||||
echo "❌ Some tests failed. Check the individual job logs for details."
|
||||
exit 1
|
||||
fi
|
||||
216
.github/workflows/changelog-v3.yml
vendored
Normal file
216
.github/workflows/changelog-v3.yml
vendored
Normal file
|
|
@ -0,0 +1,216 @@
|
|||
name: Changelog Validation (v3)
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: [ v3-alpha ]
|
||||
paths:
|
||||
- 'docs/src/content/docs/changelog.mdx'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
pr_number:
|
||||
description: 'PR number to validate'
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
validate:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: write
|
||||
actions: write
|
||||
|
||||
steps:
|
||||
- name: Checkout PR code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha || format('refs/pull/{0}/head', github.event.inputs.pr_number) }}
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.GITHUB_TOKEN || github.token }}
|
||||
|
||||
- name: Get REAL validation script from v3-alpha
|
||||
run: |
|
||||
echo "Fetching the REAL validation script from v3-alpha branch..."
|
||||
git fetch origin v3-alpha
|
||||
git checkout origin/v3-alpha -- v3/scripts/validate-changelog.go
|
||||
|
||||
echo "Validation script fetched successfully:"
|
||||
ls -la v3/scripts/
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.23'
|
||||
|
||||
- name: Get PR information
|
||||
id: pr_info
|
||||
run: |
|
||||
if [ "${{ github.event_name }}" = "pull_request" ]; then
|
||||
echo "pr_number=${{ github.event.pull_request.number }}" >> $GITHUB_OUTPUT
|
||||
echo "base_ref=${{ github.event.pull_request.base.ref }}" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "pr_number=${{ github.event.inputs.pr_number }}" >> $GITHUB_OUTPUT
|
||||
echo "base_ref=v3-alpha" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Check changelog modifications
|
||||
id: changelog_check
|
||||
run: |
|
||||
echo "Checking PR #${{ steps.pr_info.outputs.pr_number }} for changelog changes"
|
||||
git fetch origin ${{ steps.pr_info.outputs.base_ref }}
|
||||
|
||||
if git diff --name-only origin/${{ steps.pr_info.outputs.base_ref }}..HEAD | grep -q "docs/src/content/docs/changelog.mdx"; then
|
||||
echo "changelog_modified=true" >> $GITHUB_OUTPUT
|
||||
echo "✅ Changelog was modified in this PR"
|
||||
else
|
||||
echo "changelog_modified=false" >> $GITHUB_OUTPUT
|
||||
echo "ℹ️ Changelog was not modified - skipping validation"
|
||||
fi
|
||||
|
||||
- name: Get changelog diff
|
||||
id: get_diff
|
||||
if: steps.changelog_check.outputs.changelog_modified == 'true'
|
||||
run: |
|
||||
echo "Getting diff for changelog changes..."
|
||||
git diff origin/${{ steps.pr_info.outputs.base_ref }}..HEAD docs/src/content/docs/changelog.mdx | grep "^+" | grep -v "^+++" | sed 's/^+//' > /tmp/pr_added_lines.txt
|
||||
|
||||
echo "Lines added in this PR:"
|
||||
cat /tmp/pr_added_lines.txt
|
||||
echo "Total lines added: $(wc -l < /tmp/pr_added_lines.txt)"
|
||||
|
||||
- name: Validate changelog
|
||||
id: validate
|
||||
if: steps.changelog_check.outputs.changelog_modified == 'true'
|
||||
run: |
|
||||
echo "Running changelog validation..."
|
||||
cd v3/scripts
|
||||
OUTPUT=$(go run validate-changelog.go ../../docs/src/content/docs/changelog.mdx /tmp/pr_added_lines.txt 2>&1)
|
||||
echo "$OUTPUT"
|
||||
|
||||
RESULT=$(echo "$OUTPUT" | grep "VALIDATION_RESULT=" | cut -d'=' -f2)
|
||||
echo "result=$RESULT" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Commit fixes
|
||||
id: commit_fixes
|
||||
if: steps.validate.outputs.result == 'fixed'
|
||||
run: |
|
||||
echo "Committing automatic fixes..."
|
||||
git config --local user.email "action@github.com"
|
||||
git config --local user.name "GitHub Action"
|
||||
|
||||
# Check only the changelog file for changes
|
||||
if git diff --quiet docs/src/content/docs/changelog.mdx; then
|
||||
echo "No changes to commit"
|
||||
echo "committed=false" >> $GITHUB_OUTPUT
|
||||
else
|
||||
# Ensure validation script doesn't get committed
|
||||
echo "v3/scripts/validate-changelog.go" >> .git/info/exclude
|
||||
# Get the correct branch name to push to
|
||||
REPO_OWNER="wailsapp" # Always wailsapp for this repo
|
||||
|
||||
if [ "${{ github.event_name }}" = "pull_request" ]; then
|
||||
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
|
||||
else
|
||||
# For manual workflow dispatch, get PR info
|
||||
PR_INFO=$(gh pr view ${{ steps.pr_info.outputs.pr_number }} --json headRefName,headRepository)
|
||||
BRANCH_NAME=$(echo "$PR_INFO" | jq -r '.headRefName')
|
||||
HEAD_REPO=$(echo "$PR_INFO" | jq -r '.headRepository.name')
|
||||
|
||||
echo "🔍 PR source branch: $BRANCH_NAME"
|
||||
echo "🔍 Head repository: $HEAD_REPO"
|
||||
|
||||
# Don't push if this is from a fork or if branch is v3-alpha (main branch)
|
||||
if [ "$HEAD_REPO" != "wails" ] || [ "$BRANCH_NAME" = "v3-alpha" ]; then
|
||||
echo "⚠️ Cannot push - either fork or direct v3-alpha branch. Manual fix required."
|
||||
echo "committed=false" >> $GITHUB_OUTPUT
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "Pushing to branch: $BRANCH_NAME in repo: $REPO_OWNER"
|
||||
|
||||
# Only commit the changelog changes, not the validation script
|
||||
git add docs/src/content/docs/changelog.mdx
|
||||
git commit -m "🤖 Fix changelog: move entries to Unreleased section"
|
||||
|
||||
# Only push if running on the main wailsapp repository
|
||||
if [ "${{ github.repository }}" = "wailsapp/wails" ]; then
|
||||
# Pull latest changes and rebase our commit
|
||||
git fetch origin $BRANCH_NAME
|
||||
git rebase origin/$BRANCH_NAME
|
||||
git push origin HEAD:$BRANCH_NAME
|
||||
else
|
||||
echo "⚠️ Running on fork (${{ github.repository }}). Skipping push - manual fix required."
|
||||
echo "committed=false" >> $GITHUB_OUTPUT
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo "committed=true" >> $GITHUB_OUTPUT
|
||||
echo "✅ Changes committed and pushed"
|
||||
fi
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Get PR author for tagging
|
||||
id: pr_author
|
||||
if: steps.validate.outputs.result && github.event.inputs.pr_number
|
||||
run: |
|
||||
PR_AUTHOR=$(gh pr view ${{ steps.pr_info.outputs.pr_number }} --json author --jq '.author.login')
|
||||
echo "author=$PR_AUTHOR" >> $GITHUB_OUTPUT
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Comment on PR
|
||||
if: steps.validate.outputs.result && github.event.inputs.pr_number
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
script: |
|
||||
const result = '${{ steps.validate.outputs.result }}';
|
||||
const committed = '${{ steps.commit_fixes.outputs.committed }}';
|
||||
const author = '${{ steps.pr_author.outputs.author }}';
|
||||
|
||||
let message;
|
||||
if (result === 'success') {
|
||||
message = '## ✅ Changelog Validation Passed\n\nNo misplaced changelog entries detected.';
|
||||
} else if (result === 'fixed' && committed === 'true') {
|
||||
message = '## 🔧 Changelog Updated\n\nMisplaced entries were automatically moved to the `[Unreleased]` section. The changes have been committed to this PR.';
|
||||
} else if (result === 'fixed' || result === 'cannot_fix' || result === 'error') {
|
||||
// Read the fixed changelog content
|
||||
const fs = require('fs');
|
||||
let fixedContent = '';
|
||||
try {
|
||||
fixedContent = fs.readFileSync('docs/src/content/docs/changelog.mdx', 'utf8');
|
||||
} catch (error) {
|
||||
fixedContent = 'Error reading fixed changelog content';
|
||||
}
|
||||
|
||||
message = '## ⚠️ Changelog Validation Issue\\n\\n' +
|
||||
'@' + author + ' Your PR contains changelog entries that were added to already-released versions. These need to be moved to the `[Unreleased]` section.\\n\\n' +
|
||||
(committed === 'true' ?
|
||||
'✅ **Auto-fix applied**: The changes have been automatically committed to this PR.' :
|
||||
'❌ **Manual fix required**: Please apply the changes shown below manually.') + '\\n\\n' +
|
||||
'<details>\\n' +
|
||||
'<summary>📝 Click to see the corrected changelog content</summary>\\n\\n' +
|
||||
'```mdx\\n' +
|
||||
fixedContent +
|
||||
'\\n```\\n\\n' +
|
||||
'</details>\\n\\n' +
|
||||
'**What happened?** \\n' +
|
||||
'The validation script detected that you added changelog entries to a version section that has already been released (like `v3.0.0-alpha.10`). All new entries should go in the `[Unreleased]` section under the appropriate category (`### Added`, `### Fixed`, etc.).\\n\\n' +
|
||||
(committed !== 'true' ? '**Action needed:** Please copy the corrected content from above and replace your changelog file.' : '');
|
||||
}
|
||||
|
||||
if (message) {
|
||||
await github.rest.issues.createComment({
|
||||
issue_number: ${{ steps.pr_info.outputs.pr_number }},
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: message
|
||||
});
|
||||
}
|
||||
|
||||
- name: Fail if validation failed
|
||||
if: steps.validate.outputs.result == 'cannot_fix' || steps.validate.outputs.result == 'error'
|
||||
run: |
|
||||
echo "❌ Changelog validation failed"
|
||||
exit 1
|
||||
44
.github/workflows/claude-code-review.yml
vendored
Normal file
44
.github/workflows/claude-code-review.yml
vendored
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
name: Claude Code Review
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, ready_for_review, reopened]
|
||||
# Optional: Only run on specific file changes
|
||||
# paths:
|
||||
# - "src/**/*.ts"
|
||||
# - "src/**/*.tsx"
|
||||
# - "src/**/*.js"
|
||||
# - "src/**/*.jsx"
|
||||
|
||||
jobs:
|
||||
claude-review:
|
||||
# Optional: Filter by PR author
|
||||
# if: |
|
||||
# github.event.pull_request.user.login == 'external-contributor' ||
|
||||
# github.event.pull_request.user.login == 'new-developer' ||
|
||||
# github.event.pull_request.author_association == 'FIRST_TIME_CONTRIBUTOR'
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
issues: read
|
||||
id-token: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Run Claude Code Review
|
||||
id: claude-review
|
||||
uses: anthropics/claude-code-action@v1
|
||||
with:
|
||||
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
||||
plugin_marketplaces: 'https://github.com/anthropics/claude-code.git'
|
||||
plugins: 'code-review@claude-code-plugins'
|
||||
prompt: '/code-review:code-review ${{ github.repository }}/pull/${{ github.event.pull_request.number }}'
|
||||
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
|
||||
# or https://code.claude.com/docs/en/cli-reference for available options
|
||||
|
||||
50
.github/workflows/claude.yml
vendored
Normal file
50
.github/workflows/claude.yml
vendored
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
name: Claude Code
|
||||
|
||||
on:
|
||||
issue_comment:
|
||||
types: [created]
|
||||
pull_request_review_comment:
|
||||
types: [created]
|
||||
issues:
|
||||
types: [opened, assigned]
|
||||
pull_request_review:
|
||||
types: [submitted]
|
||||
|
||||
jobs:
|
||||
claude:
|
||||
if: |
|
||||
(github.event_name == 'issue_comment' && contains(github.event.comment.body, '@claude')) ||
|
||||
(github.event_name == 'pull_request_review_comment' && contains(github.event.comment.body, '@claude')) ||
|
||||
(github.event_name == 'pull_request_review' && contains(github.event.review.body, '@claude')) ||
|
||||
(github.event_name == 'issues' && (contains(github.event.issue.body, '@claude') || contains(github.event.issue.title, '@claude')))
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
issues: read
|
||||
id-token: write
|
||||
actions: read # Required for Claude to read CI results on PRs
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Run Claude Code
|
||||
id: claude
|
||||
uses: anthropics/claude-code-action@v1
|
||||
with:
|
||||
claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
|
||||
|
||||
# This is an optional setting that allows Claude to read CI results on PRs
|
||||
additional_permissions: |
|
||||
actions: read
|
||||
|
||||
# Optional: Give a custom prompt to Claude. If this is not specified, Claude will perform the instructions specified in the comment that tagged it.
|
||||
# prompt: 'Update the pull request description to include a summary of changes.'
|
||||
|
||||
# Optional: Add claude_args to customize behavior and configuration
|
||||
# See https://github.com/anthropics/claude-code-action/blob/main/docs/usage.md
|
||||
# or https://code.claude.com/docs/en/cli-reference for available options
|
||||
# claude_args: '--allowed-tools Bash(gh pr:*)'
|
||||
|
||||
13
.github/workflows/generate-sponsor-image.yml
vendored
13
.github/workflows/generate-sponsor-image.yml
vendored
|
|
@ -16,7 +16,7 @@ jobs:
|
|||
- name: Set Node
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16.x
|
||||
node-version: 20.x
|
||||
|
||||
- name: Update Sponsors
|
||||
run: cd scripts/sponsors && chmod 755 ./generate-sponsor-image.sh && ./generate-sponsor-image.sh
|
||||
|
|
@ -25,11 +25,16 @@ jobs:
|
|||
SPONSORKIT_GITHUB_LOGIN: wailsapp
|
||||
|
||||
- name: Create Pull Request
|
||||
uses: peter-evans/create-pull-request@v4
|
||||
uses: peter-evans/create-pull-request@v6
|
||||
with:
|
||||
commit-message: "chore: update sponsors.svg"
|
||||
add-paths: "website/static/img/sponsors.svg"
|
||||
title: Update Sponsor Image
|
||||
body: Generated new image
|
||||
title: "chore: update sponsors.svg"
|
||||
body: |
|
||||
Auto-generated by the sponsor image workflow
|
||||
|
||||
[skip ci] [skip actions]
|
||||
branch: update-sponsors
|
||||
base: master
|
||||
delete-branch: true
|
||||
draft: false
|
||||
|
|
|
|||
77
.github/workflows/issue-triage-automation.yml
vendored
Normal file
77
.github/workflows/issue-triage-automation.yml
vendored
Normal file
|
|
@ -0,0 +1,77 @@
|
|||
name: Issue Triage Automation
|
||||
|
||||
on:
|
||||
issues:
|
||||
types: [opened]
|
||||
|
||||
jobs:
|
||||
triage:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
contents: read
|
||||
steps:
|
||||
# Request more info for unclear bug reports
|
||||
- name: Request more info
|
||||
uses: actions/github-script@v6
|
||||
if: |
|
||||
contains(github.event.issue.labels.*.name, 'bug') &&
|
||||
!contains(github.event.issue.body, 'wails doctor') &&
|
||||
!contains(github.event.issue.body, 'reproduction')
|
||||
with:
|
||||
script: |
|
||||
github.rest.issues.createComment({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: `👋 Thanks for reporting this issue! To help us investigate, could you please:
|
||||
|
||||
1. Add the output of \`wails doctor\` if not already included
|
||||
2. Provide clear steps to reproduce the issue
|
||||
3. If possible, create a minimal reproduction of the issue
|
||||
|
||||
This will help us resolve your issue much faster. Thank you!`
|
||||
});
|
||||
github.rest.issues.addLabels({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
labels: ['awaiting feedback']
|
||||
});
|
||||
|
||||
# Prioritize security issues
|
||||
- name: Prioritize security issues
|
||||
uses: actions/github-script@v6
|
||||
if: contains(github.event.issue.labels.*.name, 'security')
|
||||
with:
|
||||
script: |
|
||||
github.rest.issues.addLabels({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
labels: ['high-priority']
|
||||
});
|
||||
|
||||
# Tag version-specific issues for project boards
|
||||
- name: Add to v2 project
|
||||
uses: actions/github-script@v6
|
||||
if: |
|
||||
contains(github.event.issue.labels.*.name, 'v2-only') &&
|
||||
!contains(github.event.issue.labels.*.name, 'v3-alpha')
|
||||
with:
|
||||
script: |
|
||||
// Replace PROJECT_ID with your actual GitHub project ID
|
||||
// This is a placeholder as the actual implementation would require
|
||||
// GraphQL API calls to add to a project board
|
||||
console.log('Would add to v2 project board');
|
||||
|
||||
# Tag version-specific issues for project boards
|
||||
- name: Add to v3 project
|
||||
uses: actions/github-script@v6
|
||||
if: contains(github.event.issue.labels.*.name, 'v3-alpha')
|
||||
with:
|
||||
script: |
|
||||
// Replace PROJECT_ID with your actual GitHub project ID
|
||||
// This is a placeholder as the actual implementation would require
|
||||
// GraphQL API calls to add to a project board
|
||||
console.log('Would add to v3 project board');
|
||||
210
.github/workflows/nightly-release-v3.yml
vendored
Normal file
210
.github/workflows/nightly-release-v3.yml
vendored
Normal file
|
|
@ -0,0 +1,210 @@
|
|||
name: Nightly Release v3-alpha
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 2 * * *' # 2 AM UTC daily
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
force_release:
|
||||
description: 'Force release even if no changes detected'
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
dry_run:
|
||||
description: 'Run in dry-run mode (no actual release)'
|
||||
required: false
|
||||
default: true
|
||||
type: boolean
|
||||
|
||||
jobs:
|
||||
nightly-release:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
pull-requests: read
|
||||
actions: write
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: v3-alpha
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v4
|
||||
with:
|
||||
go-version: '1.24'
|
||||
cache: true
|
||||
cache-dependency-path: 'v3/go.sum'
|
||||
|
||||
- name: Install Task
|
||||
uses: arduino/setup-task@v2
|
||||
with:
|
||||
version: 3.x
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Setup Git
|
||||
run: |
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
|
||||
# Configure git to use the token for authentication
|
||||
git config --global url."https://x-access-token:${{ secrets.WAILS_REPO_TOKEN || github.token }}@github.com/".insteadOf "https://github.com/"
|
||||
|
||||
- name: Check for existing release tag
|
||||
id: check_tag
|
||||
run: |
|
||||
if git describe --tags --exact-match HEAD 2>/dev/null; then
|
||||
echo "has_tag=true" >> $GITHUB_OUTPUT
|
||||
echo "tag=$(git describe --tags --exact-match HEAD)" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "has_tag=false" >> $GITHUB_OUTPUT
|
||||
echo "tag=" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Check for unreleased changelog content
|
||||
id: changelog_check
|
||||
run: |
|
||||
echo "🔍 Checking UNRELEASED_CHANGELOG.md for content..."
|
||||
|
||||
# Run the release script in check mode to see if there's content
|
||||
cd v3/tasks/release
|
||||
|
||||
# Use the release script itself to check for content
|
||||
if go run release.go --check-only 2>/dev/null; then
|
||||
echo "has_unreleased_content=true" >> $GITHUB_OUTPUT
|
||||
echo "✅ Found unreleased changelog content"
|
||||
else
|
||||
echo "has_unreleased_content=false" >> $GITHUB_OUTPUT
|
||||
echo "ℹ️ No unreleased changelog content found"
|
||||
fi
|
||||
|
||||
- name: Quick change detection and early exit
|
||||
id: quick_check
|
||||
run: |
|
||||
echo "🔍 Quick check for changes to determine if we should continue..."
|
||||
|
||||
# First check if we have unreleased changelog content
|
||||
if [ "${{ steps.changelog_check.outputs.has_unreleased_content }}" == "true" ]; then
|
||||
echo "✅ Found unreleased changelog content, proceeding with release"
|
||||
echo "has_changes=true" >> $GITHUB_OUTPUT
|
||||
echo "should_continue=true" >> $GITHUB_OUTPUT
|
||||
echo "reason=Found unreleased changelog content" >> $GITHUB_OUTPUT
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# If no unreleased changelog content, check for git changes as fallback
|
||||
echo "No unreleased changelog content found, checking for git changes..."
|
||||
|
||||
# Check if current commit has a release tag
|
||||
if git describe --tags --exact-match HEAD 2>/dev/null; then
|
||||
CURRENT_TAG=$(git describe --tags --exact-match HEAD)
|
||||
echo "Current commit has release tag: $CURRENT_TAG"
|
||||
|
||||
# For tagged commits, check if there are changes since the tag
|
||||
COMMIT_COUNT=$(git rev-list ${CURRENT_TAG}..HEAD --count)
|
||||
if [ "$COMMIT_COUNT" -eq 0 ]; then
|
||||
echo "has_changes=false" >> $GITHUB_OUTPUT
|
||||
echo "should_continue=false" >> $GITHUB_OUTPUT
|
||||
echo "reason=No changes since existing tag $CURRENT_TAG and no unreleased changelog content" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "has_changes=true" >> $GITHUB_OUTPUT
|
||||
echo "should_continue=true" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
else
|
||||
# No current tag, check against latest release
|
||||
LATEST_TAG=$(git tag --list "v3.0.0-alpha.*" | sort -V | tail -1)
|
||||
if [ -z "$LATEST_TAG" ]; then
|
||||
echo "No previous release found, proceeding with release"
|
||||
echo "has_changes=true" >> $GITHUB_OUTPUT
|
||||
echo "should_continue=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
COMMIT_COUNT=$(git rev-list ${LATEST_TAG}..HEAD --count)
|
||||
if [ "$COMMIT_COUNT" -gt 0 ]; then
|
||||
echo "Found $COMMIT_COUNT commits since $LATEST_TAG"
|
||||
echo "has_changes=true" >> $GITHUB_OUTPUT
|
||||
echo "should_continue=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "has_changes=false" >> $GITHUB_OUTPUT
|
||||
echo "should_continue=false" >> $GITHUB_OUTPUT
|
||||
echo "reason=No changes since latest release $LATEST_TAG and no unreleased changelog content" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
- name: Early exit - No changes detected
|
||||
if: |
|
||||
steps.quick_check.outputs.should_continue == 'false' &&
|
||||
github.event.inputs.force_release != 'true'
|
||||
run: |
|
||||
echo "🛑 EARLY EXIT: ${{ steps.quick_check.outputs.reason }}"
|
||||
echo ""
|
||||
echo "ℹ️ No changes detected since last release and force_release is not enabled."
|
||||
echo " Workflow will exit early to save resources."
|
||||
echo ""
|
||||
echo " To force a release anyway, run this workflow with 'force_release=true'"
|
||||
echo ""
|
||||
echo "## 🛑 Early Exit Summary" >> $GITHUB_STEP_SUMMARY
|
||||
echo "**Reason:** ${{ steps.quick_check.outputs.reason }}" >> $GITHUB_STEP_SUMMARY
|
||||
echo "**Action:** Workflow exited early to save resources" >> $GITHUB_STEP_SUMMARY
|
||||
echo "**Force Release:** Set 'force_release=true' to override this behavior" >> $GITHUB_STEP_SUMMARY
|
||||
exit 0
|
||||
|
||||
- name: Continue with release process
|
||||
if: |
|
||||
steps.quick_check.outputs.should_continue == 'true' ||
|
||||
github.event.inputs.force_release == 'true'
|
||||
run: |
|
||||
echo "✅ Proceeding with release process..."
|
||||
if [ "${{ github.event.inputs.force_release }}" == "true" ]; then
|
||||
echo "🔨 FORCE RELEASE: Overriding change detection"
|
||||
fi
|
||||
|
||||
- name: Run release script
|
||||
id: release
|
||||
if: |
|
||||
steps.quick_check.outputs.should_continue == 'true' ||
|
||||
github.event.inputs.force_release == 'true'
|
||||
env:
|
||||
WAILS_REPO_TOKEN: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
|
||||
GITHUB_TOKEN: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
|
||||
run: |
|
||||
cd v3/tasks/release
|
||||
ARGS=()
|
||||
if [ "${{ github.event.inputs.dry_run }}" == "true" ]; then
|
||||
ARGS+=(--dry-run)
|
||||
fi
|
||||
go run release.go "${ARGS[@]}"
|
||||
|
||||
- name: Summary
|
||||
if: always()
|
||||
run: |
|
||||
if [ "${{ github.event.inputs.dry_run }}" == "true" ]; then
|
||||
echo "## 🧪 DRY RUN Release Summary" >> $GITHUB_STEP_SUMMARY
|
||||
else
|
||||
echo "## 🚀 Nightly Release Summary" >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
echo "================================" >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
if [ -n "${{ steps.release.outputs.release_version }}" ]; then
|
||||
echo "- **Version:** ${{ steps.release.outputs.release_version }}" >> $GITHUB_STEP_SUMMARY
|
||||
echo "- **Tag:** ${{ steps.release.outputs.release_tag }}" >> $GITHUB_STEP_SUMMARY
|
||||
echo "- **Status:** ${{ steps.release.outcome == 'success' && '✅ Success' || '⚠️ Failed' }}" >> $GITHUB_STEP_SUMMARY
|
||||
echo "- **Mode:** ${{ steps.release.outputs.release_dry_run == 'true' && '🧪 Dry Run' || '🚀 Live release' }}" >> $GITHUB_STEP_SUMMARY
|
||||
if [ -n "${{ steps.release.outputs.release_url }}" ]; then
|
||||
echo "- **Release URL:** ${{ steps.release.outputs.release_url }}" >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
echo "" >> $GITHUB_STEP_SUMMARY
|
||||
echo "### Changelog" >> $GITHUB_STEP_SUMMARY
|
||||
if [ "${{ steps.changelog_check.outputs.has_unreleased_content }}" == "true" ]; then
|
||||
echo "✅ Unreleased changelog processed and reset." >> $GITHUB_STEP_SUMMARY
|
||||
else
|
||||
echo "ℹ️ No unreleased changelog content detected." >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
else
|
||||
echo "- Release script did not run (skipped or failed before execution)." >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
|
||||
104
.github/workflows/pr-master.yml
vendored
Normal file
104
.github/workflows/pr-master.yml
vendored
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
# Updated to ensure "Run Go Tests" runs for pull requests as expected.
|
||||
# Key fix: the test_go job previously required github.event.review.state == 'approved'
|
||||
# which only exists on pull_request_review events. That prevented the job from
|
||||
# running for regular pull_request events (opened / synchronize / reopened).
|
||||
# New logic: run tests for pull_request events, and also allow running when a
|
||||
# pull_request_review is submitted with state == 'approved'.
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
branches:
|
||||
- master
|
||||
pull_request_review:
|
||||
types: [submitted]
|
||||
branches:
|
||||
- master
|
||||
workflow_dispatch: {}
|
||||
|
||||
name: PR Checks (master)
|
||||
|
||||
jobs:
|
||||
check_docs:
|
||||
name: Check Docs
|
||||
if: ${{ github.repository == 'wailsapp/wails' && github.base_ref == 'master' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Verify Changed files
|
||||
uses: step-security/changed-files@3dbe17c78367e7d60f00d78ae6781a35be47b4a1 # v45.0.1
|
||||
id: verify-changed-files
|
||||
with:
|
||||
files: |
|
||||
website/**/*.mdx
|
||||
website/**/*.md
|
||||
- name: Run step only when files change.
|
||||
if: steps.verify-changed-files.outputs.files_changed != 'true'
|
||||
run: |
|
||||
echo "::warning::Feature branch does not contain any changes to the website."
|
||||
|
||||
test_go:
|
||||
name: Run Go Tests
|
||||
runs-on: ${{ matrix.os }}
|
||||
# Run when:
|
||||
# - the event is a pull_request (opened/synchronize/reopened) OR
|
||||
# - the event is a pull_request_review AND the review state is 'approved'
|
||||
# plus other existing filters (not the update-sponsors branch, repo and base_ref)
|
||||
if: >
|
||||
github.repository == 'wailsapp/wails' &&
|
||||
github.base_ref == 'master' &&
|
||||
github.event.pull_request.head.ref != 'update-sponsors' &&
|
||||
(
|
||||
github.event_name == 'pull_request' ||
|
||||
(github.event_name == 'pull_request_review' && github.event.review.state == 'approved')
|
||||
)
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-22.04, windows-latest, macos-latest, ubuntu-24.04]
|
||||
go-version: ['1.23']
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install linux dependencies (22.04)
|
||||
if: matrix.os == 'ubuntu-22.04'
|
||||
run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev build-essential pkg-config
|
||||
|
||||
- name: Install linux dependencies (24.04)
|
||||
if: matrix.os == 'ubuntu-24.04'
|
||||
run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev build-essential pkg-config
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
|
||||
- name: Run tests (mac)
|
||||
if: matrix.os == 'macos-latest'
|
||||
env:
|
||||
CGO_LDFLAGS: -framework UniformTypeIdentifiers -mmacosx-version-min=10.13
|
||||
working-directory: ./v2
|
||||
run: go test -v ./...
|
||||
|
||||
- name: Run tests (!mac)
|
||||
if: matrix.os != 'macos-latest' && matrix.os != 'ubuntu-24.04'
|
||||
working-directory: ./v2
|
||||
run: go test -v ./...
|
||||
|
||||
- name: Run tests (Ubuntu 24.04)
|
||||
if: matrix.os == 'ubuntu-24.04'
|
||||
working-directory: ./v2
|
||||
run: go test -v -tags webkit2_41 ./...
|
||||
|
||||
# This job will run instead of test_go for the update-sponsors branch
|
||||
skip_tests:
|
||||
name: Skip Tests (Sponsor Update)
|
||||
if: github.event.pull_request.head.ref == 'update-sponsors'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Skip tests for sponsor updates
|
||||
run: |
|
||||
echo "Skipping tests for sponsor update branch"
|
||||
echo "This is an automated update of the sponsors image."
|
||||
continue-on-error: true
|
||||
61
.github/workflows/pr.yml
vendored
61
.github/workflows/pr.yml
vendored
|
|
@ -1,61 +0,0 @@
|
|||
name: PR Checks
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
pull_request_review:
|
||||
types: [submitted]
|
||||
|
||||
jobs:
|
||||
check_docs:
|
||||
name: Check Docs
|
||||
if: ${{github.repository == 'wailsapp/wails' && contains(github.head_ref,'feature/')}}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Verify Changed files
|
||||
uses: tj-actions/verify-changed-files@v11.1
|
||||
id: verify-changed-files
|
||||
with:
|
||||
files: |
|
||||
website/**/*.mdx
|
||||
website/**/*.md
|
||||
|
||||
- name: Run step only when files change.
|
||||
if: steps.verify-changed-files.outputs.files_changed != 'true'
|
||||
run: |
|
||||
echo "::warning::Feature branch does not contain any changes to the website."
|
||||
|
||||
test_go:
|
||||
name: Run Go Tests
|
||||
runs-on: ${{ matrix.os }}
|
||||
if: github.event.review.state == 'approved'
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
go-version: [1.18, 1.19]
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install linux dependencies
|
||||
if: matrix.os == 'ubuntu-latest'
|
||||
run: sudo apt-get update -y && sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev build-essential pkg-config
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go-version }}
|
||||
|
||||
- name: Run tests (mac)
|
||||
if: matrix.os == 'macos-latest'
|
||||
env:
|
||||
CGO_LDFLAGS: -framework UniformTypeIdentifiers -mmacosx-version-min=10.13
|
||||
working-directory: ./v2
|
||||
run: go test -v ./...
|
||||
|
||||
- name: Run tests (!mac)
|
||||
if: matrix.os != 'macos-latest'
|
||||
working-directory: ./v2
|
||||
run: go test -v ./...
|
||||
25
.github/workflows/semgrep.yml
vendored
Normal file
25
.github/workflows/semgrep.yml
vendored
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
on:
|
||||
workflow_dispatch: {}
|
||||
pull_request: {}
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- master
|
||||
- v3-alpha
|
||||
paths:
|
||||
- .github/workflows/semgrep.yml
|
||||
schedule:
|
||||
# random HH:MM to avoid a load spike on GitHub Actions at 00:00
|
||||
- cron: 14 16 * * *
|
||||
name: Semgrep
|
||||
jobs:
|
||||
semgrep:
|
||||
name: semgrep/ci
|
||||
runs-on: ubuntu-24.04
|
||||
env:
|
||||
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
|
||||
container:
|
||||
image: returntocorp/semgrep
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: semgrep ci
|
||||
57
.github/workflows/stale-issues.yml
vendored
Normal file
57
.github/workflows/stale-issues.yml
vendored
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
name: Mark and Close Stale Issues
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '0 1 * * *' # Run at 1 AM UTC every day
|
||||
workflow_dispatch: # Allow manual triggering
|
||||
|
||||
jobs:
|
||||
stale:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
issues: write
|
||||
pull-requests: write
|
||||
|
||||
steps:
|
||||
- uses: actions/stale@v9
|
||||
with:
|
||||
# General settings
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
days-before-stale: 45
|
||||
days-before-close: 10
|
||||
stale-issue-label: 'stale'
|
||||
operations-per-run: 250 # Increased from 50 to 250
|
||||
|
||||
# Issue specific settings
|
||||
stale-issue-message: |
|
||||
This issue has been automatically marked as stale because it has not had recent activity.
|
||||
It will be closed if no further activity occurs within the next 10 days.
|
||||
|
||||
If this issue is still relevant, please add a comment to keep it open.
|
||||
Thank you for your contributions.
|
||||
|
||||
close-issue-message: |
|
||||
This issue has been automatically closed due to lack of activity.
|
||||
Please feel free to reopen it if it's still relevant.
|
||||
|
||||
# PR specific settings - We will not mark PRs as stale
|
||||
days-before-pr-stale: -1 # Disable PR staling
|
||||
days-before-pr-close: -1 # Disable PR closing
|
||||
|
||||
# Exemptions
|
||||
exempt-issue-labels: 'pinned,security,onhold,inprogress,Selected For Development,bug,enhancement,v3-alpha,high-priority'
|
||||
exempt-all-issue-milestones: true
|
||||
exempt-all-issue-assignees: true
|
||||
|
||||
# Protection for existing issues
|
||||
exempt-issue-created-before: '2024-01-01T00:00:00Z'
|
||||
start-date: '2025-06-01T00:00:00Z' # Don't start checking until June 1, 2025
|
||||
|
||||
# Only process issues, not PRs
|
||||
only-labels: ''
|
||||
any-of-labels: ''
|
||||
remove-stale-when-updated: true
|
||||
|
||||
# Debug options
|
||||
debug-only: false # Set to true to test without actually marking issues
|
||||
ascending: true # Process older issues first
|
||||
|
|
@ -15,7 +15,7 @@ jobs:
|
|||
- name: Setup Nodejs
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.x
|
||||
node-version: 20.x
|
||||
|
||||
- name: Install Task
|
||||
uses: arduino/setup-task@v1
|
||||
|
|
|
|||
216
.github/workflows/test-nightly-releases.yml
vendored
Normal file
216
.github/workflows/test-nightly-releases.yml
vendored
Normal file
|
|
@ -0,0 +1,216 @@
|
|||
name: Test Nightly Releases (Dry Run)
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
dry_run:
|
||||
description: 'Run in dry-run mode (no actual releases)'
|
||||
required: false
|
||||
default: true
|
||||
type: boolean
|
||||
test_branch:
|
||||
description: 'Branch to test against'
|
||||
required: false
|
||||
default: 'master'
|
||||
type: string
|
||||
|
||||
env:
|
||||
GO_VERSION: '1.24'
|
||||
|
||||
jobs:
|
||||
test-permissions:
|
||||
name: Test Release Permissions
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
authorized: ${{ steps.check.outputs.authorized }}
|
||||
steps:
|
||||
- name: Check if user is authorized
|
||||
id: check
|
||||
run: |
|
||||
# Test authorization logic
|
||||
AUTHORIZED_USERS="leaanthony"
|
||||
|
||||
if [[ "$AUTHORIZED_USERS" == *"${{ github.actor }}"* ]]; then
|
||||
echo "✅ User ${{ github.actor }} is authorized"
|
||||
echo "authorized=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "❌ User ${{ github.actor }} is not authorized"
|
||||
echo "authorized=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
test-changelog-extraction:
|
||||
name: Test Changelog Extraction
|
||||
runs-on: ubuntu-latest
|
||||
needs: test-permissions
|
||||
if: needs.test-permissions.outputs.authorized == 'true'
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.inputs.test_branch }}
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Test v2 changelog extraction
|
||||
run: |
|
||||
echo "🧪 Testing v2 changelog extraction..."
|
||||
CHANGELOG_FILE="website/src/pages/changelog.mdx"
|
||||
|
||||
if [ ! -f "$CHANGELOG_FILE" ]; then
|
||||
echo "❌ v2 changelog file not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Extract unreleased section
|
||||
awk '
|
||||
/^## \[Unreleased\]/ { found=1; next }
|
||||
found && /^## / { exit }
|
||||
found && !/^$/ { print }
|
||||
' $CHANGELOG_FILE > v2_release_notes.md
|
||||
|
||||
echo "📝 v2 changelog content (first 10 lines):"
|
||||
head -10 v2_release_notes.md || echo "No content found"
|
||||
echo "Total lines: $(wc -l < v2_release_notes.md)"
|
||||
|
||||
- name: Test v3 changelog extraction (if accessible)
|
||||
run: |
|
||||
echo "🧪 Testing v3 changelog extraction..."
|
||||
|
||||
if git show v3-alpha:docs/src/content/docs/changelog.mdx > /dev/null 2>&1; then
|
||||
echo "✅ v3 changelog accessible"
|
||||
|
||||
git show v3-alpha:docs/src/content/docs/changelog.mdx | awk '
|
||||
/^## \[Unreleased\]/ { found=1; next }
|
||||
found && /^## / { exit }
|
||||
found && !/^$/ { print }
|
||||
' > v3_release_notes.md
|
||||
|
||||
echo "📝 v3 changelog content (first 10 lines):"
|
||||
head -10 v3_release_notes.md || echo "No content found"
|
||||
echo "Total lines: $(wc -l < v3_release_notes.md)"
|
||||
else
|
||||
echo "⚠️ v3 changelog not accessible from current context"
|
||||
fi
|
||||
|
||||
test-version-detection:
|
||||
name: Test Version Detection
|
||||
runs-on: ubuntu-latest
|
||||
needs: test-permissions
|
||||
if: needs.test-permissions.outputs.authorized == 'true'
|
||||
outputs:
|
||||
v2_current_version: ${{ steps.versions.outputs.v2_current }}
|
||||
v2_next_patch: ${{ steps.versions.outputs.v2_next_patch }}
|
||||
v2_next_minor: ${{ steps.versions.outputs.v2_next_minor }}
|
||||
v2_next_major: ${{ steps.versions.outputs.v2_next_major }}
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Test version detection logic
|
||||
id: versions
|
||||
run: |
|
||||
echo "🧪 Testing version detection..."
|
||||
|
||||
# Test v2 version parsing
|
||||
if [ -f "v2/cmd/wails/internal/version.txt" ]; then
|
||||
CURRENT_V2=$(cat v2/cmd/wails/internal/version.txt | sed 's/^v//')
|
||||
echo "Current v2 version: v$CURRENT_V2"
|
||||
echo "v2_current=v$CURRENT_V2" >> $GITHUB_OUTPUT
|
||||
|
||||
# Parse and increment
|
||||
IFS='.' read -ra VERSION_PARTS <<< "$CURRENT_V2"
|
||||
MAJOR=${VERSION_PARTS[0]}
|
||||
MINOR=${VERSION_PARTS[1]}
|
||||
PATCH=${VERSION_PARTS[2]}
|
||||
|
||||
PATCH_VERSION="v$MAJOR.$MINOR.$((PATCH + 1))"
|
||||
MINOR_VERSION="v$MAJOR.$((MINOR + 1)).0"
|
||||
MAJOR_VERSION="v$((MAJOR + 1)).0.0"
|
||||
|
||||
echo "v2_next_patch=$PATCH_VERSION" >> $GITHUB_OUTPUT
|
||||
echo "v2_next_minor=$MINOR_VERSION" >> $GITHUB_OUTPUT
|
||||
echo "v2_next_major=$MAJOR_VERSION" >> $GITHUB_OUTPUT
|
||||
|
||||
echo "✅ Patch: v$CURRENT_V2 → $PATCH_VERSION"
|
||||
echo "✅ Minor: v$CURRENT_V2 → $MINOR_VERSION"
|
||||
echo "✅ Major: v$CURRENT_V2 → $MAJOR_VERSION"
|
||||
else
|
||||
echo "❌ v2 version file not found"
|
||||
fi
|
||||
|
||||
test-commit-analysis:
|
||||
name: Test Commit Analysis
|
||||
runs-on: ubuntu-latest
|
||||
needs: test-permissions
|
||||
if: needs.test-permissions.outputs.authorized == 'true'
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Test commit analysis
|
||||
run: |
|
||||
echo "🧪 Testing commit analysis..."
|
||||
|
||||
# Get recent commits for testing
|
||||
echo "Recent commits:"
|
||||
git log --oneline -10
|
||||
|
||||
# Test conventional commit detection
|
||||
RECENT_COMMITS=$(git log --oneline --since="7 days ago")
|
||||
echo "Commits from last 7 days:"
|
||||
echo "$RECENT_COMMITS"
|
||||
|
||||
# Analyze for release type
|
||||
RELEASE_TYPE="patch"
|
||||
if echo "$RECENT_COMMITS" | grep -q "feat!\|fix!\|BREAKING CHANGE:"; then
|
||||
RELEASE_TYPE="major"
|
||||
elif echo "$RECENT_COMMITS" | grep -q "feat\|BREAKING CHANGE"; then
|
||||
RELEASE_TYPE="minor"
|
||||
fi
|
||||
|
||||
echo "✅ Detected release type: $RELEASE_TYPE"
|
||||
|
||||
test-summary:
|
||||
name: Test Summary
|
||||
runs-on: ubuntu-latest
|
||||
needs: [test-permissions, test-changelog-extraction, test-version-detection, test-commit-analysis]
|
||||
if: always()
|
||||
steps:
|
||||
- name: Print test results
|
||||
run: |
|
||||
echo "# 🧪 Nightly Release Workflow Test Results" >> $GITHUB_STEP_SUMMARY
|
||||
echo "" >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
if [ "${{ needs.test-permissions.result }}" == "success" ]; then
|
||||
echo "✅ **Permissions Test**: Passed" >> $GITHUB_STEP_SUMMARY
|
||||
else
|
||||
echo "❌ **Permissions Test**: Failed" >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
|
||||
if [ "${{ needs.test-changelog-extraction.result }}" == "success" ]; then
|
||||
echo "✅ **Changelog Extraction**: Passed" >> $GITHUB_STEP_SUMMARY
|
||||
else
|
||||
echo "❌ **Changelog Extraction**: Failed" >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
|
||||
if [ "${{ needs.test-version-detection.result }}" == "success" ]; then
|
||||
echo "✅ **Version Detection**: Passed" >> $GITHUB_STEP_SUMMARY
|
||||
echo " - Current v2: ${{ needs.test-version-detection.outputs.v2_current_version }}" >> $GITHUB_STEP_SUMMARY
|
||||
echo " - Next patch: ${{ needs.test-version-detection.outputs.v2_next_patch }}" >> $GITHUB_STEP_SUMMARY
|
||||
echo " - Next minor: ${{ needs.test-version-detection.outputs.v2_next_minor }}" >> $GITHUB_STEP_SUMMARY
|
||||
echo " - Next major: ${{ needs.test-version-detection.outputs.v2_next_major }}" >> $GITHUB_STEP_SUMMARY
|
||||
else
|
||||
echo "❌ **Version Detection**: Failed" >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
|
||||
if [ "${{ needs.test-commit-analysis.result }}" == "success" ]; then
|
||||
echo "✅ **Commit Analysis**: Passed" >> $GITHUB_STEP_SUMMARY
|
||||
else
|
||||
echo "❌ **Commit Analysis**: Failed" >> $GITHUB_STEP_SUMMARY
|
||||
fi
|
||||
|
||||
echo "" >> $GITHUB_STEP_SUMMARY
|
||||
echo "**Note**: This was a dry-run test. No actual releases were created." >> $GITHUB_STEP_SUMMARY
|
||||
129
.github/workflows/unreleased-changelog-trigger.yml
vendored
Normal file
129
.github/workflows/unreleased-changelog-trigger.yml
vendored
Normal file
|
|
@ -0,0 +1,129 @@
|
|||
name: Auto Release on Changelog Update
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- v3-alpha
|
||||
paths:
|
||||
- 'v3/UNRELEASED_CHANGELOG.md'
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
dry_run:
|
||||
description: 'Run in dry-run mode (no actual release)'
|
||||
required: false
|
||||
default: false
|
||||
type: boolean
|
||||
|
||||
jobs:
|
||||
check-permissions:
|
||||
name: Check Release Permissions
|
||||
runs-on: ubuntu-latest
|
||||
outputs:
|
||||
authorized: ${{ steps.check.outputs.authorized }}
|
||||
steps:
|
||||
- name: Check if user is authorized for releases
|
||||
id: check
|
||||
run: |
|
||||
# Only allow specific users to trigger releases
|
||||
AUTHORIZED_USERS="leaanthony"
|
||||
|
||||
if [[ "$AUTHORIZED_USERS" == *"${{ github.actor }}"* ]]; then
|
||||
echo "✅ User ${{ github.actor }} is authorized for releases"
|
||||
echo "authorized=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "❌ User ${{ github.actor }} is not authorized for releases"
|
||||
echo "authorized=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
trigger-release:
|
||||
name: Trigger v3-alpha Release
|
||||
permissions:
|
||||
contents: read
|
||||
actions: write
|
||||
runs-on: ubuntu-latest
|
||||
needs: check-permissions
|
||||
if: needs.check-permissions.outputs.authorized == 'true'
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: v3-alpha
|
||||
fetch-depth: 0
|
||||
token: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
|
||||
|
||||
- name: Check for unreleased changelog content
|
||||
id: changelog_check
|
||||
run: |
|
||||
echo "🔍 Checking UNRELEASED_CHANGELOG.md for content..."
|
||||
|
||||
cd v3
|
||||
# Check if UNRELEASED_CHANGELOG.md has actual content beyond the template
|
||||
if [ -f "UNRELEASED_CHANGELOG.md" ]; then
|
||||
# Use a simple check for actual content (bullet points starting with -)
|
||||
CONTENT_LINES=$(grep -E "^\s*-\s+[^[:space:]]" UNRELEASED_CHANGELOG.md | wc -l)
|
||||
if [ "$CONTENT_LINES" -gt 0 ]; then
|
||||
echo "✅ Found $CONTENT_LINES content lines in UNRELEASED_CHANGELOG.md"
|
||||
echo "has_content=true" >> $GITHUB_OUTPUT
|
||||
else
|
||||
echo "ℹ️ No actual content found in UNRELEASED_CHANGELOG.md"
|
||||
echo "has_content=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
else
|
||||
echo "❌ UNRELEASED_CHANGELOG.md not found"
|
||||
echo "has_content=false" >> $GITHUB_OUTPUT
|
||||
fi
|
||||
|
||||
- name: Trigger nightly release workflow
|
||||
if: steps.changelog_check.outputs.has_content == 'true'
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{ secrets.WAILS_REPO_TOKEN || github.token }}
|
||||
script: |
|
||||
const response = await github.rest.actions.createWorkflowDispatch({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
workflow_id: 'nightly-release-v3.yml',
|
||||
ref: 'v3-alpha',
|
||||
inputs: {
|
||||
force_release: 'true',
|
||||
dry_run: '${{ github.event.inputs.dry_run || "false" }}'
|
||||
}
|
||||
});
|
||||
|
||||
console.log('🚀 Successfully triggered nightly release workflow');
|
||||
console.log(`Workflow dispatch response status: ${response.status}`);
|
||||
|
||||
// Create a summary
|
||||
core.summary
|
||||
.addHeading('🚀 Auto Release Triggered')
|
||||
.addRaw('The v3-alpha release workflow has been automatically triggered due to changes in UNRELEASED_CHANGELOG.md')
|
||||
.addTable([
|
||||
[{data: 'Trigger', header: true}, {data: 'Value', header: true}],
|
||||
['Repository', context.repo.repo],
|
||||
['Branch', 'v3-alpha'],
|
||||
['Actor', context.actor],
|
||||
['Dry Run', '${{ github.event.inputs.dry_run || "false" }}'],
|
||||
['Force Release', 'true']
|
||||
])
|
||||
.addRaw('\n---\n*This release was automatically triggered by the unreleased-changelog-trigger workflow*')
|
||||
.write();
|
||||
|
||||
- name: No content found
|
||||
if: steps.changelog_check.outputs.has_content == 'false'
|
||||
run: |
|
||||
echo "ℹ️ No content found in UNRELEASED_CHANGELOG.md, skipping release trigger"
|
||||
echo "## ℹ️ No Release Triggered" >> $GITHUB_STEP_SUMMARY
|
||||
echo "**Reason:** UNRELEASED_CHANGELOG.md does not contain actual changelog content" >> $GITHUB_STEP_SUMMARY
|
||||
echo "**Action:** No release workflow was triggered" >> $GITHUB_STEP_SUMMARY
|
||||
echo "" >> $GITHUB_STEP_SUMMARY
|
||||
echo "To trigger a release, add actual changelog entries to the UNRELEASED_CHANGELOG.md file." >> $GITHUB_STEP_SUMMARY
|
||||
|
||||
- name: Unauthorized user
|
||||
if: needs.check-permissions.outputs.authorized == 'false'
|
||||
run: |
|
||||
echo "❌ User ${{ github.actor }} is not authorized to trigger releases"
|
||||
echo "## ❌ Unauthorized Release Attempt" >> $GITHUB_STEP_SUMMARY
|
||||
echo "**User:** ${{ github.actor }}" >> $GITHUB_STEP_SUMMARY
|
||||
echo "**Action:** Release trigger was blocked due to insufficient permissions" >> $GITHUB_STEP_SUMMARY
|
||||
echo "" >> $GITHUB_STEP_SUMMARY
|
||||
echo "Only authorized users can trigger automatic releases via changelog updates." >> $GITHUB_STEP_SUMMARY
|
||||
|
|
@ -15,7 +15,7 @@ jobs:
|
|||
|
||||
- name: Verify Changed files
|
||||
id: changed-files
|
||||
uses: tj-actions/changed-files@v35
|
||||
uses: step-security/changed-files@3dbe17c78367e7d60f00d78ae6781a35be47b4a1 # v45.0.1
|
||||
with:
|
||||
files: |
|
||||
website/**/*.mdx
|
||||
|
|
@ -25,7 +25,7 @@ jobs:
|
|||
- name: Setup Nodejs
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 18.x
|
||||
node-version: 20.x
|
||||
|
||||
- name: Setup Task
|
||||
uses: arduino/setup-task@v1
|
||||
|
|
|
|||
35
.github/workflows/v3-docs.yml
vendored
35
.github/workflows/v3-docs.yml
vendored
|
|
@ -1,35 +0,0 @@
|
|||
name: v3 docs
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- v3-alpha
|
||||
paths:
|
||||
- 'mkdocs-website/**/*'
|
||||
permissions:
|
||||
contents: write
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
if: github.event.repository.fork == false
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./mkdocs-website
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: 3.x
|
||||
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
|
||||
- uses: actions/cache@v3
|
||||
with:
|
||||
key: mkdocs-material-${{ env.cache_id }}
|
||||
path: .cache
|
||||
restore-keys: |
|
||||
mkdocs-material-
|
||||
- run: sudo apt-get install pngquant
|
||||
- run: pip install pillow cairosvg
|
||||
- run: pip install git+https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
|
||||
- run: mkdocs build --config-file mkdocs.insiders.yml
|
||||
- run: mkdocs gh-deploy --force
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
8
.replit
Normal file
8
.replit
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
modules = ["go-1.21", "web", "nodejs-20"]
|
||||
run = "go run v2/cmd/wails/main.go"
|
||||
|
||||
[nix]
|
||||
channel = "stable-24_05"
|
||||
|
||||
[deployment]
|
||||
run = ["sh", "-c", "go run v2/cmd/wails/main.go"]
|
||||
1
CNAME
1
CNAME
|
|
@ -1 +0,0 @@
|
|||
v3alpha.wails.io
|
||||
160
README.de.md
Normal file
160
README.de.md
Normal file
|
|
@ -0,0 +1,160 @@
|
|||
<p align="center" style="text-align: center">
|
||||
<img src="./assets/images/logo-universal.png" width="55%"><br/>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
Erschaffe Desktop Anwendungen mit Go & Web Technologien.
|
||||
<br/>
|
||||
<br/>
|
||||
<a href="https://github.com/wailsapp/wails/blob/master/LICENSE">
|
||||
<img alt="GitHub" src="https://img.shields.io/github/license/wailsapp/wails"/>
|
||||
</a>
|
||||
<a href="https://goreportcard.com/report/github.com/wailsapp/wails">
|
||||
<img src="https://goreportcard.com/badge/github.com/wailsapp/wails" />
|
||||
</a>
|
||||
<a href="https://pkg.go.dev/github.com/wailsapp/wails">
|
||||
<img src="https://pkg.go.dev/badge/github.com/wailsapp/wails.svg" alt="Go Reference"/>
|
||||
</a>
|
||||
<a href="https://github.com/wailsapp/wails/issues">
|
||||
<img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat" alt="CodeFactor" />
|
||||
</a>
|
||||
<a href="https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_shield" alt="FOSSA Status">
|
||||
<img src="https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwailsapp%2Fwails.svg?type=shield" />
|
||||
</a>
|
||||
<a href="https://github.com/avelino/awesome-go" rel="nofollow">
|
||||
<img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" alt="Awesome" />
|
||||
</a>
|
||||
<a href="https://discord.gg/BrRSWTaxVK">
|
||||
<img alt="Discord" src="https://img.shields.io/discord/1042734330029547630?logo=discord"/>
|
||||
</a>
|
||||
<br/>
|
||||
<a href="https://github.com/wailsapp/wails/actions/workflows/build-and-test.yml" rel="nofollow">
|
||||
<img src="https://img.shields.io/github/actions/workflow/status/wailsapp/wails/build-and-test.yml?branch=master&logo=Github" alt="Build" />
|
||||
</a>
|
||||
<a href="https://github.com/wailsapp/wails/tags" rel="nofollow">
|
||||
<img alt="GitHub tag (latest SemVer pre-release)" src="https://img.shields.io/github/v/tag/wailsapp/wails?include_prereleases&label=version"/>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<div align="center">
|
||||
<strong>
|
||||
<samp>
|
||||
|
||||
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
|
||||
[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) ·
|
||||
[Русский](README.ru.md) · [Francais](README.fr.md) · [Uzbek](README.uz.md) · [Deutsch](README.de.md)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
## Inhaltsverzeichnis
|
||||
|
||||
- [Inhaltsverzeichnis](#inhaltsverzeichnis)
|
||||
- [Einführung](#einführung)
|
||||
- [Funktionen](#funktionen)
|
||||
- [Roadmap](#roadmap)
|
||||
- [Loslegen](#loslegen)
|
||||
- [Sponsoren](#sponsoren)
|
||||
- [FAQ](#faq)
|
||||
- [Sterne Überblick](#sterne-überblick)
|
||||
- [Mitwirkende](#mitwirkende)
|
||||
- [Lizenz](#lizenz)
|
||||
- [Inspiration](#inspiration)
|
||||
|
||||
## Einführung
|
||||
|
||||
Die herkömmliche Methode zur Bereitstellung von Web-Interfaces für Go ist über einen eingebauten Webserver.
|
||||
Wails nutzt einen anderen Weg. Es kann sowohl Go-Code als auch ein Web-Frontend in eine einzige Datei bauen.
|
||||
Beigelieferte Werkzeuge übernehmen die Projekterstellung, den Kompilierungsprozess und das bauen.
|
||||
Du musst nur kreativ werden.
|
||||
|
||||
## Funktionen
|
||||
|
||||
- Nutze Standard Go für das Backend
|
||||
- Nutze eine Frontend Technologie mit der du dich bereits auskennst um dein UI zu bauen.
|
||||
- Erschaffe schnell und einfach Frontends mit vorgefertigten Vorlagen für deine Go-Programme
|
||||
- Nutze Javascript um Go Methoden aufzurufen
|
||||
- Automatisch generierte Typescript Definitionen für deine Go Strukturen und Methoden
|
||||
- Native Dialoge und Menüs
|
||||
- Native Dark-/Lightmode Unterstützung
|
||||
- Unterstützt moderne Transluzenz- und Milchglaseffekte
|
||||
- Vereinheitlichtes Eventsystem zwischen Go und Javascript
|
||||
- Leistungsstarkes CLI-Tool zum einfachen erstellen und bauen von Projekten
|
||||
- Multiplattformen
|
||||
- Nutze native Render-Engines - _keine eingebetteten Browser_!
|
||||
|
||||
### Roadmap
|
||||
|
||||
Die Projekt Roadmap kann [hier](https://github.com/wailsapp/wails/discussions/1484) gefunden werden. Bitte lies diese
|
||||
durch bevor du eine Idee vorschlägst
|
||||
|
||||
## Loslegen
|
||||
|
||||
Die Installationsinstruktionen sind auf der [offiziellen Website](https://wails.io/docs/gettingstarted/installation).
|
||||
|
||||
## Sponsoren
|
||||
|
||||
Dieses Projekt wird von diesen freundlichen Leuten und Firmen unterstützt:
|
||||
<img src="website/static/img/sponsors.svg" style="width:100%;max-width:800px;"/>
|
||||
|
||||
<p align="center">
|
||||
<img src="https://wails.io/img/sponsor/jetbrains-grayscale.webp" style="width: 100px"/>
|
||||
</p>
|
||||
|
||||
## FAQ
|
||||
|
||||
- Ist das eine Alternative zu Electron?
|
||||
|
||||
Hängt von deinen Anforderungen ab. Wails wurde entwickelt um das Go-Programmieren leicht zu machen und effiziente
|
||||
Desktop-Anwendungen zu erstellen oder ein Frontend zu einer bestehenden Anwendung hinzuzufügen.
|
||||
Wails bietet native Elemente wie Dialoge und Menüs und könnte somit als eine leichte effiziente Electron-Alternative
|
||||
betrachtet werden.
|
||||
|
||||
- Für wen ist dieses projekt geeignet?
|
||||
|
||||
Go Entwickler, die ein HTML/CSS/JS-Frontend in ihre Anwendung integrieren möchten, ohne einen Webserver zu erstellen und
|
||||
einen Browser öffnen zu müssen, um dieses zu sehen
|
||||
|
||||
- Wie kam es zu diesem Namen?
|
||||
|
||||
Als ich WebView sah dachte ich "Was ich wirklich will, ist ein Werkzeug für die Erstellung von WebView Anwendungen so wie Rails für Ruby".
|
||||
Also war es zunächst ein Wortspiel (Webview on Rails). Zufälligerweise ist es auch ein Homophon des englischen Namens des [Landes](https://en.wikipedia.org/wiki/Wales), aus dem ich komme.
|
||||
Also ist es dabei geblieben.
|
||||
|
||||
## Sterne Überblick
|
||||
|
||||
<a href="https://star-history.com/#wailsapp/wails&Date">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=wailsapp/wails&type=Date&theme=dark" />
|
||||
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=wailsapp/wails&type=Date" />
|
||||
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=wailsapp/wails&type=Date" />
|
||||
</picture>
|
||||
</a>
|
||||
|
||||
## Mitwirkende
|
||||
|
||||
Die Liste der Mitwirkenden wird zu groß für diese Readme. All die fantastischen Menschen, die zu diesem
|
||||
Projekt beigetragen haben, haben [hier](https://wails.io/credits#contributors) ihre eigene Seite.
|
||||
|
||||
## Lizenz
|
||||
|
||||
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_large)
|
||||
|
||||
## Inspiration
|
||||
|
||||
Dieses Projekt wurde hauptsächlich zu den folgenden Alben entwickelt
|
||||
|
||||
- [Manic Street Preachers - Resistance Is Futile](https://open.spotify.com/album/1R2rsEUqXjIvAbzM0yHrxA)
|
||||
- [Manic Street Preachers - This Is My Truth, Tell Me Yours](https://open.spotify.com/album/4VzCL9kjhgGQeKCiojK1YN)
|
||||
- [The Midnight - Endless Summer](https://open.spotify.com/album/4Krg8zvprquh7TVn9OxZn8)
|
||||
- [Gary Newman - Savage (Songs from a Broken World)](https://open.spotify.com/album/3kMfsD07Q32HRWKRrpcexr)
|
||||
- [Steve Vai - Passion & Warfare](https://open.spotify.com/album/0oL0OhrE2rYVns4IGj8h2m)
|
||||
- [Ben Howard - Every Kingdom](https://open.spotify.com/album/1nJsbWm3Yy2DW1KIc1OKle)
|
||||
- [Ben Howard - Noonday Dream](https://open.spotify.com/album/6astw05cTiXEc2OvyByaPs)
|
||||
- [Adwaith - Melyn](https://open.spotify.com/album/2vBE40Rp60tl7rNqIZjaXM)
|
||||
- [Gwidaith Hen Fran - Cedors Hen Wrach](https://open.spotify.com/album/3v2hrfNGINPLuDP0YDTOjm)
|
||||
- [Metallica - Metallica](https://open.spotify.com/album/2Kh43m04B1UkVcpcRa1Zug)
|
||||
- [Bloc Party - Silent Alarm](https://open.spotify.com/album/6SsIdN05HQg2GwYLfXuzLB)
|
||||
- [Maxthor - Another World](https://open.spotify.com/album/3tklE2Fgw1hCIUstIwPBJF)
|
||||
- [Alun Tan Lan - Y Distawrwydd](https://open.spotify.com/album/0c32OywcLpdJCWWMC6vB8v)
|
||||
|
|
@ -25,7 +25,7 @@
|
|||
<img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" alt="Awesome" />
|
||||
</a>
|
||||
<a href="https://discord.gg/BrRSWTaxVK">
|
||||
<img alt="Discord" src="https://dcbadge.vercel.app/api/server/BrRSWTaxVK?style=flat"/>
|
||||
<img alt="Discord" src="https://img.shields.io/discord/1042734330029547630?logo=discord"/>
|
||||
</a>
|
||||
<br/>
|
||||
<a href="https://github.com/wailsapp/wails/actions/workflows/build-and-test.yml" rel="nofollow">
|
||||
|
|
@ -42,7 +42,8 @@
|
|||
|
||||
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
|
||||
[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) ·
|
||||
[Русский](README.ru.md)
|
||||
[Русский](README.ru.md) · [Francais](README.fr.md) · [Uzbek](README.uz.md) · [Deutsch](README.de.md) ·
|
||||
[Türkçe](README.tr.md)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
|
|
|
|||
144
README.fr.md
Normal file
144
README.fr.md
Normal file
|
|
@ -0,0 +1,144 @@
|
|||
<p align="center" style="text-align: center">
|
||||
<img src="./assets/images/logo-universal.png" width="55%"><br/>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
Créer des applications de bureau avec Go et les technologies Web.
|
||||
<br/>
|
||||
<br/>
|
||||
<a href="https://github.com/wailsapp/wails/blob/master/LICENSE">
|
||||
<img alt="GitHub" src="https://img.shields.io/github/license/wailsapp/wails"/>
|
||||
</a>
|
||||
<a href="https://goreportcard.com/report/github.com/wailsapp/wails">
|
||||
<img src="https://goreportcard.com/badge/github.com/wailsapp/wails" />
|
||||
</a>
|
||||
<a href="https://pkg.go.dev/github.com/wailsapp/wails">
|
||||
<img src="https://pkg.go.dev/badge/github.com/wailsapp/wails.svg" alt="Go Reference"/>
|
||||
</a>
|
||||
<a href="https://github.com/wailsapp/wails/issues">
|
||||
<img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat" alt="CodeFactor" />
|
||||
</a>
|
||||
<a href="https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_shield" alt="FOSSA Status">
|
||||
<img src="https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwailsapp%2Fwails.svg?type=shield" />
|
||||
</a>
|
||||
<a href="https://github.com/avelino/awesome-go" rel="nofollow">
|
||||
<img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" alt="Awesome" />
|
||||
</a>
|
||||
<a href="https://discord.gg/BrRSWTaxVK">
|
||||
<img alt="Discord" src="https://img.shields.io/discord/1042734330029547630?logo=discord"/>
|
||||
</a>
|
||||
<br/>
|
||||
<a href="https://github.com/wailsapp/wails/actions/workflows/build-and-test.yml" rel="nofollow">
|
||||
<img src="https://img.shields.io/github/actions/workflow/status/wailsapp/wails/build-and-test.yml?branch=master&logo=Github" alt="Build" />
|
||||
</a>
|
||||
<a href="https://github.com/wailsapp/wails/tags" rel="nofollow">
|
||||
<img alt="GitHub tag (latest SemVer pre-release)" src="https://img.shields.io/github/v/tag/wailsapp/wails?include_prereleases&label=version"/>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<div align="center">
|
||||
<strong>
|
||||
<samp>
|
||||
|
||||
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
|
||||
[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) ·
|
||||
[Русский](README.ru.md) · [Francais](README.fr.md) · [Uzbek](README.uz.md) · [Deutsch](README.de.md) ·
|
||||
[Türkçe](README.tr.md)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
## Sommaire
|
||||
|
||||
- [Sommaire](#sommaire)
|
||||
- [Introduction](#introduction)
|
||||
- [Fonctionnalités](#fonctionnalités)
|
||||
- [Feuille de route](#feuille-de-route)
|
||||
- [Démarrage](#démarrage)
|
||||
- [Les sponsors](#les-sponsors)
|
||||
- [Foire aux questions](#foire-aux-questions)
|
||||
- [Les étoiles au fil du temps](#les-étoiles-au-fil-du-temps)
|
||||
- [Les contributeurs](#les-contributeurs)
|
||||
- [License](#license)
|
||||
- [Inspiration](#inspiration)
|
||||
|
||||
## Introduction
|
||||
|
||||
La méthode traditionnelle pour fournir des interfaces web aux programmes Go consiste à utiliser un serveur web intégré. Wails propose une approche différente : il offre la possibilité d'intégrer à la fois le code Go et une interface web dans un seul binaire. Des outils sont fournis pour vous faciliter la tâche en gérant la création, la compilation et le regroupement des projets. Il ne vous reste plus qu'à faire preuve de créativité!
|
||||
|
||||
## Fonctionnalités
|
||||
|
||||
- Utiliser Go pour le backend
|
||||
- Utilisez n'importe quelle technologie frontend avec laquelle vous êtes déjà familier pour construire votre interface utilisateur.
|
||||
- Créez rapidement des interfaces riches pour vos programmes Go à l'aide de modèles prédéfinis.
|
||||
- Appeler facilement des méthodes Go à partir de Javascript
|
||||
- Définitions Typescript auto-générées pour vos structures et méthodes Go
|
||||
- Dialogues et menus natifs
|
||||
- Prise en charge native des modes sombre et clair
|
||||
- Prise en charge des effets modernes de translucidité et de "frosted window".
|
||||
- Système d'événements unifié entre Go et Javascript
|
||||
- Outil puissant pour générer et construire rapidement vos projets
|
||||
- Multiplateforme
|
||||
- Utilise des moteurs de rendu natifs - _pas de navigateur intégré_ !
|
||||
|
||||
### Feuille de route
|
||||
|
||||
La feuille de route du projet peut être consultée [ici](https://github.com/wailsapp/wails/discussions/1484). Veuillez consulter avant d'ouvrir une demande d'amélioration.
|
||||
|
||||
## Démarrage
|
||||
|
||||
Les instructions d'installation se trouvent sur le site [site officiel](https://wails.io/docs/gettingstarted/installation).
|
||||
|
||||
## Les sponsors
|
||||
|
||||
Ce projet est soutenu par ces personnes aimables et entreprises:
|
||||
<img src="website/static/img/sponsors.svg" style="width:100%;max-width:800px;"/>
|
||||
|
||||
<p align="center">
|
||||
<img src="https://wails.io/img/sponsor/jetbrains-grayscale.webp" style="width: 100px"/>
|
||||
</p>
|
||||
|
||||
## Foire aux questions
|
||||
|
||||
- S'agit-il d'une alternative à Electron ?
|
||||
|
||||
Cela dépend de vos besoins. Il est conçu pour permettre aux programmeurs Go de créer facilement des applications de bureau légères ou d'ajouter une interface à leurs applications existantes. Wails offre des éléments natifs tels que des menus et des boîtes de dialogue, il peut donc être considéré comme une alternative légère à electron.
|
||||
|
||||
- À qui s'adresse ce projet ?
|
||||
|
||||
Les programmeurs Go qui souhaitent intégrer une interface HTML/JS/CSS à leurs applications, sans avoir à créer un serveur et à ouvrir un navigateur pour l'afficher.
|
||||
|
||||
- Pourquoi ce nom ??
|
||||
|
||||
Lorsque j'ai vu WebView, je me suis dit : "Ce que je veux vraiment, c'est un outil pour construire une application WebView, un peu comme Rails l'est pour Ruby". Au départ, il s'agissait donc d'un jeu de mots (Webview on Rails). Il se trouve que c'est aussi un homophone du nom anglais du [Pays](https://en.wikipedia.org/wiki/Wales) d'où je viens. Il s'est donc imposé.
|
||||
|
||||
## Les étoiles au fil du temps
|
||||
|
||||
[](https://star-history.com/#wailsapp/wails&Date)
|
||||
|
||||
## Les contributeurs
|
||||
|
||||
La liste des contributeurs devient trop importante pour le readme ! Toutes les personnes extraordinaires qui ont contribué à ce projet ont leur propre page [ici](https://wails.io/credits#contributors).
|
||||
|
||||
## License
|
||||
|
||||
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_large)
|
||||
|
||||
## Inspiration
|
||||
|
||||
Ce projet a été principalement codé sur les albums suivants :
|
||||
|
||||
- [Manic Street Preachers - Resistance Is Futile](https://open.spotify.com/album/1R2rsEUqXjIvAbzM0yHrxA)
|
||||
- [Manic Street Preachers - This Is My Truth, Tell Me Yours](https://open.spotify.com/album/4VzCL9kjhgGQeKCiojK1YN)
|
||||
- [The Midnight - Endless Summer](https://open.spotify.com/album/4Krg8zvprquh7TVn9OxZn8)
|
||||
- [Gary Newman - Savage (Songs from a Broken World)](https://open.spotify.com/album/3kMfsD07Q32HRWKRrpcexr)
|
||||
- [Steve Vai - Passion & Warfare](https://open.spotify.com/album/0oL0OhrE2rYVns4IGj8h2m)
|
||||
- [Ben Howard - Every Kingdom](https://open.spotify.com/album/1nJsbWm3Yy2DW1KIc1OKle)
|
||||
- [Ben Howard - Noonday Dream](https://open.spotify.com/album/6astw05cTiXEc2OvyByaPs)
|
||||
- [Adwaith - Melyn](https://open.spotify.com/album/2vBE40Rp60tl7rNqIZjaXM)
|
||||
- [Gwidaith Hen Fran - Cedors Hen Wrach](https://open.spotify.com/album/3v2hrfNGINPLuDP0YDTOjm)
|
||||
- [Metallica - Metallica](https://open.spotify.com/album/2Kh43m04B1UkVcpcRa1Zug)
|
||||
- [Bloc Party - Silent Alarm](https://open.spotify.com/album/6SsIdN05HQg2GwYLfXuzLB)
|
||||
- [Maxthor - Another World](https://open.spotify.com/album/3tklE2Fgw1hCIUstIwPBJF)
|
||||
- [Alun Tan Lan - Y Distawrwydd](https://open.spotify.com/album/0c32OywcLpdJCWWMC6vB8v)
|
||||
70
README.ja.md
70
README.ja.md
|
|
@ -27,7 +27,7 @@
|
|||
<img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" alt="Awesome" />
|
||||
</a>
|
||||
<a href="https://discord.gg/BrRSWTaxVK">
|
||||
<img alt="Discord" src="https://dcbadge.vercel.app/api/server/BrRSWTaxVK?style=flat"/>
|
||||
<img alt="Discord" src="https://img.shields.io/discord/1042734330029547630?logo=discord"/>
|
||||
</a>
|
||||
<br/>
|
||||
<a href="https://github.com/wailsapp/wails/actions/workflows/build-and-test.yml" rel="nofollow">
|
||||
|
|
@ -44,7 +44,8 @@
|
|||
|
||||
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
|
||||
[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) ·
|
||||
[Русский](README.ru.md)
|
||||
[Русский](README.ru.md) · [Francais](README.fr.md) · [Uzbek](README.uz.md) · [Deutsch](README.de.md) ·
|
||||
[Türkçe](README.tr.md)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
|
|
@ -54,17 +55,16 @@
|
|||
|
||||
- [目次](#目次)
|
||||
- [はじめに](#はじめに)
|
||||
- [公式サイト](#公式サイト)
|
||||
- [ロードマップ](#ロードマップ)
|
||||
- [特徴](#特徴)
|
||||
- [スポンサー](#スポンサー)
|
||||
- [ロードマップ](#ロードマップ)
|
||||
- [始め方](#始め方)
|
||||
- [スポンサー](#スポンサー)
|
||||
- [FAQ](#faq)
|
||||
- [スター数の推移](#スター数の推移)
|
||||
- [コントリビューター](#コントリビューター)
|
||||
- [特記事項](#特記事項)
|
||||
- [スペシャルサンクス](#スペシャルサンクス)
|
||||
- [ライセンス](#ライセンス)
|
||||
- [インスピレーション](#インスピレーション)
|
||||
|
||||
|
||||
## はじめに
|
||||
|
||||
|
|
@ -72,44 +72,35 @@ Go プログラムにウェブインタフェースを提供する従来の方
|
|||
Wails では Go のコードとウェブフロントエンドを単一のバイナリにまとめる機能を提供します。
|
||||
また、プロジェクトの作成、コンパイル、ビルドを行うためのツールが提供されています。あなたがすべきことは創造性を発揮することです!
|
||||
|
||||
### 公式サイト
|
||||
|
||||
Version 2:
|
||||
|
||||
Wails v2 が 3 つのプラットフォームでベータ版としてリリースされました。興味のある方は[新しいウェブサイト](https://wails.io)をご覧ください。
|
||||
|
||||
レガシー版 v1:
|
||||
|
||||
レガシー版 v1 のドキュメントは[https://wails.app](https://wails.app)で見ることができます。
|
||||
|
||||
### ロードマップ
|
||||
|
||||
プロジェクトのロードマップは[こちら](https://github.com/wailsapp/wails/discussions/1484)になります。
|
||||
機能拡張のリクエストを出す前にご覧ください。
|
||||
|
||||
## 特徴
|
||||
|
||||
- バックエンドには Go を利用しています
|
||||
- 使い慣れたフロントエンド技術を利用して UI を構築できます
|
||||
- あらかじめ用意されたテンプレートを利用することで、リッチなフロントエンドを備えた Go プログラムを作成できます
|
||||
- あらかじめ用意されたテンプレートを利用することで、リッチなフロントエンドを備えた Go プログラムを素早く作成できます
|
||||
- JavaScript から Go のメソッドを簡単に呼び出すことができます
|
||||
- あなたの書いた Go の構造体やメソットに応じた TypeScript の定義が自動生成されます
|
||||
- ネイティブのダイアログとメニューが利用できます
|
||||
- ネイティブなダーク/ライトモードをサポートします
|
||||
- モダンな半透明や「frosted window」エフェクトをサポートしています
|
||||
- Go と JavaScript 間で統一されたイベント・システムを備えています
|
||||
- プロジェクトを素早く生成して構築する強力な cli ツールを用意しています
|
||||
- マルチプラットフォームに対応しています
|
||||
- ネイティブなレンダリングエンジンを使用しています - _つまりブラウザを埋め込んでいるわけではありません!_
|
||||
|
||||
## スポンサー
|
||||
### ロードマップ
|
||||
|
||||
このプロジェクトは、以下の方々・企業によって支えられています。
|
||||
<img src="website/static/img/sponsors.svg" style="width:100%;max-width:800px;"/>
|
||||
プロジェクトのロードマップは[こちら](https://github.com/wailsapp/wails/discussions/1484)になります。
|
||||
機能拡張のリクエストを出す前にご覧ください。
|
||||
|
||||
## 始め方
|
||||
|
||||
インストール方法は[公式サイト](https://wails.io/docs/gettingstarted/installation)に掲載されています。
|
||||
|
||||
## スポンサー
|
||||
|
||||
このプロジェクトは、以下の方々・企業によって支えられています。
|
||||
<img src="website/static/img/sponsors.svg" style="width:100%;max-width:800px;"/>
|
||||
|
||||
## FAQ
|
||||
|
||||
- Electron の代替品になりますか?
|
||||
|
|
@ -130,20 +121,18 @@ Wails v2 が 3 つのプラットフォームでベータ版としてリリー
|
|||
|
||||
## スター数の推移
|
||||
|
||||
[](https://starchart.cc/wailsapp/wails)
|
||||
[](https://star-history.com/#wailsapp/wails&Date)
|
||||
|
||||
## コントリビューター
|
||||
|
||||
貢献してくれた方のリストが大きくなりすぎて、readme に入りきらなくなりました!
|
||||
このプロジェクトに貢献してくれた素晴らしい方々のページは[こちら](https://wails.io/credits#contributors)です。
|
||||
|
||||
## 特記事項
|
||||
## ライセンス
|
||||
|
||||
このプロジェクトは以下の方々の協力がなければ、実現しなかったと思います。
|
||||
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_large)
|
||||
|
||||
- [Dustin Krysak](https://wiki.ubuntu.com/bashfulrobot) - 彼のサポートとフィードバックはとても大きいものでした。
|
||||
- [Serge Zaitsev](https://github.com/zserge) - Wails のウィンドウで使用している[Webview](https://github.com/zserge/webview)の作者です。
|
||||
- [Byron](https://github.com/bh90210) - 時には Byron が一人でこのプロジェクトを存続させてくれたこともありました。彼の素晴らしいインプットがなければ v1 に到達することはなかったでしょう。
|
||||
## インスピレーション
|
||||
|
||||
プロジェクトを進める際に、以下のアルバムたちも支えてくれています。
|
||||
|
||||
|
|
@ -161,20 +150,3 @@ Wails v2 が 3 つのプラットフォームでベータ版としてリリー
|
|||
- [Maxthor - Another World](https://open.spotify.com/album/3tklE2Fgw1hCIUstIwPBJF)
|
||||
- [Alun Tan Lan - Y Distawrwydd](https://open.spotify.com/album/0c32OywcLpdJCWWMC6vB8v)
|
||||
|
||||
## スペシャルサンクス
|
||||
|
||||
<p align="center" style="text-align: center">
|
||||
<a href="https://pace.dev"><img src="/assets/images/pace.jpeg"/></a><br/>
|
||||
このプロジェクトを後援し、WailsをApple Siliconに移植する取り組みを支援してくれた <a href="https://pace.dev">Pace</a> に <i>とても</i>感謝しています!<br/><br/>
|
||||
パワフルで素早く簡単に使えるプロジェクト管理ツールをお探しなら、ぜひチェックしてみてください!<br/><br/>
|
||||
</p>
|
||||
|
||||
<p align="center" style="text-align: center">
|
||||
ライセンスを提供していただいたJetBrains社に感謝します!<br/><br/>
|
||||
ロゴをクリックして、感謝の気持ちを伝えてください!<br/><br/>
|
||||
<a href="https://www.jetbrains.com?from=Wails"><img src="/assets/images/jetbrains-grayscale.png" width="30%"></a>
|
||||
</p>
|
||||
|
||||
## ライセンス
|
||||
|
||||
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_large)
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
<img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" alt="Awesome" />
|
||||
</a>
|
||||
<a href="https://discord.gg/BrRSWTaxVK">
|
||||
<img alt="Discord" src="https://dcbadge.vercel.app/api/server/BrRSWTaxVK?style=flat"/>
|
||||
<img alt="Discord" src="https://img.shields.io/discord/1042734330029547630?logo=discord"/>
|
||||
</a>
|
||||
<br/>
|
||||
<a href="https://github.com/wailsapp/wails/actions/workflows/build-and-test.yml" rel="nofollow">
|
||||
|
|
@ -44,7 +44,8 @@
|
|||
|
||||
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
|
||||
[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) ·
|
||||
[Русский](README.ru.md)
|
||||
[Русский](README.ru.md) · [Francais](README.fr.md) · [Uzbek](README.uz.md) · [Deutsch](README.de.md) ·
|
||||
[Türkçe](README.tr.md)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
|
|
|
|||
21
README.md
21
README.md
|
|
@ -25,7 +25,7 @@
|
|||
<img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" alt="Awesome" />
|
||||
</a>
|
||||
<a href="https://discord.gg/BrRSWTaxVK">
|
||||
<img alt="Discord" src="https://dcbadge.vercel.app/api/server/BrRSWTaxVK?style=flat"/>
|
||||
<img alt="Discord" src="https://img.shields.io/discord/1042734330029547630?logo=discord"/>
|
||||
</a>
|
||||
<br/>
|
||||
<a href="https://github.com/wailsapp/wails/actions/workflows/build-and-test.yml" rel="nofollow">
|
||||
|
|
@ -42,7 +42,8 @@
|
|||
|
||||
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
|
||||
[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) ·
|
||||
[Русский](README.ru.md)
|
||||
[Русский](README.ru.md) · [Francais](README.fr.md) · [Uzbek](README.uz.md) · [Deutsch](README.de.md) ·
|
||||
[Türkçe](README.tr.md)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
|
|
@ -86,7 +87,7 @@ make this easy for you by handling project creation, compilation and bundling. A
|
|||
### Roadmap
|
||||
|
||||
The project roadmap may be found [here](https://github.com/wailsapp/wails/discussions/1484). Please consult
|
||||
this before open up an enhancement request.
|
||||
it before creating an enhancement request.
|
||||
|
||||
## Getting Started
|
||||
|
||||
|
|
@ -97,9 +98,9 @@ The installation instructions are on the [official website](https://wails.io/doc
|
|||
This project is supported by these kind people / companies:
|
||||
<img src="website/static/img/sponsors.svg" style="width:100%;max-width:800px;"/>
|
||||
|
||||
<p align="center">
|
||||
<img src="https://wails.io/img/sponsor/jetbrains-grayscale.webp" style="width: 100px"/>
|
||||
</p>
|
||||
## Powered By
|
||||
|
||||
[](https://jb.gg/OpenSource)
|
||||
|
||||
## FAQ
|
||||
|
||||
|
|
@ -122,7 +123,13 @@ This project is supported by these kind people / companies:
|
|||
|
||||
## Stargazers over time
|
||||
|
||||
[](https://star-history.com/#wailsapp/wails&Date)
|
||||
<a href="https://star-history.com/#wailsapp/wails&Date">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=wailsapp/wails&type=Date&theme=dark" />
|
||||
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=wailsapp/wails&type=Date" />
|
||||
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=wailsapp/wails&type=Date" />
|
||||
</picture>
|
||||
</a>
|
||||
|
||||
## Contributors
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
<img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" alt="Awesome" />
|
||||
</a>
|
||||
<a href="https://discord.gg/BrRSWTaxVK">
|
||||
<img alt="Discord" src="https://dcbadge.vercel.app/api/server/BrRSWTaxVK?style=flat"/>
|
||||
<img alt="Discord" src="https://img.shields.io/discord/1042734330029547630?logo=discord"/>
|
||||
</a>
|
||||
<br/>
|
||||
<a href="https://github.com/wailsapp/wails/actions/workflows/build-and-test.yml" rel="nofollow">
|
||||
|
|
@ -41,7 +41,8 @@
|
|||
<samp>
|
||||
|
||||
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
|
||||
[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md)
|
||||
[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) · [Francais](README.fr.md) · [Uzbek](README.uz.md) · [Deutsch](README.de.md) ·
|
||||
[Türkçe](README.tr.md)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
|
|
|
|||
38
README.ru.md
38
README.ru.md
|
|
@ -25,7 +25,7 @@
|
|||
<img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" alt="Awesome" />
|
||||
</a>
|
||||
<a href="https://discord.gg/BrRSWTaxVK">
|
||||
<img alt="Discord" src="https://dcbadge.vercel.app/api/server/BrRSWTaxVK?style=flat"/>
|
||||
<img alt="Discord" src="https://img.shields.io/discord/1042734330029547630?logo=discord"/>
|
||||
</a>
|
||||
<br/>
|
||||
<a href="https://github.com/wailsapp/wails/actions/workflows/build-and-test.yml" rel="nofollow">
|
||||
|
|
@ -41,7 +41,8 @@
|
|||
<samp>
|
||||
|
||||
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
|
||||
[한국어](README.ko.md) · [Español](README.es.md) · [Русский](README.ru.md)
|
||||
[한국어](README.ko.md) · [Español](README.es.md) · [Русский](README.ru.md) · [Francais](README.fr.md) · [Uzbek](README.uz.md) · [Deutsch](README.de.md) ·
|
||||
[Türkçe](README.tr.md)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
|
|
@ -52,7 +53,7 @@
|
|||
- [Содержание](#содержание)
|
||||
- [Вступление](#вступление)
|
||||
- [Особенности](#особенности)
|
||||
- [Roadmap](#roadmap)
|
||||
- [Roadmap](#roadmap)
|
||||
- [Быстрый старт](#быстрый-старт)
|
||||
- [Спонсоры](#спонсоры)
|
||||
- [FAQ](#faq)
|
||||
|
|
@ -73,12 +74,12 @@
|
|||
- Использование Go для backend
|
||||
- Поддержка любой frontend технологии, с которой вы уже знакомы для создания вашего UI
|
||||
- Быстрое создание frontend для ваших программ, используя готовые шаблоны
|
||||
- Очень лёгкий вызов функция Go из JavaScript
|
||||
- Автогене рация TypeScript типов для Go структур и функций
|
||||
- Очень лёгкий вызов функций Go из JavaScript
|
||||
- Автогенерация TypeScript типов для Go структур и функций
|
||||
- Нативные диалоги и меню
|
||||
- Нативная поддержка тёмной и светлой темы
|
||||
- Поддержка современной прозрачности и эффекта "матового окна"
|
||||
- Единая система Эвентов для Go и JavaScript
|
||||
- Поддержка современных эффектов прозрачности и "матового окна"
|
||||
- Единая система эвентов для Go и JavaScript
|
||||
- Мощный CLI для быстрого создания ваших проектов
|
||||
- Мультиплатформенность
|
||||
- Использование нативного движка рендеринга - нет встроенному браузеру!
|
||||
|
|
@ -105,29 +106,28 @@ Roadmap проекта вы можете найти [здесь](https://github.
|
|||
|
||||
- Это альтернатива Electron?
|
||||
|
||||
Зависит от ваших требований. Wails разработан для легкого создания Desktop приложений или расширения интерфейсной
|
||||
части к своим существующим приложениям программистам Go. Wails действительно предлагает встроенные элементы, такие как
|
||||
меню и диалоги, так что его можно считать облегченной альтернативой Electron.
|
||||
Зависит от ваших требований. Wails разработан для легкого создания Desktop приложений или
|
||||
расширения интерфейсной части существующих приложений для программистов на Go. Wails действительно
|
||||
предлагает встроенные элементы, такие как меню и диалоги, так что его можно считать облегченной альтернативой Electron.
|
||||
|
||||
- Для кого нацелен этот проект?
|
||||
- Для кого предназначен этот проект?
|
||||
|
||||
Для Golang программистов, которые хотят создавать приложение используя HTML JS и CSS, без создания Web сервера и
|
||||
открытия браузера для его просмотра.
|
||||
Для Golang программистов, которые хотят создавать приложения, используя HTML, JS и CSS,
|
||||
без создания веб-сервера и открытия браузера для их просмотра.
|
||||
|
||||
- Что это за название?
|
||||
|
||||
Когда я увидел WebView, я подумал: "Что мне действительно нужно, так это инструменты для создания приложения WebView,
|
||||
немного похожие на Rails для Ruby". Итак, изначально это была игра слов (Webview on Rails). Просто так получилось, что
|
||||
это также омофон английского названия для [Страны](https://en.wikipedia.org/wiki/Wales) от куда я родом. Так что это
|
||||
прижилось.
|
||||
немного похожие на Rails для Ruby". Изначально это была игра слов (Webview on Rails). Просто так получилось, что это
|
||||
также омофон английского названия для [Страны](https://en.wikipedia.org/wiki/Wales) от куда я родом. Так что это прижилось.
|
||||
|
||||
## График звёздочек репозитория, относительно времени
|
||||
## График звёздочек репозитория по времени
|
||||
|
||||
[](https://star-history.com/#wailsapp/wails&Date)
|
||||
|
||||
## Контребьюторы
|
||||
## Контрибьюторы
|
||||
|
||||
Список участников слишком большой для README! У всех замечательных людей, которые внесли свой вклад в этот
|
||||
Список участников слишком велик для README! У всех замечательных людей, которые внесли свой вклад в этот
|
||||
проект, есть своя [страничка](https://wails.io/credits#contributors).
|
||||
|
||||
## Лицензия
|
||||
|
|
|
|||
156
README.tr.md
Normal file
156
README.tr.md
Normal file
|
|
@ -0,0 +1,156 @@
|
|||
<p align="center" style="text-align: center">
|
||||
<img src="./assets/images/logo-universal.png" width="55%"><br/>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
Go ve Web Teknolojilerini kullanarak masaüstü uygulamaları oluşturun.
|
||||
<br/>
|
||||
<br/>
|
||||
<a href="https://github.com/wailsapp/wails/blob/master/LICENSE">
|
||||
<img alt="GitHub" src="https://img.shields.io/github/license/wailsapp/wails"/>
|
||||
</a>
|
||||
<a href="https://goreportcard.com/report/github.com/wailsapp/wails">
|
||||
<img src="https://goreportcard.com/badge/github.com/wailsapp/wails" />
|
||||
</a>
|
||||
<a href="https://pkg.go.dev/github.com/wailsapp/wails">
|
||||
<img src="https://pkg.go.dev/badge/github.com/wailsapp/wails.svg" alt="Go Reference"/>
|
||||
</a>
|
||||
<a href="https://github.com/wailsapp/wails/issues">
|
||||
<img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat" alt="CodeFactor" />
|
||||
</a>
|
||||
<a href="https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_shield" alt="FOSSA Status">
|
||||
<img src="https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwailsapp%2Fwails.svg?type=shield" />
|
||||
</a>
|
||||
<a href="https://github.com/avelino/awesome-go" rel="nofollow">
|
||||
<img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" alt="Awesome" />
|
||||
</a>
|
||||
<a href="https://discord.gg/BrRSWTaxVK">
|
||||
<img alt="Discord" src="https://img.shields.io/discord/1042734330029547630?logo=discord"/>
|
||||
</a>
|
||||
<br/>
|
||||
<a href="https://github.com/wailsapp/wails/actions/workflows/build-and-test.yml" rel="nofollow">
|
||||
<img src="https://img.shields.io/github/actions/workflow/status/wailsapp/wails/build-and-test.yml?branch=master&logo=Github" alt="Build" />
|
||||
</a>
|
||||
<a href="https://github.com/wailsapp/wails/tags" rel="nofollow">
|
||||
<img alt="GitHub tag (latest SemVer pre-release)" src="https://img.shields.io/github/v/tag/wailsapp/wails?include_prereleases&label=version"/>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<div align="center">
|
||||
<strong>
|
||||
<samp>
|
||||
|
||||
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
|
||||
[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) ·
|
||||
[Русский](README.ru.md) · [Francais](README.fr.md) · [Uzbek](README.uz.md) ·
|
||||
[Türkçe](README.tr.md)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
## İçerik
|
||||
|
||||
- [İçerik](#içerik)
|
||||
- [Giriş](#giriş)
|
||||
- [Özellikler](#özellikler)
|
||||
- [Yol Haritası](#yol-haritası)
|
||||
- [Başlarken](#başlarken)
|
||||
- [Sponsorlar](#sponsorlar)
|
||||
- [Sıkça sorulan sorular](#sıkça-sorulan-sorular)
|
||||
- [Zaman içinda yıldızlayanlar](#zaman-içinde-yıldızlayanlar)
|
||||
- [Katkıda bulunanlar](#katkıda-bulunanlar)
|
||||
- [Lisans](#lisans)
|
||||
- [İlham](#ilham)
|
||||
|
||||
## Giriş
|
||||
|
||||
Go programlarına web arayüzleri sağlamak için geleneksel yöntem, yerleşik bir web sunucusu kullanmaktır. Wails, farklı bir yaklaşım sunar: Hem Go kodunu hem de bir web ön yüzünü tek bir ikili dosyada paketleme yeteneği sağlar. Proje oluşturma, derleme ve paketleme işlemlerini kolaylaştıran araçlar sunar. Tek yapmanız gereken yaratıcı olmaktır!
|
||||
|
||||
## Özellikler
|
||||
|
||||
- Backend için standart Go kullanın
|
||||
- Kullanıcı arayüzünüzü oluşturmak için zaten aşina olduğunuz herhangi bir frontend teknolojisini kullanın
|
||||
- Hazır şablonlar kullanarak Go programlarınız için hızlıca zengin ön yüzler oluşturun
|
||||
- Javascript'ten Go metodlarını kolayca çağırın
|
||||
- Go yapı ve metodlarınız için otomatik oluşturulan Typescript tanımları
|
||||
- Yerel Diyaloglar ve Menüler
|
||||
- Yerel Karanlık / Aydınlık mod desteği
|
||||
- Modern saydamlık ve "buzlu cam" efektlerini destekler
|
||||
- Go ve Javascript arasında birleşik olay sistemi
|
||||
- Projelerinizi hızlıca oluşturmak ve derlemek için güçlü bir komut satırı aracı
|
||||
- Çoklu platform desteği
|
||||
- Yerel render motorlarını kullanır - _gömülü tarayıcı yok_!
|
||||
|
||||
|
||||
### Yol Haritesı
|
||||
|
||||
Proje yol haritasına [buradan](https://github.com/wailsapp/wails/discussions/1484) ulaşabilirsiniz. Lütfen bir iyileştirme talebi oluşturmadan önce danışın.
|
||||
|
||||
|
||||
## Başlarken
|
||||
|
||||
Kurulum talimatları [resmi web sitesinde](https://wails.io/docs/gettingstarted/installation) bulunmaktadır.
|
||||
|
||||
|
||||
## Sponsorlar
|
||||
|
||||
Bu proje, aşağıdaki nazik insanlar / şirketler tarafından desteklenmektedir:
|
||||
<img src="website/static/img/sponsors.svg" style="width:100%;max-width:800px;"/>
|
||||
|
||||
<p align="center">
|
||||
<img src="https://wails.io/img/sponsor/jetbrains-grayscale.webp" style="width: 100px"/>
|
||||
</p>
|
||||
|
||||
## Sıkça Sorulan Sorular
|
||||
|
||||
- Bu Electron'a alternatif mi?
|
||||
|
||||
Gereksinimlerinize bağlıdır. Go programcılarının hafif masaüstü uygulamaları yapmasını veya mevcut uygulamalarına bir ön yüz eklemelerini kolaylaştırmak için tasarlanmıştır. Wails, menüler ve diyaloglar gibi yerel öğeler sunduğundan, hafif bir Electron alternatifi olarak kabul edilebilir.
|
||||
|
||||
- Bu proje kimlere yöneliktir?
|
||||
|
||||
HTML/JS/CSS ön yüzünü uygulamalarıyla birlikte paketlemek isteyen, ancak bir sunucu oluşturup bir tarayıcı açmaya başvurmadan bunu yapmak isteyen Go programcıları için.
|
||||
|
||||
- İsmin anlamı nedir?
|
||||
|
||||
WebView'i gördüğümde, "Aslında istediğim şey, WebView uygulaması oluşturmak için araçlar, biraz Rails'in Ruby için olduğu gibi" diye düşündüm. Bu nedenle başlangıçta kelime oyunu (Rails üzerinde Webview) olarak ortaya çıktı. Ayrıca, benim geldiğim [ülkenin](https://en.wikipedia.org/wiki/Wales) İngilizce adıyla homofon olması tesadüf oldu. Bu yüzden bu isim kaldı.
|
||||
|
||||
|
||||
## Zaman içinda yıldızlayanlar
|
||||
|
||||
<a href="https://star-history.com/#wailsapp/wails&Date">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=wailsapp/wails&type=Date&theme=dark" />
|
||||
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=wailsapp/wails&type=Date" />
|
||||
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=wailsapp/wails&type=Date" />
|
||||
</picture>
|
||||
</a>
|
||||
|
||||
## Katkıda Bulunanlar
|
||||
|
||||
Katkıda bulunanların listesi, README için çok büyük hale geldi! Bu projeye katkıda bulunan tüm harika insanların kendi sayfaları [burada](https://wails.io/credits#contributors) bulunmaktadır.
|
||||
|
||||
|
||||
## Lisans
|
||||
|
||||
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_large)
|
||||
|
||||
## İlham
|
||||
|
||||
Bu proje esas olarak aşağıdaki albümler dinlenilerek kodlandı:
|
||||
|
||||
- [Manic Street Preachers - Resistance Is Futile](https://open.spotify.com/album/1R2rsEUqXjIvAbzM0yHrxA)
|
||||
- [Manic Street Preachers - This Is My Truth, Tell Me Yours](https://open.spotify.com/album/4VzCL9kjhgGQeKCiojK1YN)
|
||||
- [The Midnight - Endless Summer](https://open.spotify.com/album/4Krg8zvprquh7TVn9OxZn8)
|
||||
- [Gary Newman - Savage (Songs from a Broken World)](https://open.spotify.com/album/3kMfsD07Q32HRWKRrpcexr)
|
||||
- [Steve Vai - Passion & Warfare](https://open.spotify.com/album/0oL0OhrE2rYVns4IGj8h2m)
|
||||
- [Ben Howard - Every Kingdom](https://open.spotify.com/album/1nJsbWm3Yy2DW1KIc1OKle)
|
||||
- [Ben Howard - Noonday Dream](https://open.spotify.com/album/6astw05cTiXEc2OvyByaPs)
|
||||
- [Adwaith - Melyn](https://open.spotify.com/album/2vBE40Rp60tl7rNqIZjaXM)
|
||||
- [Gwidaith Hen Fran - Cedors Hen Wrach](https://open.spotify.com/album/3v2hrfNGINPLuDP0YDTOjm)
|
||||
- [Metallica - Metallica](https://open.spotify.com/album/2Kh43m04B1UkVcpcRa1Zug)
|
||||
- [Bloc Party - Silent Alarm](https://open.spotify.com/album/6SsIdN05HQg2GwYLfXuzLB)
|
||||
- [Maxthor - Another World](https://open.spotify.com/album/3tklE2Fgw1hCIUstIwPBJF)
|
||||
- [Alun Tan Lan - Y Distawrwydd](https://open.spotify.com/album/0c32OywcLpdJCWWMC6vB8v)
|
||||
|
||||
159
README.uz.md
Normal file
159
README.uz.md
Normal file
|
|
@ -0,0 +1,159 @@
|
|||
<p align="center" style="text-align: center">
|
||||
<img src="./assets/images/logo-universal.png" width="55%"><br/>
|
||||
</p>
|
||||
|
||||
<p align="center">
|
||||
Go va Web texnologiyalaridan foydalangan holda ish stoli ilovalarini yarating
|
||||
<br/>
|
||||
<br/>
|
||||
<a href="https://github.com/wailsapp/wails/blob/master/LICENSE">
|
||||
<img alt="GitHub" src="https://img.shields.io/github/license/wailsapp/wails"/>
|
||||
</a>
|
||||
<a href="https://goreportcard.com/report/github.com/wailsapp/wails">
|
||||
<img src="https://goreportcard.com/badge/github.com/wailsapp/wails" />
|
||||
</a>
|
||||
<a href="https://pkg.go.dev/github.com/wailsapp/wails">
|
||||
<img src="https://pkg.go.dev/badge/github.com/wailsapp/wails.svg" alt="Go Reference"/>
|
||||
</a>
|
||||
<a href="https://github.com/wailsapp/wails/issues">
|
||||
<img src="https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat" alt="CodeFactor" />
|
||||
</a>
|
||||
<a href="https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_shield" alt="FOSSA Status">
|
||||
<img src="https://app.fossa.com/api/projects/git%2Bgithub.com%2Fwailsapp%2Fwails.svg?type=shield" />
|
||||
</a>
|
||||
<a href="https://github.com/avelino/awesome-go" rel="nofollow">
|
||||
<img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" alt="Awesome" />
|
||||
</a>
|
||||
<a href="https://discord.gg/BrRSWTaxVK">
|
||||
<img alt="Discord" src="https://img.shields.io/discord/1042734330029547630?logo=discord"/>
|
||||
</a>
|
||||
<br/>
|
||||
<a href="https://github.com/wailsapp/wails/actions/workflows/build-and-test.yml" rel="nofollow">
|
||||
<img src="https://img.shields.io/github/actions/workflow/status/wailsapp/wails/build-and-test.yml?branch=master&logo=Github" alt="Build" />
|
||||
</a>
|
||||
<a href="https://github.com/wailsapp/wails/tags" rel="nofollow">
|
||||
<img alt="GitHub tag (latest SemVer pre-release)" src="https://img.shields.io/github/v/tag/wailsapp/wails?include_prereleases&label=version"/>
|
||||
</a>
|
||||
</p>
|
||||
|
||||
<div align="center">
|
||||
<strong>
|
||||
<samp>
|
||||
|
||||
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
|
||||
[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) ·
|
||||
[Русский](README.ru.md) · [Francais](README.fr.md) · [Uzbek](README.uz) · [Deutsch](README.de.md) ·
|
||||
[Türkçe](README.tr.md)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
</div>
|
||||
|
||||
## Tarkib
|
||||
|
||||
- [Tarkib](#tarkib)
|
||||
- [Kirish](#kirish)
|
||||
- [Xususiyatlari](#xususiyatlari)
|
||||
- [Yo'l xaritasi](#yol-xaritasi)
|
||||
- [Ishni boshlash](#ishni-boshlash)
|
||||
- [Homiylar](#homiylar)
|
||||
- [FAQ](#faq)
|
||||
- [Vaqt o'tishi bilan yulduzlar](#vaqt-otishi-bilan-yulduzlar)
|
||||
- [Ishtirokchilar](#homiylar)
|
||||
- [Litsenziya](#litsenziya)
|
||||
- [Ilhomlanish](#ilhomlanish)
|
||||
|
||||
## Kirish
|
||||
|
||||
Odatda, Go dasturlari uchun veb-interfeyslar o'rnatilgan veb-server va veb-brauzerdir.
|
||||
Walls boshqacha yondashuvni qo'llaydi: u Go kodini ham, veb-interfeysni ham bitta ikkilik (e.g: EXE)fayliga o'raydi.
|
||||
Loyihalarni yaratish, kompilyatsiya qilish va birlashtirishni boshqarish orqali ilovangizni yaratishni osonlashtiradi.
|
||||
Hamma narsa faqat sizning tasavvuringiz bilan cheklangan!
|
||||
|
||||
## Xususiyatlari
|
||||
|
||||
- Backend uchun standart Go dan foydalaning
|
||||
- UI yaratish uchun siz allaqachon tanish bo'lgan har qanday frontend texnologiyasidan foydalaning
|
||||
- Oldindan tayyorlangan shablonlardan foydalanib, Go dasturlaringiz uchun tezda boy frontendlarni yarating
|
||||
- Javascriptdan Go methodlarini osongina chaqiring
|
||||
- Go struktura va methodlari uchun avtomatik yaratilgan Typescript ta'riflari
|
||||
- Mahalliy Dialoglar va Menyular
|
||||
- Mahalliy Dark / Light rejimini qo'llab-quvvatlash
|
||||
- Zamonaviy shaffoflik va "muzli oyna" effektlarini qo'llab-quvvatlaydi
|
||||
- Go va Javascript o'rtasidagi yagona hodisa tizimi
|
||||
- Loyihalaringizni tezda yaratish va qurish uchun kuchli cli vositasi
|
||||
- Ko'p platformali
|
||||
- Mahalliy renderlash mexanizmlaridan foydalanadi - _o'rnatilgan brauzer yo'q_!
|
||||
|
||||
### Yo'l xaritasi
|
||||
|
||||
Loyihaning yoʻl xaritasini [bu yerdan](https://github.com/wailsapp/wails/discussions/1484) topish mumkin. Iltimos, maslahatlashing
|
||||
Buni yaxshilash so'rovini ochishdan oldin.
|
||||
|
||||
## Ishni boshlash
|
||||
|
||||
O'rnatish bo'yicha ko'rsatmalar [Rasmiy veb saytda](https://wails.io/docs/gettingstarted/installation) mavjud.
|
||||
|
||||
## Homiylar
|
||||
|
||||
Ushbu loyiha quyidagi mehribon odamlar / kompaniyalar tomonidan qo'llab-quvvatlanadi:
|
||||
<img src="website/static/img/sponsors.svg" style="width:100%;max-width:800px;"/>
|
||||
|
||||
<p align="center">
|
||||
<img src="https://wails.io/img/sponsor/jetbrains-grayscale.webp" style="width: 100px"/>
|
||||
</p>
|
||||
|
||||
## FAQ
|
||||
|
||||
- Bu Elektronga muqobilmi?
|
||||
|
||||
Sizning talablaringizga bog'liq. Bu Go dasturchilariga yengil ish stoli yaratishni osonlashtirish uchun yaratilgan
|
||||
ilovalar yoki ularning mavjud ilovalariga frontend qo'shing. Wails menyular kabi mahalliy elementlarni taklif qiladi
|
||||
va dialoglar, shuning uchun uni yengil elektron muqobili deb hisoblash mumkin.
|
||||
|
||||
- Ushbu loyiha kimlar uchun?
|
||||
|
||||
Server yaratmasdan va uni ko'rish uchun brauzerni ochmasdan, o'z ilovalari bilan HTML/JS/CSS orqali frontendini birlashtirmoqchi bo'lgan dasturchilar uchun.
|
||||
|
||||
- Bu qanday nom?
|
||||
|
||||
Men WebViewni ko'rganimda, men shunday deb o'yladim: "Menga WebView ilovasini yaratish uchun vositalar kerak.
|
||||
biroz Rails for Rubyga o'xshaydi." Demak, dastlab bu so'zlar ustida o'yin edi (Railsda Webview). Shunday bo'ldi.
|
||||
u men kelgan [Mamlakat](https://en.wikipedia.org/wiki/Wales)ning inglizcha nomining omofonidir.
|
||||
|
||||
## Vaqt o'tishi bilan yulduzlar
|
||||
|
||||
<a href="https://star-history.com/#wailsapp/wails&Date">
|
||||
<picture>
|
||||
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=wailsapp/wails&type=Date&theme=dark" />
|
||||
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=wailsapp/wails&type=Date" />
|
||||
<img alt="Yulduzlar tarixi jadvali" src="https://api.star-history.com/svg?repos=wailsapp/wails&type=Date" />
|
||||
</picture>
|
||||
</a>
|
||||
|
||||
## Ishtirokchilar
|
||||
|
||||
Ishtirokchilar roʻyxati oʻqish uchun juda kattalashib bormoqda! Bunga hissa qo'shgan barcha ajoyib odamlarning
|
||||
loyihada o'z sahifasi bor [bu yerga](https://wails.io/credits#contributors).
|
||||
|
||||
## Litsenziya
|
||||
|
||||
[](https://app.fossa.com/projects/git%2Bgithub.com%2Fwailsapp%2Fwails?ref=badge_large)
|
||||
|
||||
## Ilhomlanish
|
||||
|
||||
Ushbu loyiha asosan quyidagi albomlar uchun kodlangan:
|
||||
|
||||
- [Manic Street Preachers - Resistance Is Futile](https://open.spotify.com/album/1R2rsEUqXjIvAbzM0yHrxA)
|
||||
- [Manic Street Preachers - This Is My Truth, Tell Me Yours](https://open.spotify.com/album/4VzCL9kjhgGQeKCiojK1YN)
|
||||
- [The Midnight - Endless Summer](https://open.spotify.com/album/4Krg8zvprquh7TVn9OxZn8)
|
||||
- [Gary Newman - Savage (Songs from a Broken World)](https://open.spotify.com/album/3kMfsD07Q32HRWKRrpcexr)
|
||||
- [Steve Vai - Passion & Warfare](https://open.spotify.com/album/0oL0OhrE2rYVns4IGj8h2m)
|
||||
- [Ben Howard - Every Kingdom](https://open.spotify.com/album/1nJsbWm3Yy2DW1KIc1OKle)
|
||||
- [Ben Howard - Noonday Dream](https://open.spotify.com/album/6astw05cTiXEc2OvyByaPs)
|
||||
- [Adwaith - Melyn](https://open.spotify.com/album/2vBE40Rp60tl7rNqIZjaXM)
|
||||
- [Gwidaith Hen Fran - Cedors Hen Wrach](https://open.spotify.com/album/3v2hrfNGINPLuDP0YDTOjm)
|
||||
- [Metallica - Metallica](https://open.spotify.com/album/2Kh43m04B1UkVcpcRa1Zug)
|
||||
- [Bloc Party - Silent Alarm](https://open.spotify.com/album/6SsIdN05HQg2GwYLfXuzLB)
|
||||
- [Maxthor - Another World](https://open.spotify.com/album/3tklE2Fgw1hCIUstIwPBJF)
|
||||
- [Alun Tan Lan - Y Distawrwydd](https://open.spotify.com/album/0c32OywcLpdJCWWMC6vB8v)
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
<img src="https://cdn.rawgit.com/sindresorhus/awesome/d7305f38d29fed78fa85652e3a63e154dd8e8829/media/badge.svg" alt="Awesome" />
|
||||
</a>
|
||||
<a href="https://discord.gg/BrRSWTaxVK">
|
||||
<img alt="Discord" src="https://dcbadge.vercel.app/api/server/BrRSWTaxVK?style=flat"/>
|
||||
<img alt="Discord" src="https://img.shields.io/discord/1042734330029547630?logo=discord"/>
|
||||
</a>
|
||||
<br/>
|
||||
<a href="https://github.com/wailsapp/wails/actions/workflows/build-and-test.yml" rel="nofollow">
|
||||
|
|
@ -44,7 +44,8 @@
|
|||
|
||||
[English](README.md) · [简体中文](README.zh-Hans.md) · [日本語](README.ja.md) ·
|
||||
[한국어](README.ko.md) · [Español](README.es.md) · [Português](README.pt-br.md) ·
|
||||
[Русский](README.ru.md)
|
||||
[Русский](README.ru.md) · [Francais](README.fr.md) · [Uzbek](README.uz.md) · [Deutsch](README.de.md) ·
|
||||
[Türkçe](README.tr.md)
|
||||
|
||||
</samp>
|
||||
</strong>
|
||||
|
|
|
|||
38
SECURITY.md
Normal file
38
SECURITY.md
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
# Security Policy
|
||||
|
||||
## Supported Versions
|
||||
|
||||
| Version | Supported |
|
||||
| ------- | ------------------ |
|
||||
| 2.x.x | :white_check_mark: |
|
||||
| 3.0.x-alpha | :x: |
|
||||
|
||||
|
||||
## Reporting a Vulnerability
|
||||
|
||||
If you believe you have found a security vulnerability in our project, we encourage you to let us know right away.
|
||||
We will investigate all legitimate reports and do our best to quickly fix the problem.
|
||||
|
||||
Before reporting though, please review our security policy below.
|
||||
|
||||
### How to Report
|
||||
|
||||
To report a security vulnerability, please use GitHub's [private vulnerability reporting](https://docs.github.com/en/code-security/security-advisories/guidance-on-reporting-and-writing-information-about-vulnerabilities/privately-reporting-a-security-vulnerability) feature. If possible, please include as much information as possible.
|
||||
This may include steps to reproduce, impact of the vulnerability, and anything else you believe would help us understand the problem.
|
||||
**Please do not include any sensitive or personal information in your report**.
|
||||
|
||||
### What to Expect
|
||||
|
||||
When you report a vulnerability, here's what you can expect:
|
||||
|
||||
- **Acknowledgement**: We will acknowledge your email within 48 hours, and you'll receive a more detailed response to your email within 72 hours indicating the next steps in handling your report.
|
||||
|
||||
- **Updates**: After the initial reply to your report, our team will keep you informed of the progress being made towards a fix and full announcement. These updates will be sent at least once a week.
|
||||
|
||||
- **Confidentiality**: We will maintain strict confidentiality of your report until the security issue is resolved.
|
||||
|
||||
- **Issue Resolution**: If the issue is confirmed, we will release a patch as soon as possible depending on complexity of the fix.
|
||||
|
||||
- **Recognition**: We recognize and appreciate every individual who helps us identify and fix vulnerabilities in our project. While we do not currently have a bounty program, we would be happy to publicly acknowledge your responsible disclosure.
|
||||
|
||||
We strive to make Wails safe for everyone, and we greatly appreciate the assistance of security researchers and users in helping us identify and fix vulnerabilities. Thank you for your contribution to the security of this project.
|
||||
|
|
@ -16,11 +16,6 @@ includes:
|
|||
dir: v3
|
||||
optional: true
|
||||
|
||||
docs:
|
||||
taskfile: mkdocs-website
|
||||
dir: mkdocs-website
|
||||
optional: true
|
||||
|
||||
tasks:
|
||||
contributors:check:
|
||||
cmds:
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
v3alpha.wails.io
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
# v3 Docs
|
||||
|
||||
This is the documentation for Wails v3. It is currently a work in progress.
|
||||
|
||||
If you do not wish to build it locally, it is available online at
|
||||
[https://wailsapp.github.io/wails/](https://wailsapp.github.io/wails/).
|
||||
|
||||
## Recommended Setup Steps
|
||||
|
||||
Install the wails3 CLI if you haven't already:
|
||||
|
||||
```shell
|
||||
go install github.com/wailsapp/wails/v3/cmd/wails3@latest
|
||||
```
|
||||
|
||||
The documentation uses mkdocs, so you will need to install
|
||||
[Python](https://www.python.org/). Once installed, you can setup the
|
||||
documentation by running the following command:
|
||||
|
||||
```bash
|
||||
wails3 task docs:setup
|
||||
```
|
||||
|
||||
This will install the required dependencies for you.
|
||||
|
||||
If you have installed the wails3 CLI, you can run the following command to build
|
||||
the documentation and serve it locally:
|
||||
|
||||
```bash
|
||||
wails3 task docs:serve
|
||||
```
|
||||
|
||||
### Manual Setup
|
||||
|
||||
To install manually, you will need to do the following:
|
||||
|
||||
- Install [Python](https://www.python.org/)
|
||||
- Run `pip install -r requirements.txt` to install the required dependencies
|
||||
- Run `mkdocs serve` to serve the documentation locally
|
||||
- Run `mkdocs build` to build the documentation
|
||||
|
||||
## Contributing
|
||||
|
||||
If you would like to contribute to the documentation, please feel free to open a
|
||||
PR!
|
||||
|
|
@ -1,59 +0,0 @@
|
|||
# https://taskfile.dev
|
||||
|
||||
version: '3'
|
||||
|
||||
tasks:
|
||||
|
||||
setup:
|
||||
summary: Setup the project
|
||||
preconditions:
|
||||
- sh: python{{exeExt}} --version
|
||||
msg: "Looks like Python isn't installed. Python is required to build the documentation: https://www.python.org/downloads/"
|
||||
cmds:
|
||||
- python -m pip install -r requirements.txt --user
|
||||
|
||||
setup:insiders:
|
||||
summary: Setup the project (insiders)
|
||||
preconditions:
|
||||
- sh: python{{exeExt}} --version
|
||||
msg: "Looks like Python isn't installed. Python is required to build the documentation: https://www.python.org/downloads/"
|
||||
cmds:
|
||||
- python -m pip install -r requirements.insiders.txt --user
|
||||
|
||||
upgrade:insiders:
|
||||
summary: Upgrade the project (insiders)
|
||||
preconditions:
|
||||
- sh: python{{exeExt}} --version
|
||||
msg: "Looks like Python isn't installed. Python is required to build the documentation: https://www.python.org/downloads/"
|
||||
cmds:
|
||||
- python -m pip install -r requirements.insiders.txt --upgrade --user
|
||||
|
||||
build:
|
||||
summary: Builds the documentation
|
||||
preconditions:
|
||||
- sh: mkdocs --version
|
||||
msg: "Looks like mkdocs isn't installed. Run `wails3 task setup` or `task setup` in the documentation directory to install it."
|
||||
cmds:
|
||||
- mkdocs build
|
||||
|
||||
serve:
|
||||
summary: Builds the documentation and serves it locally
|
||||
preconditions:
|
||||
- sh: mkdocs --version
|
||||
msg: "Looks like mkdocs isn't installed. Run `wails3 task setup` or `task setup` in the documentation directory to install it."
|
||||
cmds:
|
||||
- mkdocs serve
|
||||
|
||||
serve:insiders:
|
||||
summary: Builds the documentation and serves it locally
|
||||
preconditions:
|
||||
- sh: mkdocs --version
|
||||
msg: "Looks like mkdocs isn't installed. Run `wails3 task setup` or `task setup` in the documentation directory to install it."
|
||||
cmds:
|
||||
- mkdocs serve --config-file mkdocs.insiders.yml
|
||||
|
||||
update:api:
|
||||
summary: Updates the API documentation
|
||||
dir: generate
|
||||
cmds:
|
||||
- go run .
|
||||
|
|
@ -1 +0,0 @@
|
|||
v3alpha.wails.io
|
||||
|
|
@ -1,358 +0,0 @@
|
|||
# Application
|
||||
|
||||
The application API assists in creating an application using the Wails framework.
|
||||
|
||||
### New
|
||||
|
||||
API: `New(appOptions Options) *App`
|
||||
|
||||
`New(appOptions Options)` creates a new application using the given application
|
||||
options . It applies default values for unspecified options, merges them with
|
||||
the provided ones, initializes and returns an instance of the application.
|
||||
|
||||
In case of an error during initialization, the application is stopped with the
|
||||
error message provided.
|
||||
|
||||
It should be noted that if a global application instance already exists, that
|
||||
instance will be returned instead of creating a new one.
|
||||
|
||||
```go title="main.go" hl_lines="6-9"
|
||||
package main
|
||||
|
||||
import "github.com/wailsapp/wails/v3/pkg/application"
|
||||
|
||||
func main() {
|
||||
app := application.New(application.Options{
|
||||
Name: "WebviewWindow Demo",
|
||||
// Other options
|
||||
})
|
||||
|
||||
// Rest of application
|
||||
}
|
||||
```
|
||||
|
||||
### Get
|
||||
|
||||
`Get()` returns the global application instance. It's useful when you need to
|
||||
access the application from different parts of your code.
|
||||
|
||||
```go
|
||||
// Get the application instance
|
||||
app := application.Get()
|
||||
```
|
||||
|
||||
### Capabilities
|
||||
|
||||
API: `Capabilities() capabilities.Capabilities`
|
||||
|
||||
`Capabilities()` retrieves a map of capabilities that the application currently
|
||||
has. Capabilities can be about different features the operating system provides,
|
||||
like webview features.
|
||||
|
||||
```go
|
||||
// Get the application capabilities
|
||||
capabilities := app.Capabilities()
|
||||
if capabilities.HasNativeDrag {
|
||||
// Do something
|
||||
}
|
||||
```
|
||||
|
||||
### GetPID
|
||||
|
||||
API: `GetPID() int`
|
||||
|
||||
`GetPID()` returns the Process ID of the application.
|
||||
|
||||
```go
|
||||
pid := app.GetPID()
|
||||
```
|
||||
|
||||
### Run
|
||||
|
||||
API: `Run() error`
|
||||
|
||||
`Run()` starts the execution of the application and its components.
|
||||
|
||||
```go
|
||||
app := application.New(application.Options{
|
||||
//options
|
||||
})
|
||||
// Run the application
|
||||
err := application.Run()
|
||||
if err != nil {
|
||||
// Handle error
|
||||
}
|
||||
```
|
||||
|
||||
### Quit
|
||||
|
||||
API: `Quit()`
|
||||
|
||||
`Quit()` quits the application by destroying windows and potentially other
|
||||
components.
|
||||
|
||||
```go
|
||||
// Quit the application
|
||||
app.Quit()
|
||||
```
|
||||
|
||||
### IsDarkMode
|
||||
|
||||
API: `IsDarkMode() bool`
|
||||
|
||||
`IsDarkMode()` checks if the application is running in dark mode. It returns a
|
||||
boolean indicating whether dark mode is enabled.
|
||||
|
||||
```go
|
||||
// Check if dark mode is enabled
|
||||
if app.IsDarkMode() {
|
||||
// Do something
|
||||
}
|
||||
```
|
||||
|
||||
### Hide
|
||||
|
||||
API: `Hide()`
|
||||
|
||||
`Hide()` hides the application window.
|
||||
|
||||
```go
|
||||
// Hide the application window
|
||||
app.Hide()
|
||||
```
|
||||
|
||||
### Show
|
||||
|
||||
API: `Show()`
|
||||
|
||||
`Show()` shows the application window.
|
||||
|
||||
```go
|
||||
// Show the application window
|
||||
app.Show()
|
||||
```
|
||||
|
||||
### NewWebviewWindow
|
||||
|
||||
API: `NewWebviewWindow() *WebviewWindow`
|
||||
|
||||
`NewWebviewWindow()` creates a new Webview window with default options, and
|
||||
returns it.
|
||||
|
||||
```go
|
||||
// Create a new webview window
|
||||
window := app.NewWebviewWindow()
|
||||
```
|
||||
|
||||
### NewWebviewWindowWithOptions
|
||||
|
||||
API:
|
||||
`NewWebviewWindowWithOptions(windowOptions WebviewWindowOptions) *WebviewWindow`
|
||||
|
||||
`NewWebviewWindowWithOptions()` creates a new webview window with custom
|
||||
options. The newly created window is added to a map of windows managed by the
|
||||
application.
|
||||
|
||||
```go
|
||||
// Create a new webview window with custom options
|
||||
window := app.NewWebviewWindowWithOptions(WebviewWindowOptions{
|
||||
Name: "Main",
|
||||
Title: "My Window",
|
||||
Width: 800,
|
||||
Height: 600,
|
||||
})
|
||||
```
|
||||
|
||||
### OnWindowCreation
|
||||
|
||||
API: `OnWindowCreation(callback func(window *WebviewWindow))`
|
||||
|
||||
`OnWindowCreation()` registers a callback function to be called when a window is
|
||||
created.
|
||||
|
||||
```go
|
||||
// Register a callback to be called when a window is created
|
||||
app.OnWindowCreation(func(window *WebviewWindow) {
|
||||
// Do something
|
||||
})
|
||||
```
|
||||
|
||||
### GetWindowByName
|
||||
|
||||
API: `GetWindowByName(name string) *WebviewWindow`
|
||||
|
||||
`GetWindowByName()` fetches and returns a window with a specific name.
|
||||
|
||||
```go
|
||||
// Get a window by name
|
||||
window := app.GetWindowByName("Main")
|
||||
```
|
||||
|
||||
### CurrentWindow
|
||||
|
||||
API: `CurrentWindow() *WebviewWindow`
|
||||
|
||||
`CurrentWindow()` fetches and returns a pointer to the currently active window
|
||||
in the application. If there is no window, it returns nil.
|
||||
|
||||
```go
|
||||
// Get the current window
|
||||
window := app.CurrentWindow()
|
||||
```
|
||||
|
||||
### RegisterContextMenu
|
||||
|
||||
API: `RegisterContextMenu(name string, menu *Menu)`
|
||||
|
||||
`RegisterContextMenu()` registers a context menu with a given name. This menu
|
||||
can be used later in the application.
|
||||
|
||||
```go
|
||||
|
||||
// Create a new menu
|
||||
ctxmenu := app.NewMenu()
|
||||
|
||||
// Register the menu as a context menu
|
||||
app.RegisterContextMenu("MyContextMenu", ctxmenu)
|
||||
```
|
||||
|
||||
### SetMenu
|
||||
|
||||
API: `SetMenu(menu *Menu)`
|
||||
|
||||
`SetMenu()` sets the menu for the application. On Mac, this will be the global
|
||||
menu. For Windows and Linux, this will be the default menu for any new window
|
||||
created.
|
||||
|
||||
```go
|
||||
// Create a new menu
|
||||
menu := app.NewMenu()
|
||||
|
||||
// Set the menu for the application
|
||||
app.SetMenu(menu)
|
||||
```
|
||||
|
||||
### ShowAboutDialog
|
||||
|
||||
API: `ShowAboutDialog()`
|
||||
|
||||
`ShowAboutDialog()` shows an "About" dialog box. It can show the application's
|
||||
name, description and icon.
|
||||
|
||||
```go
|
||||
// Show the about dialog
|
||||
app.ShowAboutDialog()
|
||||
```
|
||||
|
||||
### Info
|
||||
|
||||
API: `InfoDialog()`
|
||||
|
||||
`InfoDialog()` creates and returns a new instance of `MessageDialog` with an
|
||||
`InfoDialogType`. This dialog is typically used to display informational
|
||||
messages to the user.
|
||||
|
||||
### Question
|
||||
|
||||
API: `QuestionDialog()`
|
||||
|
||||
`QuestionDialog()` creates and returns a new instance of `MessageDialog` with a
|
||||
`QuestionDialogType`. This dialog is often used to ask a question to the user
|
||||
and expect a response.
|
||||
|
||||
### Warning
|
||||
|
||||
API: `WarningDialog()`
|
||||
|
||||
`WarningDialog()` creates and returns a new instance of `MessageDialog` with a
|
||||
`WarningDialogType`. As the name suggests, this dialog is primarily used to
|
||||
display warning messages to the user.
|
||||
|
||||
### Error
|
||||
|
||||
API: `ErrorDialog()`
|
||||
|
||||
`ErrorDialog()` creates and returns a new instance of `MessageDialog` with an
|
||||
`ErrorDialogType`. This dialog is designed to be used when you need to display
|
||||
an error message to the user.
|
||||
|
||||
### OpenFile
|
||||
|
||||
API: `OpenFileDialog()`
|
||||
|
||||
`OpenFileDialog()` creates and returns a new `OpenFileDialogStruct`. This dialog
|
||||
prompts the user to select one or more files from their file system.
|
||||
|
||||
### SaveFile
|
||||
|
||||
API: `SaveFileDialog()`
|
||||
|
||||
`SaveFileDialog()` creates and returns a new `SaveFileDialogStruct`. This dialog
|
||||
prompts the user to choose a location on their file system where a file should
|
||||
be saved.
|
||||
|
||||
### OpenDirectory
|
||||
|
||||
API: `OpenDirectoryDialog()`
|
||||
|
||||
`OpenDirectoryDialog()` creates and returns a new instance of `MessageDialog`
|
||||
with an `OpenDirectoryDialogType`. This dialog enables the user to choose a
|
||||
directory from their file system.
|
||||
|
||||
### On
|
||||
|
||||
API:
|
||||
`On(eventType events.ApplicationEventType, callback func(event *Event)) func()`
|
||||
|
||||
`On()` registers an event listener for specific application events. The callback
|
||||
function provided will be triggered when the corresponding event occurs. The
|
||||
function returns a function that can be called to remove the listener.
|
||||
|
||||
### RegisterHook
|
||||
|
||||
API:
|
||||
`RegisterHook(eventType events.ApplicationEventType, callback func(event *Event)) func()`
|
||||
|
||||
`RegisterHook()` registers a callback to be run as a hook during specific
|
||||
events. These hooks are run before listeners attached with `On()`. The function
|
||||
returns a function that can be called to remove the hook.
|
||||
|
||||
### GetPrimaryScreen
|
||||
|
||||
API: `GetPrimaryScreen() (*Screen, error)`
|
||||
|
||||
`GetPrimaryScreen()` returns the primary screen of the system.
|
||||
|
||||
### GetScreens
|
||||
|
||||
API: `GetScreens() ([]*Screen, error)`
|
||||
|
||||
`GetScreens()` returns information about all screens attached to the system.
|
||||
|
||||
This is a brief summary of the exported methods in the provided `App` struct. Do
|
||||
note that for more detailed functionality or considerations, refer to the actual
|
||||
Go code or further internal documentation.
|
||||
|
||||
## Options
|
||||
|
||||
```go title="application_options.go"
|
||||
--8<--
|
||||
../v3/pkg/application/options_application.go
|
||||
--8<--
|
||||
```
|
||||
|
||||
### Windows Options
|
||||
|
||||
```go title="application_options_windows.go"
|
||||
--8<--
|
||||
../v3/pkg/application/options_application_win.go
|
||||
--8<--
|
||||
```
|
||||
|
||||
### Mac Options
|
||||
|
||||
```go title="options_application_mac.go"
|
||||
--8<--
|
||||
../v3/pkg/application/options_application_mac.go
|
||||
--8<--
|
||||
```
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,50 +0,0 @@
|
|||
# Main Thread Functions
|
||||
|
||||
These methods are utility functions to run code on the main thread. This is
|
||||
required when you want to run custom code on the UI thread.
|
||||
|
||||
### InvokeSync
|
||||
|
||||
API: `InvokeSync(fn func())`
|
||||
|
||||
This function runs the passed function (`fn`) synchronously. It uses a WaitGroup
|
||||
(`wg`) to ensure that the main thread waits for the `fn` function to finish
|
||||
before it continues. If a panic occurs inside `fn`, it will be passed to the
|
||||
handler function `PanicHandler`, defined in the application options.
|
||||
|
||||
### InvokeSyncWithResult
|
||||
|
||||
API: `InvokeSyncWithResult[T any](fn func() T) (res T)`
|
||||
|
||||
This function works similarly to `InvokeSync(fn func())`, however, it yields a
|
||||
result. Use this for calling any function with a single return.
|
||||
|
||||
### InvokeSyncWithError
|
||||
|
||||
API: `InvokeSyncWithError(fn func() error) (err error)`
|
||||
|
||||
This function runs `fn` synchronously and returns any error that `fn` produces.
|
||||
Note that this function will recover from a panic if one occurs during `fn`'s
|
||||
execution.
|
||||
|
||||
### InvokeSyncWithResultAndError
|
||||
|
||||
API:
|
||||
`InvokeSyncWithResultAndError[T any](fn func() (T, error)) (res T, err error)`
|
||||
|
||||
This function runs `fn` synchronously and returns both a result of type `T` and
|
||||
an error.
|
||||
|
||||
### InvokeAsync
|
||||
|
||||
API: `InvokeAsync(fn func())`
|
||||
|
||||
This function runs `fn` asynchronously. It runs the given function on the main
|
||||
thread. If a panic occurs inside `fn`, it will be passed to the handler function
|
||||
`PanicHandler`, defined in the application options.
|
||||
|
||||
---
|
||||
|
||||
_Note_: These functions will block execution until `fn` has finished. It's
|
||||
critical to ensure that `fn` doesn't block. If you need to run a function that
|
||||
blocks, use `InvokeAsync` instead.
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
# Menu
|
||||
|
||||
Menus can be created and added to the application. They can be used to create
|
||||
context menus, system tray menus and application menus.
|
||||
|
||||
To create a new menu, call:
|
||||
|
||||
```go
|
||||
// Create a new menu
|
||||
menu := app.NewMenu()
|
||||
```
|
||||
|
||||
The following operations are then available on the `Menu` type:
|
||||
|
||||
### Add
|
||||
|
||||
API: `Add(label string) *MenuItem`
|
||||
|
||||
This method takes a `label` of type `string` as an input and adds a new
|
||||
`MenuItem` with the given label to the menu. It returns the `MenuItem` added.
|
||||
|
||||
### AddSeparator
|
||||
|
||||
API: `AddSeparator()`
|
||||
|
||||
This method adds a new separator `MenuItem` to the menu.
|
||||
|
||||
### AddCheckbox
|
||||
|
||||
API: `AddCheckbox(label string, enabled bool) *MenuItem`
|
||||
|
||||
This method takes a `label` of type `string` and `enabled` of type `bool` as
|
||||
inputs and adds a new checkbox `MenuItem` with the given label and enabled state
|
||||
to the menu. It returns the `MenuItem` added.
|
||||
|
||||
### AddRadio
|
||||
|
||||
API: `AddRadio(label string, enabled bool) *MenuItem`
|
||||
|
||||
This method takes a `label` of type `string` and `enabled` of type `bool` as
|
||||
inputs and adds a new radio `MenuItem` with the given label and enabled state to
|
||||
the menu. It returns the `MenuItem` added.
|
||||
|
||||
### Update
|
||||
|
||||
API: `Update()`
|
||||
|
||||
This method processes any radio groups and updates the menu if a menu
|
||||
implementation is not initialized.
|
||||
|
||||
### AddSubmenu
|
||||
|
||||
API: `AddSubmenu(s string) *Menu`
|
||||
|
||||
This method takes a `s` of type `string` as input and adds a new submenu
|
||||
`MenuItem` with the given label to the menu. It returns the submenu added.
|
||||
|
||||
### AddRole
|
||||
|
||||
API: `AddRole(role Role) *Menu`
|
||||
|
||||
This method takes `role` of type `Role` as input, adds it to the menu if it is
|
||||
not `nil` and returns the `Menu`.
|
||||
|
||||
### SetLabel
|
||||
|
||||
API: `SetLabel(label string)`
|
||||
|
||||
This method sets the `label` of the `Menu`.
|
||||
|
|
@ -1,112 +0,0 @@
|
|||
# System Tray
|
||||
|
||||
The system tray houses notification area on a desktop environment, which can
|
||||
contain both icons of currently-running applications and specific system
|
||||
notifications.
|
||||
|
||||
You create a system tray by calling `app.NewSystemTray()`:
|
||||
|
||||
```go
|
||||
// Create a new system tray
|
||||
tray := app.NewSystemTray()
|
||||
```
|
||||
|
||||
The following methods are available on the `SystemTray` type:
|
||||
|
||||
### SetLabel
|
||||
|
||||
API: `SetLabel(label string)`
|
||||
|
||||
The `SetLabel` method sets the tray's label.
|
||||
|
||||
### Label
|
||||
|
||||
API: `Label() string`
|
||||
|
||||
The `Label` method retrieves the tray's label.
|
||||
|
||||
### PositionWindow
|
||||
|
||||
API: `PositionWindow(*WebviewWindow, offset int) error`
|
||||
|
||||
The `PositionWindow` method calls both `AttachWindow` and `WindowOffset`
|
||||
methods.
|
||||
|
||||
### SetIcon
|
||||
|
||||
API: `SetIcon(icon []byte) *SystemTray`
|
||||
|
||||
The `SetIcon` method sets the system tray's icon.
|
||||
|
||||
### SetDarkModeIcon
|
||||
|
||||
API: `SetDarkModeIcon(icon []byte) *SystemTray`
|
||||
|
||||
The `SetDarkModeIcon` method sets the system tray's icon when in dark mode.
|
||||
|
||||
### SetMenu
|
||||
|
||||
API: `SetMenu(menu *Menu) *SystemTray`
|
||||
|
||||
The `SetMenu` method sets the system tray's menu.
|
||||
|
||||
### Destroy
|
||||
|
||||
API: `Destroy()`
|
||||
|
||||
The `Destroy` method destroys the system tray instance.
|
||||
|
||||
### OnClick
|
||||
|
||||
API: `OnClick(handler func()) *SystemTray`
|
||||
|
||||
The `OnClick` method sets the function to execute when the tray icon is clicked.
|
||||
|
||||
### OnRightClick
|
||||
|
||||
API: `OnRightClick(handler func()) *SystemTray`
|
||||
|
||||
The `OnRightClick` method sets the function to execute when right-clicking the
|
||||
tray icon.
|
||||
|
||||
### OnDoubleClick
|
||||
|
||||
API: `OnDoubleClick(handler func()) *SystemTray`
|
||||
|
||||
The `OnDoubleClick` method sets the function to execute when double-clicking the
|
||||
tray icon.
|
||||
|
||||
### OnRightDoubleClick
|
||||
|
||||
API: `OnRightDoubleClick(handler func()) *SystemTray`
|
||||
|
||||
The `OnRightDoubleClick` method sets the function to execute when right
|
||||
double-clicking the tray icon.
|
||||
|
||||
### AttachWindow
|
||||
|
||||
API: `AttachWindow(window *WebviewWindow) *SystemTray`
|
||||
|
||||
The `AttachWindow` method attaches a window to the system tray. The window will
|
||||
be shown when the system tray icon is clicked.
|
||||
|
||||
### WindowOffset
|
||||
|
||||
API: `WindowOffset(offset int) *SystemTray`
|
||||
|
||||
The `WindowOffset` method sets the gap in pixels between the system tray and the
|
||||
window.
|
||||
|
||||
### WindowDebounce
|
||||
|
||||
API: `WindowDebounce(debounce time.Duration) *SystemTray`
|
||||
|
||||
The `WindowDebounce` method sets a debounce time. In the context of Windows,
|
||||
this is used to specify how long to wait before responding to a mouse up event
|
||||
on the notification icon.
|
||||
|
||||
### OpenMenu
|
||||
|
||||
API: `OpenMenu()`
|
||||
|
||||
The `OpenMenu` method opens the menu associated with the system tray.
|
||||
|
|
@ -1,114 +0,0 @@
|
|||
# Window
|
||||
|
||||
To create a window, use
|
||||
[Application.NewWebviewWindow](application.md#newwebviewwindow) or
|
||||
[Application.NewWebviewWindowWithOptions](application.md#newwebviewwindowwithoptions).
|
||||
The former creates a window with default options, while the latter allows you to
|
||||
specify custom options.
|
||||
|
||||
These methods are callable on the returned WebviewWindow object:
|
||||
|
||||
### SetTitle
|
||||
|
||||
API: `SetTitle(title string) *WebviewWindow`
|
||||
|
||||
This method updates the window title to the provided string. It returns the
|
||||
WebviewWindow object, allowing for method chaining.
|
||||
|
||||
### Name
|
||||
|
||||
API: `Name() string`
|
||||
|
||||
This function returns the name of the WebviewWindow.
|
||||
|
||||
### SetSize
|
||||
|
||||
API: `SetSize(width, height int) *WebviewWindow`
|
||||
|
||||
This method sets the size of the WebviewWindow to the provided width and height
|
||||
parameters. If the dimensions provided exceed the constraints, they are adjusted
|
||||
appropriately.
|
||||
|
||||
### SetAlwaysOnTop
|
||||
|
||||
API: `SetAlwaysOnTop(b bool) *WebviewWindow`
|
||||
|
||||
This function sets the window to stay on top based on the boolean flag provided.
|
||||
|
||||
### Show
|
||||
|
||||
API: `Show() *WebviewWindow`
|
||||
|
||||
`Show` method is used to make the window visible. If the window is not running,
|
||||
it first invokes the `run` method to start the window and then makes it visible.
|
||||
|
||||
### Hide
|
||||
|
||||
API: `Hide() *WebviewWindow`
|
||||
|
||||
`Hide` method is used to hide the window. It sets the hidden status of the
|
||||
window to true and emits the window hide event.
|
||||
|
||||
### SetURL
|
||||
|
||||
API: `SetURL(s string) *WebviewWindow`
|
||||
|
||||
`SetURL` method is used to set the URL of the window to the given URL string.
|
||||
|
||||
### SetZoom
|
||||
|
||||
API: `SetZoom(magnification float64) *WebviewWindow`
|
||||
|
||||
`SetZoom` method sets the zoom level of the window content to the provided
|
||||
magnification level.
|
||||
|
||||
### GetZoom
|
||||
|
||||
API: `GetZoom() float64`
|
||||
|
||||
`GetZoom` function returns the current zoom level of the window content.
|
||||
|
||||
### GetScreen
|
||||
|
||||
API: `GetScreen() (*Screen, error)`
|
||||
|
||||
`GetScreen` method returns the screen on which the window is displayed.
|
||||
|
||||
#### SetFrameless
|
||||
|
||||
API: `SetFrameless(frameless bool) *WebviewWindow`
|
||||
|
||||
This function is used to remove the window frame and title bar. It toggles the
|
||||
framelessness of the window according to the boolean value provided (true for
|
||||
frameless, false for framed).
|
||||
|
||||
#### RegisterContextMenu
|
||||
|
||||
API: `RegisterContextMenu(name string, menu *Menu)`
|
||||
|
||||
This function is used to register a context menu and assigns it the given name.
|
||||
|
||||
#### NativeWindowHandle
|
||||
|
||||
API: `NativeWindowHandle() (uintptr, error)`
|
||||
|
||||
This function is used to fetch the platform native window handle for the window.
|
||||
|
||||
#### Focus
|
||||
|
||||
API: `Focus()`
|
||||
|
||||
This function is used to focus the window.
|
||||
|
||||
#### SetEnabled
|
||||
|
||||
API: `SetEnabled(enabled bool)`
|
||||
|
||||
This function is used to enable/disable the window based on the provided boolean
|
||||
value.
|
||||
|
||||
#### SetAbsolutePosition
|
||||
|
||||
API: `SetAbsolutePosition(x int, y int)`
|
||||
|
||||
This function sets the absolute position of the window in the screen.
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
# Changelog
|
||||
|
||||
<!--
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
||||
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||
|
||||
- `Added` for new features.
|
||||
- `Changed` for changes in existing functionality.
|
||||
- `Deprecated` for soon-to-be removed features.
|
||||
- `Removed` for now removed features.
|
||||
- `Fixed` for any bug fixes.
|
||||
- `Security` in case of vulnerabilities.
|
||||
|
||||
-->
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Added
|
||||
|
||||
- [darwin] add Event ApplicationShouldHandleReopen to able handle dock icon click by @5aaee9 in [#2991](https://github.com/wailsapp/wails/pull/2991)
|
||||
- [darwin] add getPrimaryScreen/getScreens to impl by @tmclane in [#2618](https://github.com/wailsapp/wails/pull/2618)
|
||||
|
||||
### Fixed
|
||||
|
||||
- Fixed Doctor apt package verify by [Atterpac](https://github.com/Atterpac) in [#2972](https://github.com/wailsapp/wails/pull/2972).
|
||||
- Fixed application frozen when quit (Darwin) by @5aaee9 in [#2982](https://github.com/wailsapp/wails/pull/2982)
|
||||
- Fixed background colours of examples on Windows by [mmgvh](https://github.com/mmghv) in [#2750](https://github.com/wailsapp/wails/pull/2750).
|
||||
- Fixed default context menus by [mmgvh](https://github.com/mmghv) in [#2753](https://github.com/wailsapp/wails/pull/2753).
|
||||
|
||||
|
||||
### Changed
|
||||
|
||||
### Removed
|
||||
|
||||
### Deprecated
|
||||
|
||||
### Security
|
||||
|
|
@ -1,454 +0,0 @@
|
|||
# Changes for v3
|
||||
|
||||
!!! note
|
||||
This is currently an unsorted brain dump of changes. It will be organised into a more readable format soon.
|
||||
|
||||
## Options
|
||||
|
||||
The application options have been revised since v2.
|
||||
|
||||
## Events
|
||||
|
||||
In v3, there are 3 types of events:
|
||||
|
||||
- Application Events
|
||||
- Window Events
|
||||
- Custom Events
|
||||
|
||||
### Application Events
|
||||
|
||||
Application events are events that are emitted by the application. These events
|
||||
include native events such as `ApplicationDidFinishLaunching` on macOS.
|
||||
|
||||
### Window Events
|
||||
|
||||
Window events are events that are emitted by a window. These events include
|
||||
native events such as `WindowDidBecomeMain` on macOS. Common events are also
|
||||
defined, so they work cross-platform, e.g. `WindowClosing`.
|
||||
|
||||
### Custom Events
|
||||
|
||||
Events that the user defines are called `WailsEvents`. This is to differentiate
|
||||
them from the `Event` object that is used to communicate with the browser.
|
||||
WailsEvents are now objects that encapsulate all the details of an event. This
|
||||
includes the event name, the data, and the source of the event.
|
||||
|
||||
The data associated with a WailsEvent is now a single value. If multiple values
|
||||
are required, then a struct can be used.
|
||||
|
||||
### Event callbacks and `Emit` function signature
|
||||
|
||||
The signatures events callbacks (as used by `On`, `Once` & `OnMultiple`) have
|
||||
changed. In v2, the callback function received optional data. In v3, the
|
||||
callback function receives a `WailsEvent` object that contains all data related
|
||||
to the event.
|
||||
|
||||
Similarly, the `Emit` function has changed. Instead of taking a name and
|
||||
optional data, it now takes a single `WailsEvent` object that it will emit.
|
||||
|
||||
### `Off` and `OffAll`
|
||||
|
||||
In v2, `Off` and `OffAll` calls would remove events in both JS and Go. Due to
|
||||
the multi-window nature of v3, this has been changed so that these methods only
|
||||
apply to the context they are called in. For example, if you call `Off` in a
|
||||
window, it will only remove events for that window. If you use `Off` in Go, it
|
||||
will only remove events for Go.
|
||||
|
||||
### Hooks
|
||||
|
||||
Event Hooks are a new feature in v3. They allow you to hook into the event
|
||||
system and perform actions when certain events are emitted. For example, you can
|
||||
hook into the `WindowClosing` event and perform some cleanup before the window
|
||||
closes. Hooks can be registered at the application level or at the window level
|
||||
using `RegisterHook`. Application level are for application events. Window level
|
||||
hooks will only be called for the window they are registered with.
|
||||
|
||||
### Logging
|
||||
|
||||
Logging in v2 was confusing as both application logs and system (internal) logs
|
||||
were using the same logger. We have simplified this as follows:
|
||||
|
||||
- Internal logs are now handled using the standard Go `slog` logger. This is
|
||||
configured using the `logger` option in the application options. By default,
|
||||
this uses the [tint](https://github.com/lmittmann/tint) logger.
|
||||
- Application logs can now be achieved through the new `log` plugin which
|
||||
utilises `slog` under the hood. This plugin provides a simple API for logging
|
||||
to the console. It is available in both Go and JS.
|
||||
|
||||
### Developer notes
|
||||
|
||||
When emitting an event in Go, it will dispatch the event to local Go listeners
|
||||
and also each window in the application. When emitting an event in JS, it now
|
||||
sends the event to the application. This will be processed as if it was emitted
|
||||
in Go, however the sender ID will be that of the window.
|
||||
|
||||
## Window
|
||||
|
||||
The Window API has largely remained the same, however the methods are now on an
|
||||
instance of a window rather than the runtime. Some notable differences are:
|
||||
|
||||
- Windows now have a Name that identifies them. This is used to identify the
|
||||
window when emitting events.
|
||||
- Windows have even more methods on the that were previously unavailable, such
|
||||
as `AbsolutePosition` and `ToggleDevTools`.
|
||||
- Windows can now accept files via native drag and drop. See the Drag and Drop
|
||||
section for more details.
|
||||
|
||||
## ClipBoard
|
||||
|
||||
The clipboard API has been simplified. There is now a single `Clipboard` object
|
||||
that can be used to read and write to the clipboard. The `Clipboard` object is
|
||||
available in both Go and JS. `SetText()` to set the text and `Text()` to get the
|
||||
text.
|
||||
|
||||
## Bindings
|
||||
|
||||
Bindings work in a similar way to v2, by providing a means to bind struct
|
||||
methods to the frontend. These can be called in the frontend using the binding
|
||||
wrappers generated by the `wails3 generate bindings` command:
|
||||
|
||||
```javascript
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
import { main } from "./models";
|
||||
|
||||
window.go = window.go || {};
|
||||
window.go.main = {
|
||||
GreetService: {
|
||||
/**
|
||||
* GreetService.Greet
|
||||
* Greet greets a person
|
||||
* @param name {string}
|
||||
* @returns {Promise<string>}
|
||||
**/
|
||||
Greet: function (name) {
|
||||
wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0));
|
||||
},
|
||||
|
||||
/**
|
||||
* GreetService.GreetPerson
|
||||
* GreetPerson greets a person
|
||||
* @param person {main.Person}
|
||||
* @returns {Promise<string>}
|
||||
**/
|
||||
GreetPerson: function (person) {
|
||||
wails.CallByID(4021313248, ...Array.prototype.slice.call(arguments, 0));
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
Bound methods are obfuscated by default, and are identified using uint32 IDs,
|
||||
calculated using the
|
||||
[FNV hashing algorithm](https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function).
|
||||
This is to prevent the method name from being exposed in production builds. In
|
||||
debug mode, the method IDs are logged along with the calculated ID of the method
|
||||
to aid in debugging. If you wish to add an extra layer of obfuscation, you can
|
||||
use the `BindAliases` option. This allows you to specify a map of alias IDs to
|
||||
method IDs. When the frontend calls a method using an ID, the method ID will be
|
||||
looked up in the alias map first for a match. If it does not find it, it assumes
|
||||
it's a standard method ID and tries to find the method in the usual way.
|
||||
|
||||
Example:
|
||||
|
||||
```go
|
||||
app := application.New(application.Options{
|
||||
Bind: []any{
|
||||
&GreetService{},
|
||||
},
|
||||
BindAliases: map[uint32]uint32{
|
||||
1: 1411160069,
|
||||
2: 4021313248,
|
||||
},
|
||||
Assets: application.AssetOptions{
|
||||
FS: assets,
|
||||
},
|
||||
Mac: application.MacOptions{
|
||||
ApplicationShouldTerminateAfterLastWindowClosed: true,
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
We can now call using this alias in the frontend: `wails.Call(1, "world!")`.
|
||||
|
||||
### Insecure calls
|
||||
|
||||
If you don't mind your calls being available in plain text in your binary and
|
||||
have no intention of using [garble](https://github.com/burrowers/garble), then
|
||||
you can use the insecure `wails.CallByName()` method. This method takes the
|
||||
fully qualified name of the method to call and the arguments to pass to it.
|
||||
Example:
|
||||
|
||||
```go
|
||||
wails.CallByName("main.GreetService.Greet", "world!")
|
||||
```
|
||||
|
||||
!!! danger
|
||||
|
||||
This is only provided as a convenience method for development. It is not recommended to use this in production.
|
||||
|
||||
## Dialogs
|
||||
|
||||
Dialogs are now available in JavaScript!
|
||||
|
||||
### Windows
|
||||
|
||||
Dialog buttons in Windows are not configurable and are constant depending on the
|
||||
type of dialog. To trigger a callback when a button is pressed, create a button
|
||||
with the same name as the button you wish to have the callback attached to.
|
||||
Example: Create a button with the label `Ok` and use `OnClick()` to set the
|
||||
callback method:
|
||||
|
||||
```go
|
||||
dialog := app.QuestionDialog().
|
||||
SetTitle("Update").
|
||||
SetMessage("The cancel button is selected when pressing escape")
|
||||
ok := dialog.AddButton("Ok")
|
||||
ok.OnClick(func() {
|
||||
// Do something
|
||||
})
|
||||
no := dialog.AddButton("Cancel")
|
||||
dialog.SetDefaultButton(ok)
|
||||
dialog.SetCancelButton(no)
|
||||
dialog.Show()
|
||||
```
|
||||
|
||||
## Drag and Drop
|
||||
|
||||
Native drag and drop can be enabled per-window. Simply set the
|
||||
`EnableDragAndDrop` window config option to `true` and the window will allow
|
||||
files to be dragged onto it. When this happens, the `events.FilesDropped` event
|
||||
will be emitted. The filenames can then be retrieved from the
|
||||
`WindowEvent.Context()` using the `DroppedFiles()` method. This returns a slice
|
||||
of strings containing the filenames.
|
||||
|
||||
## Context Menus
|
||||
|
||||
Context menus are contextual menus that are shown when the user right-clicks on
|
||||
an element. Creating a context menu is the same as creating a standard menu , by
|
||||
using `app.NewMenu()`. To make the context menu available to a window, call
|
||||
`window.RegisterContextMenu(name, menu)`. The name will be the id of the context
|
||||
menu and used by the frontend.
|
||||
|
||||
To indicate that an element has a context menu, add the `data-contextmenu`
|
||||
attribute to the element. The value of this attribute should be the name of a
|
||||
context menu previously registered with the window.
|
||||
|
||||
It is possible to register a context menu at the application level, making it
|
||||
available to all windows. This can be done using
|
||||
`app.RegisterContextMenu(name, menu)`. If a context menu cannot be found at the
|
||||
window level, the application context menus will be checked. A demo of this can
|
||||
be found in `v3/examples/contextmenus`.
|
||||
|
||||
## Wails Markup Language (WML)
|
||||
|
||||
The Wails Markup Language is a simple markup language that allows you to add
|
||||
functionality to standard HTML elements without the use of Javascript.
|
||||
|
||||
The following tags are currently supported:
|
||||
|
||||
### `data-wml-event`
|
||||
|
||||
This specifies that a Wails event will be emitted when the element is clicked.
|
||||
The value of the attribute should be the name of the event to emit.
|
||||
|
||||
Example:
|
||||
|
||||
```html
|
||||
<button data-wml-event="myevent">Click Me</button>
|
||||
```
|
||||
|
||||
Sometimes you need the user to confirm an action. This can be done by adding the
|
||||
`data-wml-confirm` attribute to the element. The value of this attribute will be
|
||||
the message to display to the user.
|
||||
|
||||
Example:
|
||||
|
||||
```html
|
||||
<button data-wml-event="delete-all-items" data-wml-confirm="Are you sure?">
|
||||
Delete All Items
|
||||
</button>
|
||||
```
|
||||
|
||||
### `data-wml-window`
|
||||
|
||||
Any `wails.window` method can be called by adding the `data-wml-window`
|
||||
attribute to an element. The value of the attribute should be the name of the
|
||||
method to call. The method name should be in the same case as the method.
|
||||
|
||||
```html
|
||||
<button data-wml-window="Close">Close Window</button>
|
||||
```
|
||||
|
||||
### `data-wml-trigger`
|
||||
|
||||
This attribute specifies which javascript event should trigger the action. The
|
||||
default is `click`.
|
||||
|
||||
```html
|
||||
<button data-wml-event="hover-box" data-wml-trigger="mouseover">
|
||||
Hover over me!
|
||||
</button>
|
||||
```
|
||||
|
||||
## Systray
|
||||
|
||||
Wails 3 comes with a built-in systray. This is a fully featured systray that has
|
||||
been designed to be as simple as possible to use. It is possible to set the
|
||||
icon, tooltip and menu of the systray. It is possible to also "attach" a window
|
||||
to the systray. Doing this will provide the following functionality:
|
||||
|
||||
- Clicking the systray icon with toggle the window visibility
|
||||
- Right-clicking the systray will open the menu, if there is one
|
||||
|
||||
On macOS, if there is no attached window, the systray will use the default
|
||||
method of displaying the menu (any button). If there is an attached window but
|
||||
no menu, the systray will toggle the window regardless of the button pressed.
|
||||
|
||||
## Plugins
|
||||
|
||||
Plugins are a way to extend the functionality of your Wails application.
|
||||
|
||||
### Creating a plugin
|
||||
|
||||
Plugins are standard Go structure that adhere to the following interface:
|
||||
|
||||
```go
|
||||
type Plugin interface {
|
||||
Name() string
|
||||
Init(*application.App) error
|
||||
Shutdown()
|
||||
CallableByJS() []string
|
||||
InjectJS() string
|
||||
}
|
||||
```
|
||||
|
||||
The `Name()` method returns the name of the plugin. This is used for logging
|
||||
purposes.
|
||||
|
||||
The `Init(*application.App) error` method is called when the plugin is loaded.
|
||||
The `*application.App` parameter is the application that the plugin is being
|
||||
loaded into. Any errors will prevent the application from starting.
|
||||
|
||||
The `Shutdown()` method is called when the application is shutting down.
|
||||
|
||||
The `CallableByJS()` method returns a list of exported functions that can be
|
||||
called from the frontend. These method names must exactly match the names of the
|
||||
methods exported by the plugin.
|
||||
|
||||
The `InjectJS()` method returns JavaScript that should be injected into all
|
||||
windows as they are created. This is useful for adding custom JavaScript
|
||||
functions that complement the plugin.
|
||||
|
||||
### Tips
|
||||
|
||||
#### Enums
|
||||
|
||||
In Go, enums are often defined as a type and a set of constants. For example:
|
||||
|
||||
```go
|
||||
type MyEnum int
|
||||
|
||||
const (
|
||||
MyEnumOne MyEnum = iota
|
||||
MyEnumTwo
|
||||
MyEnumThree
|
||||
)
|
||||
```
|
||||
|
||||
Due to incompatibility between Go and JavaScript, custom types cannot be used in
|
||||
this way. The best strategy is to use a type alias for float64:
|
||||
|
||||
```go
|
||||
type MyEnum = float64
|
||||
|
||||
const (
|
||||
MyEnumOne MyEnum = iota
|
||||
MyEnumTwo
|
||||
MyEnumThree
|
||||
)
|
||||
```
|
||||
|
||||
In Javascript, you can then use the following:
|
||||
|
||||
```js
|
||||
const MyEnum = {
|
||||
MyEnumOne: 0,
|
||||
MyEnumTwo: 1,
|
||||
MyEnumThree: 2,
|
||||
};
|
||||
```
|
||||
|
||||
- Why use `float64`? Can't we use `int`?
|
||||
- Because JavaScript doesn't have a concept of `int`. Everything is a
|
||||
`number`, which translates to `float64` in Go. There are also restrictions
|
||||
on casting types in Go's reflection package, which means using `int` doesn't
|
||||
work.
|
||||
|
||||
### BackgroundColour
|
||||
|
||||
In v2, this was a pointer to an `RGBA` struct. In v3, this is an `RGBA` struct
|
||||
value.
|
||||
|
||||
### WindowIsTranslucent
|
||||
|
||||
This flag has been removed. Now there is a `BackgroundType` flag that can be
|
||||
used to set the type of background the window should have. This flag can be set
|
||||
to any of the following values:
|
||||
|
||||
- `BackgroundTypeSolid` - The window will have a solid background
|
||||
- `BackgroundTypeTransparent` - The window will have a transparent background
|
||||
- `BackgroundTypeTranslucent` - The window will have a translucent background
|
||||
|
||||
On Windows, if the `BackgroundType` is set to `BackgroundTypeTranslucent`, the
|
||||
type of translucency can be set using the `BackdropType` flag in the
|
||||
`WindowsWindow` options. This can be set to any of the following values:
|
||||
|
||||
- `Auto` - The window will use an effect determined by the system
|
||||
- `None` - The window will have no background
|
||||
- `Mica` - The window will use the Mica effect
|
||||
- `Acrylic` - The window will use the acrylic effect
|
||||
- `Tabbed` - The window will use the tabbed effect
|
||||
|
||||
## Windows Application Options
|
||||
|
||||
### WndProcInterceptor
|
||||
|
||||
If this is set, the WndProc will be intercepted and the function will be called.
|
||||
This allows you to handle Windows messages directly. The function should have
|
||||
the following signature:
|
||||
|
||||
```go
|
||||
func(hwnd uintptr, msg uint32, wParam, lParam uintptr) (returnValue uintptr, shouldReturn)
|
||||
```
|
||||
|
||||
The `shouldReturn` value should be set to `true` if the returnValue should be
|
||||
returned by the main wndProc method. If it is set to `false`, the return value
|
||||
will be ignored and the message will continue to be processed by the main
|
||||
wndProc method.
|
||||
|
||||
## Hide Window on Close + OnBeforeClose
|
||||
|
||||
In v2, there was the `HideWindowOnClose` flag to hide the window when it closed.
|
||||
There was a logical overlap between this flag and the `OnBeforeClose` callback.
|
||||
In v3, the `HideWindowOnClose` flag has been removed and the `OnBeforeClose`
|
||||
callback has been renamed to `ShouldClose`. The `ShouldClose` callback is called
|
||||
when the user attempts to close a window. If the callback returns `true`, the
|
||||
window will close. If it returns `false`, the window will not close. This can be
|
||||
used to hide the window instead of closing it.
|
||||
|
||||
## Window Drag
|
||||
|
||||
In v2, the `--wails-drag` attribute was used to indicate that an element could
|
||||
be used to drag the window. In v3, this has been replaced with
|
||||
`--webkit-app-region` to be more in line with the way other frameworks handle
|
||||
this. The `--webkit-app-region` attribute can be set to any of the following
|
||||
values:
|
||||
|
||||
- `drag` - The element can be used to drag the window
|
||||
- `no-drag` - The element cannot be used to drag the window
|
||||
|
||||
We would have ideally liked to use `app-region`, however this is not supported
|
||||
by the `getComputedStyle` call on webkit on macOS.
|
||||
|
|
@ -1,209 +0,0 @@
|
|||
# Introduction
|
||||
|
||||
!!! note This guide is a work in progress.
|
||||
|
||||
Thanks for wanting to help out with development of Wails! This guide will help
|
||||
you get started.
|
||||
|
||||
## Getting Started
|
||||
|
||||
- Git clone this repository. Checkout the `v3-alpha` branch.
|
||||
- Install the CLI: `cd v3/cmd/wails3 && go install`
|
||||
|
||||
- Optional: If you are wanting to use the build system to build frontend code,
|
||||
you will need to install [npm](https://nodejs.org/en/download).
|
||||
|
||||
## Building
|
||||
|
||||
For simple programs, you can use the standard `go build` command. It's also
|
||||
possible to use `go run`.
|
||||
|
||||
Wails also comes with a build system that can be used to build more complex
|
||||
projects. It utilises the awesome [Task](https://taskfile.dev) build system. For
|
||||
more information, check out the task homepage or run `wails task --help`.
|
||||
|
||||
## Project layout
|
||||
|
||||
The project has the following structure:
|
||||
|
||||
```
|
||||
v3
|
||||
├── cmd/wails3 // CLI
|
||||
├── examples // Examples of Wails apps
|
||||
├── internal // Internal packages
|
||||
| ├── runtime // The Wails JS runtime
|
||||
| └── templates // The supported project templates
|
||||
├── pkg
|
||||
| ├── application // The core Wails library
|
||||
| └── events // The event definitions
|
||||
| └── mac // macOS specific code used by plugins
|
||||
| └── w32 // Windows specific code
|
||||
├── plugins // Supported plugins
|
||||
├── tasks // General tasks
|
||||
└── Taskfile.yaml // Development tasks configuration
|
||||
```
|
||||
|
||||
## Development
|
||||
|
||||
### Adding window functionality
|
||||
|
||||
The preferred way to add window functionality is to add a new function to the
|
||||
`pkg/application/webview_window.go` file. This should implement all the
|
||||
functionality required for all platforms. Any platform specific code should be
|
||||
called via a `webviewWindowImpl` interface method. This interface is implemented
|
||||
by each of the target platforms to provide the platform specific functionality.
|
||||
In some cases, this may do nothing. Once you've added the interface method,
|
||||
ensure each platform implements it. A good example of this is the `SetMinSize`
|
||||
method.
|
||||
|
||||
- Mac: `webview_window_darwin.go`
|
||||
- Windows: `webview_window_windows.go`
|
||||
- Linux: `webview_window_linux.go`
|
||||
|
||||
Most, if not all, of the platform specific code should be run on the main
|
||||
thread. To simplify this, there are a number of `invokeSync` methods defined in
|
||||
`application.go`.
|
||||
|
||||
### Updating the runtime
|
||||
|
||||
The runtime is located in `v3/internal/runtime`. When the runtime is updated,
|
||||
the following steps need to be taken:
|
||||
|
||||
```shell
|
||||
wails3 task runtime:build
|
||||
```
|
||||
|
||||
### Events
|
||||
|
||||
Events are defined in `v3/pkg/events`. When adding a new event, the following
|
||||
steps need to be taken:
|
||||
|
||||
- Add the event to the `events.txt` file
|
||||
- Run `wails3 task events:generate`
|
||||
|
||||
There are a number of types of events: platform specific application and window
|
||||
events + common events. The common events are useful for cross-platform event
|
||||
handling, but you aren't limited to the "lowest common denominator". You can use
|
||||
the platform specific events if you need to.
|
||||
|
||||
When adding a common event, ensure that the platform specific events are mapped.
|
||||
An example of this is in `window_webview_darwin.go`:
|
||||
|
||||
```go
|
||||
// Translate ShouldClose to common WindowClosing event
|
||||
w.parent.On(events.Mac.WindowShouldClose, func(_ *WindowEventContext) {
|
||||
w.parent.emit(events.Common.WindowClosing)
|
||||
})
|
||||
```
|
||||
|
||||
NOTE: We may try to automate this in the future by adding the mapping to the
|
||||
event definition.
|
||||
|
||||
### Plugins
|
||||
|
||||
Plugins are a way to extend the functionality of your Wails application.
|
||||
|
||||
#### Creating a plugin
|
||||
|
||||
Plugins are standard Go structure that adhere to the following interface:
|
||||
|
||||
```go
|
||||
type Plugin interface {
|
||||
Name() string
|
||||
Init(*application.App) error
|
||||
Shutdown()
|
||||
CallableByJS() []string
|
||||
InjectJS() string
|
||||
}
|
||||
```
|
||||
|
||||
The `Name()` method returns the name of the plugin. This is used for logging
|
||||
purposes.
|
||||
|
||||
The `Init(*application.App) error` method is called when the plugin is loaded.
|
||||
The `*application.App` parameter is the application that the plugin is being
|
||||
loaded into. Any errors will prevent the application from starting.
|
||||
|
||||
The `Shutdown()` method is called when the application is shutting down.
|
||||
|
||||
The `CallableByJS()` method returns a list of exported functions that can be
|
||||
called from the frontend. These method names must exactly match the names of the
|
||||
methods exported by the plugin.
|
||||
|
||||
The `InjectJS()` method returns JavaScript that should be injected into all
|
||||
windows as they are created. This is useful for adding custom JavaScript
|
||||
functions that complement the plugin.
|
||||
|
||||
The built-in plugins can be found in the `v3/plugins` directory.
|
||||
Check them out for inspiration.
|
||||
|
||||
## Tasks
|
||||
|
||||
The Wails CLI uses the [Task](https://taskfile.dev) build system. It is imported
|
||||
as a library and used to run the tasks defined in `Taskfile.yaml`. The main
|
||||
interfacing with Task happens in `v3/internal/commands/task.go`.
|
||||
|
||||
### Upgrading Taskfile
|
||||
|
||||
To check if there's an upgrade for Taskfile, run `wails3 task -version` and
|
||||
check against the Task website.
|
||||
|
||||
To upgrade the version of Taskfile used, run:
|
||||
|
||||
```shell
|
||||
wails3 task taskfile:upgrade
|
||||
```
|
||||
|
||||
If there are incompatibilities then they should appear in the
|
||||
`v3/internal/commands/task.go` file.
|
||||
|
||||
Usually the best way to fix incompatibilities is to clone the task repo at
|
||||
`https://github.com/go-task/task` and look at the git history to determine what
|
||||
has changed and why.
|
||||
|
||||
To check all changes have worked correctly, re-install the CLI and check the
|
||||
version again:
|
||||
|
||||
```shell
|
||||
wails3 task cli:install
|
||||
wails3 task -version
|
||||
```
|
||||
|
||||
## Opening a PR
|
||||
|
||||
Make sure that all PRs have a ticket associated with them providing context to
|
||||
the change. If there is no ticket, please create one first. Ensure that all PRs
|
||||
have updated the CHANGELOG.md file with the changes made. The CHANGELOG.md file
|
||||
is located in the `mkdocs-website/docs` directory.
|
||||
|
||||
## Misc Tasks
|
||||
|
||||
### Upgrading Taskfile
|
||||
|
||||
The Wails CLI uses the [Task](https://taskfile.dev) build system. It is imported
|
||||
as a library and used to run the tasks defined in `Taskfile.yaml`. The main
|
||||
interfacing with Task happens in `v3/internal/commands/task.go`.
|
||||
|
||||
To check if there's an upgrade for Taskfile, run `wails3 task -version` and
|
||||
check against the Task website.
|
||||
|
||||
To upgrade the version of Taskfile used, run:
|
||||
|
||||
```shell
|
||||
wails3 task taskfile:upgrade
|
||||
```
|
||||
|
||||
If there are incompatibilities then they should appear in the
|
||||
`v3/internal/commands/task.go` file.
|
||||
|
||||
Usually the best way to fix incompatibilities is to clone the task repo at
|
||||
`https://github.com/go-task/task` and look at the git history to determine what
|
||||
has changed and why.
|
||||
|
||||
To check all changes have worked correctly, re-install the CLI and check the
|
||||
version again:
|
||||
|
||||
```shell
|
||||
wails3 task cli:install
|
||||
wails3 task -version
|
||||
```
|
||||
|
|
@ -1,388 +0,0 @@
|
|||
# Status
|
||||
|
||||
Status of features in v3.
|
||||
|
||||
!!! note
|
||||
|
||||
This list is a mixture of public and internal API support.<br/>
|
||||
It is not complete and probably not up to date.
|
||||
|
||||
## Known Issues
|
||||
|
||||
- Linux is not yet up to feature parity with Windows/Mac
|
||||
|
||||
## Application
|
||||
|
||||
Application interface methods
|
||||
|
||||
| Method | Windows | Linux | Mac | Notes |
|
||||
|---------------------------------------------------------------|---------|-------|-----|-------|
|
||||
| run() error | Y | Y | Y | |
|
||||
| destroy() | | Y | Y | |
|
||||
| setApplicationMenu(menu \*Menu) | Y | Y | Y | |
|
||||
| name() string | | Y | Y | |
|
||||
| getCurrentWindowID() uint | Y | Y | Y | |
|
||||
| showAboutDialog(name string, description string, icon []byte) | | Y | Y | |
|
||||
| setIcon(icon []byte) | - | Y | Y | |
|
||||
| on(id uint) | | | Y | |
|
||||
| dispatchOnMainThread(fn func()) | Y | Y | Y | |
|
||||
| hide() | Y | Y | Y | |
|
||||
| show() | Y | Y | Y | |
|
||||
| getPrimaryScreen() (\*Screen, error) | | Y | Y | |
|
||||
| getScreens() ([]\*Screen, error) | | Y | Y | |
|
||||
|
||||
## Webview Window
|
||||
|
||||
Webview Window Interface Methods
|
||||
|
||||
| Method | Windows | Linux | Mac | Notes |
|
||||
|----------------------------------------------------|---------|-------|-----|------------------------------------------|
|
||||
| center() | Y | Y | Y | |
|
||||
| close() | y | Y | Y | |
|
||||
| destroy() | | Y | Y | |
|
||||
| execJS(js string) | y | Y | Y | |
|
||||
| focus() | Y | Y | | |
|
||||
| forceReload() | | Y | Y | |
|
||||
| fullscreen() | Y | Y | Y | |
|
||||
| getScreen() (\*Screen, error) | y | Y | Y | |
|
||||
| getZoom() float64 | | Y | Y | |
|
||||
| height() int | Y | Y | Y | |
|
||||
| hide() | Y | Y | Y | |
|
||||
| isFullscreen() bool | Y | Y | Y | |
|
||||
| isMaximised() bool | Y | Y | Y | |
|
||||
| isMinimised() bool | Y | Y | Y | |
|
||||
| maximise() | Y | Y | Y | |
|
||||
| minimise() | Y | Y | Y | |
|
||||
| nativeWindowHandle() (uintptr, error) | Y | Y | | |
|
||||
| on(eventID uint) | y | | Y | |
|
||||
| openContextMenu(menu *Menu, data *ContextMenuData) | y | | Y | |
|
||||
| relativePosition() (int, int) | Y | Y | Y | |
|
||||
| reload() | y | Y | Y | |
|
||||
| run() | Y | Y | Y | |
|
||||
| setAlwaysOnTop(alwaysOnTop bool) | Y | Y | Y | |
|
||||
| setBackgroundColour(color RGBA) | Y | Y | Y | |
|
||||
| setEnabled(bool) | | Y | Y | |
|
||||
| setFrameless(bool) | | Y | Y | |
|
||||
| setFullscreenButtonEnabled(enabled bool) | - | Y | Y | There is no fullscreen button in Windows |
|
||||
| setHTML(html string) | Y | Y | Y | |
|
||||
| setMaxSize(width, height int) | Y | Y | Y | |
|
||||
| setMinSize(width, height int) | Y | Y | Y | |
|
||||
| setRelativePosition(x int, y int) | Y | Y | Y | |
|
||||
| setResizable(resizable bool) | Y | Y | Y | |
|
||||
| setSize(width, height int) | Y | Y | Y | |
|
||||
| setTitle(title string) | Y | Y | Y | |
|
||||
| setURL(url string) | Y | Y | Y | |
|
||||
| setZoom(zoom float64) | Y | Y | Y | |
|
||||
| show() | Y | Y | Y | |
|
||||
| size() (int, int) | Y | Y | Y | |
|
||||
| toggleDevTools() | Y | Y | Y | |
|
||||
| unfullscreen() | Y | Y | Y | |
|
||||
| unmaximise() | Y | Y | Y | |
|
||||
| unminimise() | Y | Y | Y | |
|
||||
| width() int | Y | Y | Y | |
|
||||
| zoom() | | Y | Y | |
|
||||
| zoomIn() | Y | Y | Y | |
|
||||
| zoomOut() | Y | Y | Y | |
|
||||
| zoomReset() | Y | Y | Y | |
|
||||
|
||||
## Runtime
|
||||
|
||||
### Application
|
||||
|
||||
| Feature | Windows | Linux | Mac | Notes |
|
||||
|---------|---------|-------|-----|-------|
|
||||
| Quit | Y | Y | Y | |
|
||||
| Hide | Y | | Y | |
|
||||
| Show | Y | | Y | |
|
||||
|
||||
### Dialogs
|
||||
|
||||
| Feature | Windows | Linux | Mac | Notes |
|
||||
|----------|---------|-------|-----|-------|
|
||||
| Info | Y | Y | Y | |
|
||||
| Warning | Y | Y | Y | |
|
||||
| Error | Y | Y | Y | |
|
||||
| Question | Y | Y | Y | |
|
||||
| OpenFile | Y | | Y | |
|
||||
| SaveFile | Y | | Y | |
|
||||
|
||||
### Clipboard
|
||||
|
||||
| Feature | Windows | Linux | Mac | Notes |
|
||||
|---------|---------|-------|-----|-------|
|
||||
| SetText | Y | | Y | |
|
||||
| Text | Y | | Y | |
|
||||
|
||||
### ContextMenu
|
||||
|
||||
| Feature | Windows | Linux | Mac | Notes |
|
||||
|------------------|---------|-------|-----|-------|
|
||||
| OpenContextMenu | Y | | Y | |
|
||||
| On By Default | | | | |
|
||||
| Control via HTML | Y | | | |
|
||||
|
||||
The default context menu is enabled by default for all elements that are
|
||||
`contentEditable: true`, `<input>` or `<textarea>` tags or have the
|
||||
`--default-contextmenu: true` style set. The `--default-contextmenu: show` style
|
||||
will always show the context menu The `--default-contextmenu: hide` style will
|
||||
always hide the context menu
|
||||
|
||||
Anything nested under a tag with `--default-contextmenu: hide` style will not
|
||||
show the context menu unless it is explicitly set with
|
||||
`--default-contextmenu: show`.
|
||||
|
||||
### Screens
|
||||
|
||||
| Feature | Windows | Linux | Mac | Notes |
|
||||
|------------|---------|-------|-----|-------|
|
||||
| GetAll | Y | Y | Y | |
|
||||
| GetPrimary | Y | Y | Y | |
|
||||
| GetCurrent | Y | Y | Y | |
|
||||
|
||||
### System
|
||||
|
||||
| Feature | Windows | Linux | Mac | Notes |
|
||||
|------------|---------|-------|-----|-------|
|
||||
| IsDarkMode | | | Y | |
|
||||
|
||||
### Window
|
||||
|
||||
Y = Supported U = Untested
|
||||
|
||||
- = Not available
|
||||
|
||||
| Feature | Windows | Linux | Mac | Notes |
|
||||
|---------------------|---------|-------|-----|--------------------------------------------------------------------------------------|
|
||||
| Center | Y | Y | Y | |
|
||||
| Focus | Y | Y | | |
|
||||
| FullScreen | Y | Y | Y | |
|
||||
| GetZoom | Y | Y | Y | Get current view scale |
|
||||
| Height | Y | Y | Y | |
|
||||
| Hide | Y | Y | Y | |
|
||||
| Maximise | Y | Y | Y | |
|
||||
| Minimise | Y | Y | Y | |
|
||||
| RelativePosition | Y | Y | Y | |
|
||||
| Screen | Y | Y | Y | Get screen for window |
|
||||
| SetAlwaysOnTop | Y | Y | Y | |
|
||||
| SetBackgroundColour | Y | Y | Y | https://github.com/MicrosoftEdge/WebView2Feedback/issues/1621#issuecomment-938234294 |
|
||||
| SetEnabled | Y | U | - | Set the window to be enabled/disabled |
|
||||
| SetMaxSize | Y | Y | Y | |
|
||||
| SetMinSize | Y | Y | Y | |
|
||||
| SetRelativePosition | Y | Y | Y | |
|
||||
| SetResizable | Y | Y | Y | |
|
||||
| SetSize | Y | Y | Y | |
|
||||
| SetTitle | Y | Y | Y | |
|
||||
| SetZoom | Y | Y | Y | Set view scale |
|
||||
| Show | Y | Y | Y | |
|
||||
| Size | Y | Y | Y | |
|
||||
| UnFullscreen | Y | Y | Y | |
|
||||
| UnMaximise | Y | Y | Y | |
|
||||
| UnMinimise | Y | Y | Y | |
|
||||
| Width | Y | Y | Y | |
|
||||
| ZoomIn | Y | Y | Y | Increase view scale |
|
||||
| ZoomOut | Y | Y | Y | Decrease view scale |
|
||||
| ZoomReset | Y | Y | Y | Reset view scale |
|
||||
|
||||
### Window Options
|
||||
|
||||
A 'Y' in the table below indicates that the option has been tested and is
|
||||
applied when the window is created. An 'X' indicates that the option is not
|
||||
supported by the platform.
|
||||
|
||||
| Feature | Windows | Linux | Mac | Notes |
|
||||
|---------------------------------|---------|-------|-----|--------------------------------------------|
|
||||
| AlwaysOnTop | Y | | | |
|
||||
| BackgroundColour | Y | Y | | |
|
||||
| BackgroundType | | | | Acrylic seems to work but the others don't |
|
||||
| CSS | Y | Y | | |
|
||||
| DevToolsEnabled | Y | Y | Y | |
|
||||
| DisableResize | Y | Y | | |
|
||||
| EnableDragAndDrop | | Y | | |
|
||||
| EnableFraudulentWebsiteWarnings | | | | |
|
||||
| Focused | Y | Y | | |
|
||||
| Frameless | Y | Y | | |
|
||||
| FullscreenButtonEnabled | Y | | | |
|
||||
| Height | Y | Y | | |
|
||||
| Hidden | Y | Y | | |
|
||||
| HTML | Y | Y | | |
|
||||
| JS | Y | Y | | |
|
||||
| Mac | - | - | | |
|
||||
| MaxHeight | Y | Y | | |
|
||||
| MaxWidth | Y | Y | | |
|
||||
| MinHeight | Y | Y | | |
|
||||
| MinWidth | Y | Y | | |
|
||||
| Name | Y | Y | | |
|
||||
| OpenInspectorOnStartup | | | | |
|
||||
| StartState | Y | | | |
|
||||
| Title | Y | Y | | |
|
||||
| URL | Y | Y | | |
|
||||
| Width | Y | Y | | |
|
||||
| Windows | Y | - | - | |
|
||||
| X | Y | Y | | |
|
||||
| Y | Y | Y | | |
|
||||
| Zoom | | | | |
|
||||
| ZoomControlEnabled | | | | |
|
||||
|
||||
### Log
|
||||
|
||||
To log or not to log? System logger vs custom logger.
|
||||
|
||||
## Menu
|
||||
|
||||
| Event | Windows | Linux | Mac | Notes |
|
||||
|--------------------------|---------|-------|-----|-------|
|
||||
| Default Application Menu | Y | Y | Y | |
|
||||
|
||||
## Tray Menus
|
||||
|
||||
| Feature | Windows | Linux | Mac | Notes |
|
||||
|--------------------|---------|-------|-----|----------------------------------------------------------------------|
|
||||
| Icon | Y | | Y | Windows has default icons for light/dark mode & supports PNG or ICO. |
|
||||
| Label | - | | Y | |
|
||||
| Label (ANSI Codes) | - | | | |
|
||||
| Menu | Y | | Y | |
|
||||
|
||||
### Methods
|
||||
|
||||
| Method | Windows | Linux | Mac | Notes |
|
||||
|-------------------------------|---------|-------|-----|-------|
|
||||
| setLabel(label string) | - | | Y | |
|
||||
| run() | Y | | Y | |
|
||||
| setIcon(icon []byte) | Y | | Y | |
|
||||
| setMenu(menu \*Menu) | Y | | Y | |
|
||||
| setIconPosition(position int) | - | | Y | |
|
||||
| setTemplateIcon(icon []byte) | - | | Y | |
|
||||
| destroy() | Y | | Y | |
|
||||
| setDarkModeIcon(icon []byte) | Y | | Y | |
|
||||
|
||||
## Cross Platform Events
|
||||
|
||||
Mapping native events to cross-platform events.
|
||||
|
||||
| Event | Windows | Linux | Mac | Notes |
|
||||
|--------------------------|---------|-------|-----------------|-------|
|
||||
| WindowWillClose | | | WindowWillClose | |
|
||||
| WindowDidClose | | | | |
|
||||
| WindowDidResize | | | | |
|
||||
| WindowDidHide | | | | |
|
||||
| ApplicationWillTerminate | | | | |
|
||||
|
||||
... Add more
|
||||
|
||||
## Bindings Generation
|
||||
|
||||
Working well.
|
||||
|
||||
## Models Generation
|
||||
|
||||
Working well.
|
||||
|
||||
## Task file
|
||||
|
||||
Contains a lot needed for development.
|
||||
|
||||
## Theme
|
||||
|
||||
| Mode | Windows | Linux | Mac | Notes |
|
||||
|--------|---------|-------|-----|-------|
|
||||
| Dark | Y | | | |
|
||||
| Light | Y | | | |
|
||||
| System | Y | | | |
|
||||
|
||||
## NSIS Installer
|
||||
|
||||
TBD
|
||||
|
||||
## Templates
|
||||
|
||||
All templates are working.
|
||||
|
||||
## Plugins
|
||||
|
||||
Built-in plugin support:
|
||||
|
||||
| Plugin | Windows | Linux | Mac | Notes |
|
||||
|-----------------|---------|-------|-----|-------|
|
||||
| Browser | Y | | Y | |
|
||||
| KV Store | Y | Y | Y | |
|
||||
| Log | Y | Y | Y | |
|
||||
| Single Instance | Y | | Y | |
|
||||
| SQLite | Y | Y | Y | |
|
||||
| Start at login | Y | | Y | |
|
||||
| Server | | | | |
|
||||
|
||||
TODO:
|
||||
|
||||
- Ensure each plugin has a JS wrapper that can be injected into the window.
|
||||
|
||||
## Packaging
|
||||
|
||||
| | Windows | Linux | Mac | Notes |
|
||||
|-----------------|---------|-------|-----|-------|
|
||||
| Icon Generation | Y | | Y | |
|
||||
| Icon Embedding | Y | | Y | |
|
||||
| Info.plist | - | | Y | |
|
||||
| NSIS Installer | | | - | |
|
||||
| Mac bundle | - | | Y | |
|
||||
| Windows exe | Y | | - | |
|
||||
|
||||
## Frameless Windows
|
||||
|
||||
| Feature | Windows | Linux | Mac | Notes |
|
||||
|---------|---------|-------|-----|------------------------------------------------|
|
||||
| Resize | Y | | Y | |
|
||||
| Drag | Y | Y | Y | Linux - can always drag with `Meta`+left mouse |
|
||||
|
||||
## Mac Specific
|
||||
|
||||
- [x] Translucency
|
||||
|
||||
### Mac Options
|
||||
|
||||
| Feature | Default | Notes |
|
||||
|-------------------------|-------------------|------------------------------------------------------|
|
||||
| Backdrop | MacBackdropNormal | Standard solid window |
|
||||
| DisableShadow | false | |
|
||||
| TitleBar | | Standard window decorations by default |
|
||||
| Appearance | DefaultAppearance | |
|
||||
| InvisibleTitleBarHeight | 0 | Creates an invisible title bar for frameless windows |
|
||||
| DisableShadow | false | Disables the window drop shadow |
|
||||
|
||||
## Windows Specific
|
||||
|
||||
- [x] Translucency
|
||||
- [x] Custom Themes
|
||||
|
||||
### Windows Options
|
||||
|
||||
| Feature | Default | Notes |
|
||||
|-----------------------------------|---------------|---------------------------------------------|
|
||||
| BackdropType | Solid | |
|
||||
| DisableIcon | false | |
|
||||
| Theme | SystemDefault | |
|
||||
| CustomTheme | nil | |
|
||||
| DisableFramelessWindowDecorations | false | |
|
||||
| WindowMask | nil | Makes the window the contents of the bitmap |
|
||||
|
||||
## Linux Specific
|
||||
|
||||
Implementation details for the functions utilized by the `*_linux.go` files are
|
||||
located in the following files:
|
||||
|
||||
- linux_cgo.go: CGo implementation
|
||||
- linux_purego.go: PureGo implementation
|
||||
|
||||
### CGO
|
||||
|
||||
By default CGO is utilized to compile the Linux port. This prevents easy
|
||||
cross-compilation and so the PureGo implementation is also being simultaneously
|
||||
developed.
|
||||
|
||||
### Purego
|
||||
|
||||
The examples can be compiled using the following command:
|
||||
|
||||
CGO_ENABLED=0 go build -tags purego
|
||||
|
||||
Note: things are currently not working after the refactor
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 15 KiB |
|
|
@ -1,58 +0,0 @@
|
|||
# Feedback
|
||||
|
||||
We welcome (and encourage) your feedback! Please search for existing tickets or posts before creating new ones.
|
||||
Here are the different ways to provide feedback:
|
||||
|
||||
=== "Bugs"
|
||||
|
||||
If you find a bug, please let us know by posting into the [v3 Alpha Feedback](https://discord.gg/3mgVyGua) channel on Discord:
|
||||
|
||||
- The post should clearly state what the bug is and have a simple reproducible example. If the docs are unclear what *should* happen, please include that in the post.
|
||||
- The post should be given the `Bug` tag.
|
||||
- Please include the output of `wails doctor` in your post.
|
||||
- *Remember* unexpected behaviour isn't necessarily a bug - it might just not do what you expect it to do. Use [Suggestions](#suggestions) for this.
|
||||
|
||||
=== "Fixes"
|
||||
|
||||
If you have a fix for a bug or an update for documentation, please do the following:
|
||||
|
||||
- Open a pull request on the [Wails repository](https://github.com/wailsapp/wails). The title of the PR should start with `[v3 alpha]`.
|
||||
- Create a post in the [v3 Alpha Feedback](https://discord.gg/3mgVyGua) channel.
|
||||
- The post should be given the `PR` tag.
|
||||
- Please include a link to the PR in your post.
|
||||
|
||||
=== "Suggestions"
|
||||
|
||||
If you have a suggestion, please let us know by posting into the [v3 Alpha Feedback](https://discord.gg/3mgVyGua) channel on Discord:
|
||||
|
||||
- The post should be given the `Suggestion` tag.
|
||||
|
||||
Please feel free to reach out to us on [Discord](https://discord.gg/3mgVyGua) if you have any questions.
|
||||
|
||||
=== "Upvoting"
|
||||
|
||||
- Posts can be "upvoted" by using the :thumbsup: emoji. Please apply to any posts that are a priority for you.
|
||||
- Please *don't* just add comments like "+1" or "me too".
|
||||
- Please feel free to comment if there is more to add to the post, such as "this bug also affect ARM builds" or "Another option would be to ....."
|
||||
|
||||
There is a list of known issues & work in progress can be found [here](https://github.com/orgs/wailsapp/projects/6).
|
||||
|
||||
## Things we are looking for feedback on
|
||||
|
||||
- The API
|
||||
- Is it easy to use?
|
||||
- Does it do what you expect?
|
||||
- Is it missing anything?
|
||||
- Is there anything that should be removed?
|
||||
- Is it consistent between Go and JS?
|
||||
- The build system
|
||||
- Is it easy to use?
|
||||
- Can we improve it?
|
||||
- The examples
|
||||
- Are they clear?
|
||||
- Do they cover the basics?
|
||||
- Features
|
||||
- What features are missing?
|
||||
- What features are not needed?
|
||||
- Documentation
|
||||
- What could be clearer?
|
||||
|
|
@ -1,81 +0,0 @@
|
|||
# Installation
|
||||
|
||||
To install the Wails CLI, ensure you have [Go 1.21+](https://go.dev/dl/)
|
||||
installed and run:
|
||||
|
||||
```shell
|
||||
git clone https://github.com/wailsapp/wails.git
|
||||
cd wails
|
||||
git checkout v3-alpha
|
||||
cd v3/cmd/wails3
|
||||
go install
|
||||
```
|
||||
|
||||
## Supported Platforms
|
||||
|
||||
- Windows 10/11 AMD64/ARM64
|
||||
- MacOS 10.13+ AMD64
|
||||
- MacOS 11.0+ ARM64
|
||||
- Ubuntu 22.04 AMD64/ARM64 (other Linux may work too!)
|
||||
|
||||
## Dependencies
|
||||
|
||||
Wails has a number of common dependencies that are required before installation:
|
||||
|
||||
=== "Go 1.21+"
|
||||
|
||||
Download Go from the [Go Downloads Page](https://go.dev/dl/).
|
||||
|
||||
Ensure that you follow the official [Go installation instructions](https://go.dev/doc/install). You will also need to ensure that your `PATH` environment variable also includes the path to your `~/go/bin` directory. Restart your terminal and do the following checks:
|
||||
|
||||
- Check Go is installed correctly: `go version`
|
||||
- Check `~/go/bin` is in your PATH variable: `echo $PATH | grep go/bin`
|
||||
|
||||
=== "npm (Optional)"
|
||||
|
||||
Although Wails doesn't require npm to be installed, it is needed if you want to use the bundled templates.
|
||||
|
||||
Download the latest node installer from the [Node Downloads Page](https://nodejs.org/en/download/). It is best to use the latest release as that is what we generally test against.
|
||||
|
||||
Run `npm --version` to verify.
|
||||
|
||||
=== "Task (Optional)"
|
||||
|
||||
The Wails CLI embeds a task runner called [Task](https://taskfile.dev/#/installation). It is optional, but recommended. If you do not wish to install Task, you can use the `wails3 task` command instead of `task`.
|
||||
Installing Task will give you the greatest flexibility.
|
||||
|
||||
## Platform Specific Dependencies
|
||||
|
||||
You will also need to install platform specific dependencies:
|
||||
|
||||
=== "Mac"
|
||||
|
||||
Wails requires that the xcode command line tools are installed. This can be
|
||||
done by running:
|
||||
|
||||
```
|
||||
xcode-select --install
|
||||
```
|
||||
|
||||
=== "Windows"
|
||||
|
||||
Wails requires that the [WebView2 Runtime](https://developer.microsoft.com/en-us/microsoft-edge/webview2/) is installed. Some Windows installations will already have this installed. You can check using the `wails doctor` command.
|
||||
|
||||
=== "Linux"
|
||||
|
||||
Linux requires the standard `gcc` build tools plus `libgtk3` and `libwebkit`. Rather than list a ton of commands for different distros, Wails can try to determine what the installation commands are for your specific distribution. Run <code>wails doctor</code> after installation to be shown how to install the dependencies. If your distro/package manager is not supported, please let us know on discord.
|
||||
|
||||
## System Check
|
||||
|
||||
Running `wails3 doctor` will check if you have the correct dependencies
|
||||
installed. If not, it will advise on what is missing and help on how to rectify
|
||||
any problems.
|
||||
|
||||
## The `wails3` command appears to be missing?
|
||||
|
||||
If your system is reporting that the `wails3` command is missing, check the
|
||||
following:
|
||||
|
||||
- Make sure you have followed the Go installation guide correctly.
|
||||
- Check that the `go/bin` directory is in the `PATH` environment variable.
|
||||
- Close/Reopen current terminals to pick up the new `PATH` variable.
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
# Next Steps
|
||||
|
||||
Now that you have Wails installed, you can start exploring the alpha version.
|
||||
|
||||
The best place to start is the `examples` directory in the Wails repository.
|
||||
This contains a number of examples that you can run and play with.
|
||||
|
||||
## Running an example
|
||||
|
||||
To run an example, you can simply use:
|
||||
|
||||
```shell
|
||||
go run .
|
||||
```
|
||||
|
||||
in the example directory.
|
||||
|
||||
The status of the examples is on the [roadmap](../roadmap.md).
|
||||
|
||||
## Creating a new project
|
||||
|
||||
To create a new project, you can use the `wails3 init` command. This will create
|
||||
a new project in the current directory.
|
||||
|
||||
Wails3 uses [Task](https://taskfile.dev) as its build system by default,
|
||||
although there is no reason why you can't use your own build system, or use
|
||||
`go build` directly. Wails has the task build system built in and can be run
|
||||
using `wails3 task`.
|
||||
|
||||
If you look through the `Taskfile.yaml` file, you will see that there are a
|
||||
number of tasks defined. The most important one is the `build` task. This is the
|
||||
task that is run when you use `wails3 build`.
|
||||
|
||||
The task file is unlikely to be complete and is subject to change over time.
|
||||
|
||||
## Building a project
|
||||
|
||||
To build a project, you can use the `wails3 build` command. This is a shortcut
|
||||
for `wails3 task build`.
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
---
|
||||
template: home.en.html
|
||||
---
|
||||
|
||||
Welcome to The Wails Project
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
# Roadmap
|
||||
|
||||
The roadmap is a living document and is subject to change. If you have any suggestions, please open an issue.
|
||||
Each milestone will have a set of goals that we are aiming to achieve. These are subject to change.
|
||||
|
||||
## Alpha milestones
|
||||
|
||||
### Alpha 1
|
||||
|
||||
#### Goals
|
||||
|
||||
Alpha 1 is the initial release. It is intended to get feedback on the new API and to get people experimenting with it.
|
||||
The main goal is to get most of the examples working on all platforms.
|
||||
|
||||
#### Status
|
||||
|
||||
- W - Working
|
||||
- P - Partially working
|
||||
- N - Not working
|
||||
|
||||
| Example | Mac | Windows | Linux |
|
||||
|---------------|-----|---------|-------|
|
||||
| binding | W | W | |
|
||||
| build | W | W | |
|
||||
| clipboard | W | W | |
|
||||
| context menus | W | W | |
|
||||
| dialogs | P | W | |
|
||||
| drag-n-drop | W | N | |
|
||||
| events | W | W | |
|
||||
| frameless | W | W | |
|
||||
| keybindings | W | W | |
|
||||
| plain | W | W | |
|
||||
| screen | W | W | |
|
||||
| systray | W | W | |
|
||||
| video | | W | |
|
||||
| window | P | W | |
|
||||
| wml | W | W | |
|
||||
|
||||
- Mac Dialogs work, however the file dialogs issue a warning that needs to be fixed.
|
||||
|
||||
#### TODO:
|
||||
|
||||
- [ ] Fix `+[CATransaction synchronize] called within transaction` warnings on Mac
|
||||
- [ ] When hiding window, application terminates
|
||||
|
||||
### Alpha 2
|
||||
|
||||
- [ ] Most examples working on Linux
|
||||
- [ ] Project creation via `wails init`
|
||||
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
|
||||
[data-md-color-scheme="slate"] {
|
||||
--md-hue: 208;
|
||||
--md-primary-fg-color--light: #ECB7B7;
|
||||
--md-primary-fg-color--dark: #90030C;
|
||||
--md-accent-fg-color: #ff4646;
|
||||
--md-primary-fg-color: #2a2a2a;
|
||||
--md-default-bg-color: #191919;
|
||||
--md-footer-bg-color--dark: #2a2a2a;
|
||||
--md-default-fg-color: #e0e0e0;
|
||||
}
|
||||
|
||||
.md-header__button.md-logo img, .md-header__button.md-logo svg {
|
||||
fill: currentcolor;
|
||||
display: block;
|
||||
height: 2rem;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.md-typeset {
|
||||
font-weight: 100;
|
||||
}
|
||||
|
|
@ -1,337 +0,0 @@
|
|||
# What's new in v3?
|
||||
|
||||
!!! note
|
||||
The features that will be included in the v3 release may change from this list.
|
||||
|
||||
## Multiple Windows
|
||||
|
||||
It's now possible to create multiple windows and configure each one
|
||||
independently.
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
"log"
|
||||
|
||||
"github.com/wailsapp/wails/v3/pkg/application"
|
||||
)
|
||||
|
||||
//go:embed assets/*
|
||||
var assets embed.FS
|
||||
|
||||
func main() {
|
||||
|
||||
app := application.New(application.Options{
|
||||
Name: "Multi Window Demo",
|
||||
Assets: application.AssetOptions{
|
||||
FS: assets,
|
||||
},
|
||||
})
|
||||
|
||||
window1 := app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{
|
||||
Title: "Window 1",
|
||||
})
|
||||
|
||||
window2 := app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{
|
||||
Title: "Window 2",
|
||||
})
|
||||
|
||||
// load the embedded html from the embed.FS
|
||||
window1.SetURL("/")
|
||||
window1.Center()
|
||||
|
||||
// Load an external URL
|
||||
window2.SetURL("https://wails.app")
|
||||
|
||||
err := app.Run()
|
||||
|
||||
if err != nil {
|
||||
log.Fatal(err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
## Systrays
|
||||
|
||||
Systrays allow you to add an icon in the system tray area of your desktop and
|
||||
have the following features:
|
||||
|
||||
- Attach window (the window will be centered to the systray icon)
|
||||
- Full menu support
|
||||
- Light/Dark mode icons
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
"log"
|
||||
"runtime"
|
||||
|
||||
"github.com/wailsapp/wails/v3/pkg/application"
|
||||
"github.com/wailsapp/wails/v3/pkg/icons"
|
||||
)
|
||||
|
||||
func main() {
|
||||
app := application.New(application.Options{
|
||||
Name: "Systray Demo",
|
||||
Mac: application.MacOptions{
|
||||
ActivationPolicy: application.ActivationPolicyAccessory,
|
||||
},
|
||||
})
|
||||
|
||||
window := app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{
|
||||
Width: 500,
|
||||
Height: 800,
|
||||
Frameless: true,
|
||||
AlwaysOnTop: true,
|
||||
Hidden: true,
|
||||
Windows: application.WindowsWindow{
|
||||
HiddenOnTaskbar: true,
|
||||
},
|
||||
})
|
||||
|
||||
systemTray := app.NewSystemTray()
|
||||
|
||||
// Support for template icons on macOS
|
||||
if runtime.GOOS == "darwin" {
|
||||
systemTray.SetTemplateIcon(icons.SystrayMacTemplate)
|
||||
} else {
|
||||
// Support for light/dark mode icons
|
||||
systemTray.SetDarkModeIcon(icons.SystrayDark)
|
||||
systemTray.SetIcon(icons.SystrayLight)
|
||||
}
|
||||
|
||||
// Support for menu
|
||||
myMenu := app.NewMenu()
|
||||
myMenu.Add("Hello World!").OnClick(func(_ *application.Context) {
|
||||
println("Hello World!")
|
||||
})
|
||||
systemTray.SetMenu(myMenu)
|
||||
|
||||
// This will center the window to the systray icon with a 5px offset
|
||||
// It will automatically be shown when the systray icon is clicked
|
||||
// and hidden when the window loses focus
|
||||
systemTray.AttachWindow(window).WindowOffset(5)
|
||||
|
||||
err := app.Run()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
## Plugins
|
||||
|
||||
Plugins allow you to extend the functionality of the Wails system. Not only can
|
||||
plugin methods be used in Go, but also called from Javascript. Included plugins:
|
||||
|
||||
- kvstore - A key/value store
|
||||
- browser - open links in a browser
|
||||
- log - custom logger
|
||||
- oauth - handles oauth authentication and supports 60 providers
|
||||
- single_instance - only allow one copy of your app to be run
|
||||
- sqlite - add a sqlite db to your app. Uses the modernc pure go library
|
||||
- start_at_login - Register/Unregister your application to start at login
|
||||
|
||||
## Improved bindings generation
|
||||
|
||||
v3 uses a new static analyser to generate bindings. This makes it extremely fast
|
||||
and maintains comments and parameter names in your bindings. By default,
|
||||
bindings are generated with calls using IDs instead of strings. This provides a
|
||||
performance boost and allows for using obfuscation tools such as
|
||||
[garble](https://github.com/burrowers/garble).
|
||||
|
||||
Bindings are generated by simply running `wails3 generate bindings` in the
|
||||
project directory.
|
||||
|
||||
```js
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
import { main } from "./models";
|
||||
|
||||
window.go = window.go || {};
|
||||
window.go.main = {
|
||||
GreetService: {
|
||||
/**
|
||||
* GreetService.Greet
|
||||
* Greet greets a person
|
||||
* @param name {string}
|
||||
* @returns {Promise<string>}
|
||||
**/
|
||||
Greet: function (name) {
|
||||
wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0));
|
||||
},
|
||||
|
||||
/**
|
||||
* GreetService.GreetPerson
|
||||
* GreetPerson greets a person
|
||||
* @param person {main.Person}
|
||||
* @returns {Promise<string>}
|
||||
**/
|
||||
GreetPerson: function (person) {
|
||||
wails.CallByID(4021313248, ...Array.prototype.slice.call(arguments, 0));
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
## Improved build system
|
||||
|
||||
In v2, the build system was completely opaque and hard to customise. In v3, it's
|
||||
possible to build everything using standard Go tooling.
|
||||
|
||||
All the heavy lifting that the v2 build system did, such as icon generation,
|
||||
have been added as tool commands in the CLI. We have incorporated
|
||||
[Taskfile](https://taskfile.dev) into the CLI to orchestrate these calls to
|
||||
bring the same developer experience as v2. However, this approach brings the
|
||||
ultimate balance of flexibility and ease of use as you can now customise the
|
||||
build process to your needs.
|
||||
|
||||
You can even use make if that's your thing!
|
||||
|
||||
```yaml title="Snippet from Taskfile.yml"
|
||||
build:darwin:
|
||||
summary: Builds the application
|
||||
platforms:
|
||||
- darwin
|
||||
cmds:
|
||||
- task: pre-build
|
||||
- task: build-frontend
|
||||
- go build -gcflags=all="-N -l" -o bin/{{.APP_NAME}}
|
||||
- task: post-build
|
||||
env:
|
||||
CGO_CFLAGS: "-mmacosx-version-min=10.13"
|
||||
CGO_LDFLAGS: "-mmacosx-version-min=10.13"
|
||||
MACOSX_DEPLOYMENT_TARGET: "10.13"
|
||||
```
|
||||
|
||||
## Improved events
|
||||
|
||||
Events are now emitted for a lot of the runtime operations, allowing you to hook
|
||||
into application/system events. Cross-platform (common) events are also emitted
|
||||
where there are common platform events, allowing you to write the same event
|
||||
handling methods cross platform.
|
||||
|
||||
Event hooks can also be registered. These are like the `On` method but are
|
||||
synchronous and allow you to cancel the event. An example of this would be to
|
||||
show a confirmation dialog before closing a window.
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
"log"
|
||||
"time"
|
||||
|
||||
"github.com/wailsapp/wails/v3/pkg/application"
|
||||
"github.com/wailsapp/wails/v3/pkg/events"
|
||||
)
|
||||
|
||||
//go:embed assets
|
||||
var assets embed.FS
|
||||
|
||||
func main() {
|
||||
|
||||
app := application.New(application.Options{
|
||||
Name: "Events Demo",
|
||||
Description: "A demo of the Events API",
|
||||
Assets: application.AssetOptions{
|
||||
FS: assets,
|
||||
},
|
||||
Mac: application.MacOptions{
|
||||
ApplicationShouldTerminateAfterLastWindowClosed: true,
|
||||
},
|
||||
})
|
||||
|
||||
// Custom event handling
|
||||
app.Events.On("myevent", func(e *application.WailsEvent) {
|
||||
log.Printf("[Go] WailsEvent received: %+v\n", e)
|
||||
})
|
||||
|
||||
// OS specific application events
|
||||
app.On(events.Mac.ApplicationDidFinishLaunching, func(event *application.Event) {
|
||||
println("events.Mac.ApplicationDidFinishLaunching fired!")
|
||||
})
|
||||
|
||||
// Platform agnostic events
|
||||
app.On(events.Common.ApplicationStarted, func(event *application.Event) {
|
||||
println("events.Common.ApplicationStarted fired!")
|
||||
})
|
||||
|
||||
win1 := app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{
|
||||
Title: "Takes 3 attempts to close me!",
|
||||
})
|
||||
|
||||
var countdown = 3
|
||||
|
||||
// Register a hook to cancel the window closing
|
||||
win1.RegisterHook(events.Common.WindowClosing, func(e *application.WindowEvent) {
|
||||
countdown--
|
||||
if countdown == 0 {
|
||||
println("Closing!")
|
||||
return
|
||||
}
|
||||
println("Nope! Not closing!")
|
||||
e.Cancel()
|
||||
})
|
||||
|
||||
win1.On(events.Common.WindowFocus, func(e *application.WindowEvent) {
|
||||
println("[Event] Window focus!")
|
||||
})
|
||||
|
||||
err := app.Run()
|
||||
|
||||
if err != nil {
|
||||
log.Fatal(err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
## Wails Markup Language (wml)
|
||||
|
||||
An experimental feature to call runtime methods using plain html, similar to
|
||||
[htmx](https://htmx.org).
|
||||
|
||||
```html
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Wails ML Demo</title>
|
||||
</head>
|
||||
<body style="margin-top:50px; color: white; background-color: #191919">
|
||||
<h2>Wails ML Demo</h2>
|
||||
<p>This application contains no Javascript!</p>
|
||||
<button wml-event="button-pressed">Press me!</button>
|
||||
<button wml-event="delete-things" wml-confirm="Are you sure?">
|
||||
Delete all the things!
|
||||
</button>
|
||||
<button wml-window="Close" wml-confirm="Are you sure?">
|
||||
Close the Window?
|
||||
</button>
|
||||
<button wml-window="Center">Center</button>
|
||||
<button wml-window="Minimise">Minimise</button>
|
||||
<button wml-window="Maximise">Maximise</button>
|
||||
<button wml-window="UnMaximise">UnMaximise</button>
|
||||
<button wml-window="Fullscreen">Fullscreen</button>
|
||||
<button wml-window="UnFullscreen">UnFullscreen</button>
|
||||
<button wml-window="Restore">Restore</button>
|
||||
<div
|
||||
style="width: 200px; height: 200px; border: 2px solid white;"
|
||||
wml-event="hover"
|
||||
wml-trigger="mouseover"
|
||||
>
|
||||
Hover over me
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
|
@ -1,318 +0,0 @@
|
|||
# 应用程序
|
||||
|
||||
应用程序 API 用于使用 Wails 框架创建应用程序。
|
||||
|
||||
### New
|
||||
|
||||
API:`New(appOptions Options) *App`
|
||||
|
||||
`New(appOptions Options)` 使用给定的应用程序选项创建一个新的应用程序。它对未指定的选项应用默认值,将其与提供的选项合并,然后初始化并返回应用程序的实例。
|
||||
|
||||
如果在初始化过程中出现错误,应用程序将停止,并显示提供的错误消息。
|
||||
|
||||
需要注意的是,如果全局应用程序实例已经存在,将返回该实例,而不是创建新的实例。
|
||||
|
||||
```go title="main.go" hl_lines="6-9"
|
||||
package main
|
||||
|
||||
import "github.com/wailsapp/wails/v3/pkg/application"
|
||||
|
||||
func main() {
|
||||
app := application.New(application.Options{
|
||||
Name: "WebviewWindow Demo",
|
||||
// 其他选项
|
||||
})
|
||||
|
||||
// 其余的应用程序逻辑
|
||||
}
|
||||
```
|
||||
|
||||
### Get
|
||||
|
||||
`Get()` 返回全局应用程序实例。在代码的不同部分需要访问应用程序时非常有用。
|
||||
|
||||
```go
|
||||
// 获取应用程序实例
|
||||
app := application.Get()
|
||||
```
|
||||
|
||||
### Capabilities
|
||||
|
||||
API:`Capabilities() capabilities.Capabilities`
|
||||
|
||||
`Capabilities()` 返回应用程序当前具有的功能的映射。这些功能可以是操作系统提供的不同功能,如 webview 功能。
|
||||
|
||||
```go
|
||||
// 获取应用程序的功能
|
||||
capabilities := app.Capabilities()
|
||||
if capabilities.HasNativeDrag {
|
||||
// 做一些事情
|
||||
}
|
||||
```
|
||||
|
||||
### GetPID
|
||||
|
||||
API:`GetPID() int`
|
||||
|
||||
`GetPID()` 返回应用程序的进程 ID。
|
||||
|
||||
```go
|
||||
pid := app.GetPID()
|
||||
```
|
||||
|
||||
### Run
|
||||
|
||||
API:`Run() error`
|
||||
|
||||
`Run()` 启动应用程序及其组件的执行。
|
||||
|
||||
```go
|
||||
app := application.New(application.Options{
|
||||
// 选项
|
||||
})
|
||||
// 运行应用程序
|
||||
err := application.Run()
|
||||
if err != nil {
|
||||
// 处理错误
|
||||
}
|
||||
```
|
||||
|
||||
### Quit
|
||||
|
||||
API:`Quit()`
|
||||
|
||||
`Quit()` 通过销毁窗口和可能的其他组件退出应用程序。
|
||||
|
||||
```go
|
||||
// 退出应用程序
|
||||
app.Quit()
|
||||
```
|
||||
|
||||
### IsDarkMode
|
||||
|
||||
API:`IsDarkMode() bool`
|
||||
|
||||
`IsDarkMode()` 检查应用程序是否在暗模式下运行。它返回一个布尔值,指示是否启用了暗模式。
|
||||
|
||||
```go
|
||||
// 检查是否启用了暗模式
|
||||
if app.IsDarkMode() {
|
||||
// 做一些事情
|
||||
}
|
||||
```
|
||||
|
||||
### Hide
|
||||
|
||||
API:`Hide()`
|
||||
|
||||
`Hide()` 隐藏应用程序窗口。
|
||||
|
||||
```go
|
||||
// 隐藏应用程序窗口
|
||||
app.Hide()
|
||||
```
|
||||
|
||||
### Show
|
||||
|
||||
API:`Show()`
|
||||
|
||||
`Show()` 显示应用程序窗口。
|
||||
|
||||
```go
|
||||
// 显示应用程序窗口
|
||||
app.Show()
|
||||
```
|
||||
|
||||
### NewWebviewWindow
|
||||
|
||||
API:`NewWebviewWindow() *WebviewWindow`
|
||||
|
||||
`NewWebviewWindow()` 使用默认选项创建一个新的 Webview 窗口,并返回它。
|
||||
|
||||
```go
|
||||
// 创建一个新的 Webview 窗口
|
||||
window := app.NewWebviewWindow()
|
||||
```
|
||||
|
||||
### NewWebviewWindowWithOptions
|
||||
|
||||
API:`NewWebviewWindowWithOptions(windowOptions WebviewWindowOptions) *WebviewWindow`
|
||||
|
||||
`NewWebviewWindowWithOptions()` 使用自定义选项创建一个新的 Webview 窗口。新创建的窗口将添加到应用程序管理的窗口映射中。
|
||||
|
||||
```go
|
||||
// 使用自定义选项创建一个新的 Webview 窗口
|
||||
window := app.NewWebviewWindowWithOptions(WebviewWindowOptions{
|
||||
Name: "Main",
|
||||
Title: "My Window",
|
||||
Width: 800,
|
||||
Height: 600,
|
||||
})
|
||||
```
|
||||
|
||||
### OnWindowCreation
|
||||
|
||||
API:`OnWindowCreation(callback func(window *WebviewWindow))`
|
||||
|
||||
`OnWindowCreation()` 注册一个回调函数,当创建窗口时调用该函数。
|
||||
|
||||
```go
|
||||
// 注册一个回调函数,当创建窗口时调用该函数
|
||||
app.OnWindowCreation(func(window *WebviewWindow) {
|
||||
// 做一些事情
|
||||
})
|
||||
```
|
||||
|
||||
### GetWindowByName
|
||||
|
||||
API:`GetWindowByName(name string) *WebviewWindow`
|
||||
|
||||
`GetWindowByName()` 获取并返回具有特定名称的窗口。
|
||||
|
||||
```go
|
||||
// 通过名称获取窗口
|
||||
window := app.GetWindowByName("Main")
|
||||
```
|
||||
|
||||
### CurrentWindow
|
||||
|
||||
API:`CurrentWindow() *WebviewWindow`
|
||||
|
||||
`CurrentWindow()` 获取并返回应用程序中当前活动窗口的指针。如果没有窗口,则返回 nil。
|
||||
|
||||
```go
|
||||
// 获取当前窗口
|
||||
window := app.CurrentWindow()
|
||||
```
|
||||
|
||||
### RegisterContextMenu
|
||||
|
||||
API:`RegisterContextMenu(name string, menu *Menu)`
|
||||
|
||||
`RegisterContextMenu()` 注册具有给定名称的上下文菜单。稍后可以在应用程序中使用该菜单。
|
||||
|
||||
```go
|
||||
|
||||
// 创建一个新的菜单
|
||||
ctxmenu := app.NewMenu()
|
||||
|
||||
// 将菜单注册为上下文菜单
|
||||
app.RegisterContextMenu("MyContextMenu", ctxmenu)
|
||||
```
|
||||
|
||||
### SetMenu
|
||||
|
||||
API:`SetMenu(menu *Menu)`
|
||||
|
||||
`SetMenu()` 设置应用程序的菜单。在 Mac 上,这将是全局菜单。对于 Windows 和 Linux,这将是任何新窗口的默认菜单。
|
||||
|
||||
```go
|
||||
// 创建一个新的菜单
|
||||
menu := app.NewMenu()
|
||||
|
||||
// 设置应用程序的菜单
|
||||
app.SetMenu(menu)
|
||||
```
|
||||
|
||||
### ShowAboutDialog
|
||||
|
||||
API:`ShowAboutDialog()`
|
||||
|
||||
`ShowAboutDialog()` 显示一个 "关于" 对话框。可以显示应用程序的名称、描述和图标。
|
||||
|
||||
```go
|
||||
// 显示关于对话框
|
||||
app.ShowAboutDialog()
|
||||
```
|
||||
|
||||
### Info
|
||||
|
||||
API:`InfoDialog()`
|
||||
|
||||
`InfoDialog()` 创建并返回一个具有 `InfoDialogType` 的 `MessageDialog` 的新实例。此对话框通常用于向用户显示信息消息。
|
||||
|
||||
### Question
|
||||
|
||||
API:`QuestionDialog()`
|
||||
|
||||
`QuestionDialog()` 创建并返回一个具有 `QuestionDialogType` 的 `MessageDialog` 的新实例。此对话框通常用于向用户提问并期望回应。
|
||||
|
||||
### Warning
|
||||
|
||||
API:`WarningDialog()`
|
||||
|
||||
`WarningDialog()` 创建并返回一个具有 `WarningDialogType` 的 `MessageDialog` 的新实例。如其名称所示,此对话框主要用于向用户显示警告消息。
|
||||
|
||||
### Error
|
||||
|
||||
API:`ErrorDialog()`
|
||||
|
||||
`ErrorDialog()` 创建并返回一个具有 `ErrorDialogType` 的 `MessageDialog` 的新实例。此对话框设计用于在需要向用户显示错误消息时使用。
|
||||
|
||||
### OpenFile
|
||||
|
||||
API:`OpenFileDialog()`
|
||||
|
||||
`OpenFileDialog()` 创建并返回一个新的 `OpenFileDialogStruct`。此对话框提示用户从其文件系统中选择一个或多个文件。
|
||||
|
||||
### SaveFile
|
||||
|
||||
API:`SaveFileDialog()`
|
||||
|
||||
`SaveFileDialog()` 创建并返回一个新的 `SaveFileDialogStruct`。此对话框提示用户选择其文件系统上的位置以保存文件。
|
||||
|
||||
### OpenDirectory
|
||||
|
||||
API:`OpenDirectoryDialog()`
|
||||
|
||||
`OpenDirectoryDialog()` 创建并返回一个具有 `OpenDirectoryDialogType` 的 `MessageDialog` 的新实例。此对话框使用户能够从其文件系统中选择目录。
|
||||
|
||||
### On
|
||||
|
||||
API:`On(eventType events.ApplicationEventType, callback func(event *Event)) func()`
|
||||
|
||||
`On()` 注册特定应用程序事件的事件侦听器。提供的回调函数将在相应事件发生时触发。该函数返回一个可调用的函数,用于删除侦听器。
|
||||
|
||||
### RegisterHook
|
||||
|
||||
API:`RegisterHook(eventType events.ApplicationEventType, callback func(event *Event)) func()`
|
||||
|
||||
`RegisterHook()` 注册要在特定事件期间作为钩子运行的回调函数。这些钩子在使用 `On()` 附加的侦听器之前运行。该函数返回一个可调用的函数,用于删除钩子。
|
||||
|
||||
### GetPrimaryScreen
|
||||
|
||||
API:`GetPrimaryScreen() (*Screen, error)`
|
||||
|
||||
`GetPrimaryScreen()` 返回系统的主屏幕。
|
||||
|
||||
### GetScreens
|
||||
|
||||
API:`GetScreens() ([]*Screen, error)`
|
||||
|
||||
`GetScreens()` 返回有关连接到系统的所有屏幕的信息。
|
||||
|
||||
这是提供的 `App` 结构中导出的方法的简要摘要。请注意,有关更详细的功能或注意事项,请参考实际的 Go 代码或进一步的内部文档。
|
||||
|
||||
## Options
|
||||
|
||||
```go title="application_options.go"
|
||||
--8<--
|
||||
../v3/pkg/application/options_application.go
|
||||
--8<--
|
||||
```
|
||||
|
||||
### Windows 选项
|
||||
|
||||
```go title="application_options_windows.go"
|
||||
--8<--
|
||||
../v3/pkg/application/options_application_win.go
|
||||
--8<--
|
||||
```
|
||||
|
||||
### Mac 选项
|
||||
|
||||
```go title="options_application_mac.go"
|
||||
--8<--
|
||||
../v3/pkg/application/options_application_mac.go
|
||||
--8<--
|
||||
```
|
||||
|
|
@ -1,37 +0,0 @@
|
|||
# 主线程函数
|
||||
|
||||
这些方法是在主线程上运行代码的实用函数。当您想要在UI线程上运行自定义代码时,这是必需的。
|
||||
|
||||
### InvokeSync
|
||||
|
||||
API: `InvokeSync(fn func())`
|
||||
|
||||
此函数以同步方式运行传入的函数(`fn`)。它使用一个`WaitGroup`(`wg`)确保主线程在`fn`函数完成之前等待,然后才继续执行。如果在`fn`内部发生恐慌,它将传递给应用程序选项中定义的处理程序函数`PanicHandler`。
|
||||
|
||||
### InvokeSyncWithResult
|
||||
|
||||
API: `InvokeSyncWithResult[T any](fn func() T) (res T)`
|
||||
|
||||
此函数与`InvokeSync(fn func())`类似,但它返回一个结果。可用于调用具有单个返回值的任何函数。
|
||||
|
||||
### InvokeSyncWithError
|
||||
|
||||
API: `InvokeSyncWithError(fn func() error) (err error)`
|
||||
|
||||
此函数同步运行`fn`并返回`fn`产生的任何错误。请注意,如果在`fn`执行期间发生恐慌,此函数将从恢复。
|
||||
|
||||
### InvokeSyncWithResultAndError
|
||||
|
||||
API: `InvokeSyncWithResultAndError[T any](fn func() (T, error)) (res T, err error)`
|
||||
|
||||
此函数同步运行`fn`并返回类型为`T`的结果和一个错误。
|
||||
|
||||
### InvokeAsync
|
||||
|
||||
API: `InvokeAsync(fn func())`
|
||||
|
||||
此函数以异步方式运行`fn`。它在主线程上运行给定的函数。如果在`fn`内部发生恐慌,它将传递给应用程序选项中定义的处理程序函数`PanicHandler`。
|
||||
|
||||
---
|
||||
|
||||
注意:这些函数将阻塞执行,直到`fn`完成。确保`fn`不会阻塞至关重要。如果需要运行阻塞函数,请改用`InvokeAsync`。
|
||||
|
|
@ -1,60 +0,0 @@
|
|||
# 菜单
|
||||
|
||||
可以创建菜单并添加到应用程序中。它们可以用于创建上下文菜单、系统托盘菜单和应用程序菜单。
|
||||
|
||||
要创建一个新菜单,请调用:
|
||||
|
||||
```go
|
||||
// 创建一个新菜单
|
||||
menu := app.NewMenu()
|
||||
```
|
||||
|
||||
然后,`Menu` 类型上可用以下操作:
|
||||
|
||||
### 添加
|
||||
|
||||
API:`Add(label string) *MenuItem`
|
||||
|
||||
此方法以 `string` 类型的 `label` 作为输入,并将具有给定标签的新 `MenuItem` 添加到菜单中。它返回添加的 `MenuItem`。
|
||||
|
||||
### 添加分隔符
|
||||
|
||||
API:`AddSeparator()`
|
||||
|
||||
此方法将一个新的分隔符 `MenuItem` 添加到菜单中。
|
||||
|
||||
### 添加复选框
|
||||
|
||||
API:`AddCheckbox(label string, enabled bool) *MenuItem`
|
||||
|
||||
此方法以 `string` 类型的 `label` 和 `bool` 类型的 `enabled` 作为输入,并将具有给定标签和启用状态的新复选框 `MenuItem` 添加到菜单中。它返回添加的 `MenuItem`。
|
||||
|
||||
### 添加单选按钮
|
||||
|
||||
API:`AddRadio(label string, enabled bool) *MenuItem`
|
||||
|
||||
此方法以 `string` 类型的 `label` 和 `bool` 类型的 `enabled` 作为输入,并将具有给定标签和启用状态的新单选按钮 `MenuItem` 添加到菜单中。它返回添加的 `MenuItem`。
|
||||
|
||||
### 更新
|
||||
|
||||
API:`Update()`
|
||||
|
||||
此方法处理任何单选按钮组,并在菜单未初始化时更新菜单。
|
||||
|
||||
### 添加子菜单
|
||||
|
||||
API:`AddSubmenu(s string) *Menu`
|
||||
|
||||
此方法以 `string` 类型的 `s` 作为输入,并将具有给定标签的新子菜单 `MenuItem` 添加到菜单中。它返回添加的子菜单。
|
||||
|
||||
### 添加角色
|
||||
|
||||
API:`AddRole(role Role) *Menu`
|
||||
|
||||
此方法以 `Role` 类型的 `role` 作为输入,如果不为 `nil`,则将其添加到菜单中,并返回 `Menu`。
|
||||
|
||||
### 设置标签
|
||||
|
||||
API:`SetLabel(label string)`
|
||||
|
||||
此方法设置 `Menu` 的 `label`。
|
||||
|
|
@ -1,102 +0,0 @@
|
|||
# 系统托盘
|
||||
|
||||
系统托盘位于桌面环境的通知区域,可以包含当前运行应用程序的图标和特定系统通知。
|
||||
|
||||
您可以通过调用 `app.NewSystemTray()` 来创建一个系统托盘:
|
||||
|
||||
```go
|
||||
// 创建一个新的系统托盘
|
||||
tray := app.NewSystemTray()
|
||||
```
|
||||
|
||||
`SystemTray` 类型上提供了以下方法:
|
||||
|
||||
### SetLabel
|
||||
|
||||
API:`SetLabel(label string)`
|
||||
|
||||
`SetLabel` 方法设置托盘的标签。
|
||||
|
||||
### Label
|
||||
|
||||
API:`Label() string`
|
||||
|
||||
`Label` 方法获取托盘的标签。
|
||||
|
||||
### PositionWindow
|
||||
|
||||
API:`PositionWindow(*WebviewWindow, offset int) error`
|
||||
|
||||
`PositionWindow` 方法调用了 `AttachWindow` 和 `WindowOffset` 方法。
|
||||
|
||||
### SetIcon
|
||||
|
||||
API:`SetIcon(icon []byte) *SystemTray`
|
||||
|
||||
`SetIcon` 方法设置系统托盘的图标。
|
||||
|
||||
### SetDarkModeIcon
|
||||
|
||||
API:`SetDarkModeIcon(icon []byte) *SystemTray`
|
||||
|
||||
`SetDarkModeIcon` 方法设置暗黑模式下系统托盘的图标。
|
||||
|
||||
### SetMenu
|
||||
|
||||
API:`SetMenu(menu *Menu) *SystemTray`
|
||||
|
||||
`SetMenu` 方法设置系统托盘的菜单。
|
||||
|
||||
### Destroy
|
||||
|
||||
API:`Destroy()`
|
||||
|
||||
`Destroy` 方法销毁系统托盘实例。
|
||||
|
||||
### OnClick
|
||||
|
||||
API:`OnClick(handler func()) *SystemTray`
|
||||
|
||||
`OnClick` 方法设置点击托盘图标时执行的函数。
|
||||
|
||||
### OnRightClick
|
||||
|
||||
API:`OnRightClick(handler func()) *SystemTray`
|
||||
|
||||
`OnRightClick` 方法设置右键点击托盘图标时执行的函数。
|
||||
|
||||
### OnDoubleClick
|
||||
|
||||
API:`OnDoubleClick(handler func()) *SystemTray`
|
||||
|
||||
`OnDoubleClick` 方法设置双击托盘图标时执行的函数。
|
||||
|
||||
### OnRightDoubleClick
|
||||
|
||||
API:`OnRightDoubleClick(handler func()) *SystemTray`
|
||||
|
||||
`OnRightDoubleClick` 方法设置右键双击托盘图标时执行的函数。
|
||||
|
||||
### AttachWindow
|
||||
|
||||
API:`AttachWindow(window *WebviewWindow) *SystemTray`
|
||||
|
||||
`AttachWindow` 方法将窗口附加到系统托盘。当点击系统托盘图标时,窗口将显示出来。
|
||||
|
||||
### WindowOffset
|
||||
|
||||
API:`WindowOffset(offset int) *SystemTray`
|
||||
|
||||
`WindowOffset` 方法设置系统托盘与窗口之间的像素间隔。
|
||||
|
||||
### WindowDebounce
|
||||
|
||||
API:`WindowDebounce(debounce time.Duration) *SystemTray`
|
||||
|
||||
`WindowDebounce` 方法设置防抖时间。在 Windows 上,它用于指定在响应通知图标上的鼠标松开事件之前等待多长时间。
|
||||
|
||||
### OpenMenu
|
||||
|
||||
API:`OpenMenu()`
|
||||
|
||||
`OpenMenu` 方法打开与系统托盘关联的菜单。
|
||||
|
|
@ -1,101 +0,0 @@
|
|||
# 窗口
|
||||
|
||||
要创建一个窗口,可以使用[Application.NewWebviewWindow](application.md#newwebviewwindow)或[Application.NewWebviewWindowWithOptions](application.md#newwebviewwindowwithoptions)。前者创建一个具有默认选项的窗口,而后者允许您指定自定义选项。
|
||||
|
||||
这些方法可在返回的WebviewWindow对象上调用:
|
||||
|
||||
### SetTitle
|
||||
|
||||
API: `SetTitle(title string) *WebviewWindow`
|
||||
|
||||
此方法将窗口标题更新为提供的字符串。它返回WebviewWindow对象,允许进行方法链接。
|
||||
|
||||
### Name
|
||||
|
||||
API: `Name() string`
|
||||
|
||||
此函数返回WebviewWindow的名称。
|
||||
|
||||
### SetSize
|
||||
|
||||
API: `SetSize(width, height int) *WebviewWindow`
|
||||
|
||||
此方法将WebviewWindow的大小设置为提供的宽度和高度参数。如果提供的尺寸超过约束条件,它们将被相应调整。
|
||||
|
||||
### SetAlwaysOnTop
|
||||
|
||||
API: `SetAlwaysOnTop(b bool) *WebviewWindow`
|
||||
|
||||
此函数根据提供的布尔标志设置窗口始终置顶。
|
||||
|
||||
### Show
|
||||
|
||||
API: `Show() *WebviewWindow`
|
||||
|
||||
`Show`方法用于使窗口可见。如果窗口未运行,它首先调用`run`方法启动窗口,然后使其可见。
|
||||
|
||||
### Hide
|
||||
|
||||
API: `Hide() *WebviewWindow`
|
||||
|
||||
`Hide`方法用于隐藏窗口。它将窗口的隐藏状态设置为true,并触发窗口隐藏事件。
|
||||
|
||||
### SetURL
|
||||
|
||||
API: `SetURL(s string) *WebviewWindow`
|
||||
|
||||
`SetURL`方法用于将窗口的URL设置为给定的URL字符串。
|
||||
|
||||
### SetZoom
|
||||
|
||||
API: `SetZoom(magnification float64) *WebviewWindow`
|
||||
|
||||
`SetZoom`方法将窗口内容的缩放级别设置为提供的放大倍数。
|
||||
|
||||
### GetZoom
|
||||
|
||||
API: `GetZoom() float64`
|
||||
|
||||
`GetZoom`函数返回窗口内容的当前缩放级别。
|
||||
|
||||
### GetScreen
|
||||
|
||||
API: `GetScreen() (*Screen, error)`
|
||||
|
||||
`GetScreen`方法返回窗口所显示的屏幕。
|
||||
|
||||
#### SetFrameless
|
||||
|
||||
API: `SetFrameless(frameless bool) *WebviewWindow`
|
||||
|
||||
此函数用于移除窗口边框和标题栏。它根据提供的布尔值(true表示无边框,false表示有边框)切换窗口的无边框状态。
|
||||
|
||||
#### RegisterContextMenu
|
||||
|
||||
API: `RegisterContextMenu(name string, menu *Menu)`
|
||||
|
||||
此函数用于注册上下文菜单并为其指定给定的名称。
|
||||
|
||||
#### NativeWindowHandle
|
||||
|
||||
API: `NativeWindowHandle() (uintptr, error)`
|
||||
|
||||
此函数用于获取窗口的平台本机窗口句柄。
|
||||
|
||||
#### Focus
|
||||
|
||||
API: `Focus()`
|
||||
|
||||
此函数用于将焦点设置到窗口。
|
||||
|
||||
#### SetEnabled
|
||||
|
||||
API: `SetEnabled(enabled bool)`
|
||||
|
||||
此函数用于根据提供的布尔值启用/禁用窗口。
|
||||
|
||||
#### SetAbsolutePosition
|
||||
|
||||
API: `SetAbsolutePosition(x int, y int)`
|
||||
|
||||
此函数设置窗口在屏幕上的绝对位置。
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
# 更新日志
|
||||
|
||||
<!--
|
||||
此项目的所有重要更改将在此文件中记录。
|
||||
|
||||
格式基于[保持一个更改日志](https://keepachangelog.com/en/1.0.0/),
|
||||
并且该项目遵循[语义化版本](https://semver.org/spec/v2.0.0.html)。
|
||||
|
||||
- `Added` 用于新增功能。
|
||||
- `Changed` 用于现有功能的更改。
|
||||
- `Deprecated` 用于即将移除的功能。
|
||||
- `Removed` 用于已移除的功能。
|
||||
- `Fixed` 用于修复错误。
|
||||
- `Security` 用于安全漏洞。
|
||||
|
||||
-->
|
||||
|
||||
## [未发布]
|
||||
|
||||
### Added
|
||||
|
||||
- [darwin] 添加Event ApplicationShouldHandleReopen以处理单击dock图标的功能 @5aaee9 in [#2991](https://github.com/wailsapp/wails/pull/2991)
|
||||
- [darwin] 添加getPrimaryScreen/getScreens的实现 @tmclane in [#2618](https://github.com/wailsapp/wails/pull/2618)
|
||||
|
||||
### Fixed
|
||||
|
||||
- 修复Doctor apt软件包验证问题 [Atterpac](https://github.com/Atterpac) in [#2972](https://github.com/wailsapp/wails/pull/2972)。
|
||||
- 修复应用程序在退出时冻结的问题 (Darwin) @5aaee9 in [#2982](https://github.com/wailsapp/wails/pull/2982)
|
||||
- 修复Windows上示例的背景颜色问题 [mmgvh](https://github.com/mmghv) in [#2750](https://github.com/wailsapp/wails/pull/2750)。
|
||||
- 修复默认上下文菜单问题 [mmgvh](https://github.com/mmghv) in [#2753](https://github.com/wailsapp/wails/pull/2753)。
|
||||
|
||||
|
||||
### Changed
|
||||
|
||||
### Removed
|
||||
|
||||
### Deprecated
|
||||
|
||||
### Security
|
||||
|
|
@ -1,341 +0,0 @@
|
|||
# v3的更改
|
||||
|
||||
!!! note
|
||||
这是当前的无序更改脑升级。很快它将组织成一个更易读的格式。
|
||||
|
||||
## 选项
|
||||
|
||||
自v2以来,应用程序选项已经进行了修订。
|
||||
|
||||
## 事件
|
||||
|
||||
在v3中,有3种类型的事件:
|
||||
|
||||
- 应用程序事件
|
||||
- 窗口事件
|
||||
- 自定义事件
|
||||
|
||||
### 应用程序事件
|
||||
|
||||
应用程序事件是由应用程序发出的事件。这些事件包括macOS上的`ApplicationDidFinishLaunching`等本机事件。
|
||||
|
||||
### 窗口事件
|
||||
|
||||
窗口事件是由窗口发出的事件。这些事件包括macOS上的`WindowDidBecomeMain`等本机事件。还定义了常见事件,以便它们在跨平台上工作,例如`WindowClosing`。
|
||||
|
||||
### 自定义事件
|
||||
|
||||
用户定义的事件称为`WailsEvents`。这是为了将它们与用于与浏览器通信的`Event`对象区分开来。WailsEvents现在是封装事件的对象。这包括事件名称,数据和事件的源。
|
||||
|
||||
与WailsEvent关联的数据现在是单个值。如果需要多个值,则可以使用struct。
|
||||
|
||||
### 事件回调和`Emit`函数签名
|
||||
|
||||
事件回调的签名(由`On`,`Once`和`OnMultiple`使用)已更改。在v2中,回调函数接收可选数据。在v3中,回调函数接收包含与事件相关的所有数据的`WailsEvent`对象。
|
||||
|
||||
类似地,`Emit`函数已更改。它现在不再接受名称和可选数据,而是接受一个`WailsEvent`对象,它将发出该对象。
|
||||
|
||||
### `Off`和`OffAll`
|
||||
|
||||
在v2中,`Off`和`OffAll`调用将删除JS和Go中的事件。由于v3具有多窗口的特性,因此已更改为这些方法仅适用于调用它们的上下文。例如,如果你在一个窗口中调用`Off`,它仅会删除该窗口的事件。如果你在Go中使用`Off`,它只会删除Go的事件。
|
||||
|
||||
### Hooks
|
||||
|
||||
事件钩子是v3中的新功能。它们允许您钩入事件系统,并在发出某些事件时执行操作。例如,您可以钩入`WindowClosing`事件,在窗口关闭之前执行一些清理操作。钩子可以在应用程序级别或窗口级别使用`RegisterHook`进行注册。应用程序级别适用于应用程序事件。仅当窗口级别钩子与其注册的窗口一起调用。
|
||||
|
||||
### 日志记录
|
||||
|
||||
在v2中,日志记录会混淆,因为应用程序日志和系统(内部)日志都使用相同的记录器。我们已经对此进行了简化:
|
||||
|
||||
- 内部日志现在使用标准的Go `slog`记录器处理。这是通过应用程序选项中的`logger`选项进行配置的。默认情况下,这使用[tint](https://github.com/lmittmann/tint)记录器。
|
||||
- 现在可以通过新的`log`插件进行应用程序日志记录,它在底层使用`slog`。此插件提供了一个简单的用于记录到控制台的API。它在Go和JS中都可用。
|
||||
|
||||
### 开发人员注意事项
|
||||
|
||||
在Go中发出事件时,它会将事件分派到本地的Go侦听器以及应用程序中的每个窗口。在JS中发出事件时,它现在会将事件发送到应用程序。这将被处理,就好像它是在Go中发出的,但是发送者ID将是窗口的ID。
|
||||
|
||||
## 窗口
|
||||
|
||||
Window API在很大程度上保持不变,但方法现在是在窗口实例而不是运行时上。一些值得注意的变化是:
|
||||
|
||||
- 窗口现在具有标识它们的名称。用于在发出事件时标识窗口。
|
||||
- 窗口上现在有更多以前不可用的方法,例如`AbsolutePosition`和`ToggleDevTools`。
|
||||
- 窗口现在可以通过本机拖放接受文件。有关详细信息,请参阅拖放部分。
|
||||
|
||||
## 剪切板
|
||||
|
||||
剪贴板API已经简化。现在有一个单独的`Clipboard`对象,可以用于读取和写入剪贴板。`Clipboard`对象在Go和JS中都可用。`SetText()`用于设置文本,`Text()`用于获取文本。
|
||||
|
||||
## 绑定
|
||||
|
||||
绑定的工作方式与v2类似,通过提供一种将结构方法绑定到前端的方式。这些可以在前端使用由`wails3 generate bindings`命令生成的绑定包装器来调用:
|
||||
|
||||
```javascript
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
import { main } from "./models";
|
||||
|
||||
window.go = window.go || {};
|
||||
window.go.main = {
|
||||
GreetService: {
|
||||
/**
|
||||
* GreetService.Greet
|
||||
* Greet greets a person
|
||||
* @param name {string}
|
||||
* @returns {Promise<string>}
|
||||
**/
|
||||
Greet: function (name) {
|
||||
wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0));
|
||||
},
|
||||
|
||||
/**
|
||||
* GreetService.GreetPerson
|
||||
* GreetPerson greets a person
|
||||
* @param person {main.Person}
|
||||
* @returns {Promise<string>}
|
||||
**/
|
||||
GreetPerson: function (person) {
|
||||
wails.CallByID(4021313248, ...Array.prototype.slice.call(arguments, 0));
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
默认情况下,绑定的方法是混淆的,并使用uint32 ID进行标识,该ID是使用[FNV哈希算法](https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function)计算的。这是为了防止方法名称在生产构建中被暴露出来。在调试模式下,方法ID与计算的方法ID一起记录,以帮助调试。如果您希望增加额外的混淆层,可以使用`BindAliases`选项。这允许您指定别名ID与方法ID的映射。当前端使用ID调用方法时,方法ID将首先在别名映射中查找匹配项。如果找不到,它将假定是标准方法ID,并尝试以通常的方式查找方法。
|
||||
|
||||
示例:
|
||||
|
||||
```go
|
||||
app := application.New(application.Options{
|
||||
Bind: []any{
|
||||
&GreetService{},
|
||||
},
|
||||
BindAliases: map[uint32]uint32{
|
||||
1: 1411160069,
|
||||
2: 4021313248,
|
||||
},
|
||||
Assets: application.AssetOptions{
|
||||
FS: assets,
|
||||
},
|
||||
Mac: application.MacOptions{
|
||||
ApplicationShouldTerminateAfterLastWindowClosed: true,
|
||||
},
|
||||
})
|
||||
```
|
||||
|
||||
现在我们可以使用此别名在前端调用:`wails.Call(1, "world!")`。
|
||||
|
||||
### 不安全调用
|
||||
|
||||
如果您不介意在二进制文件中以明文形式提供调用,并且不打算使用[garble](https://github.com/burrowers/garble),那么可以使用不安全的`wails.CallByName()`方法。此方法接受要调用的方法的完全限定名称和要传递给它的参数。示例:
|
||||
|
||||
```go
|
||||
wails.CallByName("main.GreetService.Greet", "world!")
|
||||
```
|
||||
|
||||
!!! danger
|
||||
|
||||
这仅作为开发的便利方法提供。不建议在生产中使用此方法。
|
||||
|
||||
## 对话框
|
||||
|
||||
对话框现在在JavaScript中可用!
|
||||
|
||||
### Windows
|
||||
|
||||
Windows中的对话框按钮是不可配置的,根据对话框的类型是恒定的。要在按下按钮时触发回调,请创建一个具有与您希望附加回调的按钮相同名称的按钮。示例:创建一个标签为“确定”的按钮,并使用`OnClick()`方法设置回调方法:
|
||||
|
||||
```go
|
||||
dialog := app.QuestionDialog().
|
||||
SetTitle("Update").
|
||||
SetMessage("The cancel button is selected when pressing escape")
|
||||
ok := dialog.AddButton("Ok")
|
||||
ok.OnClick(func() {
|
||||
// Do something
|
||||
})
|
||||
no := dialog.AddButton("Cancel")
|
||||
dialog.SetDefaultButton(ok)
|
||||
dialog.SetCancelButton(no)
|
||||
dialog.Show()
|
||||
```
|
||||
|
||||
## 拖放
|
||||
|
||||
可以按窗口启用本机拖放。只需将`EnableDragAndDrop`窗口配置选项设置为`true`,窗口将允许将文件拖放到其上。当这种情况发生时,将发出`events.FilesDropped`事件。然后可以使用`WindowEvent.Context()`中的`DroppedFiles()`方法检索文件名。这将返回一个包含文件名的字符串切片。
|
||||
|
||||
## 上下文菜单
|
||||
|
||||
上下文菜单是当用户右键单击元素时显示的上下文菜单。创建上下文菜单与创建标准菜单相同,使用`app.NewMenu()`。要使上下文菜单对窗口可用,请调用`window.RegisterContextMenu(name, menu)`。名称将是上下文菜单的ID,并由前端使用。
|
||||
|
||||
要指示元素具有上下文菜单,请将`data-contextmenu`属性添加到元素。此属性的值应为先前在窗口中注册的上下文菜单的名称。
|
||||
|
||||
可以在应用程序级别注册上下文菜单,使其对所有窗口可用。可以使用`app.RegisterContextMenu(name, menu)`完成此操作。如果在窗口级别找不到上下文菜单,则将检查应用程序上下文菜单。`v3/examples/contextmenus`中可以找到此演示。
|
||||
|
||||
## Wails标记语言(WML)
|
||||
|
||||
Wails标记语言是一种简单的标记语言,允许您在没有JavaScript的情况下向标准HTML元素添加功能。
|
||||
|
||||
当前支持以下标签:
|
||||
|
||||
### `data-wml-event`
|
||||
|
||||
这指定单击元素时将发出Wails事件。属性的值应为要发出的事件的名称。
|
||||
|
||||
示例:
|
||||
|
||||
```html
|
||||
<button data-wml-event="myevent">Click Me</button>
|
||||
```
|
||||
|
||||
有时您需要用户确认操作。可以通过向元素添加`data-wml-confirm`属性来完成。此属性的值将是要显示给用户的消息。
|
||||
|
||||
示例:
|
||||
|
||||
```html
|
||||
<button data-wml-event="delete-all-items" data-wml-confirm="Are you sure?">
|
||||
Delete All Items
|
||||
</button>
|
||||
```
|
||||
|
||||
### `data-wml-window`
|
||||
|
||||
可以通过将`data-wml-window`属性添加到元素中来调用任何`wails.window`方法。属性的值应为要调用的方法的名称。方法名称应与导出的方法的名称完全匹配。
|
||||
|
||||
```html
|
||||
<button data-wml-window="Close">Close Window</button>
|
||||
```
|
||||
|
||||
### `data-wml-trigger`
|
||||
|
||||
此属性指定应触发操作的javascript事件。默认为`click`。
|
||||
|
||||
```html
|
||||
<button data-wml-event="hover-box" data-wml-trigger="mouseover">
|
||||
Hover over me!
|
||||
</button>
|
||||
```
|
||||
|
||||
## 系统托盘
|
||||
|
||||
Wails 3附带了一个内置的系统托盘。这是一个完全功能的系统托盘,旨在尽可能简单地使用。可以设置托盘的图标、工具提示和菜单。还可以“附加”窗口到系统托盘。这样做将提供以下功能:
|
||||
|
||||
- 单击托盘图标会切换窗口可见性
|
||||
- 右键单击托盘将打开菜单(如果有)
|
||||
|
||||
在macOS上,如果没有附加的窗口,则托盘将使用显示菜单的默认方法(任何按钮)。如果有附加的窗口但没有菜单,则托盘将切换窗口,而不管按下的按钮如何。
|
||||
|
||||
## 插件
|
||||
|
||||
插件是扩展Wails应用程序功能的一种方式。
|
||||
|
||||
### 创建插件
|
||||
|
||||
插件是符合以下接口的标准Go结构:
|
||||
|
||||
```go
|
||||
type Plugin interface {
|
||||
Name() string
|
||||
Init(*application.App) error
|
||||
Shutdown()
|
||||
CallableByJS() []string
|
||||
InjectJS() string
|
||||
}
|
||||
```
|
||||
|
||||
`Name()`方法返回插件的名称。这用于记录目的。
|
||||
|
||||
`Init(*application.App) error`方法在加载插件时调用。`*application.App`参数是加载插件的应用程序。任何错误都将阻止应用程序启动。
|
||||
|
||||
`Shutdown()`方法在应用程序关闭时调用。
|
||||
|
||||
`CallableByJS()`方法返回可以从前端调用的导出函数列表。这些方法名称必须与插件导出的方法名称完全匹配。
|
||||
|
||||
`InjectJS()`方法返回应注入到创建的所有窗口中的JavaScript。这对于添加与插件补充的自定义JavaScript函数很有用。
|
||||
|
||||
### 提示
|
||||
|
||||
#### 枚举
|
||||
|
||||
在Go中,枚举通常被定义为类型和一组常量。例如:
|
||||
|
||||
```go
|
||||
type MyEnum int
|
||||
|
||||
const (
|
||||
MyEnumOne MyEnum = iota
|
||||
MyEnumTwo
|
||||
MyEnumThree
|
||||
)
|
||||
```
|
||||
|
||||
由于Go和JavaScript之间的不兼容性,无法以这种方式使用自定义类型。最好的策略是为float64使用类型别名:
|
||||
|
||||
```go
|
||||
type MyEnum = float64
|
||||
|
||||
const (
|
||||
MyEnumOne MyEnum = iota
|
||||
MyEnumTwo
|
||||
MyEnumThree
|
||||
)
|
||||
```
|
||||
|
||||
在Javascript中,您可以使用以下代码:
|
||||
|
||||
```js
|
||||
const MyEnum = {
|
||||
MyEnumOne: 0,
|
||||
MyEnumTwo: 1,
|
||||
MyEnumThree: 2,
|
||||
};
|
||||
```
|
||||
|
||||
- 为什么使用`float64`?不能使用`int`吗?
|
||||
- 因为JavaScript没有“int”的概念。一切都是`number`,在Go中会转换为`float64`。Go的反射包中还有类型转换的限制,这意味着使用`int`是行不通的。
|
||||
|
||||
### BackgroundColour
|
||||
|
||||
在v2中,这是指向`RGBA`结构的指针。在v3中,这是`RGBA`结构的值。
|
||||
|
||||
### WindowIsTranslucent
|
||||
|
||||
已删除此标志。现在有一个`BackgroundType`标志,可用于设置窗口应具有的背景类型。此标志可以设置为以下任何值:
|
||||
|
||||
- `BackgroundTypeSolid` - 窗口将具有实心背景
|
||||
- `BackgroundTypeTransparent` - 窗口将具有透明背景
|
||||
- `BackgroundTypeTranslucent` - 窗口将具有半透明背景
|
||||
|
||||
在Windows上,如果`BackgroundType`设置为`BackgroundTypeTranslucent`,则可以使用`WindowsWindow`选项中的`BackdropType`标志设置透明度的类型。这可以设置为以下任何值:
|
||||
|
||||
- `Auto` - 窗口将使用系统确定的效果
|
||||
- `None` - 窗口没有背景
|
||||
- `Mica` - 窗口使用Mica效果
|
||||
- `Acrylic` - 窗口使用丙烯酸效果
|
||||
- `Tabbed` - 窗口使用选项卡效果
|
||||
|
||||
## Windows Application Options
|
||||
|
||||
### WndProcInterceptor
|
||||
|
||||
如果设置了此标志,将拦截WndProc并调用该函数。这允许您直接处理Windows消息。该函数应具有以下签名:
|
||||
|
||||
```go
|
||||
func(hwnd uintptr, msg uint32, wParam, lParam uintptr) (returnValue uintptr, shouldReturn)
|
||||
```
|
||||
|
||||
如果`shouldReturn`值设置为`true`,则`returnValue`将由主wndProc方法返回。如果设置为`false`,将忽略返回值,并且消息将继续由主wndProc方法处理。
|
||||
|
||||
## 在关闭时隐藏窗口+OnBeforeClose
|
||||
|
||||
在v2中,有一个`HideWindowOnClose`标志,用于在关闭窗口时隐藏窗口。`HideWindowOnClose`标志与`OnBeforeClose`回调之间存在逻辑重叠。在v3中,已删除`HideWindowOnClose`标志,并将`OnBeforeClose`回调重命名为`ShouldClose`。当用户尝试关闭窗口时,将调用`ShouldClose`回调。如果回调返回`true`,窗口将关闭。如果返回`false`,窗口将不会关闭。这可以用于隐藏窗口而不是关闭窗口。
|
||||
|
||||
## 窗口拖动
|
||||
|
||||
在v2中,使用`--wails-drag`属性来指示可以使用元素拖动窗口。在v3中,已将其替换为`--webkit-app-region`,以更符合其他框架处理方式。`--webkit-app-region`属性可以设置为以下任何值:
|
||||
|
||||
- `drag` - 可使用该元素拖动窗口
|
||||
- `no-drag` - 该元素无法用于拖动窗口
|
||||
|
||||
我们本来希望使用`app-region`,但是在webkit在macOS上的`getComputedStyle`调用不支持它。
|
||||
|
|
@ -1,163 +0,0 @@
|
|||
# 介绍
|
||||
|
||||
!!! note 这个指南仍在制作中。
|
||||
|
||||
感谢您想要帮助开发Wails!本指南将帮助您入门。
|
||||
|
||||
## 入门指南
|
||||
|
||||
- Git 克隆此存储库。切换到 `v3-alpha` 分支。
|
||||
- 安装 CLI:`cd v3/cmd/wails3 && go install`
|
||||
|
||||
- 可选:如果您想要使用构建系统构建前端代码,您需要安装 [npm](https://nodejs.org/en/download)。
|
||||
|
||||
## 构建
|
||||
|
||||
对于简单的程序,您可以使用标准的 `go build` 命令。也可以使用 `go run`。
|
||||
|
||||
Wails 还配备了一个构建系统,可用于构建更复杂的项目。它使用了强大的 [Task](https://taskfile.dev) 构建系统。要了解更多信息,请查看任务主页或运行 `wails task --help`。
|
||||
|
||||
## 项目结构
|
||||
|
||||
该项目具有以下结构:
|
||||
|
||||
```
|
||||
v3
|
||||
├── cmd/wails3 // CLI
|
||||
├── examples // Wails 应用示例
|
||||
├── internal // 内部包
|
||||
| ├── runtime // Wails JS 运行时
|
||||
| └── templates // 支持的项目模板
|
||||
├── pkg
|
||||
| ├── application // 核心 Wails 库
|
||||
| └── events // 事件定义
|
||||
| └── mac // 由插件使用的 macOS 特定代码
|
||||
| └── w32 // Windows 特定代码
|
||||
├── plugins // 支持的插件
|
||||
├── tasks // 通用任务
|
||||
└── Taskfile.yaml // 开发任务配置
|
||||
```
|
||||
|
||||
## 开发
|
||||
|
||||
### 添加窗口功能
|
||||
|
||||
添加窗口功能的首选方法是在 `pkg/application/webview_window.go` 文件中添加一个新函数。这应该实现所有平台所需的功能。任何特定于平台的代码都应通过 `webviewWindowImpl` 接口方法调用。该接口由每个目标平台实现,以提供平台特定的功能。在某些情况下,这可能不执行任何操作。添加接口方法后,请确保每个平台都实现了它。一个很好的例子是 `SetMinSize` 方法。
|
||||
|
||||
- Mac: `webview_window_darwin.go`
|
||||
- Windows: `webview_window_windows.go`
|
||||
- Linux: `webview_window_linux.go`
|
||||
|
||||
大多数,如果不是全部,特定于平台的代码应在主线程上运行。为了简化这一点,在 `application.go` 中定义了一些 `invokeSync` 方法。
|
||||
|
||||
### 更新运行时
|
||||
|
||||
运行时位于 `v3/internal/runtime`。更新运行时时,需要执行以下步骤:
|
||||
|
||||
```shell
|
||||
wails3 task runtime:build
|
||||
```
|
||||
|
||||
### 事件
|
||||
|
||||
事件定义在 `v3/pkg/events` 中。当添加新事件时,需要执行以下步骤:
|
||||
|
||||
- 将事件添加到 `events.txt` 文件中
|
||||
- 运行 `wails3 task events:generate`
|
||||
|
||||
有几种类型的事件:特定于平台的应用程序和窗口事件 + 通用事件。通用事件对于跨平台事件处理很有用,但您不必局限于“最低公共分母”。如果需要,可以使用特定于平台的事件。
|
||||
|
||||
添加通用事件时,请确保映射了特定于平台的事件。一个示例是在 `window_webview_darwin.go` 中:
|
||||
|
||||
```go
|
||||
// 将 ShouldClose 转化为通用的 WindowClosing 事件
|
||||
w.parent.On(events.Mac.WindowShouldClose, func(_ *WindowEventContext) {
|
||||
w.parent.emit(events.Common.WindowClosing)
|
||||
})
|
||||
```
|
||||
|
||||
注意:我们可能会尝试通过将映射添加到事件定义中来自动化此过程。
|
||||
|
||||
### 插件
|
||||
|
||||
插件是扩展 Wails 应用功能的一种方式。
|
||||
|
||||
#### 创建插件
|
||||
|
||||
插件是符合以下接口的标准 Go 结构:
|
||||
|
||||
```go
|
||||
type Plugin interface {
|
||||
Name() string
|
||||
Init(*application.App) error
|
||||
Shutdown()
|
||||
CallableByJS() []string
|
||||
InjectJS() string
|
||||
}
|
||||
```
|
||||
|
||||
`Name()` 方法返回插件的名称。这用于日志记录。
|
||||
|
||||
`Init(*application.App) error` 方法在加载插件时调用。`*application.App` 参数是加载插件的应用程序。任何错误都将阻止应用程序启动。
|
||||
|
||||
`Shutdown()` 方法在应用程序关闭时调用。
|
||||
|
||||
`CallableByJS()` 方法返回可以从前端调用的导出函数列表。这些方法的名称必须与插件导出的方法的名称完全匹配。
|
||||
|
||||
`InjectJS()` 方法返回应注入到所有窗口中的 JavaScript。这对于添加与插件相补充的自定义 JavaScript 函数非常有用。
|
||||
|
||||
内置插件可以在 `v3/plugins` 目录中找到。参考它们以获得灵感。
|
||||
|
||||
## 任务
|
||||
|
||||
Wails CLI 使用 [Task](https://taskfile.dev) 构建系统。它作为库导入并用于运行 `Taskfile.yaml` 中定义的任务。与 Task 的主要交互发生在 `v3/internal/commands/task.go` 中。
|
||||
|
||||
### 升级 Taskfile
|
||||
|
||||
要检查是否有 Taskfile 的升级,请运行 `wails3 task -version` 并检查 Task 网站。
|
||||
|
||||
要升级使用的 Taskfile 版本,请运行:
|
||||
|
||||
```shell
|
||||
wails3 task taskfile:upgrade
|
||||
```
|
||||
|
||||
如果存在不兼容性,则应在 `v3/internal/commands/task.go` 文件中显示。
|
||||
|
||||
通常,修复不兼容性的最佳方法是克隆 `https://github.com/go-task/task` 上的任务存储库,并查看 git 历史记录以确定发生了什么变化以及原因。
|
||||
|
||||
要检查所有更改是否正确工作,请重新安装 CLI 并再次检查版本:
|
||||
|
||||
```shell
|
||||
wails3 task cli:install
|
||||
wails3 task -version
|
||||
```
|
||||
|
||||
## 打开 PR
|
||||
|
||||
确保所有 PR 都有与之关联的工单,以提供更改的上下文。如果没有工单,请先创建一个。确保所有 PR 都已使用所做的更改更新了 CHANGELOG.md 文件。CHANGELOG.md 文件位于 `mkdocs-website/docs` 目录中。
|
||||
|
||||
## 其他任务
|
||||
|
||||
### 升级 Taskfile
|
||||
|
||||
Wails CLI 使用 [Task](https://taskfile.dev) 构建系统。它作为库导入并用于运行 `Taskfile.yaml` 中定义的任务。与 Task 的主要交互发生在 `v3/internal/commands/task.go` 中。
|
||||
|
||||
要检查是否有 Taskfile 的升级,请运行 `wails3 task -version` 并检查 Task 网站。
|
||||
|
||||
要升级使用的 Taskfile 版本,请运行:
|
||||
|
||||
```shell
|
||||
wails3 task taskfile:upgrade
|
||||
```
|
||||
|
||||
如果存在不兼容性,则应在 `v3/internal/commands/task.go` 文件中显示。
|
||||
|
||||
通常,修复不兼容性的最佳方法是克隆 `https://github.com/go-task/task` 上的任务存储库,并查看 git 历史记录以确定发生了什么变化以及原因。
|
||||
|
||||
要检查所有更改是否正确工作,请重新安装 CLI 并再次检查版本:
|
||||
|
||||
```shell
|
||||
wails3 task cli:install
|
||||
wails3 task -version
|
||||
```
|
||||
|
|
@ -1,378 +0,0 @@
|
|||
将以下文本翻译为中文,并不要翻译 `!!! note` 或 `!!! tip` 或以此格式的字符串:
|
||||
|
||||
# 状态
|
||||
|
||||
v3版功能的状态。
|
||||
|
||||
!!! note
|
||||
|
||||
此列表包含公有和内部API支持的混合内容。<br/>
|
||||
它不完整且可能不是最新的。
|
||||
|
||||
## 已知问题
|
||||
|
||||
- Linux尚未与Windows/Mac达到功能平衡
|
||||
|
||||
## 应用程序
|
||||
|
||||
应用程序接口方法
|
||||
|
||||
| 方法 | Windows | Linux | Mac | 备注 |
|
||||
|--------------------------------------------------------------|---------|-------|-----|-------|
|
||||
| run() error | Y | Y | Y | |
|
||||
| destroy() | | Y | Y | |
|
||||
| setApplicationMenu(menu *Menu) | Y | Y | Y | |
|
||||
| name() string | | Y | Y | |
|
||||
| getCurrentWindowID() uint | Y | Y | Y | |
|
||||
| showAboutDialog(name string, description string, icon []byte) | | Y | Y | |
|
||||
| setIcon(icon []byte) | - | Y | Y | |
|
||||
| on(id uint) | | | Y | |
|
||||
| dispatchOnMainThread(fn func()) | Y | Y | Y | |
|
||||
| hide() | Y | Y | Y | |
|
||||
| show() | Y | Y | Y | |
|
||||
| getPrimaryScreen() (*Screen, error) | | Y | Y | |
|
||||
| getScreens() ([]*Screen, error) | | Y | Y | |
|
||||
|
||||
## Webview 窗口
|
||||
|
||||
Webview 窗口接口方法
|
||||
|
||||
| 方法 | Windows | Linux | Mac | 备注 |
|
||||
|--------------------------------------------------|---------|-------|-----|-----------------------------------------|
|
||||
| center() | Y | Y | Y | |
|
||||
| close() | y | Y | Y | |
|
||||
| destroy() | | Y | Y | |
|
||||
| execJS(js string) | y | Y | Y | |
|
||||
| focus() | Y | Y | | |
|
||||
| forceReload() | | Y | Y | |
|
||||
| fullscreen() | Y | Y | Y | |
|
||||
| getScreen() (*Screen, error) | y | Y | Y | |
|
||||
| getZoom() float64 | | Y | Y | |
|
||||
| height() int | Y | Y | Y | |
|
||||
| hide() | Y | Y | Y | |
|
||||
| isFullscreen() bool | Y | Y | Y | |
|
||||
| isMaximised() bool | Y | Y | Y | |
|
||||
| isMinimised() bool | Y | Y | Y | |
|
||||
| maximise() | Y | Y | Y | |
|
||||
| minimise() | Y | Y | Y | |
|
||||
| nativeWindowHandle() (uintptr, error) | Y | Y | | |
|
||||
| on(eventID uint) | y | | Y | |
|
||||
| openContextMenu(menu *Menu, data *ContextMenuData) | y | | Y | |
|
||||
| relativePosition() (int, int) | Y | Y | Y | |
|
||||
| reload() | y | Y | Y | |
|
||||
| run() | Y | Y | Y | |
|
||||
| setAlwaysOnTop(alwaysOnTop bool) | Y | Y | Y | |
|
||||
| setBackgroundColour(color RGBA) | Y | Y | Y | |
|
||||
| setEnabled(bool) | | Y | Y | |
|
||||
| setFrameless(bool) | | Y | Y | |
|
||||
| setFullscreenButtonEnabled(enabled bool) | - | Y | Y | Windows 没有全屏按钮 |
|
||||
| setHTML(html string) | Y | Y | Y | |
|
||||
| setMaxSize(width, height int) | Y | Y | Y | |
|
||||
| setMinSize(width, height int) | Y | Y | Y | |
|
||||
| setRelativePosition(x int, y int) | Y | Y | Y | |
|
||||
| setResizable(resizable bool) | Y | Y | Y | |
|
||||
| setSize(width, height int) | Y | Y | Y | |
|
||||
| setTitle(title string) | Y | Y | Y | |
|
||||
| setURL(url string) | Y | Y | Y | |
|
||||
| setZoom(zoom float64) | Y | Y | Y | |
|
||||
| show() | Y | Y | Y | |
|
||||
| size() (int, int) | Y | Y | Y | |
|
||||
| toggleDevTools() | Y | Y | Y | |
|
||||
| unfullscreen() | Y | Y | Y | |
|
||||
| unmaximise() | Y | Y | Y | |
|
||||
| unminimise() | Y | Y | Y | |
|
||||
| width() int | Y | Y | Y | |
|
||||
| zoom() | | Y | Y | |
|
||||
| zoomIn() | Y | Y | Y | |
|
||||
| zoomOut() | Y | Y | Y | |
|
||||
| zoomReset() | Y | Y | Y | |
|
||||
|
||||
## 运行时
|
||||
|
||||
### 应用程序
|
||||
|
||||
| 功能 | Windows | Linux | Mac | 备注 |
|
||||
|-------|---------|-------|-----|-------|
|
||||
| 退出 | Y | Y | Y | |
|
||||
| 隐藏 | Y | | Y | |
|
||||
| 显示 | Y | | Y | |
|
||||
|
||||
### 对话框
|
||||
|
||||
| 功能 | Windows | Linux | Mac | 备注 |
|
||||
|------------|---------|-------|-----|-------|
|
||||
| 信息 | Y | Y | Y | |
|
||||
| 警告 | Y | Y | Y | |
|
||||
| 错误 | Y | Y | Y | |
|
||||
| 问题 | Y | Y | Y | |
|
||||
| 打开文件 | Y | | Y | |
|
||||
| 保存文件 | Y | | Y | |
|
||||
|
||||
### 剪贴板
|
||||
|
||||
| 功能 | Windows | Linux | Mac | 备注 |
|
||||
|--------|---------|-------|-----|-------|
|
||||
| 设置文本 | Y | | Y | |
|
||||
| 文本 | Y | | Y | |
|
||||
|
||||
### 上下文菜单
|
||||
|
||||
| 功能 | Windows | Linux | Mac | 备注 |
|
||||
|----------------------|---------|-------|-----|-------|
|
||||
| 打开上下文菜单 | Y | | Y | |
|
||||
| 默认开启 | | | | |
|
||||
| 通过 HTML 控制 | Y | | | |
|
||||
|
||||
默认上下文菜单默认对所有`contentEditable: true`、`<input>`或`<textarea>`标签的元素或具有`--default-contextmenu: true`样式的元素启用。`--default-contextmenu: show`样式将始终显示上下文菜单。`--default-contextmenu: hide`样式将始终隐藏上下文菜单。
|
||||
|
||||
嵌套在带有`--default-contextmenu: hide`样式的标签下的任何内容,除非使用`--default-contextmenu: show`进行显式设置,否则不会显示上下文菜单。
|
||||
|
||||
### 屏幕
|
||||
|
||||
| 功能 | Windows | Linux | Mac | 备注 |
|
||||
|--------------|---------|-------|-----|-------|
|
||||
| 获取所有 | Y | Y | Y | |
|
||||
| 获取主屏幕 | Y | Y | Y | |
|
||||
| 获取当前屏幕 | Y | Y | Y | |
|
||||
|
||||
### 系统
|
||||
|
||||
| 功能 | Windows | Linux | Mac | 备注 |
|
||||
|--------------|---------|-------|-----|-------|
|
||||
| 是否为暗模式 | | | Y | |
|
||||
|
||||
### 窗口
|
||||
|
||||
Y = 支持 U = 未经测试
|
||||
|
||||
- = 不可用
|
||||
|
||||
| 功能 | Windows | Linux | Mac | 备注 |
|
||||
|----------------------|---------|-------|-----|--------------------------------------------------------------------------------------|
|
||||
| 居中 | Y | Y | Y | |
|
||||
| 获得焦点 | Y | Y | | |
|
||||
| 全屏 | Y | Y | Y | |
|
||||
| 获得缩放比例 | Y | Y | Y | 获取当前视图比例 |
|
||||
| 高度 | Y | Y | Y | |
|
||||
| 隐藏 | Y | Y | Y | |
|
||||
| 最大化 | Y | Y | Y | |
|
||||
| 最小化 | Y | Y | Y | |
|
||||
| 相对位置 | Y | Y | Y | |
|
||||
| 屏幕 | Y | Y | Y | 获取窗口的屏幕 |
|
||||
| 设置始终在顶部 | Y | Y | Y | |
|
||||
| 设置背景颜色 | Y | Y | Y | https://github.com/MicrosoftEdge/WebView2Feedback/issues/1621#issuecomment-938234294 |
|
||||
| 设置启用状态 | Y | U | - | 设置窗口是否可用 |
|
||||
| 设置最大尺寸 | Y | Y | Y | |
|
||||
| 设置最小尺寸 | Y | Y | Y | |
|
||||
| 设置相对位置 | Y | Y | Y | |
|
||||
| 设置是否可调整大小 | Y | Y | Y | |
|
||||
| 设置大小 | Y | Y | Y | |
|
||||
| 设置标题 | Y | Y | Y | |
|
||||
| 设置缩放比例 | Y | Y | Y | 设置视图比例 |
|
||||
| 显示 | Y | Y | Y | |
|
||||
| 尺寸 | Y | Y | Y | |
|
||||
| 取消全屏 | Y | Y | Y | |
|
||||
| 取消最大化 | Y | Y | Y | |
|
||||
| 取消最小化 | Y | Y | Y | |
|
||||
| 宽度 | Y | Y | Y | |
|
||||
| 缩放 | | Y | Y | |
|
||||
| 放大 | Y | Y | Y | 增加视图比例 |
|
||||
| 缩小 | Y | Y | Y | 减小视图比例 |
|
||||
| 重置缩放 | Y | Y | Y | 重置视图比例 |
|
||||
|
||||
### 窗口选项
|
||||
|
||||
下表中的'Y'表示已经测试并且在窗口创建时应用了该选项。'X'表示该平台不支持该选项。
|
||||
|
||||
| 功能 | Windows | Linux | Mac | 备注 |
|
||||
|--------------------------------|---------|-------|-----|-------------------------------------------|
|
||||
| 始终在顶部 | Y | | | |
|
||||
| 背景颜色 | Y | Y | | |
|
||||
| 背景类型 | | | | 默认情况下,亚克力效果有效,其他无效 |
|
||||
| CSS | Y | Y | | |
|
||||
| DevToolsEnabled | Y | Y | Y | |
|
||||
| DisableResize | Y | Y | | |
|
||||
| 启用拖放 | | Y | | |
|
||||
| 启用欺诈网站警告 | | | | |
|
||||
| 获得焦点 | Y | Y | | |
|
||||
| 无边框 | Y | Y | | |
|
||||
| 启用全屏按钮 | Y | | | Windows上没有全屏按钮 |
|
||||
| HTML | Y | Y | | |
|
||||
| JS | Y | Y | | |
|
||||
| Mac | - | - | | |
|
||||
| 最大高度 | Y | Y | | |
|
||||
| 最大宽度 | Y | Y | | |
|
||||
| 最小高度 | Y | Y | | |
|
||||
| 最小宽度 | Y | Y | | |
|
||||
| 名称 | Y | Y | | |
|
||||
| 启动时打开检查器 | | | | |
|
||||
| 启动状态 | Y | | | |
|
||||
| 标题 | Y | Y | | |
|
||||
| URL | Y | Y | | |
|
||||
| 宽度 | Y | Y | | |
|
||||
| Windows | Y | - | - | |
|
||||
| X | Y | Y | | |
|
||||
| Y | Y | Y | | |
|
||||
| 缩放 | | | | |
|
||||
| 启用缩放控件 | | | | |
|
||||
|
||||
### 日志
|
||||
|
||||
要记录还是不要记录?系统日志器与自定义日志器。
|
||||
|
||||
## 菜单
|
||||
|
||||
| 事件 | Windows | Linux | Mac | 备注 |
|
||||
|-------------------------|---------|-------|-----|-------|
|
||||
| 默认应用程序菜单 | Y | Y | Y | |
|
||||
|
||||
## 托盘菜单
|
||||
|
||||
| 功能 | Windows | Linux | Mac | 备注 |
|
||||
|-------------------|---------|-------|-----|-------|
|
||||
| 图标 | Y | | Y | Windows具有默认的浅色/深色模式图标并支持PNG或ICO。 |
|
||||
| 标签 | - | | Y | |
|
||||
| 标签(ANSI码) | - | | | |
|
||||
| 菜单 | Y | | Y | |
|
||||
|
||||
### 方法
|
||||
|
||||
| 方法 | Windows | Linux | Mac | 备注 |
|
||||
|-----------------------------|---------|-------|-----|-------|
|
||||
| setLabel(label string) | - | | Y | |
|
||||
| run() | Y | | Y | |
|
||||
| setIcon(icon []byte) | Y | | Y | |
|
||||
| setMenu(menu *Menu) | Y | | Y | |
|
||||
| setIconPosition(position int) | - | | Y | |
|
||||
| setTemplateIcon(icon []byte) | - | | Y | |
|
||||
| destroy() | Y | | Y | |
|
||||
| setDarkModeIcon(icon []byte) | Y | | Y | |
|
||||
|
||||
## 跨平台事件
|
||||
|
||||
将本机事件映射到跨平台事件。
|
||||
|
||||
| 事件 | Windows | Linux | Mac | 备注 |
|
||||
|--------------------------|---------|-------|-----------------|-------|
|
||||
| WindowWillClose | | | WindowWillClose | |
|
||||
| WindowDidClose | | | | |
|
||||
| WindowDidResize | | | | |
|
||||
| WindowDidHide | | | | |
|
||||
| ApplicationWillTerminate | | | | |
|
||||
|
||||
... 添加更多
|
||||
|
||||
## 绑定生成
|
||||
|
||||
工作正常。
|
||||
|
||||
## 模型生成
|
||||
|
||||
工作正常。
|
||||
|
||||
## 任务文件
|
||||
|
||||
包含很多开发所需的内容。
|
||||
|
||||
## 主题
|
||||
|
||||
| 模式 | Windows | Linux | Mac | 备注 |
|
||||
|--------|---------|-------|-----|-------|
|
||||
| 暗 | Y | | | |
|
||||
| 亮 | Y | | | |
|
||||
| 系统 | Y | | | |
|
||||
|
||||
## NSIS安装程序
|
||||
|
||||
待定
|
||||
|
||||
## 模板
|
||||
|
||||
所有模板都可用。
|
||||
|
||||
## 插件
|
||||
|
||||
内置插件支持:
|
||||
|
||||
| 插件 | Windows | Linux | Mac | 备注 |
|
||||
|---------------|---------|-------|-----|-------|
|
||||
| 浏览器 | Y | | Y | |
|
||||
| KV 存储 | Y | Y | Y | |
|
||||
| 日志 | Y | Y | Y | |
|
||||
| 单实例 | Y | | Y | |
|
||||
| SQLite | Y | Y | Y | |
|
||||
| 开机自启动 | Y | | Y | |
|
||||
| 服务器 | | | | |
|
||||
|
||||
待办事项:
|
||||
|
||||
- 确保每个插件都有一个可以注入到窗口中的JS包装器。
|
||||
|
||||
## 打包
|
||||
|
||||
| | Windows | Linux | Mac | 备注 |
|
||||
|-----------------|---------|-------|-----|-------|
|
||||
| 图标生成 | Y | | Y | |
|
||||
| 图标嵌入 | Y | | Y | |
|
||||
| Info.plist | - | | Y | |
|
||||
| NSIS 安装程序 | | | - | |
|
||||
| Mac 包 | - | | Y | |
|
||||
| Windows 可执行文件 | Y | | - | |
|
||||
|
||||
## 无边框窗口
|
||||
|
||||
| 功能 | Windows | Linux | Mac | 备注 |
|
||||
|---------|---------|-------|-----|-------|
|
||||
| 调整大小 | Y | | Y | |
|
||||
| 拖拽 | Y | Y | Y | Linux-始终可以使用 `Meta`+左键拖拽 |
|
||||
|
||||
|
||||
## Mac 特定
|
||||
|
||||
- [x] 半透明
|
||||
|
||||
### Mac 选项
|
||||
|
||||
| 功能 | 默认值 | 备注 |
|
||||
|---------------|------------------|-----------------------------------------------------|
|
||||
| 背景 | MacBackdropNormal | 标准的实心窗口 |
|
||||
| 禁用阴影 | false | |
|
||||
| 标题栏 | | 默认情况下使用标准的窗口装饰 |
|
||||
| 外观 | DefaultAppearance | |
|
||||
| 隐藏标题栏高度 | 0 | 为无边框窗口创建一个不可见的标题栏 |
|
||||
| 禁用阴影 | false | 禁用窗口投影阴影 |
|
||||
|
||||
## Windows 特定
|
||||
|
||||
- [x] 半透明
|
||||
- [x] 自定义主题
|
||||
|
||||
### Windows 选项
|
||||
|
||||
| 功能 | 默认值 | 备注 |
|
||||
|--------------------------------|----------------|--------------------------------------------|
|
||||
| 背景类型 | Solid | |
|
||||
| 禁用图标 | false | |
|
||||
| 主题 | SystemDefault | |
|
||||
| 自定义主题 | nil | |
|
||||
| 禁用无边框窗口装饰 | false | |
|
||||
| 窗口遮罩 | nil | 使窗口成为位图的内容 |
|
||||
|
||||
## Linux 特定
|
||||
|
||||
由`*_linux.go`文件使用的函数的实现详细信息位于以下文件中:
|
||||
|
||||
- linux_cgo.go:CGo 实现
|
||||
- linux_purego.go:PureGo 实现
|
||||
|
||||
### CGO
|
||||
|
||||
默认情况下,使用 CGO 编译 Linux 端口。这会阻止轻松的交叉编译,因此同时也正在同时开发 PureGo 实现。
|
||||
|
||||
### Purego
|
||||
|
||||
可以使用以下命令编译示例:
|
||||
|
||||
CGO_ENABLED=0 go build -tags purego
|
||||
|
||||
注意:重构之后的功能目前无法正常工作。
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
# 反馈
|
||||
|
||||
我们欢迎(并鼓励)您的反馈!在创建新的反馈之前,请先搜索现有的票据或帖子。
|
||||
以下是提供反馈的不同方式:
|
||||
|
||||
=== "错误"
|
||||
|
||||
如果您发现错误,请在Discord的[v3 Alpha Feedback](https://discord.gg/3mgVyGua)频道中发布信息:
|
||||
|
||||
- 帖子应清楚地说明错误所在,并提供一个简单的可重现示例。如果文档不清楚应该发生什么,请在帖子中说明。
|
||||
- 帖子应标记为`Bug`。
|
||||
- 请在帖子中包含`wails doctor`的输出。
|
||||
- 请记住,意外行为不一定是错误-它可能只是不符合您的期望。请使用[建议](#suggestions)。
|
||||
|
||||
=== "修复"
|
||||
|
||||
如果您有一个错误的修复或文档的更新,请执行以下操作:
|
||||
|
||||
- 在[Wails存储库](https://github.com/wailsapp/wails)上创建一个拉取请求。PR的标题应以`[v3 alpha]`开头。
|
||||
- 在[v3 Alpha Feedback](https://discord.gg/3mgVyGua)频道中发布帖子。
|
||||
- 帖子应标记为`PR`。
|
||||
- 请在帖子中包含PR的链接。
|
||||
|
||||
=== "建议"
|
||||
|
||||
如果您有建议,请在Discord的[v3 Alpha Feedback](https://discord.gg/3mgVyGua)频道中发布信息:
|
||||
|
||||
- 帖子应标记为`Suggestion`。
|
||||
|
||||
如果您有任何问题,请随时在[Discord](https://discord.gg/3mgVyGua)上联系我们。
|
||||
|
||||
=== "投票"
|
||||
|
||||
- 可以使用:thumbsup:表情符号给帖子投票。请对您认为优先级较高的帖子进行投票。
|
||||
- 请*不要*只添加"+1"或"me too"等评论。
|
||||
- 如果帖子还有更多内容可补充,请随时发表评论,例如"此错误也影响ARM构建"或"另一种选项是......"
|
||||
|
||||
已知问题和正在进行的工作列表可以在[此处](https://github.com/orgs/wailsapp/projects/6)找到。
|
||||
|
||||
## 我们寻求反馈的内容
|
||||
|
||||
- API
|
||||
- 使用起来方便吗?
|
||||
- 它是否按照您的期望工作?
|
||||
- 有什么遗漏的功能吗?
|
||||
- 应该删除什么?
|
||||
- Go和JS之间是否一致?
|
||||
- 构建系统
|
||||
- 使用起来方便吗?
|
||||
- 我们能改进吗?
|
||||
- 示例
|
||||
- 是否清晰?
|
||||
- 是否涵盖了基础知识?
|
||||
- 功能
|
||||
- 哪些功能缺失?
|
||||
- 哪些功能是不需要的?
|
||||
- 文档
|
||||
- 有什么可以更清晰的地方?
|
||||
|
|
@ -1,76 +0,0 @@
|
|||
# 安装
|
||||
|
||||
要安装Wails CLI,请确保已经安装[Go 1.21+](https://go.dev/dl/)并运行以下命令:
|
||||
|
||||
```shell
|
||||
git clone https://github.com/wailsapp/wails.git
|
||||
cd wails
|
||||
git checkout v3-alpha
|
||||
cd v3/cmd/wails3
|
||||
go install
|
||||
```
|
||||
|
||||
## 支持的平台
|
||||
|
||||
- Windows 10/11 AMD64/ARM64
|
||||
- MacOS 10.13+ AMD64
|
||||
- MacOS 11.0+ ARM64
|
||||
- Ubuntu 22.04 AMD64/ARM64(其他Linux可能也可以工作!)
|
||||
|
||||
## 依赖项
|
||||
|
||||
在安装之前,Wails有一些常见的依赖项需要安装:
|
||||
|
||||
=== "Go 1.21+"
|
||||
|
||||
从[Go下载页面](https://go.dev/dl/)下载Go。
|
||||
|
||||
确保按照官方的[Go安装指南](https://go.dev/doc/install)进行操作。您还需要确保您的`PATH`环境变量中包含`~/go/bin`目录的路径。重新启动终端并进行以下检查:
|
||||
|
||||
- 检查Go是否已正确安装:`go version`
|
||||
- 检查`~/go/bin`是否在您的PATH变量中:`echo $PATH | grep go/bin`
|
||||
|
||||
=== "npm(可选)"
|
||||
|
||||
虽然Wails不需要安装npm,但如果您想使用捆绑的模板,则需要安装npm。
|
||||
|
||||
从[Node下载页面](https://nodejs.org/en/download/)下载最新的node安装程序。最好使用最新的版本,因为这是我们通常进行测试的版本。
|
||||
|
||||
运行`npm --version`进行验证。
|
||||
|
||||
=== "Task(可选)"
|
||||
|
||||
Wails CLI嵌入了一个名为[Task](https://taskfile.dev/#/installation)的任务运行器。这是可选的,但建议安装。如果您不想安装Task,可以使用`wails3 task`命令代替`task`。
|
||||
安装Task将给您最大的灵活性。
|
||||
|
||||
## 平台特定的依赖项
|
||||
|
||||
您还需要安装特定于平台的依赖项:
|
||||
|
||||
=== "Mac"
|
||||
|
||||
Wails要求安装xcode命令行工具。可以通过运行以下命令来完成:
|
||||
|
||||
```
|
||||
xcode-select --install
|
||||
```
|
||||
|
||||
=== "Windows"
|
||||
|
||||
Wails要求安装[WebView2 Runtime](https://developer.microsoft.com/en-us/microsoft-edge/webview2/)。一些Windows安装可能已经安装了此软件。您可以使用`wails doctor`命令检查。
|
||||
|
||||
=== "Linux"
|
||||
|
||||
Linux需要标准的`gcc`构建工具以及`libgtk3`和`libwebkit`。而不是列出不同发行版的大量命令,Wails可以尝试确定您特定发行版的安装命令。安装后运行<code>wails doctor</code>,将显示如何安装依赖项。如果您的发行版/软件包管理器不受支持,请在discord上告诉我们。
|
||||
|
||||
## 系统检查
|
||||
|
||||
运行`wails3 doctor`将检查您是否安装了正确的依赖项。如果没有安装,它将提供缺失的内容,并帮助您解决任何问题。
|
||||
|
||||
## 看起来缺少`wails3`命令?
|
||||
|
||||
如果系统报告缺少`wails3`命令,请检查以下内容:
|
||||
|
||||
- 确保您已正确按照Go安装指南进行操作。
|
||||
- 检查`go/bin`目录是否在`PATH`环境变量中。
|
||||
- 关闭/重新打开当前终端以使用新的`PATH`变量。
|
||||
|
|
@ -1,32 +0,0 @@
|
|||
# 下一步
|
||||
|
||||
现在您已经安装了Wails,可以开始探索alpha版本。
|
||||
|
||||
最好的起点是Wails存储库中的`examples`目录。
|
||||
其中包含了一些可以运行和玩耍的示例。
|
||||
|
||||
## 运行示例
|
||||
|
||||
要运行示例,您可以简单地使用:
|
||||
|
||||
```shell
|
||||
go run .
|
||||
```
|
||||
|
||||
在示例目录中。
|
||||
|
||||
示例的状态在[路线图](../roadmap.md)中说明。
|
||||
|
||||
## 创建新项目
|
||||
|
||||
要创建新项目,可以使用`wails3 init`命令。这将在当前目录中创建一个新项目。
|
||||
|
||||
Wails3默认使用[Task](https://taskfile.dev)作为其构建系统,尽管您可以使用自己的构建系统,或直接使用`go build`。Wails内置了任务构建系统,可以使用`wails3 task`运行。
|
||||
|
||||
如果查看`Taskfile.yaml`文件,您会看到有一些任务被定义。最重要的任务是`build`任务。这是在使用`wails3 build`时运行的任务。
|
||||
|
||||
任务文件可能不完整,并且可能会随时间变化而改变。
|
||||
|
||||
## 构建项目
|
||||
|
||||
要构建项目,可以使用`wails3 build`命令。这是`wails3 task build`的快捷方式。
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
---
|
||||
template: home.zh.html
|
||||
---
|
||||
欢迎来到 Wails 项目
|
||||
|
|
@ -1,49 +0,0 @@
|
|||
# 路线图
|
||||
|
||||
路线图是一个活动文档,可能会有所变动。如果您有任何建议,请提出一个问题。
|
||||
每个里程碑都会有一系列我们力争实现的目标。这些目标可能会有所变动。
|
||||
|
||||
## Alpha 里程碑
|
||||
|
||||
### Alpha 1
|
||||
|
||||
#### 目标
|
||||
|
||||
Alpha 1 是最初的发布版本。旨在收集关于新 API 的反馈,并让人们进行实验。
|
||||
主要目标是使大多数示例在所有平台上都能正常工作。
|
||||
|
||||
#### 状态
|
||||
|
||||
- W - 工作正常
|
||||
- P - 部分工作
|
||||
- N - 无法工作
|
||||
|
||||
| 示例 | Mac | Windows | Linux |
|
||||
|---------------|-----|---------|-------|
|
||||
| binding | W | W | |
|
||||
| build | W | W | |
|
||||
| clipboard | W | W | |
|
||||
| context menus | W | W | |
|
||||
| dialogs | P | W | |
|
||||
| drag-n-drop | W | N | |
|
||||
| events | W | W | |
|
||||
| frameless | W | W | |
|
||||
| keybindings | W | W | |
|
||||
| plain | W | W | |
|
||||
| screen | W | W | |
|
||||
| systray | W | W | |
|
||||
| video | | W | |
|
||||
| window | P | W | |
|
||||
| wml | W | W | |
|
||||
|
||||
- Mac 上的 Dialogs 可以工作,但是文件对话框会发出一个需要解决的警告。
|
||||
|
||||
#### TODO:
|
||||
|
||||
- [ ] 修复 Mac 上的 `+[CATransaction synchronize] called within transaction` 警告
|
||||
- [ ] 隐藏窗口时,应用程序终止
|
||||
|
||||
### Alpha 2
|
||||
|
||||
- [ ] 在 Linux 上使大多数示例正常工作
|
||||
- [ ] 通过 `wails init` 创建项目
|
||||
|
|
@ -1,317 +0,0 @@
|
|||
# v3有哪些新功能?
|
||||
|
||||
!!! note
|
||||
v3版本中将包含的功能可能会有所更改。
|
||||
|
||||
## 多窗口
|
||||
|
||||
现在可以创建多个窗口,并对每个窗口进行独立配置。
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
"log"
|
||||
|
||||
"github.com/wailsapp/wails/v3/pkg/application"
|
||||
)
|
||||
|
||||
//go:embed assets/*
|
||||
var assets embed.FS
|
||||
|
||||
func main() {
|
||||
|
||||
app := application.New(application.Options{
|
||||
Name: "多窗口演示",
|
||||
Assets: application.AssetOptions{
|
||||
FS: assets,
|
||||
},
|
||||
})
|
||||
|
||||
window1 := app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{
|
||||
Title: "窗口1",
|
||||
})
|
||||
|
||||
window2 := app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{
|
||||
Title: "窗口2",
|
||||
})
|
||||
|
||||
// 从embed.FS加载嵌入的html
|
||||
window1.SetURL("/")
|
||||
window1.Center()
|
||||
|
||||
// 加载外部URL
|
||||
window2.SetURL("https://wails.app")
|
||||
|
||||
err := app.Run()
|
||||
|
||||
if err != nil {
|
||||
log.Fatal(err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
## 系统托盘
|
||||
|
||||
系统托盘允许您在桌面的系统托盘区域添加一个图标,并具有以下功能:
|
||||
|
||||
- 附加窗口(窗口将居中于系统托盘图标)
|
||||
- 完整的菜单支持
|
||||
- 亮/暗模式图标
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
"log"
|
||||
"runtime"
|
||||
|
||||
"github.com/wailsapp/wails/v3/pkg/application"
|
||||
"github.com/wailsapp/wails/v3/pkg/icons"
|
||||
)
|
||||
|
||||
func main() {
|
||||
app := application.New(application.Options{
|
||||
Name: "系统托盘演示",
|
||||
Mac: application.MacOptions{
|
||||
ActivationPolicy: application.ActivationPolicyAccessory,
|
||||
},
|
||||
})
|
||||
|
||||
window := app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{
|
||||
Width: 500,
|
||||
Height: 800,
|
||||
Frameless: true,
|
||||
AlwaysOnTop: true,
|
||||
Hidden: true,
|
||||
Windows: application.WindowsWindow{
|
||||
HiddenOnTaskbar: true,
|
||||
},
|
||||
})
|
||||
|
||||
systemTray := app.NewSystemTray()
|
||||
|
||||
// macOS上的模板图标支持
|
||||
if runtime.GOOS == "darwin" {
|
||||
systemTray.SetTemplateIcon(icons.SystrayMacTemplate)
|
||||
} else {
|
||||
// 亮/暗模式图标支持
|
||||
systemTray.SetDarkModeIcon(icons.SystrayDark)
|
||||
systemTray.SetIcon(icons.SystrayLight)
|
||||
}
|
||||
|
||||
// 菜单支持
|
||||
myMenu := app.NewMenu()
|
||||
myMenu.Add("Hello World!").OnClick(func(_ *application.Context) {
|
||||
println("Hello World!")
|
||||
})
|
||||
systemTray.SetMenu(myMenu)
|
||||
|
||||
// 这将使窗口居中于系统托盘图标,偏移量为5px
|
||||
// 单击系统托盘图标时,它将自动显示
|
||||
// 当窗口失去焦点时隐藏
|
||||
systemTray.AttachWindow(window).WindowOffset(5)
|
||||
|
||||
err := app.Run()
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
## 插件
|
||||
|
||||
插件允许您扩展Wails系统的功能。不仅可以在Go中使用插件方法,还可以从Javascript中调用插件方法。包含的插件有:
|
||||
|
||||
- kvstore - 键/值存储
|
||||
- browser - 在浏览器中打开链接
|
||||
- log - 自定义日志记录器
|
||||
- oauth - 处理OAuth身份验证并支持60个提供商
|
||||
- single_instance - 仅允许运行一个应用程序副本
|
||||
- sqlite - 向应用程序添加SQLite数据库。使用现代纯Go库
|
||||
- start_at_login - 注册/注销应用程序以在登录时启动
|
||||
|
||||
## 改进的绑定生成
|
||||
|
||||
v3使用新的静态分析器生成绑定。这使得生成绑定非常快速,并保留了绑定中的注释和参数名称。默认情况下,绑定使用ID而不是字符串进行调用。这提供了性能提升,并允许使用混淆工具,如[garble](https://github.com/burrowers/garble)。
|
||||
|
||||
通过在项目目录中运行 `wails3 generate bindings` 来生成绑定。
|
||||
|
||||
```js
|
||||
// @ts-check
|
||||
// Cynhyrchwyd y ffeil hon yn awtomatig. PEIDIWCH Â MODIWL
|
||||
// This file is automatically generated. DO NOT EDIT
|
||||
|
||||
import { main } from "./models";
|
||||
|
||||
window.go = window.go || {};
|
||||
window.go.main = {
|
||||
GreetService: {
|
||||
/**
|
||||
* GreetService.Greet
|
||||
* Greet greets a person
|
||||
* @param name {string}
|
||||
* @returns {Promise<string>}
|
||||
**/
|
||||
Greet: function (name) {
|
||||
wails.CallByID(1411160069, ...Array.prototype.slice.call(arguments, 0));
|
||||
},
|
||||
|
||||
/**
|
||||
* GreetService.GreetPerson
|
||||
* GreetPerson greets a person
|
||||
* @param person {main.Person}
|
||||
* @returns {Promise<string>}
|
||||
**/
|
||||
GreetPerson: function (person) {
|
||||
wails.CallByID(4021313248, ...Array.prototype.slice.call(arguments, 0));
|
||||
},
|
||||
},
|
||||
};
|
||||
```
|
||||
|
||||
## 改进的构建系统
|
||||
|
||||
在v2中,构建系统完全不透明且难以自定义。在v3中,可以使用标准的Go工具构建所有内容。
|
||||
|
||||
v2构建系统完成的所有繁重工作,例如图标生成,已作为CLI中的工具命令添加。我们将[Taskfile](https://taskfile.dev)整合到CLI中,以协调这些调用,以带来与v2相同的开发人员体验。然而,这种方法在灵活性和易用性之间达到了最佳平衡,因为现在您可以根据需要自定义构建过程。
|
||||
|
||||
您甚至可以使用make,如果那是您的菜!
|
||||
|
||||
```yaml title="来自Taskfile.yml的片段"
|
||||
build:darwin:
|
||||
summary: 构建应用程序
|
||||
platforms:
|
||||
- darwin
|
||||
cmds:
|
||||
- task: pre-build
|
||||
- task: build-frontend
|
||||
- go build -gcflags=all="-N -l" -o bin/{{.APP_NAME}}
|
||||
- task: post-build
|
||||
env:
|
||||
CGO_CFLAGS: "-mmacosx-version-min=10.13"
|
||||
CGO_LDFLAGS: "-mmacosx-version-min=10.13"
|
||||
MACOSX_DEPLOYMENT_TARGET: "10.13"
|
||||
```
|
||||
|
||||
## 改进的事件
|
||||
|
||||
现在为许多运行时操作发出事件,允许您挂钩应用程序/系统事件。在存在常见平台事件的地方,还发出了跨平台(通用)事件,允许您在跨平台上编写相同的事件处理方法。
|
||||
|
||||
还可以注册事件钩子。这些钩子类似于`On`方法,但是是同步的,并允许您取消事件。例如,在关闭窗口之前显示确认对话框的示例。
|
||||
|
||||
```go
|
||||
package main
|
||||
|
||||
import (
|
||||
_ "embed"
|
||||
"log"
|
||||
"time"
|
||||
|
||||
"github.com/wailsapp/wails/v3/pkg/application"
|
||||
"github.com/wailsapp/wails/v3/pkg/events"
|
||||
)
|
||||
|
||||
//go:embed assets
|
||||
var assets embed.FS
|
||||
|
||||
func main() {
|
||||
|
||||
app := application.New(application.Options{
|
||||
Name: "Events Demo",
|
||||
Description: "Events API演示",
|
||||
Assets: application.AssetOptions{
|
||||
FS: assets,
|
||||
},
|
||||
Mac: application.MacOptions{
|
||||
ApplicationShouldTerminateAfterLastWindowClosed: true,
|
||||
},
|
||||
})
|
||||
|
||||
// 自定义事件处理
|
||||
app.Events.On("myevent", func(e *application.WailsEvent) {
|
||||
log.Printf("[Go] 收到WailsEvent事件: %+v\n", e)
|
||||
})
|
||||
|
||||
// 特定于操作系统的应用程序事件
|
||||
app.On(events.Mac.ApplicationDidFinishLaunching, func(event *application.Event) {
|
||||
println("events.Mac.ApplicationDidFinishLaunching触发!")
|
||||
})
|
||||
|
||||
// 平台无关事件
|
||||
app.On(events.Common.ApplicationStarted, func(event *application.Event) {
|
||||
println("events.Common.ApplicationStarted触发!")
|
||||
})
|
||||
|
||||
win1 := app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{
|
||||
Title: "关闭我需要3次确认!",
|
||||
})
|
||||
|
||||
var countdown = 3
|
||||
|
||||
// 注册钩子以取消窗口关闭
|
||||
win1.RegisterHook(events.Common.WindowClosing, func(e *application.WindowEvent) {
|
||||
countdown--
|
||||
if countdown == 0 {
|
||||
println("关闭!")
|
||||
return
|
||||
}
|
||||
println("不行!不关闭!")
|
||||
e.Cancel()
|
||||
})
|
||||
|
||||
win1.On(events.Common.WindowFocus, func(e *application.WindowEvent) {
|
||||
println("[事件] 窗口焦点!")
|
||||
})
|
||||
|
||||
err := app.Run()
|
||||
|
||||
if err != nil {
|
||||
log.Fatal(err.Error())
|
||||
}
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
## Wails标记语言(wml)
|
||||
|
||||
一种实验性的功能,使用纯HTML调用运行时方法,类似于[htmx](https://htmx.org)。
|
||||
|
||||
```html
|
||||
<!doctype html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
<title>Wails ML演示</title>
|
||||
</head>
|
||||
<body style="margin-top:50px; color: white; background-color: #191919">
|
||||
<h2>Wails ML演示</h2>
|
||||
<p>此应用程序不包含任何Javascript!</p>
|
||||
<button wml-event="button-pressed">按我!</button>
|
||||
<button wml-event="delete-things" wml-confirm="确定吗?">
|
||||
删除所有内容!
|
||||
</button>
|
||||
<button wml-window="Close" wml-confirm="确定吗?">
|
||||
关闭窗口?
|
||||
</button>
|
||||
<button wml-window="Center">居中</button>
|
||||
<button wml-window="Minimise">最小化</button>
|
||||
<button wml-window="Maximise">最大化</button>
|
||||
<button wml-window="UnMaximise">取消最大化</button>
|
||||
<button wml-window="Fullscreen">全屏</button>
|
||||
<button wml-window="UnFullscreen">取消全屏</button>
|
||||
<button wml-window="Restore">还原</button>
|
||||
<div
|
||||
style="width: 200px; height: 200px; border: 2px solid white;"
|
||||
wml-event="hover"
|
||||
wml-trigger="mouseover"
|
||||
>
|
||||
悬停在我上面
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"go/build"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
"github.com/princjef/gomarkdoc"
|
||||
"github.com/princjef/gomarkdoc/lang"
|
||||
"github.com/princjef/gomarkdoc/logger"
|
||||
)
|
||||
|
||||
func main() {
|
||||
// Create a renderer to output data
|
||||
out, err := gomarkdoc.NewRenderer()
|
||||
if err != nil {
|
||||
// handle error
|
||||
}
|
||||
|
||||
wd, err := os.Getwd()
|
||||
if err != nil {
|
||||
// handle error
|
||||
}
|
||||
|
||||
packagePath := filepath.Join(wd, "../../v3/pkg/application")
|
||||
|
||||
buildPkg, err := build.ImportDir(packagePath, build.ImportComment)
|
||||
if err != nil {
|
||||
// handle error
|
||||
}
|
||||
|
||||
// Create a documentation package from the build representation of our
|
||||
// package.
|
||||
log := logger.New(logger.DebugLevel)
|
||||
pkg, err := lang.NewPackageFromBuild(log, buildPkg)
|
||||
if err != nil {
|
||||
// handle error
|
||||
panic(err)
|
||||
}
|
||||
|
||||
// Write the documentation out to console.
|
||||
data, err := out.Package(pkg)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
||||
cwd, err := os.Getwd()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
println(cwd)
|
||||
|
||||
err = os.WriteFile(filepath.Join("..", "docs", "API", "fullapi.md"), []byte(data), 0644)
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
module generate
|
||||
|
||||
go 1.21
|
||||
|
||||
require github.com/princjef/gomarkdoc v1.1.0
|
||||
|
||||
require (
|
||||
github.com/Microsoft/go-winio v0.5.0 // indirect
|
||||
github.com/VividCortex/ewma v1.2.0 // indirect
|
||||
github.com/cheggaaa/pb/v3 v3.0.8 // indirect
|
||||
github.com/emirpasic/gods v1.12.0 // indirect
|
||||
github.com/fatih/color v1.11.0 // indirect
|
||||
github.com/go-git/gcfg v1.5.0 // indirect
|
||||
github.com/go-git/go-billy/v5 v5.3.1 // indirect
|
||||
github.com/go-git/go-git/v5 v5.3.0 // indirect
|
||||
github.com/imdario/mergo v0.3.12 // indirect
|
||||
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
|
||||
github.com/kevinburke/ssh_config v1.1.0 // indirect
|
||||
github.com/mattn/go-colorable v0.1.8 // indirect
|
||||
github.com/mattn/go-isatty v0.0.12 // indirect
|
||||
github.com/mattn/go-runewidth v0.0.12 // indirect
|
||||
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
|
||||
github.com/mitchellh/go-homedir v1.1.0 // indirect
|
||||
github.com/nxadm/tail v1.4.8 // indirect
|
||||
github.com/princjef/mageutil v1.0.0 // indirect
|
||||
github.com/rivo/uniseg v0.2.0 // indirect
|
||||
github.com/russross/blackfriday/v2 v2.1.0 // indirect
|
||||
github.com/sergi/go-diff v1.3.1 // indirect
|
||||
github.com/sirupsen/logrus v1.8.1 // indirect
|
||||
github.com/x-cray/logrus-prefixed-formatter v0.5.2 // indirect
|
||||
github.com/xanzy/ssh-agent v0.3.0 // indirect
|
||||
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a // indirect
|
||||
golang.org/x/net v0.0.0-20210520170846-37e1c6afe023 // indirect
|
||||
golang.org/x/sys v0.0.0-20210514084401-e8d321eab015 // indirect
|
||||
golang.org/x/term v0.0.0-20210503060354-a79de5458b56 // indirect
|
||||
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 // indirect
|
||||
gopkg.in/warnings.v0 v0.1.2 // indirect
|
||||
mvdan.cc/xurls/v2 v2.2.0 // indirect
|
||||
)
|
||||
|
|
@ -1,178 +0,0 @@
|
|||
github.com/Microsoft/go-winio v0.4.14/go.mod h1:qXqCSQ3Xa7+6tgxaGTIe4Kpcdsi+P8jBhyzoq1bpyYA=
|
||||
github.com/Microsoft/go-winio v0.4.16/go.mod h1:XB6nPKklQyQ7GC9LdcBEcBl8PF76WugXOPRXwdLnMv0=
|
||||
github.com/Microsoft/go-winio v0.5.0 h1:Elr9Wn+sGKPlkaBvwu4mTrxtmOp3F3yV9qhaHbXGjwU=
|
||||
github.com/Microsoft/go-winio v0.5.0/go.mod h1:JPGBdM1cNvN/6ISo+n8V5iA4v8pBzdOpzfwIujj1a84=
|
||||
github.com/VividCortex/ewma v1.1.1/go.mod h1:2Tkkvm3sRDVXaiyucHiACn4cqf7DpdyLvmxzcbUokwA=
|
||||
github.com/VividCortex/ewma v1.2.0 h1:f58SaIzcDXrSy3kWaHNvuJgJ3Nmz59Zji6XoJR/q1ow=
|
||||
github.com/VividCortex/ewma v1.2.0/go.mod h1:nz4BbCtbLyFDeC9SUHbtcT5644juEuWfUAUnGx7j5l4=
|
||||
github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7 h1:uSoVVbwJiQipAclBbw+8quDsfcvFjOpI5iCf4p/cqCs=
|
||||
github.com/alcortesm/tgz v0.0.0-20161220082320-9c5fe88206d7/go.mod h1:6zEj6s6u/ghQa61ZWa/C2Aw3RkjiTBOix7dkqa1VLIs=
|
||||
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239 h1:kFOfPq6dUM1hTo4JG6LR5AXSUEsOjtdm0kw0FtQtMJA=
|
||||
github.com/anmitsu/go-shlex v0.0.0-20161002113705-648efa622239/go.mod h1:2FmKhYUyUczH0OGQWaF5ceTx0UBShxjsH6f8oGKYe2c=
|
||||
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5 h1:0CwZNZbxp69SHPdPJAN/hZIm0C4OItdklCFmMRWYpio=
|
||||
github.com/armon/go-socks5 v0.0.0-20160902184237-e75332964ef5/go.mod h1:wHh0iHkYZB8zMSxRWpUBQtwG5a7fFgvEO+odwuTv2gs=
|
||||
github.com/cheggaaa/pb v2.0.7+incompatible/go.mod h1:pQciLPpbU0oxA0h+VJYYLxO+XeDQb5pZijXscXHm81s=
|
||||
github.com/cheggaaa/pb/v3 v3.0.4/go.mod h1:7rgWxLrAUcFMkvJuv09+DYi7mMUYi8nO9iOWcvGJPfw=
|
||||
github.com/cheggaaa/pb/v3 v3.0.8 h1:bC8oemdChbke2FHIIGy9mn4DPJ2caZYQnfbRqwmdCoA=
|
||||
github.com/cheggaaa/pb/v3 v3.0.8/go.mod h1:UICbiLec/XO6Hw6k+BHEtHeQFzzBH4i2/qk/ow1EJTA=
|
||||
github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
|
||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||
github.com/emirpasic/gods v1.12.0 h1:QAUIPSaCu4G+POclxeqb3F+WPpdKqFGlw36+yOzGlrg=
|
||||
github.com/emirpasic/gods v1.12.0/go.mod h1:YfzfFFoVP/catgzJb4IKIqXjX78Ha8FMSDh3ymbK86o=
|
||||
github.com/fatih/color v1.7.0/go.mod h1:Zm6kSWBoL9eyXnKyktHP6abPY2pDugNf5KwzbycvMj4=
|
||||
github.com/fatih/color v1.9.0/go.mod h1:eQcE1qtQxscV5RaZvpXrrb8Drkc3/DdQ+uUYCNjL+zU=
|
||||
github.com/fatih/color v1.10.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
|
||||
github.com/fatih/color v1.11.0 h1:l4iX0RqNnx/pU7rY2DB/I+znuYY0K3x6Ywac6EIr0PA=
|
||||
github.com/fatih/color v1.11.0/go.mod h1:ELkj/draVOlAH/xkhN6mQ50Qd0MPOk5AAr3maGEBuJM=
|
||||
github.com/flynn/go-shlex v0.0.0-20150515145356-3f9db97f8568/go.mod h1:xEzjJPgXI435gkrCt3MPfRiAkVrwSbHsst4LCFVfpJc=
|
||||
github.com/fsnotify/fsnotify v1.4.9 h1:hsms1Qyu0jgnwNXIxa+/V/PDsU6CfLf6CNO8H7IWoS4=
|
||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
||||
github.com/gliderlabs/ssh v0.2.2 h1:6zsha5zo/TWhRhwqCD3+EarCAgZ2yN28ipRnGPnwkI0=
|
||||
github.com/gliderlabs/ssh v0.2.2/go.mod h1:U7qILu1NlMHj9FlMhZLlkCdDnU1DBEAqr0aevW3Awn0=
|
||||
github.com/go-git/gcfg v1.5.0 h1:Q5ViNfGF8zFgyJWPqYwA7qGFoMTEiBmdlkcfRmpIMa4=
|
||||
github.com/go-git/gcfg v1.5.0/go.mod h1:5m20vg6GwYabIxaOonVkTdrILxQMpEShl1xiMF4ua+E=
|
||||
github.com/go-git/go-billy/v5 v5.0.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0=
|
||||
github.com/go-git/go-billy/v5 v5.1.0/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0=
|
||||
github.com/go-git/go-billy/v5 v5.3.1 h1:CPiOUAzKtMRvolEKw+bG1PLRpT7D3LIs3/3ey4Aiu34=
|
||||
github.com/go-git/go-billy/v5 v5.3.1/go.mod h1:pmpqyWchKfYfrkb/UVH4otLvyi/5gJlGI4Hb3ZqZ3W0=
|
||||
github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12 h1:PbKy9zOy4aAKrJ5pibIRpVO2BXnK1Tlcg+caKI7Ox5M=
|
||||
github.com/go-git/go-git-fixtures/v4 v4.0.2-0.20200613231340-f56387b50c12/go.mod h1:m+ICp2rF3jDhFgEZ/8yziagdT1C+ZpZcrJjappBCDSw=
|
||||
github.com/go-git/go-git/v5 v5.3.0 h1:8WKMtJR2j8RntEXR/uvTKagfEt4GYlwQ7mntE4+0GWc=
|
||||
github.com/go-git/go-git/v5 v5.3.0/go.mod h1:xdX4bWJ48aOrdhnl2XqHYstHbbp6+LFS4r4X+lNVprw=
|
||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
||||
github.com/google/go-cmp v0.4.0 h1:xsAVV57WRhGj6kEIi8ReJzQlHHqcBYCElAvkovg3B/4=
|
||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
||||
github.com/imdario/mergo v0.3.12 h1:b6R2BslTbIEToALKP7LxUvijTsNI9TAe80pLWN2g/HU=
|
||||
github.com/imdario/mergo v0.3.12/go.mod h1:jmQim1M+e3UYxmgPu/WyfjB3N3VflVyUjjjwH0dnCYA=
|
||||
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 h1:BQSFePA1RWJOlocH6Fxy8MmwDt+yVQYULKfN0RoTN8A=
|
||||
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99/go.mod h1:1lJo3i6rXxKeerYnT8Nvf0QmHCRC1n8sfWVwXF2Frvo=
|
||||
github.com/jessevdk/go-flags v1.5.0/go.mod h1:Fw0T6WPc1dYxT4mKEZRfG5kJhaTDP9pj1c2EWnYs/m4=
|
||||
github.com/kevinburke/ssh_config v0.0.0-20201106050909-4977a11b4351/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
|
||||
github.com/kevinburke/ssh_config v1.1.0 h1:pH/t1WS9NzT8go394IqZeJTMHVm6Cr6ZJ6AQ+mdNo/o=
|
||||
github.com/kevinburke/ssh_config v1.1.0/go.mod h1:CT57kijsi8u/K/BOFA39wgDQJ9CxiF4nAY/ojJ6r6mM=
|
||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
||||
github.com/kr/pretty v0.2.1 h1:Fmg33tUaq4/8ym9TJN1x7sLJnHVwhP33CNkpYV/7rwI=
|
||||
github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
|
||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
||||
github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
|
||||
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
|
||||
github.com/matryer/is v1.3.0/go.mod h1:2fLPjFQM9rhQ15aVEtbuwhJinnOqrmgXPNdZsdwlWXA=
|
||||
github.com/matryer/is v1.4.0 h1:sosSmIWwkYITGrxZ25ULNDeKiMNzFSr4V/eqBQP0PeE=
|
||||
github.com/matryer/is v1.4.0/go.mod h1:8I/i5uYgLzgsgEloJE1U6xx5HkBQpAZvepWuujKwMRU=
|
||||
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
||||
github.com/mattn/go-colorable v0.1.4/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
||||
github.com/mattn/go-colorable v0.1.8 h1:c1ghPdyEDarC70ftn0y+A/Ee++9zz8ljHG1b13eJ0s8=
|
||||
github.com/mattn/go-colorable v0.1.8/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
||||
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
||||
github.com/mattn/go-isatty v0.0.10/go.mod h1:qgIWMr58cqv1PHHyhnkY9lrL7etaEgOFcMEpPG5Rm84=
|
||||
github.com/mattn/go-isatty v0.0.11/go.mod h1:PhnuNfih5lzO57/f3n+odYbM4JtupLOxQOAqxQCu2WE=
|
||||
github.com/mattn/go-isatty v0.0.12 h1:wuysRhFDzyxgEmMf5xjvJ2M9dZoWAXNNr5LSBS7uHXY=
|
||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
||||
github.com/mattn/go-runewidth v0.0.7/go.mod h1:H031xJmbD/WCDINGzjvQ9THkh0rPKHF+m2gUSrubnMI=
|
||||
github.com/mattn/go-runewidth v0.0.12 h1:Y41i/hVW3Pgwr8gV+J23B9YEY0zxjptBuCWEaxmAOow=
|
||||
github.com/mattn/go-runewidth v0.0.12/go.mod h1:RAqKPSqVFrSLVXbA8x7dzmKdmGzieGRCM46jaSJTDAk=
|
||||
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d h1:5PJl274Y63IEHC+7izoQE9x6ikvDFZS2mDVS3drnohI=
|
||||
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d/go.mod h1:01TrycV0kFyexm33Z7vhZRXopbI8J3TDReVlkTgMUxE=
|
||||
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
|
||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
||||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
|
||||
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
||||
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
||||
github.com/onsi/ginkgo v1.14.2 h1:8mVmC9kjFFmA8H4pKMUhcblgifdkOIXPvbhN1T36q1M=
|
||||
github.com/onsi/ginkgo v1.14.2/go.mod h1:iSB4RoI2tjJc9BBv4NKIKWKya62Rps+oPG/Lv9klQyY=
|
||||
github.com/onsi/gomega v1.10.3 h1:gph6h/qe9GSUw1NhH1gp+qb+h8rXD8Cy60Z32Qw3ELA=
|
||||
github.com/onsi/gomega v1.10.3/go.mod h1:V9xEwhxec5O8UDM77eCW8vLymOMltsqPVYWrpDsH8xc=
|
||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||
github.com/princjef/gomarkdoc v1.1.0 h1:xtl7mESKQWVuGiFdd1AO3dFA6OenWG86bZu97IqBNPE=
|
||||
github.com/princjef/gomarkdoc v1.1.0/go.mod h1:HI3w0Zv8H03ecak/IqVAcPFTuPt7sn7Top6xbgCs1Qk=
|
||||
github.com/princjef/mageutil v1.0.0 h1:1OfZcJUMsooPqieOz2ooLjI+uHUo618pdaJsbCXcFjQ=
|
||||
github.com/princjef/mageutil v1.0.0/go.mod h1:mkShhaUomCYfAoVvTKRcbAs8YSVPdtezI5j6K+VXhrs=
|
||||
github.com/rivo/uniseg v0.1.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
|
||||
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
|
||||
github.com/rogpeppe/go-internal v1.5.2/go.mod h1:xXDCJY+GAPziupqXw64V24skbSoqbTEfhy4qGm1nDQc=
|
||||
github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk=
|
||||
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
|
||||
github.com/sergi/go-diff v1.1.0/go.mod h1:STckp+ISIX8hZLjrqAeVduY0gWCT9IjLuqbuNXdaHfM=
|
||||
github.com/sergi/go-diff v1.3.1 h1:xkr+Oxo4BOQKmkn/B9eMK0g5Kg/983T9DqqPHwYqD+8=
|
||||
github.com/sergi/go-diff v1.3.1/go.mod h1:aMJSSKb2lpPvRNec0+w3fl7LP9IOFzdc9Pa4NFbPK1I=
|
||||
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
|
||||
github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
|
||||
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
|
||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
||||
github.com/stretchr/testify v1.4.0 h1:2E4SXV/wtOkTonXsotYi4li6zVWxYlZuYNCXe9XRJyk=
|
||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
||||
github.com/x-cray/logrus-prefixed-formatter v0.5.2 h1:00txxvfBM9muc0jiLIEAkAcIMJzfthRT6usrui8uGmg=
|
||||
github.com/x-cray/logrus-prefixed-formatter v0.5.2/go.mod h1:2duySbKsL6M18s5GU7VPsoEPHyzalCE06qoARUCeBBE=
|
||||
github.com/xanzy/ssh-agent v0.3.0 h1:wUMzuKtKilRgBAD1sUb8gOwwRr2FGoBVumcjoOACClI=
|
||||
github.com/xanzy/ssh-agent v0.3.0/go.mod h1:3s9xbODqPuuhK9JV1R321M/FlMZSBvE5aY6eAcqrDh0=
|
||||
golang.org/x/crypto v0.0.0-20190219172222-a4c6cb3142f2/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
||||
golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4=
|
||||
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a h1:kr2P4QFmQr29mSLA43kwrOcgcReGTfbE9N577tCTuBc=
|
||||
golang.org/x/crypto v0.0.0-20210513164829-c07d793c2f9a/go.mod h1:P+XmwS30IXTQdn5tA2iutPOUgjI07+tq3H3K9MVA1s8=
|
||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
||||
golang.org/x/net v0.0.0-20210326060303-6b1517762897/go.mod h1:uSPa2vr4CLtc/ILN5odXGNXS6mhrKVzTaCXzk9m6W3k=
|
||||
golang.org/x/net v0.0.0-20210520170846-37e1c6afe023 h1:ADo5wSpq2gqaCGQWzk7S5vd//0iyyLeAratkEoG5dLE=
|
||||
golang.org/x/net v0.0.0-20210520170846-37e1c6afe023/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
|
||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
||||
golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20190916202348-b4ddaad3f8a3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191008105621-543471e840be/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20191128015809-6d18c012aee9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20200302150141-5c8b2ff67527/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210320140829-1e4c9ba3b0c4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210324051608-47abb6519492/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210403161142-5e06dd20ab57/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
golang.org/x/sys v0.0.0-20210514084401-e8d321eab015 h1:hZR0X1kPW+nwyJ9xRxqZk1vx5RUObAPBdKVvXPDUH/E=
|
||||
golang.org/x/sys v0.0.0-20210514084401-e8d321eab015/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
||||
golang.org/x/term v0.0.0-20210503060354-a79de5458b56 h1:b8jxX3zqjpqb2LklXPzKSGJhzyxCOZSz8ncv8Nv+y7w=
|
||||
golang.org/x/term v0.0.0-20210503060354-a79de5458b56/go.mod h1:tfny5GFUkzUvx4ps4ajbZsCe5lw1metzhBm9T3x7oIY=
|
||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/text v0.3.6 h1:aRYxNxv6iGQlyVaZmk6ZgYEDa+Jg18DxebPSrd6bg1M=
|
||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
||||
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2 h1:H2TDz8ibqkAF6YGhCdN3jS9O0/s90v0rJh3X/OLHEUk=
|
||||
golang.org/x/xerrors v0.0.0-20220907171357-04be3eba64a2/go.mod h1:K8+ghG5WaK9qNqU5K3HdILfMLy1f3aNYFI/wnl100a8=
|
||||
gopkg.in/VividCortex/ewma.v1 v1.1.1/go.mod h1:TekXuFipeiHWiAlO1+wSS23vTcyFau5u3rxXUSXj710=
|
||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20190902080502-41f04d3bba15/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
|
||||
gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
|
||||
gopkg.in/cheggaaa/pb.v2 v2.0.7/go.mod h1:0CiZ1p8pvtxBlQpLXkHuUTpdJ1shm3OqCF1QugkjHL4=
|
||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
||||
gopkg.in/fatih/color.v1 v1.7.0/go.mod h1:P7yosIhqIl/sX8J8UypY5M+dDpD2KmyfP5IRs5v/fo0=
|
||||
gopkg.in/mattn/go-colorable.v0 v0.1.0/go.mod h1:BVJlBXzARQxdi3nZo6f6bnl5yR20/tOL6p+V0KejgSY=
|
||||
gopkg.in/mattn/go-isatty.v0 v0.0.4/go.mod h1:wt691ab7g0X4ilKZNmMII3egK0bTxl37fEn/Fwbd8gc=
|
||||
gopkg.in/mattn/go-runewidth.v0 v0.0.4/go.mod h1:BmXejnxvhwdaATwiJbB1vZ2dtXkQKZGu9yLFCZb4msQ=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
||||
gopkg.in/warnings.v0 v0.1.2 h1:wFXVbFY8DY5/xOe1ECiWdKCzZlxgshcYVNkBHstARME=
|
||||
gopkg.in/warnings.v0 v0.1.2/go.mod h1:jksf8JmL6Qr/oQM2OXTHunEvvTAsrWBLb6OOjuVWRNI=
|
||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
||||
mvdan.cc/xurls/v2 v2.2.0 h1:NSZPykBXJFCetGZykLAxaL6SIpvbVy/UFEniIfHAa8A=
|
||||
mvdan.cc/xurls/v2 v2.2.0/go.mod h1:EV1RMtya9D6G5DMYPGD8zTQzaHet6Jh8gFlRgGRJeO8=
|
||||
|
|
@ -1,5 +0,0 @@
|
|||
INHERIT: mkdocs.yml
|
||||
plugins:
|
||||
- search
|
||||
- social
|
||||
- tags
|
||||
|
|
@ -1,187 +0,0 @@
|
|||
site_name: "alpha"
|
||||
repo_url: https://github.com/wailsapp/wails
|
||||
edit_uri: edit/v3-alpha/mkdocs-website/docs/
|
||||
site_url: https://v3alpha.wails.io
|
||||
site_description: The Wails Project - Build beautiful cross-platform applications using Go
|
||||
site_author: Lea Anthony
|
||||
theme:
|
||||
name: material
|
||||
custom_dir: overrides
|
||||
logo: assets/images/wails-logo-horizontal-dark.svg
|
||||
icon:
|
||||
repo: fontawesome/brands/github
|
||||
favicon: /favicon.ico
|
||||
features:
|
||||
- navigation.tabs
|
||||
- navigation.sections
|
||||
- navigation.expand
|
||||
- navigation.instant.prefetch
|
||||
- navigation.top
|
||||
- navigation.footer
|
||||
- navigation.path
|
||||
- navigation.prune
|
||||
|
||||
- toc.integrate
|
||||
- toc.follow
|
||||
|
||||
- search.suggest
|
||||
- search.highlight
|
||||
- search.share
|
||||
|
||||
- content.tabs.link
|
||||
- content.tabs.annotation
|
||||
- content.tabs.copy
|
||||
- content.code.copy
|
||||
- content.action.edit
|
||||
language: en
|
||||
palette:
|
||||
# Palette toggle for light mode
|
||||
- media: "(prefers-color-scheme: light)"
|
||||
scheme: default
|
||||
toggle:
|
||||
icon: material/toggle-switch-off-outline
|
||||
name: Switch to dark mode
|
||||
|
||||
# Palette toggle for dark mode
|
||||
- media: "(prefers-color-scheme: dark)"
|
||||
scheme: slate
|
||||
toggle:
|
||||
icon: material/toggle-switch
|
||||
name: Switch to light mode
|
||||
|
||||
plugins:
|
||||
- i18n:
|
||||
docs_structure: folder
|
||||
languages:
|
||||
- locale: en
|
||||
default: true
|
||||
name: English
|
||||
build: true
|
||||
- locale: zh
|
||||
name: 简体中文
|
||||
build: true
|
||||
site_description: Wails 项目 - 使用 Go 构建美观的跨平台应用程序
|
||||
extra:
|
||||
announcement: 这些文档是自动生成的。 如有错误,请告知我们。
|
||||
nav:
|
||||
- 主页: index.md
|
||||
- 入门:
|
||||
# - 介绍: introduction.md
|
||||
- 安装: getting-started/installation.md
|
||||
# - 创建项目: getting-started/creating-a-project.md
|
||||
# - 它是如何工作的: how-does-it-work.md
|
||||
# - 开发您的应用程序: getting-started/developing-your-application.md
|
||||
# - 编译您的项目: getting-started/compiling-your-project.md
|
||||
# - API 参考:
|
||||
# - 运行时:
|
||||
# - 介绍: reference/runtime/introduction.md
|
||||
# - CLI: reference/cli.md
|
||||
# - 社区:
|
||||
# - 模板: community/templates.md
|
||||
# - 指南:
|
||||
# - Angular: guides/angular.md
|
||||
# - 展示:
|
||||
# - Emaillit: community/showcase/emailit.md
|
||||
# - 贡献: community/contributing.md
|
||||
# - 链接: community/links.md
|
||||
- 下一步: getting-started/next-steps.md
|
||||
- 反馈: getting-started/feedback.md
|
||||
- v3 版本中的新内容是什么?: whats-new.md
|
||||
- API:
|
||||
- 应用程序: API/application.md
|
||||
- 窗口: API/window.md
|
||||
- 系统托盘: API/systray.md
|
||||
- 菜单: API/menu.md
|
||||
- 主线程: API/mainthread.md
|
||||
- 完整 API: API/fullapi.md
|
||||
- 开发:
|
||||
- 介绍: development/introduction.md
|
||||
- 状态: development/status.md
|
||||
- v3 变更: development/changes.md
|
||||
- 路线图: roadmap.md
|
||||
- 更改日志: changelog.md
|
||||
- 赞助❤️: https://github.com/sponsors/leaanthony
|
||||
|
||||
|
||||
extra:
|
||||
alternate:
|
||||
- name: English
|
||||
link: /
|
||||
lang: en
|
||||
- name: 简体中文
|
||||
link: /zh/
|
||||
lang: zh
|
||||
|
||||
social:
|
||||
- icon: fontawesome/brands/github-alt
|
||||
link: https://github.com/wailsapp/wails
|
||||
- icon: fontawesome/brands/twitter
|
||||
link: https://twitter.com/wailsapp
|
||||
- icon: fontawesome/brands/discord
|
||||
link: https://discord.gg/JDdSxwjhGf
|
||||
|
||||
extra_css:
|
||||
- stylesheets/extra.css
|
||||
|
||||
nav:
|
||||
- Home: index.md
|
||||
- Getting started:
|
||||
# - Introduction: introduction.md
|
||||
- Installation: getting-started/installation.md
|
||||
# - Creating a Project: getting-started/creating-a-project.md
|
||||
# - How does it work: how-does-it-work.md
|
||||
# - Developing your Application: getting-started/developing-your-application.md
|
||||
# - Compiling your Project: getting-started/compiling-your-project.md
|
||||
# - API Reference:
|
||||
# - Runtime:
|
||||
# - Introduction: reference/runtime/introduction.md
|
||||
# - CLI: reference/cli.md
|
||||
# - Community:
|
||||
# - Template: community/templates.md
|
||||
# - Guides:
|
||||
# - Angular: guides/angular.md
|
||||
# - Showcase:
|
||||
# - Emaillit: community/showcase/emailit.md
|
||||
# - Contributing: community/contributing.md
|
||||
# - Links: community/links.md
|
||||
- Next Steps: getting-started/next-steps.md
|
||||
- Feedback: getting-started/feedback.md
|
||||
- What's New in v3?: whats-new.md
|
||||
- API:
|
||||
- Application: API/application.md
|
||||
- Window: API/window.md
|
||||
- System Tray: API/systray.md
|
||||
- Menu: API/menu.md
|
||||
- Main Thread: API/mainthread.md
|
||||
- Full API: API/fullapi.md
|
||||
- Development:
|
||||
- Introduction: development/introduction.md
|
||||
- Status: development/status.md
|
||||
- v3 Changes: development/changes.md
|
||||
- Roadmap: roadmap.md
|
||||
- Change Log: changelog.md
|
||||
- Sponsor❤️: https://github.com/sponsors/leaanthony
|
||||
|
||||
|
||||
markdown_extensions:
|
||||
- pymdownx.tabbed:
|
||||
alternate_style: true
|
||||
- pymdownx.highlight:
|
||||
anchor_linenums: true
|
||||
- pymdownx.tasklist:
|
||||
custom_checkbox: true
|
||||
- pymdownx.inlinehilite
|
||||
- pymdownx.snippets:
|
||||
restrict_base_path: false
|
||||
- pymdownx.details
|
||||
- pymdownx.superfences
|
||||
- pymdownx.mark
|
||||
- attr_list
|
||||
- admonition
|
||||
- footnotes
|
||||
- pymdownx.emoji:
|
||||
emoji_index: !!python/name:material.extensions.emoji.twemoji
|
||||
emoji_generator: !!python/name:material.extensions.emoji.to_svg
|
||||
|
||||
copyright:
|
||||
Copyright © 2023 Lea Anthony
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 109 KiB |
|
|
@ -1 +0,0 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%" version="1.1" viewBox="0 0 180 167" xml:space="preserve" style="fill-rule:evenodd;clip-rule:evenodd;stroke-linejoin:round;stroke-miterlimit:2"><g><path d="M196,19.285C196,14.712 192.095,11 187.286,11L27.714,11C22.905,11 19,14.712 19,19.285L19,158.715C19,163.288 22.905,167 27.714,167L187.286,167C192.095,167 196,163.288 196,158.715L196,19.285Z" transform="matrix(1.00565,0,0,1.05769,-18.1073,-10.6346)" style="fill:#fff"/></g><g><path d="M0,-51.891L14.429,-51.891L13.043,-21.183L22.568,-51.891L34.226,-51.891L34.084,-21.183L42.365,-51.891L56.794,-51.891L38.526,0L25.198,0L25.34,-32.45L15.211,0L1.919,0L0,-51.891Z" transform="matrix(2.51258,0,0,2.51258,20.0103,151.138)" style="fill-rule:nonzero"/></g></svg>
|
||||
|
Before Width: | Height: | Size: 774 B |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 5.4 KiB |
File diff suppressed because one or more lines are too long
|
Before Width: | Height: | Size: 5.4 KiB |
|
|
@ -1,144 +0,0 @@
|
|||
<!--
|
||||
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
-->
|
||||
|
||||
{% extends "main.html" %}
|
||||
|
||||
<!-- Render hero under tabs -->
|
||||
{% block tabs %}
|
||||
{{ super() }}
|
||||
|
||||
<!-- Additional styles for landing page -->
|
||||
<style>
|
||||
|
||||
/* Application header should be static for the landing page */
|
||||
.md-header {
|
||||
position: initial;
|
||||
}
|
||||
|
||||
/* Remove spacing, as we cannot hide it completely */
|
||||
.md-main__inner {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Hide main content for now */
|
||||
.md-content {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Hide table of contents */
|
||||
@media screen and (min-width: 60em) {
|
||||
.md-sidebar--secondary {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Hide navigation */
|
||||
@media screen and (min-width: 76.25em) {
|
||||
.md-sidebar--primary {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- Hero for landing page -->
|
||||
<section class="mdx-container">
|
||||
<div class="md-grid md-typeset">
|
||||
<div class="mdx-hero">
|
||||
|
||||
<!-- Hero content -->
|
||||
<div class="mdx-hero__content">
|
||||
<br/>
|
||||
<br/>
|
||||
<div style="text-align: center">
|
||||
This is the Wails v3 Alpha website.
|
||||
|
||||
This site will be updated as we progress through the alpha and beta releases.<br/><br/>
|
||||
|
||||
<div class="admonition warning">
|
||||
<p class="admonition-title">Warning</p>
|
||||
<h3>The v3 alpha release is intended for testers and contributors. It is not ready for use in any other capacity. Expect things to fail. Expect things to change. Expect the documentation to be wrong.<br/><br/>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<h2>Status</h2>
|
||||
<br/>
|
||||
<table border="1">
|
||||
<tr>
|
||||
<th>Operating System</th>
|
||||
<th>Status</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Windows</td>
|
||||
<td>All examples are working</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Mac</td>
|
||||
<td>Most examples are working</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Linux</td>
|
||||
<td>Some examples are working</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br/><br/>
|
||||
|
||||
<div style="width: 50%; margin: 0 auto; text-align: justify; padding-bottom: 75px;">
|
||||
<h2>FAQ</h2>
|
||||
<h3>What is the aim of the alpha release?</h3>
|
||||
The aim of the alpha release is to get feedback on the new API and to get people experimenting with it.
|
||||
We want to make sure that the API is easy to use and that it is possible to build applications with it.
|
||||
<br/><br/>
|
||||
<h3>How do I provide feedback?</h3>
|
||||
Please read <a href="/getting-started/feedback/">this page</a> for details on how to provide feedback.
|
||||
</div>
|
||||
<h3>Is there a Roadmap</h3>
|
||||
Yes, you can find it <a href="/roadmap/">here</a>.
|
||||
|
||||
Please feel free to raise PRs against this website. Every single PR helps us get closer to a release.<br/><br/>
|
||||
Thank you for sharing this journey with us.<br/><br/>
|
||||
<br/>
|
||||
<a
|
||||
href="{{ page.next_page.url | url }}"
|
||||
title="{{ page.next_page.title | e }}"
|
||||
class="md-button md-button--primary"
|
||||
>
|
||||
Get started
|
||||
</a>
|
||||
</div>
|
||||
<!-- <a-->
|
||||
<!-- href="{{ 'introduction' | url }}"-->
|
||||
<!-- title="Material for MkDocs Insiders"-->
|
||||
<!-- class="md-button"-->
|
||||
<!-- >-->
|
||||
<!-- Learn more-->
|
||||
<!-- </a>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
<!-- Content -->
|
||||
{% block content %}{% endblock %}
|
||||
|
||||
<!-- Application footer -->
|
||||
{% block footer %}{% endblock %}
|
||||
|
|
@ -1,145 +0,0 @@
|
|||
<!--
|
||||
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
-->
|
||||
|
||||
{% extends "main.zh.html" %}
|
||||
|
||||
<!-- Render hero under tabs -->
|
||||
{% block tabs %}
|
||||
{{ super() }}
|
||||
|
||||
<!-- Additional styles for landing page -->
|
||||
<style>
|
||||
|
||||
/* Application header should be static for the landing page */
|
||||
.md-header {
|
||||
position: initial;
|
||||
}
|
||||
|
||||
/* Remove spacing, as we cannot hide it completely */
|
||||
.md-main__inner {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Hide main content for now */
|
||||
.md-content {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Hide table of contents */
|
||||
@media screen and (min-width: 60em) {
|
||||
.md-sidebar--secondary {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
/* Hide navigation */
|
||||
@media screen and (min-width: 76.25em) {
|
||||
.md-sidebar--primary {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- Hero for landing page -->
|
||||
<section class="mdx-container">
|
||||
<div class="md-grid md-typeset">
|
||||
<div class="mdx-hero">
|
||||
|
||||
<!-- Hero content -->
|
||||
<div class="mdx-hero__content">
|
||||
<br/>
|
||||
<br/>
|
||||
<div style="text-align: center">
|
||||
这是 Wails v3 Alpha 网站。
|
||||
|
||||
随着 alpha 和 beta 版本的推进,本站将会有所更新。<br/><br/>
|
||||
|
||||
<div class="admonition warning">
|
||||
<p class="admonition-title">警告</p>
|
||||
<h3>v3 alpha版本主要用于测试和贡献者。它还不适用于其他任何容量。请预料可能会出现故障,可能会有变化,文档可能会有错误。<br/><br/>
|
||||
</h3>
|
||||
</div>
|
||||
|
||||
<h2>状态</h2>
|
||||
<br/>
|
||||
<table border="1">
|
||||
<tr>
|
||||
<th>操作系统</th>
|
||||
<th>状态</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Windows</td>
|
||||
<td>所有示例都可以运行</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Mac</td>
|
||||
<td>大多数示例可以运行</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Linux</td>
|
||||
<td>一些示例可以运行</td>
|
||||
</tr>
|
||||
</table>
|
||||
<br/><br/>
|
||||
|
||||
<div style="width: 50%; margin: 0 auto; text-align: justify; padding-bottom: 75px;">
|
||||
<h2>常见问题</h2>
|
||||
<h3>alpha版本的目的是什么?</h3>
|
||||
alpha版本的目的是获得有关新 API 的反馈,并让人们尝试使用它。
|
||||
我们想确保 API 易于使用,并且可以使用它构建应用程序。
|
||||
<br/><br/>
|
||||
<h3>如何提供反馈?</h3>
|
||||
请阅读 <a href="/getting-started/feedback/">此页面</a>以获取有关如何提供反馈的详细信息。
|
||||
</div>
|
||||
<h3>有路线图吗?</h3>
|
||||
是的,你可以在 <a href="/roadmap/">这里</a> 找到它。
|
||||
|
||||
请随时提出针对此网站的PR。每一个PR都会帮助我们更接近发布。<br/><br/>
|
||||
感谢您与我们共度此旅程。<br/><br/>
|
||||
<br/>
|
||||
<a
|
||||
href="{{ page.next_page.url | url }}"
|
||||
title="{{ page.next_page.title | e }}"
|
||||
class="md-button md-button--primary"
|
||||
>
|
||||
开始
|
||||
</a>
|
||||
</div>
|
||||
<!-- <a-->
|
||||
<!-- href="{{ 'introduction' | url }}"-->
|
||||
<!-- title="Material for MkDocs Insiders"-->
|
||||
<!-- class="md-button"-->
|
||||
<!-- >-->
|
||||
<!-- 了解更多-->
|
||||
<!-- </a>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
<!-- Content -->
|
||||
{% block content %}{% endblock %}
|
||||
|
||||
<!-- Application footer -->
|
||||
{% block footer %}{% endblock %}
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
<!--
|
||||
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
-->
|
||||
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block announce %}
|
||||
{%
|
||||
set announcement = {
|
||||
"en": "Translations are autogenerated. Please report mistakes.",
|
||||
"zh": "这些文档是自动生成的。 如有错误,请告知我们。",
|
||||
}
|
||||
%}
|
||||
|
||||
<div class="announcement__translation">
|
||||
{{ announcement[i18n_page_locale] }}
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
||||
<!-- Theme-related JavaScript -->
|
||||
{% block scripts %}
|
||||
{{ super() }}
|
||||
|
||||
<!-- Extra JavaScript (can't be set in mkdocs.yml due to content hash) -->
|
||||
<script src="{{ 'assets/javascripts/custom.js' | url }}"></script>
|
||||
{% endblock %}
|
||||
|
|
@ -1,35 +0,0 @@
|
|||
<!--
|
||||
Copyright (c) 2016-2023 Martin Donath <martin.donath@squidfunk.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to
|
||||
deal in the Software without restriction, including without limitation the
|
||||
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
sell copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
IN THE SOFTWARE.
|
||||
-->
|
||||
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block announce %}
|
||||
这些文档是自动生成的。 如有错误,请告知我们。
|
||||
{% endblock %}
|
||||
|
||||
<!-- Theme-related JavaScript -->
|
||||
{% block scripts %}
|
||||
{{ super() }}
|
||||
|
||||
<!-- Extra JavaScript (can't be set in mkdocs.yml due to content hash) -->
|
||||
<script src="{{ 'assets/javascripts/custom.js' | url }}"></script>
|
||||
{% endblock %}
|
||||
Binary file not shown.
29
qodana.yaml
29
qodana.yaml
|
|
@ -1,29 +0,0 @@
|
|||
#-------------------------------------------------------------------------------#
|
||||
# Qodana analysis is configured by qodana.yaml file #
|
||||
# https://www.jetbrains.com/help/qodana/qodana-yaml.html #
|
||||
#-------------------------------------------------------------------------------#
|
||||
version: "1.0"
|
||||
|
||||
#Specify inspection profile for code analysis
|
||||
profile:
|
||||
name: qodana.starter
|
||||
|
||||
#Enable inspections
|
||||
#include:
|
||||
# - name: <SomeEnabledInspectionId>
|
||||
|
||||
#Disable inspections
|
||||
#exclude:
|
||||
# - name: <SomeDisabledInspectionId>
|
||||
# paths:
|
||||
# - <path/where/not/run/inspection>
|
||||
|
||||
#Execute shell command before Qodana execution (Applied in CI/CD pipeline)
|
||||
#bootstrap: sh ./prepare-qodana.sh
|
||||
|
||||
#Install IDE plugins before Qodana execution (Applied in CI/CD pipeline)
|
||||
#plugins:
|
||||
# - id: <plugin.id> #(plugin id can be found at https://plugins.jetbrains.com)
|
||||
|
||||
#Specify Qodana linter for analysis (Applied in CI/CD pipeline)
|
||||
linter: jetbrains/qodana-go:latest
|
||||
123
scripts/AUTOMATION-README.md
Normal file
123
scripts/AUTOMATION-README.md
Normal file
|
|
@ -0,0 +1,123 @@
|
|||
# Wails Issue Management Automation
|
||||
|
||||
This directory contains automation workflows and scripts to help manage the Wails project with minimal time investment.
|
||||
|
||||
## GitHub Workflow Files
|
||||
|
||||
### 1. Auto-Label Issues (`auto-label-issues.yml`)
|
||||
- Automatically labels issues and PRs based on their content and modified files
|
||||
- Labels are defined in `issue-labeler.yml` and `file-labeler.yml`
|
||||
- Activates when issues are opened, edited, or reopened
|
||||
|
||||
### 2. Issue Triage Automation (`issue-triage-automation.yml`)
|
||||
- Performs automated actions for issue triage
|
||||
- Requests more info for incomplete bug reports
|
||||
- Prioritizes security issues
|
||||
- Adds issues to appropriate project boards
|
||||
|
||||
## Configuration Files
|
||||
|
||||
### 1. Issue Content Labeler (`issue-labeler.yml`)
|
||||
- Defines patterns to match in issue title/body
|
||||
- Categorizes by version (v2/v3), component, type, and priority
|
||||
- Customize patterns as needed for your project
|
||||
|
||||
### 2. File Path Labeler (`file-labeler.yml`)
|
||||
- Labels PRs based on which files they modify
|
||||
- Helps identify which areas of the codebase are affected
|
||||
- Customize file patterns as needed
|
||||
|
||||
### 3. Stale Issues Config (`stale.yml`)
|
||||
- Marks issues as stale after 45 days of inactivity
|
||||
- Closes stale issues after an additional 10 days
|
||||
- Exempts issues with important labels
|
||||
|
||||
## Helper Scripts
|
||||
|
||||
### 1. Issue Triage Script (`scripts/issue-triage.ps1`)
|
||||
- PowerShell script to quickly triage issues
|
||||
- Lists recent issues needing attention
|
||||
- Provides easy keyboard shortcuts for common actions
|
||||
- Run during your dedicated issue triage time
|
||||
|
||||
### 2. PR Review Helper (`scripts/pr-review-helper.ps1`)
|
||||
- PowerShell script to efficiently review PRs
|
||||
- Generates review checklists
|
||||
- Provides easy shortcuts for common review actions
|
||||
- Run during your dedicated PR review time
|
||||
|
||||
## How to Use This System
|
||||
|
||||
### Daily Workflow (2 hours max)
|
||||
|
||||
**Monday (120 min):**
|
||||
1. Run `scripts/issue-triage.ps1` (30 min)
|
||||
2. Run `scripts/pr-review-helper.ps1` (30 min)
|
||||
3. Check Discord for critical discussions (30 min)
|
||||
4. Plan your week (30 min)
|
||||
|
||||
**Tuesday-Wednesday (120 min/day):**
|
||||
1. Quick check for urgent issues (10 min)
|
||||
2. v3 development (110 min)
|
||||
|
||||
**Thursday (120 min):**
|
||||
1. v2 maintenance (90 min)
|
||||
2. Documentation updates (30 min)
|
||||
|
||||
**Friday (120 min):**
|
||||
1. Run `scripts/pr-review-helper.ps1` (60 min)
|
||||
2. Discord updates/newsletter (30 min)
|
||||
3. Weekly reflection (30 min)
|
||||
|
||||
## Installation
|
||||
|
||||
1. The GitHub workflow files should be placed in `.github/workflows/`
|
||||
2. Configuration files should be placed in `.github/`
|
||||
3. Helper scripts should be placed in `scripts/`
|
||||
4. Make sure you have GitHub CLI (`gh`) installed and authenticated
|
||||
|
||||
## Customization
|
||||
|
||||
Feel free to modify the configuration files and scripts to better suit your project's needs:
|
||||
|
||||
1. **Adding New Label Categories**:
|
||||
- Add new patterns to `issue-labeler.yml` for additional components or types
|
||||
- Update `file-labeler.yml` if you add new directories or file types
|
||||
|
||||
2. **Adjusting Automation Thresholds**:
|
||||
- Modify `stale.yml` to change how long issues remain active
|
||||
- Update `issue-triage-automation.yml` to change conditions for automated actions
|
||||
|
||||
3. **Customizing Scripts**:
|
||||
- Update the scripts with your specific GitHub username
|
||||
- Add additional actions based on your workflow preferences
|
||||
- Adjust time allocations based on which tasks need more attention
|
||||
|
||||
## Benefits
|
||||
|
||||
This automated issue management system will:
|
||||
|
||||
1. **Save Time**: Reduce manual triage of most common issues
|
||||
2. **Improve Consistency**: Apply the same categorization rules every time
|
||||
3. **Increase Visibility**: Clear categorization helps community members find issues
|
||||
4. **Focus Development**: Clearer separation of v2 and v3 work
|
||||
5. **Reduce Backlog**: Better management of stale issues
|
||||
6. **Streamline Reviews**: Faster PR processing with guided workflows
|
||||
|
||||
## Requirements
|
||||
|
||||
- GitHub CLI (`gh`) installed and authenticated
|
||||
- PowerShell 5.1+ for Windows scripts
|
||||
- GitHub Actions enabled on your repository
|
||||
- Appropriate permissions to modify workflows
|
||||
|
||||
## Maintenance
|
||||
|
||||
This system requires minimal maintenance:
|
||||
|
||||
- Periodically review and update label patterns as your project evolves
|
||||
- Adjust time allocations based on where you need to focus
|
||||
- Update scripts if GitHub CLI commands change
|
||||
- Customize the workflow as you find pain points in your process
|
||||
|
||||
Remember that the goal is to maximize your limited time (2 hours per day) by automating repetitive tasks and streamlining essential ones.
|
||||
108
scripts/issue-triage.ps1
Normal file
108
scripts/issue-triage.ps1
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
# issue-triage.ps1 - Script to help with quick issue triage
|
||||
# Run this at the start of your GitHub time to quickly process issues
|
||||
|
||||
# Set your GitHub username
|
||||
$GITHUB_USERNAME = "your-username"
|
||||
|
||||
# Get the latest 10 open issues that aren't assigned and aren't labeled as "awaiting feedback"
|
||||
Write-Host "Fetching recent unprocessed issues..."
|
||||
gh issue list --repo wailsapp/wails --limit 10 --json number,title,labels,assignees | Out-File -Encoding utf8 -FilePath "issues_temp.json"
|
||||
$issues = Get-Content -Raw -Path "issues_temp.json" | ConvertFrom-Json
|
||||
$newIssues = $issues | Where-Object {
|
||||
$_.assignees.Count -eq 0 -and
|
||||
($_.labels.Count -eq 0 -or -not ($_.labels | Where-Object { $_.name -eq "awaiting feedback" }))
|
||||
}
|
||||
|
||||
# Process each issue
|
||||
Write-Host "`n===== Issues Needing Triage =====`n"
|
||||
foreach ($issue in $newIssues) {
|
||||
$number = $issue.number
|
||||
$title = $issue.title
|
||||
$labelNames = $issue.labels | ForEach-Object { $_.name }
|
||||
$labelsStr = if ($labelNames) { $labelNames -join ", " } else { "none" }
|
||||
|
||||
Write-Host "Issue #$number`: $title"
|
||||
Write-Host "Labels: $labelsStr`n"
|
||||
|
||||
$continue = $true
|
||||
while ($continue) {
|
||||
Write-Host "Options:"
|
||||
Write-Host " [v] View issue in browser"
|
||||
Write-Host " [2] Add v2-only label"
|
||||
Write-Host " [3] Add v3-alpha label"
|
||||
Write-Host " [b] Add bug label"
|
||||
Write-Host " [e] Add enhancement label"
|
||||
Write-Host " [d] Add documentation label"
|
||||
Write-Host " [w] Add webview2 label"
|
||||
Write-Host " [f] Request more info (awaiting feedback)"
|
||||
Write-Host " [c] Close issue (duplicate/invalid)"
|
||||
Write-Host " [a] Assign to yourself"
|
||||
Write-Host " [s] Skip to next issue"
|
||||
Write-Host " [q] Quit script"
|
||||
$action = Read-Host "Enter action"
|
||||
|
||||
switch ($action) {
|
||||
"v" {
|
||||
gh issue view $number --repo wailsapp/wails --web
|
||||
}
|
||||
"2" {
|
||||
Write-Host "Adding v2-only label..."
|
||||
gh issue edit $number --repo wailsapp/wails --add-label "v2-only"
|
||||
}
|
||||
"3" {
|
||||
Write-Host "Adding v3-alpha label..."
|
||||
gh issue edit $number --repo wailsapp/wails --add-label "v3-alpha"
|
||||
}
|
||||
"b" {
|
||||
Write-Host "Adding bug label..."
|
||||
gh issue edit $number --repo wailsapp/wails --add-label "Bug"
|
||||
}
|
||||
"e" {
|
||||
Write-Host "Adding enhancement label..."
|
||||
gh issue edit $number --repo wailsapp/wails --add-label "Enhancement"
|
||||
}
|
||||
"d" {
|
||||
Write-Host "Adding documentation label..."
|
||||
gh issue edit $number --repo wailsapp/wails --add-label "Documentation"
|
||||
}
|
||||
"w" {
|
||||
Write-Host "Adding webview2 label..."
|
||||
gh issue edit $number --repo wailsapp/wails --add-label "webview2"
|
||||
}
|
||||
"f" {
|
||||
Write-Host "Requesting more info..."
|
||||
gh issue comment $number --repo wailsapp/wails --body "Thank you for reporting this issue. Could you please provide additional information to help us investigate?`n`n- [Specific details needed]`n`nThis will help us address your issue more effectively."
|
||||
gh issue edit $number --repo wailsapp/wails --add-label "awaiting feedback"
|
||||
}
|
||||
"c" {
|
||||
$reason = Read-Host "Reason for closing (duplicate/invalid/etc)"
|
||||
gh issue comment $number --repo wailsapp/wails --body "Closing this issue: $reason"
|
||||
gh issue close $number --repo wailsapp/wails
|
||||
}
|
||||
"a" {
|
||||
Write-Host "Assigning to yourself..."
|
||||
gh issue edit $number --repo wailsapp/wails --add-assignee "$GITHUB_USERNAME"
|
||||
}
|
||||
"s" {
|
||||
Write-Host "Skipping to next issue..."
|
||||
$continue = $false
|
||||
}
|
||||
"q" {
|
||||
Write-Host "Exiting script."
|
||||
exit
|
||||
}
|
||||
default {
|
||||
Write-Host "Invalid option. Please try again."
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host ""
|
||||
}
|
||||
|
||||
Write-Host "--------------------------------`n"
|
||||
}
|
||||
|
||||
Write-Host "No more issues to triage!"
|
||||
|
||||
# Clean up temp file
|
||||
Remove-Item -Path "issues_temp.json"
|
||||
103
scripts/issue-triage.sh
Normal file
103
scripts/issue-triage.sh
Normal file
|
|
@ -0,0 +1,103 @@
|
|||
#!/bin/bash
|
||||
# issue-triage.sh - Script to help with quick issue triage
|
||||
# Run this at the start of your GitHub time to quickly process issues
|
||||
|
||||
# Set your GitHub username
|
||||
GITHUB_USERNAME="your-username"
|
||||
|
||||
# Get the latest 10 open issues that aren't assigned and aren't labeled as "awaiting feedback"
|
||||
echo "Fetching recent unprocessed issues..."
|
||||
gh issue list --repo wailsapp/wails --limit 10 --json number,title,labels,assignees --jq '.[] | select(.assignees | length == 0) | select(any(.labels[]; .name != "awaiting feedback"))' > new_issues.json
|
||||
|
||||
# Process each issue
|
||||
echo -e "\n===== Issues Needing Triage =====\n"
|
||||
cat new_issues.json | jq -c '.[]' | while read -r issue; do
|
||||
number=$(echo $issue | jq -r '.number')
|
||||
title=$(echo $issue | jq -r '.title')
|
||||
labels=$(echo $issue | jq -r '.labels[] | .name' 2>/dev/null | tr '\n' ', ' | sed 's/,$//')
|
||||
|
||||
if [ -z "$labels" ]; then
|
||||
labels="none"
|
||||
fi
|
||||
|
||||
echo -e "Issue #$number: $title"
|
||||
echo -e "Labels: $labels\n"
|
||||
|
||||
while true; do
|
||||
echo "Options:"
|
||||
echo " [v] View issue in browser"
|
||||
echo " [2] Add v2-only label"
|
||||
echo " [3] Add v3-alpha label"
|
||||
echo " [b] Add bug label"
|
||||
echo " [e] Add enhancement label"
|
||||
echo " [d] Add documentation label"
|
||||
echo " [w] Add webview2 label"
|
||||
echo " [f] Request more info (awaiting feedback)"
|
||||
echo " [c] Close issue (duplicate/invalid)"
|
||||
echo " [a] Assign to yourself"
|
||||
echo " [s] Skip to next issue"
|
||||
echo " [q] Quit script"
|
||||
read -p "Enter action: " action
|
||||
|
||||
case $action in
|
||||
v)
|
||||
gh issue view $number --repo wailsapp/wails --web
|
||||
;;
|
||||
2)
|
||||
echo "Adding v2-only label..."
|
||||
gh issue edit $number --repo wailsapp/wails --add-label "v2-only"
|
||||
;;
|
||||
3)
|
||||
echo "Adding v3-alpha label..."
|
||||
gh issue edit $number --repo wailsapp/wails --add-label "v3-alpha"
|
||||
;;
|
||||
b)
|
||||
echo "Adding bug label..."
|
||||
gh issue edit $number --repo wailsapp/wails --add-label "Bug"
|
||||
;;
|
||||
e)
|
||||
echo "Adding enhancement label..."
|
||||
gh issue edit $number --repo wailsapp/wails --add-label "Enhancement"
|
||||
;;
|
||||
d)
|
||||
echo "Adding documentation label..."
|
||||
gh issue edit $number --repo wailsapp/wails --add-label "Documentation"
|
||||
;;
|
||||
w)
|
||||
echo "Adding webview2 label..."
|
||||
gh issue edit $number --repo wailsapp/wails --add-label "webview2"
|
||||
;;
|
||||
f)
|
||||
echo "Requesting more info..."
|
||||
gh issue comment $number --repo wailsapp/wails --body "Thank you for reporting this issue. Could you please provide additional information to help us investigate?\n\n- [Specific details needed]\n\nThis will help us address your issue more effectively."
|
||||
gh issue edit $number --repo wailsapp/wails --add-label "awaiting feedback"
|
||||
;;
|
||||
c)
|
||||
read -p "Reason for closing (duplicate/invalid/etc): " reason
|
||||
gh issue comment $number --repo wailsapp/wails --body "Closing this issue: $reason"
|
||||
gh issue close $number --repo wailsapp/wails
|
||||
;;
|
||||
a)
|
||||
echo "Assigning to yourself..."
|
||||
gh issue edit $number --repo wailsapp/wails --add-assignee "$GITHUB_USERNAME"
|
||||
;;
|
||||
s)
|
||||
echo "Skipping to next issue..."
|
||||
break
|
||||
;;
|
||||
q)
|
||||
echo "Exiting script."
|
||||
exit 0
|
||||
;;
|
||||
*)
|
||||
echo "Invalid option. Please try again."
|
||||
;;
|
||||
esac
|
||||
|
||||
echo ""
|
||||
done
|
||||
|
||||
echo -e "--------------------------------\n"
|
||||
done
|
||||
|
||||
echo "No more issues to triage!"
|
||||
152
scripts/pr-review-helper.ps1
Normal file
152
scripts/pr-review-helper.ps1
Normal file
|
|
@ -0,0 +1,152 @@
|
|||
# pr-review-helper.ps1 - Script to help with efficient PR reviews
|
||||
# Run this during your PR review time
|
||||
|
||||
# Set your GitHub username
|
||||
$GITHUB_USERNAME = "your-username"
|
||||
|
||||
# Get open PRs that are ready for review
|
||||
Write-Host "Fetching PRs ready for review..."
|
||||
gh pr list --repo wailsapp/wails --json number,title,author,labels,reviewDecision,additions,deletions,baseRefName,headRefName --limit 10 | Out-File -Encoding utf8 -FilePath "prs_temp.json"
|
||||
$prs = Get-Content -Raw -Path "prs_temp.json" | ConvertFrom-Json
|
||||
|
||||
# Process each PR
|
||||
Write-Host "`n===== PRs Needing Review =====`n"
|
||||
foreach ($pr in $prs) {
|
||||
$number = $pr.number
|
||||
$title = $pr.title
|
||||
$author = $pr.author.login
|
||||
$labels = if ($pr.labels) { $pr.labels | ForEach-Object { $_.name } | Join-String -Separator ", " } else { "none" }
|
||||
$reviewState = if ($pr.reviewDecision) { $pr.reviewDecision } else { "PENDING" }
|
||||
$baseRef = $pr.baseRefName
|
||||
$headRef = $pr.headRefName
|
||||
$changes = $pr.additions + $pr.deletions
|
||||
|
||||
Write-Host "PR #$number`: $title"
|
||||
Write-Host "Author: $author"
|
||||
Write-Host "Labels: $labels"
|
||||
Write-Host "Branch: $headRef -> $baseRef"
|
||||
Write-Host "Changes: +$($pr.additions)/-$($pr.deletions) lines"
|
||||
Write-Host "Review state: $reviewState`n"
|
||||
|
||||
# Determine complexity based on size
|
||||
$complexity = if ($changes -lt 50) {
|
||||
"Quick review"
|
||||
} elseif ($changes -lt 300) {
|
||||
"Moderate review"
|
||||
} else {
|
||||
"Extensive review"
|
||||
}
|
||||
|
||||
Write-Host "Complexity: $complexity"
|
||||
|
||||
$continue = $true
|
||||
while ($continue) {
|
||||
Write-Host "`nOptions:"
|
||||
Write-Host " [v] View PR in browser"
|
||||
Write-Host " [d] View diff in browser"
|
||||
Write-Host " [c] Generate review checklist"
|
||||
Write-Host " [a] Approve PR"
|
||||
Write-Host " [r] Request changes"
|
||||
Write-Host " [m] Add comment"
|
||||
Write-Host " [l] Add labels"
|
||||
Write-Host " [s] Skip to next PR"
|
||||
Write-Host " [q] Quit script"
|
||||
$action = Read-Host "Enter action"
|
||||
|
||||
switch ($action) {
|
||||
"v" {
|
||||
gh pr view $number --repo wailsapp/wails --web
|
||||
}
|
||||
"d" {
|
||||
gh pr diff $number --repo wailsapp/wails --web
|
||||
}
|
||||
"c" {
|
||||
# Generate review checklist
|
||||
$checklist = @"
|
||||
## PR Review: $title
|
||||
|
||||
### Basic Checks:
|
||||
- [ ] PR title is descriptive
|
||||
- [ ] PR description explains the changes
|
||||
- [ ] Related issues are linked
|
||||
|
||||
### Technical Checks:
|
||||
- [ ] Code follows project style
|
||||
- [ ] No unnecessary commented code
|
||||
- [ ] Error handling is appropriate
|
||||
- [ ] Documentation updated (if needed)
|
||||
- [ ] Tests included (if needed)
|
||||
|
||||
### Impact Assessment:
|
||||
- [ ] Changes are backward compatible (if applicable)
|
||||
- [ ] No breaking changes to public APIs
|
||||
- [ ] Performance impact considered
|
||||
|
||||
### Version Specific:
|
||||
"@
|
||||
|
||||
if ($baseRef -eq "master") {
|
||||
$checklist += @"
|
||||
|
||||
- [ ] Appropriate for v2 maintenance
|
||||
- [ ] No features that should be v3-only
|
||||
"@
|
||||
} elseif ($baseRef -eq "v3-alpha") {
|
||||
$checklist += @"
|
||||
|
||||
- [ ] Appropriate for v3 development
|
||||
- [ ] Aligns with v3 roadmap
|
||||
"@
|
||||
}
|
||||
|
||||
# Write to clipboard
|
||||
$checklist | Set-Clipboard
|
||||
Write-Host "`nReview checklist copied to clipboard!`n"
|
||||
}
|
||||
"a" {
|
||||
$comment = Read-Host "Approval comment (blank for none)"
|
||||
if ($comment) {
|
||||
gh pr review $number --repo wailsapp/wails --approve --body $comment
|
||||
} else {
|
||||
gh pr review $number --repo wailsapp/wails --approve
|
||||
}
|
||||
}
|
||||
"r" {
|
||||
$comment = Read-Host "Feedback for changes requested"
|
||||
gh pr review $number --repo wailsapp/wails --request-changes --body $comment
|
||||
}
|
||||
"m" {
|
||||
$comment = Read-Host "Comment text"
|
||||
gh pr comment $number --repo wailsapp/wails --body $comment
|
||||
}
|
||||
"l" {
|
||||
$labels = Read-Host "Labels to add (comma-separated)"
|
||||
$labelArray = $labels -split ","
|
||||
foreach ($label in $labelArray) {
|
||||
$labelTrimmed = $label.Trim()
|
||||
if ($labelTrimmed) {
|
||||
gh pr edit $number --repo wailsapp/wails --add-label $labelTrimmed
|
||||
}
|
||||
}
|
||||
}
|
||||
"s" {
|
||||
Write-Host "Skipping to next PR..."
|
||||
$continue = $false
|
||||
}
|
||||
"q" {
|
||||
Write-Host "Exiting script."
|
||||
exit
|
||||
}
|
||||
default {
|
||||
Write-Host "Invalid option. Please try again."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Write-Host "--------------------------------`n"
|
||||
}
|
||||
|
||||
Write-Host "No more PRs to review!"
|
||||
|
||||
# Clean up temp file
|
||||
Remove-Item -Path "prs_temp.json"
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
npm install sponsorkit@0.6.1
|
||||
npm install sponsorkit@16.4.2
|
||||
npx sponsorkit -o ../../website/static/img/
|
||||
|
|
|
|||
2360
scripts/sponsors/package-lock.json
generated
2360
scripts/sponsors/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -10,6 +10,9 @@
|
|||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"sponsorkit": "^0.8.2"
|
||||
"sponsorkit": "^16.5.0"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=22.0.0"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue