-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathio.github._02engine._02Engine.yml
More file actions
178 lines (161 loc) · 7.09 KB
/
io.github._02engine._02Engine.yml
File metadata and controls
178 lines (161 loc) · 7.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
id: io.github._02engine._02Engine
runtime: org.freedesktop.Platform
runtime-version: '24.08'
base: org.electronjs.Electron2.BaseApp
base-version: '24.08'
sdk: org.freedesktop.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.node20
command: 02engine
finish-args:
- --share=ipc
- --socket=fallback-x11
- --socket=wayland
- --socket=pulseaudio
- --socket=alsa
- --device=dri
- --filesystem=xdg-download
- --filesystem=xdg-documents:ro
- --filesystem=xdg-pictures:ro
- --filesystem=xdg-music:ro
- --filesystem=xdg-videos:ro
- --share=network
modules:
- name: 02Engine
buildsystem: simple
build-options:
append-path: /usr/lib/sdk/node20/bin:$PATH
env:
npm_config_nodedir: /usr/lib/sdk/node20
npm_config_cache: flatpak-node/npm-cache
npm_config_offline: 'true'
XDG_CACHE_HOME: flatpak-node/cache
ELECTRON_ENABLE_LOGGING: '1'
NPM_CONFIG_GIT_TAG_VERSION_PREFIX: ""
NO_UPDATE_NOTIFIER: "1"
NPM_CONFIG_UPDATE_NOTIFIER: "false"
ELECTRON_SKIP_BINARY_DOWNLOAD: "1"
ELECTRON_CONFIG_CACHE: flatpak-node/cache/electron
sources:
- type: git
url: https://github.com/02engine/desktop.git
commit: 56e8d5f030761aa835b6941fcc7d80fab26dba6c
- type: file
url: https://raw.githubusercontent.com/02engine/desktop/main/art/icon.png
dest-filename: icon.png
sha256: f18ada96f6c02e9948ac8297e373089585a53c54d77ed77afa26f671140df7f8
- type: file
url: https://raw.githubusercontent.com/02engine/desktop/main/flatpak/package-lock.json
dest-filename: package-lock.json
sha256: 1f6c3b0df1df9c1e11f6928b903c4997833cc2a9562ff6a5d8b2da70615d613d
- flatpak/generated-sources.json
build-commands:
# DEBUG 检查
- echo "=== DEBUG: Node & npm 检查 ==="
- which node && node --version || echo "node failed"
- which npm && npm --version || echo "npm failed"
- echo "=== DEBUG: npm 缓存路径 ==="
- echo $npm_config_cache
- ls -la $npm_config_cache || echo "npm cache not found"
- du -sh $npm_config_cache || echo "cache size unknown"
- find $npm_config_cache -type f | wc -l || echo "no cache files"
- echo "=== DEBUG: 当前目录内容 ==="
- ls -la .
- echo "=== DEBUG: flatpak-node git-packages 目录(如果存在) ==="
- ls -la flatpak-node/git-packages || echo "No git-packages dir found"
# 关键修复:强制重写 git+file: / file: / 被误解的 ssh://file 为正确的本地 file:///
- git config --global url."file:///".insteadOf git+file:
- git config --global url."file:///".insteadOf file:
- git config --global url."file:///".insteadOf ssh://file:
- git config --global url."file:///".insteadOf "ssh://"
# 保留原有 github 重写(防万一有远程 git 依赖)
- git config --global url."https://github.com/".insteadOf git@github.com:
- git config --global url."https://".insteadOf git://
- git config --global url."https://".insteadOf ssh://
# 临时禁用 ssl 校验(flatpak 沙盒有时证书链有问题,可选,成功后可注释掉)
# - git config --global http.sslVerify false
# 加强 npm ci/install:更严格离线 + 跳过 git fetch/tag 检查
- npm ci --prefer-offline --no-audit --no-fund --ignore-scripts --legacy-peer-deps --force --no-package-lock --no-git-tags --fetch-retries=0 --git-tag-version=false
# 后续构建步骤
- npm run fetch || true
- npm run webpack:prod
- npm run release-automation/build.js --linux-dir --x64
- mkdir -p /app/main
- cp -a dist/linux-unpacked/* /app/main/ || echo "dist/linux-unpacked not found, check build logs"
- install -Dm644 icon.png /app/share/icons/hicolor/512x512/apps/io.github._02engine._02Engine.png
- |
cat > /app/bin/02engine << 'EOF'
#!/usr/bin/env bash
set -euo pipefail
exec /app/main/02Engine "$@"
EOF
- chmod +x /app/bin/02engine
- |
cat > /app/share/applications/io.github._02engine._02Engine.desktop << 'EOF'
[Desktop Entry]
Name=02Engine
Exec=02engine %U
Terminal=false
Type=Application
Icon=io.github._02engine._02Engine
StartupWMClass=02Engine-desktop
Comment=Better Scratch. Based on Turbowarp.
MimeType=application/x.scratch.sb3;application/x.scratch.sb2;application/x.scratch.sb;
Categories=Development;Education;
Keywords=scratch;programming;animation;
EOF
- |
cat > /app/share/metainfo/io.github._02engine._02Engine.metainfo.xml << 'EOF'
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop-application">
<id>io.github._02engine._02Engine</id>
<launchable type="desktop-id">io.github._02engine._02Engine.desktop</launchable>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0</project_license>
<name>02Engine</name>
<developer id="io.github._02engine">
<name>02Studio</name>
</developer>
<summary>Better Scratch. Based on TurboWarp.</summary>
<description>
<p>02Engine is a Scratch mod based on TurboWarp with enhanced features for designing and animating.</p>
<p>Features:</p>
<ul>
<li>Runs projects up to 100x faster than Scratch</li>
<li>Dark mode for comfortable editing</li>
<li>Many addons to improve the editor experience</li>
<li>Native filesystem integration</li>
<li>Support for .sb3, .sb2, and .sb project files</li>
</ul>
</description>
<screenshots>
<screenshot type="default">
<image>https://raw.githubusercontent.com/02engine/desktop/main/art/icon.png</image>
</screenshot>
</screenshots>
<url type="homepage">https://02engine.org/</url>
<url type="bugtracker">https://github.com/02engine/desktop/issues</url>
<url type="vcs-browser">https://github.com/02engine/desktop</url>
<categories>
<category>Development</category>
<category>Education</category>
</categories>
<keywords>
<keyword>scratch</keyword>
<keyword>programming</keyword>
<keyword>animation</keyword>
</keywords>
<recommends>
<control>pointing</control>
<control>keyboard</control>
</recommends>
<supports>
<control>touch</control>
</supports>
<content_rating type="oars-1.1">
<content_attribute id="social-chat">mild</content_attribute>
<content_attribute id="social-info">mild</content_attribute>
</content_rating>
</component>
EOF
- ln -s /app/bin/02engine /app/bin/io.github._02engine._02Engine