Skip to content

Commit

Permalink
Merge pull request #895 from Hi-Windom/v0.35
Browse files Browse the repository at this point in the history
V0.35
  • Loading branch information
Soltus authored Jul 21, 2024
2 parents 27f54f1 + f6d1907 commit f3c006a
Show file tree
Hide file tree
Showing 15 changed files with 168 additions and 58 deletions.
32 changes: 18 additions & 14 deletions .github/README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,25 @@ link:./docs/Sillot-android[汐洛安卓]

image::split.png[Split Image]

image:https://img.shields.io/github/license/Hi-Windom/Sillot?style=flat&color=0080ff[license]
image:https://img.shields.io/github/last-commit/Hi-Windom/Sillot?style=flat&logo=git&logoColor=white&color=0080ff[last-commit]
image:https://img.shields.io/github/languages/top/Hi-Windom/Sillot?style=flat&color=0080ff[repo-top-language]
image:https://img.shields.io/github/languages/count/Hi-Windom/Sillot?style=flat&color=0080ff[repo-language-count]
image:https://img.shields.io/github/repo-size/Hi-Windom/Sillot?logo=github[GitHub repo size]
image:https://img.shields.io/github/languages/code-size/Hi-Windom/Sillot.svg?logo=github[GitHub code size]
image:https://img.shields.io/github/issues-closed/Hi-Windom/Sillot?logo=github[GitHub closed issues]
image:https://img.shields.io/github/issues-pr-closed/Hi-Windom/Sillot?logo=github[GitHub closed pull requests]

image:https://app.codacy.com/project/badge/Grade/3106acfdbc5041118d800c5b4f2f935d[
codacy,
link="https://app.codacy.com/gh/Hi-Windom/Sillot/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade"
image:https://hits.b3log.org/Hi-Windom/Sillot.svg[
Github Hits,
link="https://github.com/Hi-Windom/Sillot"
]
image:https://img.shields.io/github/last-commit/Hi-Windom/Sillot?logo=git[last-commit]
image:https://img.shields.io/github/commit-activity/m/Hi-Windom/Sillot?logo=git[GitHub commit activity]
image:https://img.shields.io/github/commit-activity/y/Hi-Windom/Sillot?logo=git[GitHub commit activity]

image:https://img.shields.io/github/languages/count/Hi-Windom/Sillot[repo-language-count]
// codacy 太拉了,不好用
// image:https://app.codacy.com/project/badge/Grade/3106acfdbc5041118d800c5b4f2f935d[
// codacy,
// link="https://app.codacy.com/gh/Hi-Windom/Sillot/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade"
// ]
image:https://www.codefactor.io/repository/github/hi-windom/sillot/badge[
codefactor,
link="https://www.codefactor.io/repository/github/hi-windom/sillot"
Expand All @@ -25,25 +35,19 @@ image:https://codecov.io/gh/Hi-Windom/Sillot/branch/master/graph/badge.svg?token
codecov,
link="https://codecov.io/gh/Hi-Windom/Sillot"
]
image:https://img.shields.io/github/downloads/Hi-Windom/Sillot/total.svg?style=flat-square&color=A26738&logo=github[
image:https://img.shields.io/github/downloads/Hi-Windom/Sillot/total.svg?style=flat-square&logo=github[
downloads,
link="https://github.com/Hi-Windom/Sillot/releases"
]
image:https://img.shields.io/docker/pulls/soltus/sillot?color=99CCFF&label=pulls&logo=docker&logoColor=99CCFF[
docker-pulls,
link="https://hub.docker.com/r/soltus/sillot"
]
image:https://hits.b3log.org/Hi-Windom/Sillot.svg[
Hits,
link="https://github.com/Hi-Windom/Sillot"
]

// 注意当前设置 master 为默认分支
image:https://repobeats.axiom.co/api/embed/708cdf00c747155e49ff28c0c0024e17a28e5705.svg[
Insights,
link="https://github.com/Hi-Windom/Sillot/pulse"
]

image::../app/stage/icon.png[Sillot Logo]

image::https://capsule-render.vercel.app/api?type=waving&color=timeGradient&height=300&&section=footer&text=Hi-Windom&fontSize=90&fontAlign=50&fontAlignY=70&desc=Power%20by%20&descAlign=50&descSize=30&descAlignY=40&animation=twinkling[Hi-Windom Footer]
33 changes: 30 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,42 @@ jobs:
prerelease: true
token: ${{ secrets.GITHUB_TOKEN }}

- name: 📤 Upload artifact siyuan_desc_mapping.json
uses: actions/upload-artifact@v4
with:
name: siyuan_desc_mapping.json
path: siyuan_desc_mapping.json

build:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.name }}
needs: create_release
strategy:
matrix:
# suffix 需要与 electron builder 配置中的 artifactName 匹配
config:
- os: ubuntu-20.04
name: ubuntu build linux-x86_64.AppImage
kernel_path_upx: "app/kernel-linux/SiYuan-Sillot-Kernel"
kernel_path: "../app/kernel-linux/SiYuan-Sillot-Kernel"
build_args_prefix: "-s -w -X"
build_args_suffix: "Mode=prod"
electron_args: "dist-linux"
goos: "linux"
goarch: "amd64"
suffix: "linux-x86_64.AppImage"
- os: ubuntu-20.04
name: ubuntu build linux-x64.tar.gz
kernel_path_upx: "app/kernel-linux/SiYuan-Sillot-Kernel"
kernel_path: "../app/kernel-linux/SiYuan-Sillot-Kernel"
build_args_prefix: "-s -w -X"
build_args_suffix: "Mode=prod"
electron_args: "dist-linux"
goos: "linux"
goarch: "amd64"
suffix: "linux-x64.tar.gz"
- os: windows-latest
name: windows build win.exe
name: windows build win-x64.exe
kernel_path_upx: "app/kernel/SiYuan-Sillot-Kernel.exe"
kernel_path: "../app/kernel/SiYuan-Sillot-Kernel.exe"
build_args_prefix: "-s -w -H=windowsgui -X"
Expand All @@ -150,7 +177,7 @@ jobs:
gobin: "bin"
mingwsys: "MINGW64"
goarch: "amd64"
suffix: "win.exe"
suffix: "win-x64.exe"
- os: windows-latest
name: windows build android.apk
kernel_path_upx: "app/kernel/SiYuan-Sillot-Kernel.exe"
Expand Down Expand Up @@ -381,7 +408,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_name: ${{ env.repo_name }}-${{ needs.create_release.outputs.release_version }}-beta_arm64.apk
asset_name: ${{ env.repo_name }}-${{ needs.create_release.outputs.release_version }}-android-arm64_v8a.apk
asset_path: ${{ steps.sign_app.outputs.signedReleaseFile }}

- name: 📤 Upload logs to artifact if failure
Expand Down
2 changes: 1 addition & 1 deletion .vscode/extensions/Sillot/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "sillot",
"displayName": "汐洛 Sillot",
"description": "汐洛彖夲肜矩阵(Sillot T☳Converbenk Matrix)为智慧新彖务服务。此插件为汐洛官方插件,提供多功能一体化集成。",
"version": "0.35.24072019",
"version": "0.35.24072117",
"preview": true,
"repository": "https://github.com/Hi-Windom/Sillot",
"publisher": "Hi-Windom",
Expand Down
52 changes: 22 additions & 30 deletions app/electron-builder-arm64.yml → app/electron-builder-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ appId: "sc.windom.sillot"
asar: false
compression: "store"
copyright: "© 2024 Hi-Windom"
artifactName: "siyuan-${version}-${os}-arm64.${ext}"
artifactName: "Sillot-${version}-${os}-${arch}.${ext}"
extraMetadata:
main: "electron/main.js"
directories:
Expand All @@ -13,34 +13,24 @@ files:
extraFiles:
- from: "../LICENSE"
to: "LICENSE"
win:
icon: "src/assets/icon.ico"

linux:
icon: "src/assets/icon.icns"
category: "Utility"
executableName: "Sillot"
desktop: {
"Name": "Sillot",
"Comment": "Refactor your thinking",
"Type": "Application",
"Categories": "Utility;"
}
extraResources:
- from: "kernel-arm64"
- from: "kernel-linux"
to: "kernel"
requestedExecutionLevel: "asInvoker"
# certificateSubjectName: "Yunnan Liandi Technology Co., Ltd."
signingHashAlgorithms: [ 'sha256' ]
#rfc3161TimeStampServer: "http://sha256timestamp.ws.symantec.com/sha256/timestamp"
#rfc3161TimeStampServer: "http://time.certum.pl"
rfc3161TimeStampServer: "http://timestamp.entrust.net/TSS/RFC3161sha2TS"
target:
- target: "nsis"
arch: "arm64"
nsis:
oneClick: false
perMachine: false
allowToChangeInstallationDirectory: true
allowElevation: true
deleteAppDataOnUninstall: true
createDesktopShortcut: true
createStartMenuShortcut: true
shortcutName: "Sillot"
license: "../LICENSE"
include: "nsis/installer.nsh"
warningsAsErrors: false
installerSidebar: "nsis/installerSidebar.bmp"
uninstallerSidebar: "nsis/uninstallerSidebar.bmp"
- target: "tar.gz"
- target: "AppImage"
- target: "deb"
electronLanguages: ['zh-CN', 'en-US']
extraResources:
- from: "changelogs"
Expand All @@ -49,7 +39,7 @@ extraResources:
to: "stage"
- from: "guide"
to: "guide"
filter: "!**/{.DS_Store,.git,.gitignore,.idea}"
filter: "!**/{.DS_Store,.git,.gitignore,.idea,20211226090932-5lcq56f}"
- from: "appearance/boot"
to: "appearance/boot"
filter: "!**/{.DS_Store}"
Expand All @@ -70,9 +60,11 @@ extraResources:
- from: "appearance/themes/daylight"
to: "appearance/themes/daylight"
filter: "!**/{.DS_Store,custom.css}"
- from: "appearance/themes/lnco"
to: "appearance/themes/lnco"
filter: "!**/{.DS_Store,custom.css}"
- from: "src/assets/fonts"
to: "appearance/fonts"
filter: "!**/{.DS_Store}"
- from: "appearance/themes/lnco"
to: "appearance/themes/lnco"
filter: "!**/{.DS_Store,custom.css}"
- from: "pandoc/pandoc-linux-amd64.zip"
to: "pandoc.zip"
4 changes: 2 additions & 2 deletions app/electron-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ appId: "sc.windom.sillot"
asar: false
compression: "store"
copyright: "© 2024 Hi-Windom"
artifactName: "Sillot-${version}-${os}.${ext}"
artifactName: "Sillot-${version}-${os}-${arch}.${ext}"
extraMetadata:
main: "electron/main.js"
directories:
Expand Down Expand Up @@ -77,4 +77,4 @@ extraResources:
to: "appearance/fonts"
filter: "!**/{.DS_Store}"
- from: "pandoc/pandoc-windows-amd64.zip"
to: "pandoc.zip"
to: "pandoc.zip"
4 changes: 1 addition & 3 deletions app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sillot",
"version": "0.35.24072019",
"version": "0.35.24072117",
"syv": "3.1.2",
"sypv": "[3.0.16, 3.0.17, 3.1.0, 3.1.1]",
"description": "Build Your Eternal Digital Garden",
Expand Down Expand Up @@ -45,8 +45,6 @@
"dist-appx": "ELECTRON_MIRROR=https://cnpmjs.org/mirrors/electron/ electron-builder --config electron-appx-builder.yml",
"dist": "ELECTRON_MIRROR=https://cnpmjs.org/mirrors/electron/ electron-builder --config electron-builder.yml --publish=never",
"dist-arm64": "ELECTRON_MIRROR=https://cnpmjs.org/mirrors/electron/ electron-builder --arm64 --config electron-builder-arm64.yml --publish=never",
"dist-darwin": "ELECTRON_MIRROR=https://cnpmjs.org/mirrors/electron/ electron-builder --mac --config electron-builder-darwin.yml --publish=never",
"dist-darwin-arm64": "ELECTRON_MIRROR=https://cnpmjs.org/mirrors/electron/ electron-builder --arm64 --mac --config electron-builder-darwin-arm64.yml --publish=never",
"dist-linux": "ELECTRON_MIRROR=https://cnpmjs.org/mirrors/electron/ electron-builder --linux --config electron-builder-linux.yml --publish=never",
"dist-linux-arm64": "ELECTRON_MIRROR=https://cnpmjs.org/mirrors/electron/ electron-builder --arm64 --linux --config electron-builder-linux-arm64.yml --publish=never"
},
Expand Down
2 changes: 1 addition & 1 deletion docs/starlight/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "starlight",
"type": "module",
"version": "0.35.24072019",
"version": "0.35.24072117",
"scripts": {
"test": "echo 'Test your sister day by day'",
"dev": "astro dev",
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 54 additions & 0 deletions docs/starlight/src/content/docs/汐洛宝典/下载.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,57 @@ https://github.com/Hi-Windom/Sillot/releases
## 阿里云盘

https://www.alipan.com/s/FuVG2PhBYTD 提取码: g4k1

## 在 WSL 上运行

这里以安装了 `kali-linux-default` 的 kali 系统为例(约占用 3GB 空间)。用户可以在 [微软商店获取 kali ](https://apps.microsoft.com/detail/9pkr34tncv07?hl=zh-cn&gl=CN),然通过官方文档 [了解如何安装 kali-linux-default](https://www.kali.org/docs/general-use/metapackages/) 。

如果未安装 `wget`,可以通过 `apt install wget` 命令安装。

找到 GitHub 仓库的 [Release 页面](https://github.com/Hi-Windom/Sillot/releases),并在 Assets 里找到 AppImage 文件。

<img src="/src/assets/shots/2024-07-21-002329.png" />

复制 Appimage 的链接,在 WSL 中打开终端,输入 `wget <URL>` 命令下载,然后通过 `chmod +x <FILENAME>` 命令赋予可执行权限,最后通过 `./<FILENAME>` 命令运行。

### 在其他挂载盘里运行

在其他挂载盘里运行有两个好处,一个是节省 C 盘空间( WSL 的默认挂载盘是 C 盘),另一个方便通过 Windows 文件资源管理器管理。

通过命令 `ls /mnt/` 可以查看 WSL 挂载的盘符。

假设我们想将 AppImage 文件放到 D 盘已存在的文件夹 D:\\wsl\\kali\\ ,可以参考以下操作:

```bash
cd /mnt/d/wsl/kali
wget <URL>
chmod +x <FILENAME>.AppImage
./<FILENAME>.AppImage
```

### 手动提取后运行

直接运行 Appimage 有个问题:无法写入日志文件,用户可以在控制台看到类似下面的信息:

```log
Unable to write to log file: [Error: EROFS: read-only file system, open '/tmp/.mount_sillotEOT29t/resources/electron-main.log'] {
errno: -30,
code: 'EROFS',
syscall: 'open',
path: '/tmp/.mount_sillotEOT29t/resources/electron-main.log'
}
```

而通过 --appimage-extract-and-run 指令可以写入日志文件,但是其仍然在 /tmp 路径。

要解决这个问题,可以手动提取 AppImage 的内容,然后运行其中的可执行文件。首先,提取 AppImage:

```bash
./<FILENAME>.AppImage --appimage-extract
```

然后,运行提取出来的可执行文件:

```bash
./squashfs-root/AppRun
```
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "Sillot-workspace",
"version": "0.35.24072019",
"version": "0.35.24072117",
"description": "汐洛 pnpm 工作区",
"packageManager": "pnpm@9.5.0",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion scripts/_pkg/Const.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<p>
<img src="https://img.shields.io/badge/Chromium 114+-black?logo=Google Chrome" title="Chromium" height="29"/>
<img src="https://img.shields.io/badge/Windows 10+-black?logo=nsis" title="Windows" height="29"/>
<img src="https://img.shields.io/badge/Linux TODO-black?logo=linux" title="linux" height="29"/>
<img src="https://img.shields.io/badge/Linux AMD64-black?logo=linux" title="linux" height="29"/>
<img src="https://img.shields.io/badge/Android 12+-black?logo=android" title="Android" height="29"/>
<img src="https://img.shields.io/badge/HarmonyOS TODO-black?logo=harmonyos" title="harmonyos" height="29"/>
</p>
Expand Down
27 changes: 27 additions & 0 deletions scripts/linux-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash
# 汐洛仅实现在 windows 平台的构建,linux 自行探索

echo 'Building UI'
pnpm pnpm install && pnpm run app:build

echo 'Cleaning Builds'
rm -rf app/build
rm -rf app/kernel-linux
rm -rf app/kernel-linux-arm64

echo 'Building Kernel'

cd kernel
go version
export GO111MODULE=on
export GOPROXY=https://goproxy.io
export CGO_ENABLED=1

echo 'Building Kernel amd64'
export GOOS=linux
export GOARCH=amd64
export CC=~/x86_64-linux-musl-cross/bin/x86_64-linux-musl-gcc
go build -buildmode=pie --tags fts5 -v -o "../app/kernel-linux/SiYuan-Sillot-Kernel" -ldflags "-s -w -extldflags -static-pie" .

echo 'Building Electron App amd64'
pnpm -F ./app run dist-linux
8 changes: 8 additions & 0 deletions scripts/parse-changelog.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import json
import os
import re, ast
from argparse import ArgumentParser
Expand Down Expand Up @@ -35,6 +36,13 @@ def generate_msg_from_repo(repo_name, tag_name, otherReleaseArray):
)
U.generate_msg(desc_mapping, C.docmap_siyuan)

# 将desc_mapping转换为JSON格式并写入文件
filename = "siyuan_desc_mapping.json"
with open(filename, 'w') as file:
json.dump(desc_mapping, file, indent=4)

# 文件已经准备好上传,接下来的步骤将在GitHub Actions工作流文件中执行

if __name__ == "__main__":
parser = ArgumentParser(
description="Automaticly generate information from issues by tag."
Expand Down
2 changes: 1 addition & 1 deletion scripts/workspace-sillot-android-build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@REM if errorlevel 1 实际上是在检查errorlevel是否大于或等于1,这是检查命令是否失败的标准做法。

echo ===== Building UI =====
call pnpm --filter ./app install
call pnpm install
call pnpm run app:build
if errorlevel 1 (
exit /b %errorlevel%
Expand Down
2 changes: 1 addition & 1 deletion scripts/workspace-sillot-win-build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
@REM if errorlevel 1 实际上是在检查errorlevel是否大于或等于1,这是检查命令是否失败的标准做法。

echo ===== Building UI =====
call pnpm --filter ./app install
call pnpm install
call pnpm run app:build
if errorlevel 1 (
exit /b %errorlevel%
Expand Down

0 comments on commit f3c006a

Please sign in to comment.