fix: 重构发版部署方式
This commit is contained in:
parent
e4c1ff7900
commit
57bd558b69
281
updates/index.html
Normal file
281
updates/index.html
Normal file
@ -0,0 +1,281 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>LikeCowork 安装指南</title>
|
||||
<style>
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
body {
|
||||
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
min-height: 100vh;
|
||||
padding: 40px 20px;
|
||||
}
|
||||
.container {
|
||||
max-width: 800px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.card {
|
||||
background: white;
|
||||
border-radius: 20px;
|
||||
padding: 40px;
|
||||
box-shadow: 0 20px 60px rgba(0,0,0,0.3);
|
||||
}
|
||||
h1 {
|
||||
text-align: center;
|
||||
color: #333;
|
||||
margin-bottom: 10px;
|
||||
font-size: 32px;
|
||||
}
|
||||
.subtitle {
|
||||
text-align: center;
|
||||
color: #666;
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
.platform-section {
|
||||
margin-bottom: 40px;
|
||||
}
|
||||
.platform-title {
|
||||
font-size: 20px;
|
||||
color: #333;
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 10px;
|
||||
border-bottom: 2px solid #667eea;
|
||||
}
|
||||
.step {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.step-number {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
background: #667eea;
|
||||
color: white;
|
||||
border-radius: 50%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
font-weight: bold;
|
||||
flex-shrink: 0;
|
||||
margin-right: 15px;
|
||||
}
|
||||
.step-content {
|
||||
flex: 1;
|
||||
}
|
||||
.step-title {
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.step-desc {
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
}
|
||||
.download-btn {
|
||||
display: inline-block;
|
||||
background: #667eea;
|
||||
color: white;
|
||||
padding: 12px 30px;
|
||||
border-radius: 10px;
|
||||
text-decoration: none;
|
||||
font-weight: 600;
|
||||
margin: 10px 5px 10px 0;
|
||||
transition: transform 0.2s, box-shadow 0.2s;
|
||||
}
|
||||
.download-btn:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
|
||||
}
|
||||
.terminal {
|
||||
background: #1e1e1e;
|
||||
color: #d4d4d4;
|
||||
padding: 15px 20px;
|
||||
border-radius: 10px;
|
||||
font-family: 'Monaco', 'Menlo', monospace;
|
||||
font-size: 14px;
|
||||
margin: 10px 0;
|
||||
overflow-x: auto;
|
||||
}
|
||||
.terminal .cmd { color: #9cdcfe; }
|
||||
.terminal .path { color: #ce9178; }
|
||||
.warning {
|
||||
background: #fff3cd;
|
||||
border: 1px solid #ffc107;
|
||||
border-radius: 10px;
|
||||
padding: 15px;
|
||||
margin: 20px 0;
|
||||
}
|
||||
.warning-title {
|
||||
font-weight: 600;
|
||||
color: #856404;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.copy-btn {
|
||||
background: #28a745;
|
||||
color: white;
|
||||
border: none;
|
||||
padding: 4px 12px;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
font-size: 12px;
|
||||
margin-left: 10px;
|
||||
}
|
||||
.copy-btn:hover { background: #218838; }
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="card">
|
||||
<h1>📦 LikeCowork 安装指南</h1>
|
||||
<p class="subtitle">Mac / Windows 双平台桌面应用</p>
|
||||
|
||||
<div class="platform-section">
|
||||
<h2 class="platform-title">🍎 Mac 安装 <span id="version-mac" style="font-size:0.7em;color:#666;"></span></h2>
|
||||
|
||||
<div class="step">
|
||||
<div class="step-number">1</div>
|
||||
<div class="step-content">
|
||||
<div class="step-title">下载安装包</div>
|
||||
<div class="step-desc">根据您的 Mac 芯片选择对应版本:</div>
|
||||
<div>
|
||||
<a id="mac-arm64" href="likecowork-1.1.0-arm64-mac.zip" class="download-btn">Apple Silicon (M1/M2/M3)</a>
|
||||
<a id="mac-x64" href="likecowork-1.1.0-x64-mac.zip" class="download-btn">Intel 芯片</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="step">
|
||||
<div class="step-number">2</div>
|
||||
<div class="step-content">
|
||||
<div class="step-title">解压并修复(重要!)</div>
|
||||
<div class="step-desc">解压后,如果打开应用提示"已损坏",请运行以下命令:</div>
|
||||
<div class="terminal">
|
||||
<span class="cmd">xattr -cr</span> <span class="path">~/Downloads/LikeCowork.app</span>
|
||||
<button class="copy-btn" onclick="copyCmd('mac')">复制</button>
|
||||
</div>
|
||||
<div class="warning">
|
||||
<div class="warning-title">⚠️ 提示</div>
|
||||
<div>如果解压后找不到应用,请把压缩包解压到「下载」文件夹,然后再运行上述命令。</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="step">
|
||||
<div class="step-number">3</div>
|
||||
<div class="step-content">
|
||||
<div class="step-title">移动到应用程序</div>
|
||||
<div class="step-desc">将 <strong>LikeCowork.app</strong> 拖入「应用程序」文件夹即可。</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="platform-section">
|
||||
<h2 class="platform-title">🪟 Windows 安装 <span id="version-win" style="font-size:0.7em;color:#666;"></span></h2>
|
||||
|
||||
<div class="step">
|
||||
<div class="step-number">1</div>
|
||||
<div class="step-content">
|
||||
<div class="step-title">下载安装包</div>
|
||||
<div class="step-desc"></div>
|
||||
<div>
|
||||
<a id="win-setup" href="likecowork-1.1.0-setup.exe" class="download-btn">下载 Windows 安装包</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="step">
|
||||
<div class="step-number">2</div>
|
||||
<div class="step-content">
|
||||
<div class="step-title">运行安装程序</div>
|
||||
<div class="step-desc">双击运行安装包,按提示完成安装即可。安装完成后可选择立即运行。</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="platform-section">
|
||||
<h2 class="platform-title">❓ 常见问题</h2>
|
||||
|
||||
<div class="step">
|
||||
<div class="step-content">
|
||||
<div class="step-title">如何判断我的 Mac 是 Intel 还是 Apple Silicon?</div>
|
||||
<div class="step-desc">点击 Apple 菜单 → 关于本机 → 概览,如果显示「芯片」就是 Apple Silicon,「处理器」就是 Intel。</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="step">
|
||||
<div class="step-content">
|
||||
<div class="step-title">Mac 提示"已损坏"无法打开?</div>
|
||||
<div class="step-desc">这是 macOS 安全限制。请在终端运行:<code style="background:#f5f5f5;padding:2px 6px;border-radius:4px;">xattr -cr ~/Downloads/LikeCowork.app</code></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// 动态获取最新版本
|
||||
async function fetchLatestVersion() {
|
||||
try {
|
||||
// 使用绝对路径,避免不同访问路径下的相对路径偏差
|
||||
const [macRes, winRes] = await Promise.all([
|
||||
fetch('/updates/latest-mac.yml'),
|
||||
fetch('/updates/latest.yml')
|
||||
]);
|
||||
|
||||
if (!macRes.ok) {
|
||||
console.warn('latest-mac.yml 不可用,保留页面默认下载链接', macRes.status);
|
||||
} else {
|
||||
const macText = await macRes.text();
|
||||
const macMatch = macText.match(/version:\s*([0-9]+\.[0-9]+\.[0-9]+)/);
|
||||
if (macMatch) {
|
||||
const version = macMatch[1];
|
||||
document.getElementById('version-mac').textContent = `(v${version})`;
|
||||
document.getElementById('mac-arm64').href = `likecowork-${version}-arm64-mac.zip`;
|
||||
document.getElementById('mac-x64').href = `likecowork-${version}-x64-mac.zip`;
|
||||
}
|
||||
}
|
||||
|
||||
if (!winRes.ok) {
|
||||
console.warn('latest.yml 不可用,保留页面默认下载链接', winRes.status);
|
||||
} else {
|
||||
const winText = await winRes.text();
|
||||
const winMatch = winText.match(/version:\s*([0-9]+\.[0-9]+\.[0-9]+)/);
|
||||
if (winMatch) {
|
||||
const version = winMatch[1];
|
||||
document.getElementById('version-win').textContent = `(v${version})`;
|
||||
document.getElementById('win-setup').href = `likecowork-${version}-setup.exe`;
|
||||
}
|
||||
}
|
||||
} catch (e) {
|
||||
console.error('获取版本失败,已使用页面默认下载链接:', e);
|
||||
}
|
||||
}
|
||||
|
||||
fetchLatestVersion();
|
||||
|
||||
function copyCmd(type) {
|
||||
const cmds = {
|
||||
'mac': 'xattr -cr ~/Downloads/LikeCowork.app'
|
||||
};
|
||||
const text = cmds[type];
|
||||
if (navigator.clipboard && window.isSecureContext) {
|
||||
navigator.clipboard.writeText(text).then(() => {
|
||||
alert('已复制到剪贴板!');
|
||||
});
|
||||
} else {
|
||||
const textarea = document.createElement('textarea');
|
||||
textarea.value = text;
|
||||
textarea.style.position = 'fixed';
|
||||
textarea.style.opacity = '0';
|
||||
document.body.appendChild(textarea);
|
||||
textarea.select();
|
||||
document.execCommand('copy');
|
||||
document.body.removeChild(textarea);
|
||||
alert('已复制到剪贴板!');
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
11
updates/latest-mac.yml
Normal file
11
updates/latest-mac.yml
Normal file
@ -0,0 +1,11 @@
|
||||
version: 1.1.2
|
||||
files:
|
||||
- url: likecowork-1.1.2-x64-mac.zip
|
||||
sha512: HDBOY4uN5DrAYY/+7nfUe96+RFsdG799Y2433VmHpHF7UN7wnc3ZeqyXlYgh5nNltcZVvW8Nx/sYA4QNF3jc9Q==
|
||||
size: 845749431
|
||||
- url: likecowork-1.1.2-arm64-mac.zip
|
||||
sha512: 25t+SsBld9o2NSeKyD1gUKs4+5NSKmH58VrrQXnLWDxIb1ZZmfUzEuP2L4IvZ/UCZWyZbwjOyCP+S8nUWPWBOA==
|
||||
size: 840978186
|
||||
path: likecowork-1.1.2-x64-mac.zip
|
||||
sha512: HDBOY4uN5DrAYY/+7nfUe96+RFsdG799Y2433VmHpHF7UN7wnc3ZeqyXlYgh5nNltcZVvW8Nx/sYA4QNF3jc9Q==
|
||||
releaseDate: '2026-03-24T05:49:08.930Z'
|
||||
8
updates/latest.yml
Normal file
8
updates/latest.yml
Normal file
@ -0,0 +1,8 @@
|
||||
version: 1.1.2
|
||||
files:
|
||||
- url: likecowork-1.1.2-setup.exe
|
||||
sha512: +KGRtONJbziLPP7NW/5OL0MfvPW1GA9u/JgeKVwQjEe4NHtSydCXi/VJvgpvGqXNqf35M19IxwI4tp3Z+e70Fw==
|
||||
size: 806187561
|
||||
path: likecowork-1.1.2-setup.exe
|
||||
sha512: +KGRtONJbziLPP7NW/5OL0MfvPW1GA9u/JgeKVwQjEe4NHtSydCXi/VJvgpvGqXNqf35M19IxwI4tp3Z+e70Fw==
|
||||
releaseDate: '2026-03-19T03:50:20.521Z'
|
||||
Loading…
x
Reference in New Issue
Block a user