From 9a31213bcd2f462fad56e91c2014b24872d3d515 Mon Sep 17 00:00:00 2001 From: Il Harper Date: Sun, 12 May 2024 19:15:44 +0800 Subject: [PATCH] refactor: cordis migrate - stage 1 --- .github/workflows/build.yml | 46 ++++++++-------- config.ts | 4 +- packages/app/koicli/cli.go | 4 +- packages/app/koicli/import.go | 2 +- packages/app/koicli/run.go | 2 +- packages/app/main.go | 2 +- packages/app/ui/tray/tray.go | 10 ++-- packages/build/tasks/pack/appimage.ts | 6 +-- packages/build/tasks/pack/mac.ts | 26 ++++----- packages/build/tasks/pack/msi.ts | 4 +- packages/build/tasks/pack/portable.ts | 2 +- .../linux/chat.koishi.desktop.appdata.xml | 10 ++-- .../linux/chat.koishi.desktop.desktop.hbs | 10 ++-- .../build/templates/mac/distribution.xml.hbs | 8 +-- .../build/templates/mac/mac-app.plist.hbs | 8 +-- packages/build/templates/mac/postinstall.sh | 8 +-- packages/build/templates/msi/index.wxs.hbs | 48 ++++++++--------- .../portable/koi.VisualElementsManifest.xml | 4 +- .../build/templates/shell/koishell.rc.hbs | 53 ++++++------------- packages/build/utils/config.ts | 30 +++++------ packages/core/god/daemon.go | 2 +- packages/core/koicmd/import.go | 2 +- packages/core/koishell/koishell.go | 6 +-- packages/core/proc/koiproc.go | 2 +- packages/instwin/CMakeLists.txt | 2 +- packages/instwin/src/windows/mainwindow.ui | 4 +- packages/shellcomm/CMakeLists.txt | 2 +- packages/shelllinux/CMakeLists.txt | 2 +- .../Sources/KoiShell/mode/webview/menu.swift | 2 +- .../KoiShell/mode/webview/window.swift | 6 +-- packages/shellwin/CMakeLists.txt | 2 +- .../include/koishell/mode/webview.hpp | 2 +- packages/unfold/main.go | 2 +- 33 files changed, 150 insertions(+), 173 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b44c66cc..0ded8b62 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -106,60 +106,60 @@ jobs: uses: actions/upload-artifact@v3 with: name: koi-${{ matrix.target.rid }}-${{ github.sha }}.zip - path: build/dist/koishi.zip + path: build/dist/cordis.zip - name: Upload msi for Windows to Build Artifact if: matrix.target.goos == 'windows' uses: actions/upload-artifact@v3 with: name: koi-${{ matrix.target.rid }}-${{ github.sha }}.msi - path: build/dist/koishi.msi + path: build/dist/cordis.msi - name: Upload zip for macOS to Build Artifact if: matrix.target.goos == 'darwin' uses: actions/upload-artifact@v3 with: name: koi-${{ matrix.target.rid }}-${{ github.sha }}.zip - path: build/dist/koishi.zip + path: build/dist/cordis.zip - name: Upload dmg for macOS to Build Artifact if: matrix.target.goos == 'darwin' uses: actions/upload-artifact@v3 with: name: koi-${{ matrix.target.rid }}-${{ github.sha }}.dmg - path: build/dist/koishi.dmg + path: build/dist/cordis.dmg - name: Upload pkg for macOS to Build Artifact if: matrix.target.goos == 'darwin' uses: actions/upload-artifact@v3 with: name: koi-${{ matrix.target.rid }}-${{ github.sha }}.pkg - path: build/dist/koishi.pkg + path: build/dist/cordis.pkg - name: Upload zip for Linux to Build Artifact if: matrix.target.goos == 'linux' uses: actions/upload-artifact@v3 with: name: koi-${{ matrix.target.rid }}-${{ github.sha }}.zip - path: build/dist/koishi.zip + path: build/dist/cordis.zip - name: Upload AppImage for Linux to Build Artifact if: matrix.target.goos == 'linux' uses: actions/upload-artifact@v3 with: name: koi-${{ matrix.target.rid }}-${{ github.sha }}.AppImage - path: build/dist/Koishi.AppImage + path: build/dist/Cordis.AppImage - name: Upload Release Files for Windows to GitHub Release if: startsWith(github.ref, 'refs/tags/') && matrix.target.goos == 'windows' env: GITHUB_TOKEN: ${{ secrets.ACTIONS_DEPLOY_MODULE_KEY }} run: | - mv build/dist/koishi.zip build/dist/koishi-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.zip - mv build/dist/koishi.msi build/dist/koishi-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.msi + mv build/dist/cordis.zip build/dist/cordis-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.zip + mv build/dist/cordis.msi build/dist/cordis-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.msi gh release upload ${{ steps.tag.outputs.version }} \ - build/dist/koishi-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.zip \ - build/dist/koishi-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.msi + build/dist/cordis-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.zip \ + build/dist/cordis-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.msi shell: bash - name: Upload Release Files for macOS to GitHub Release @@ -167,13 +167,13 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.ACTIONS_DEPLOY_MODULE_KEY }} run: | - mv build/dist/koishi.zip build/dist/koishi-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.zip - mv build/dist/koishi.dmg build/dist/koishi-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.dmg - mv build/dist/koishi.pkg build/dist/koishi-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.pkg + mv build/dist/cordis.zip build/dist/cordis-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.zip + mv build/dist/cordis.dmg build/dist/cordis-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.dmg + mv build/dist/cordis.pkg build/dist/cordis-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.pkg gh release upload ${{ steps.tag.outputs.version }} \ - build/dist/koishi-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.zip \ - build/dist/koishi-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.dmg \ - build/dist/koishi-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.pkg + build/dist/cordis-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.zip \ + build/dist/cordis-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.dmg \ + build/dist/cordis-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.pkg shell: bash - name: Upload Release Files for Linux to GitHub Release @@ -181,11 +181,11 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.ACTIONS_DEPLOY_MODULE_KEY }} run: | - mv build/dist/koishi.zip build/dist/koishi-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.zip - mv build/dist/Koishi.AppImage build/dist/koishi-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.AppImage + mv build/dist/cordis.zip build/dist/cordis-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.zip + mv build/dist/Cordis.AppImage build/dist/cordis-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.AppImage gh release upload ${{ steps.tag.outputs.version }} \ - build/dist/koishi-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.zip \ - build/dist/koishi-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.AppImage + build/dist/cordis-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.zip \ + build/dist/cordis-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.AppImage shell: bash # - name: Upload Release Files for Windows to App Center @@ -196,7 +196,7 @@ jobs: # -a koishi/Koishi-Desktop-for-Windows \ # -g stable \ # -b ${{ steps.tag.outputs.build_version }} \ - # -f build/dist/koishi-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.msi + # -f build/dist/cordis-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.msi # shell: bash # - name: Upload Release Files for macOS to App Center @@ -207,5 +207,5 @@ jobs: # -a koishi/Koishi-Desktop-for-macOS \ # -g stable \ # -b ${{ steps.tag.outputs.build_version }} -n ${{ steps.tag.outputs.build_number }} \ - # -f build/dist/koishi-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.pkg + # -f build/dist/codris-desktop-${{ matrix.target.rid }}-${{ steps.tag.outputs.version }}.pkg # shell: bash diff --git a/config.ts b/config.ts index 60a35e38..00365e5e 100644 --- a/config.ts +++ b/config.ts @@ -1,4 +1,4 @@ -// KOISHI DESKTOP BUILD CONFIG +// CORDIS DESKTOP BUILD CONFIG // --------------------------------------------------- // Here are all config used during building. You can // freely change configs like mirrors and build paths, @@ -35,7 +35,7 @@ export const versionToolsWix = '311' //#endregion //#region Defaults -// These are defaults for koishi-desktop. +// These are defaults for Cordis Desktop. export const repoBoilerplate = 'koishijs/boilerplate' export const versionBoilerplate = 'v1.13.6' diff --git a/packages/app/koicli/cli.go b/packages/app/koicli/cli.go index 871ffc03..93aa15e7 100644 --- a/packages/app/koicli/cli.go +++ b/packages/app/koicli/cli.go @@ -26,8 +26,8 @@ func NewCli(i *do.Injector) (*cli.App, error) { do.ProvideNamed(i, serviceCommandYarn, newYarnCommand) return &cli.App{ - Name: p.Sprintf("Koishi Desktop"), - Usage: p.Sprintf("Launch Koishi from your desktop."), + Name: p.Sprintf("Cordis Desktop"), + Usage: p.Sprintf("Launch Cordis from your desktop."), Version: fmt.Sprintf("v%s", util.AppVersion), Authors: []*cli.Author{ { diff --git a/packages/app/koicli/import.go b/packages/app/koicli/import.go index 02db2ed6..18a48076 100644 --- a/packages/app/koicli/import.go +++ b/packages/app/koicli/import.go @@ -27,7 +27,7 @@ func newImportCommand(i *do.Injector) (*cli.Command, error) { return &cli.Command{ Name: "import", - Usage: p.Sprintf("Import a Koishi Bundle"), + Usage: p.Sprintf("Import a Cordis Bundle"), ArgsUsage: "path", Action: do.MustInvokeNamed[cli.ActionFunc](i, serviceActionImport), diff --git a/packages/app/koicli/run.go b/packages/app/koicli/run.go index 2b5cd6c4..51039765 100644 --- a/packages/app/koicli/run.go +++ b/packages/app/koicli/run.go @@ -27,7 +27,7 @@ func newRunCommand(i *do.Injector) (*cli.Command, error) { return &cli.Command{ Name: "run", - Usage: p.Sprintf("Run Koishi Desktop"), + Usage: p.Sprintf("Run Cordis Desktop"), Action: do.MustInvokeNamed[cli.ActionFunc](i, serviceActionRun), Subcommands: []*cli.Command{ { diff --git a/packages/app/main.go b/packages/app/main.go index 7665514c..d8b35675 100644 --- a/packages/app/main.go +++ b/packages/app/main.go @@ -46,7 +46,7 @@ func main() { do.Provide(i, koicli.NewCli) - l.Info(p.Sprintf("Koishi Desktop v%s", util.AppVersion)) + l.Info(p.Sprintf("Cordis Desktop v%s", util.AppVersion)) noConsole := false diff --git a/packages/app/ui/tray/tray.go b/packages/app/ui/tray/tray.go index 87487512..df7574f8 100644 --- a/packages/app/ui/tray/tray.go +++ b/packages/app/ui/tray/tray.go @@ -116,9 +116,9 @@ func (tray *TrayDaemon) onReady() { l.Debug(p.Sprintf("Tray ready.")) - // systray.SetTitle("Koishi") + // systray.SetTitle("Cordis") if runtime.GOOS != "windows" { - systray.SetTooltip("Koishi") + systray.SetTooltip("Cordis") } systray.SetTemplateIcon(icon.Koishi, icon.Koishi) @@ -516,7 +516,7 @@ func (tray *TrayDaemon) rebuild() { func (tray *TrayDaemon) addItemsBefore() { p := do.MustInvoke[*message.Printer](tray.i) - mTitle := systray.AddMenuItem(p.Sprintf("Koishi Desktop"), "") + mTitle := systray.AddMenuItem(p.Sprintf("Cordis Desktop"), "") mTitle.Disable() mTitle.SetTemplateIcon(icon.Koishi, icon.Koishi) version := "v" + util.AppVersion @@ -654,12 +654,12 @@ func (tray *TrayDaemon) addItemsAfter() { os.Getenv("COMSPEC"), "/C", "START", - "Koishi Desktop Terminal", + "Cordis Desktop Terminal", "/D", dirExe, "cmd", // Use "cmd" here "/K", - "echo Koishi Desktop Terminal - You can start running koi command here.", + "echo Cordis Desktop Terminal - You can start running koi command here.", ) } else { cmd = exec.Command( diff --git a/packages/build/tasks/pack/appimage.ts b/packages/build/tasks/pack/appimage.ts index 235ac194..9f4f3665 100644 --- a/packages/build/tasks/pack/appimage.ts +++ b/packages/build/tasks/pack/appimage.ts @@ -6,7 +6,7 @@ import { linuxAppImageDesktop } from '../../templates/linux' import { dir } from '../../utils/path' import { exec } from '../../utils/spawn' -const appDirPath = dir('buildLinux', 'Koishi.AppDir/') +const appDirPath = dir('buildLinux', 'Cordis.AppDir/') const appBinaryPath = path.join(appDirPath, 'usr/bin/') const appMetaInfoPath = path.join(appDirPath, 'usr/share/metainfo/') @@ -76,8 +76,8 @@ export const packAppImageGenerate = () => export const packAppImageCopyDist = () => fs.copyFile( - dir('buildLinux', 'Koishi-x86_64.AppImage'), - dir('dist', 'Koishi.AppImage') + dir('buildLinux', 'Cordis-x86_64.AppImage'), + dir('dist', 'Cordis.AppImage') ) export const packAppImage = series( diff --git a/packages/build/tasks/pack/mac.ts b/packages/build/tasks/pack/mac.ts index 6e70483f..aa045ed4 100644 --- a/packages/build/tasks/pack/mac.ts +++ b/packages/build/tasks/pack/mac.ts @@ -6,15 +6,15 @@ import { koiVersion } from '../../utils/config' import { dir } from '../../utils/path' import { exec, tryExec } from '../../utils/spawn' -const appPath = dir('buildMac', 'Koishi.app/') +const appPath = dir('buildMac', 'Cordis.app/') export const packMacApp = async () => { - const appInfoPlistPath = dir('buildMac', 'Koishi.app/Contents/Info.plist') - const appMacosPath = dir('buildMac', 'Koishi.app/Contents/MacOS/') - const appResourcesPath = dir('buildMac', 'Koishi.app/Contents/Resources/') + const appInfoPlistPath = dir('buildMac', 'Cordis.app/Contents/Info.plist') + const appMacosPath = dir('buildMac', 'Cordis.app/Contents/MacOS/') + const appResourcesPath = dir('buildMac', 'Cordis.app/Contents/Resources/') const appIconPath = dir( 'buildMac', - 'Koishi.app/Contents/Resources/koishi-app.icns' + 'Cordis.app/Contents/Resources/koishi-app.icns' ) await mkdirp(appMacosPath) @@ -22,8 +22,8 @@ export const packMacApp = async () => { await fs.cp(dir('buildUnfoldBinary'), appMacosPath, { recursive: true }) await fs.rename( - dir('buildMac', 'Koishi.app/Contents/MacOS/KoiShell_KoiShell.bundle/'), - dir('buildMac', 'Koishi.app/KoiShell_KoiShell.bundle/') + dir('buildMac', 'Cordis.app/Contents/MacOS/KoiShell_KoiShell.bundle/'), + dir('buildMac', 'Cordis.app/KoiShell_KoiShell.bundle/') ) await fs.copyFile(dir('buildAssets', 'koishi-app.icns'), appIconPath) await fs.writeFile(appInfoPlistPath, macAppPlist) @@ -31,13 +31,13 @@ export const packMacApp = async () => { export const packMacDmg = async () => { await fs.writeFile( - dir('buildMac', 'Koishi.app/Contents/MacOS/koi.yml'), + dir('buildMac', 'Cordis.app/Contents/MacOS/koi.yml'), 'redirect: USERDATA' ) await tryExec('yarn', ['create-dmg', appPath, dir('buildMac'), '--overwrite']) await fs.rename( - dir('buildMac', `Koishi ${koiVersion}.dmg`), - dir('dist', 'koishi.dmg') + dir('buildMac', `Cordis ${koiVersion}.dmg`), + dir('dist', 'cordis.dmg') ) } @@ -57,12 +57,12 @@ export const packMacPkg = async () => { '--identifier', 'chat.koishi.desktop', '--component', - 'Koishi.app', + 'Cordis.app', '--scripts', 'scripts', '--install-location', '/Applications', - 'koishi-app.pkg', + 'cordis-app.pkg', ], dir('buildMac') ) @@ -74,7 +74,7 @@ export const packMacPkg = async () => { 'distribution.xml', '--package-path', '.', - dir('dist', 'koishi.pkg'), + dir('dist', 'cordis.pkg'), ], dir('buildMac') ) diff --git a/packages/build/tasks/pack/msi.ts b/packages/build/tasks/pack/msi.ts index 3e667f55..373888bf 100644 --- a/packages/build/tasks/pack/msi.ts +++ b/packages/build/tasks/pack/msi.ts @@ -155,7 +155,7 @@ const buildPackMsi = (lang: Lang) => async () => { ) } -const pathNeutralMsi = dir('buildMsi', 'koishi.msi') +const pathNeutralMsi = dir('buildMsi', 'cordis.msi') export const packMsiCopyNeutral = () => fs.copyFile(dir('buildMsi', '1033.msi'), pathNeutralMsi) @@ -209,7 +209,7 @@ export const packMsiListStorage = () => exec('cscript', [getPathWiSubStg(), pathNeutralMsi], dir('buildMsi')) export const packMsiCopyDist = () => - fs.copyFile(pathNeutralMsi, dir('dist', 'koishi.msi')) + fs.copyFile(pathNeutralMsi, dir('dist', 'cordis.msi')) export const packMsi = series( packMsiMkdir, diff --git a/packages/build/tasks/pack/portable.ts b/packages/build/tasks/pack/portable.ts index 942e0dce..951cbd04 100644 --- a/packages/build/tasks/pack/portable.ts +++ b/packages/build/tasks/pack/portable.ts @@ -2,4 +2,4 @@ import { zip } from '../../utils/compress' import { dir } from '../../utils/path' export const packPortable = () => - zip(dir('buildPortable'), dir('dist', 'koishi.zip')) + zip(dir('buildPortable'), dir('dist', 'cordis.zip')) diff --git a/packages/build/templates/linux/chat.koishi.desktop.appdata.xml b/packages/build/templates/linux/chat.koishi.desktop.appdata.xml index 14e9b56c..8ced6789 100644 --- a/packages/build/templates/linux/chat.koishi.desktop.appdata.xml +++ b/packages/build/templates/linux/chat.koishi.desktop.appdata.xml @@ -8,12 +8,12 @@ AGPL-1.0 AGPL-1.0 - Koishi - Cross-platform chatbot framework made with love + Cordis + Meta-Framework for Modern Applications -

Cross-platform chatbot framework made with love

+

Meta-Framework for Modern Applications

- Koishi.js + Cordis Development @@ -26,7 +26,7 @@ Chatbot 聊天机器人 - Koishi + Cordis Discord Telegram diff --git a/packages/build/templates/linux/chat.koishi.desktop.desktop.hbs b/packages/build/templates/linux/chat.koishi.desktop.desktop.hbs index 58e4d555..83f30daf 100644 --- a/packages/build/templates/linux/chat.koishi.desktop.desktop.hbs +++ b/packages/build/templates/linux/chat.koishi.desktop.desktop.hbs @@ -1,15 +1,15 @@ [Desktop Entry] Type=Application -Name=Koishi -Comment=Start Koishi +Name=Cordis +Comment=Start Cordis TryExec=koi Exec=koi Icon=chat.koishi.desktop Categories=Development; -Keywords=Bot;Chatbot;Koishi;Discord;Telegram;OneBot;Framework; -Keywords[zh]=Bot;机器人;聊天机器人;Koishi;Discord;Telegram;OneBot;框架; +Keywords=Bot;Chatbot;Koishi;Cordis;Discord;Telegram;OneBot;Framework; +Keywords[zh]=Bot;机器人;聊天机器人;Koishi;Cordis;Discord;Telegram;OneBot;框架; Actions=UI;Daemon; -X-AppImage-Name=Koishi +X-AppImage-Name=Cordis X-AppImage-Version={{koiVersion}} X-AppImage-Arch=x86_64 diff --git a/packages/build/templates/mac/distribution.xml.hbs b/packages/build/templates/mac/distribution.xml.hbs index ee7c7923..2c06d9bd 100644 --- a/packages/build/templates/mac/distribution.xml.hbs +++ b/packages/build/templates/mac/distribution.xml.hbs @@ -1,6 +1,6 @@ - Koishi + Cordis @@ -34,5 +34,5 @@ id="chat.koishi.desktop" version="{{koiSemver.major}}.{{koiSemver.minor}}.{{koiSemver.patch}}" onConclusion="none" - >koishi-app.pkg + >cordis-app.pkg diff --git a/packages/build/templates/mac/mac-app.plist.hbs b/packages/build/templates/mac/mac-app.plist.hbs index 4ac7f174..7010a03d 100644 --- a/packages/build/templates/mac/mac-app.plist.hbs +++ b/packages/build/templates/mac/mac-app.plist.hbs @@ -4,11 +4,11 @@ CFBundleName - Koishi + Cordis CFBundleDisplayName - Koishi + Cordis CFBundleSpokenName - Koishi + Cordis CFBundleIdentifier chat.koishi.desktop CFBundleVersion @@ -26,7 +26,7 @@ NSPrincipalClass NSApplication NSHumanReadableCopyright - {{date.year}} Koishi.js Team + {{date.year}} Cordis Team NSHighResolutionCapable LSUIElement diff --git a/packages/build/templates/mac/postinstall.sh b/packages/build/templates/mac/postinstall.sh index 18e46906..fdd54ac7 100644 --- a/packages/build/templates/mac/postinstall.sh +++ b/packages/build/templates/mac/postinstall.sh @@ -3,16 +3,16 @@ echo "Starting post-install process..." echo "Removing com.apple.quarantine..." -sudo xattr -d com.apple.quarantine /Applications/Koishi.app/ || true +sudo xattr -d com.apple.quarantine /Applications/Cordis.app/ || true echo "Setting chmod for unfold..." -sudo chmod -R 777 /Applications/Koishi.app/ || true +sudo chmod -R 777 /Applications/Cordis.app/ || true echo "Starting unfold..." -sudo /Applications/Koishi.app/Contents/MacOS/unfold ensure +sudo /Applications/Cordis.app/Contents/MacOS/unfold ensure echo "Setting chmod for app..." -sudo chmod -R 755 /Applications/Koishi.app/ || true +sudo chmod -R 755 /Applications/Cordis.app/ || true echo "Setting chmod for user data..." sudo chmod -R 777 ~/Library/Application\ Support/Koishi/Desktop/ || true diff --git a/packages/build/templates/msi/index.wxs.hbs b/packages/build/templates/msi/index.wxs.hbs index ea0ccfe3..6e9dec01 100644 --- a/packages/build/templates/msi/index.wxs.hbs +++ b/packages/build/templates/msi/index.wxs.hbs @@ -3,8 +3,8 @@ @@ -35,23 +35,23 @@ VersionNT >= 603 VersionNT64 - + - + - + @@ -166,9 +166,9 @@ Win64="yes" > @@ -205,8 +205,8 @@ { export const koiSemver = buildKoiSemver() export const koiVersionStrings = { - Comments: 'Koishi Desktop', - CompanyName: 'Koishi.js', - FileDescription: 'Koishi Desktop', + Comments: 'Cordis Desktop', + CompanyName: 'Cordis', + FileDescription: 'Cordis Desktop', FileVersion: koiVersion, - InternalName: 'Koishi Desktop', - LegalCopyright: `${new Date().getFullYear()} Koishi.js Team`, - LegalTrademarks: `${new Date().getFullYear()} Koishi.js Team`, + InternalName: 'Cordis Desktop', + LegalCopyright: `${new Date().getFullYear()} Cordis Team`, + LegalTrademarks: `${new Date().getFullYear()} Cordis Team`, OriginalFilename: 'koi', PrivateBuild: koiVersion, - ProductName: 'Koishi Desktop', + ProductName: 'Cordis Desktop', ProductVersion: koiVersion, SpecialBuild: koiVersion, } export const koishiVersionStrings = { - Comments: 'Koishi', - CompanyName: 'Koishi.js', - FileDescription: 'Koishi', + Comments: 'Cordis', + CompanyName: 'Cordis', + FileDescription: 'Cordis', FileVersion: koiVersion, - InternalName: 'Koishi', - LegalCopyright: `${new Date().getFullYear()} Koishi.js Team`, - LegalTrademarks: `${new Date().getFullYear()} Koishi.js Team`, - OriginalFilename: 'koishi', + InternalName: 'Cordis', + LegalCopyright: `${new Date().getFullYear()} Cordis Team`, + LegalTrademarks: `${new Date().getFullYear()} Cordis Team`, + OriginalFilename: 'cordis', PrivateBuild: koiVersion, - ProductName: 'Koishi', + ProductName: 'Cordis', ProductVersion: koiVersion, SpecialBuild: koiVersion, } diff --git a/packages/core/god/daemon.go b/packages/core/god/daemon.go index 7b80a3dd..32135de5 100644 --- a/packages/core/god/daemon.go +++ b/packages/core/god/daemon.go @@ -65,7 +65,7 @@ func Daemon(i *do.Injector, startInstances bool) error { do.Provide(i, daemonproc.NewDaemonProcess) if startInstances { // And start it in a new goroutine as early as possible. - // This ensures Koishi starts quickly first. + // This ensures Cordis starts quickly first. err = do.MustInvoke[*daemonproc.DaemonProcess](i).Init() if err != nil { return fmt.Errorf("daemon process init failed: %w", err) diff --git a/packages/core/koicmd/import.go b/packages/core/koicmd/import.go index 64bd847a..502446cf 100644 --- a/packages/core/koicmd/import.go +++ b/packages/core/koicmd/import.go @@ -65,7 +65,7 @@ func koiCmdImport(i *do.Injector) *proto.Response { } } - l.Infof("Importing instance %s\nUsing Koishi bundle: %s", name, path) + l.Infof("Importing instance %s\nUsing Cordis bundle: %s", name, path) err = os.MkdirAll(targetPath, os.ModePerm) if err != nil { return proto.NewErrorResult(koierr.NewErrInternalError(fmt.Errorf("cannot create target path %s: %w", targetPath, err))) diff --git a/packages/core/koishell/koishell.go b/packages/core/koishell/koishell.go index f00004ad..128eeb21 100644 --- a/packages/core/koishell/koishell.go +++ b/packages/core/koishell/koishell.go @@ -251,7 +251,7 @@ func (shell *KoiShell) About() { "mode": "dialog", "title": "About", "style": "info", - "text1": "Koishi Desktop", + "text1": "Cordis Desktop", "text2": fmt.Sprintf("v%s", util.AppVersion), "buttonCount": 1, }) @@ -267,8 +267,8 @@ func (shell *KoiShell) AlreadyRunning() { "mode": "dialog", "title": "Already Running", "style": "info", - "text1": "Koishi is already running.", - "text2": "You can find the Koishi icon from notification area. Tap the Koishi icon to perform action.", + "text1": "Cordis is already running.", + "text2": "You can find the Cordis icon from notification area. Tap the Cordis icon to perform action.", "buttonCount": 1, }) if err != nil { diff --git a/packages/core/proc/koiproc.go b/packages/core/proc/koiproc.go index c346ce34..f772b893 100644 --- a/packages/core/proc/koiproc.go +++ b/packages/core/proc/koiproc.go @@ -15,7 +15,7 @@ import ( "gopkg.ilharper.com/x/rpl" ) -// KoiProc is the Koishi subprocess wrapper for Koishi Desktop. +// KoiProc is the Cordis subprocess wrapper for Cordis Desktop. // Also, it is an [rpl.Source] for emitting subprocess outputs // as [rpl.Log] objects to [rpl.Target] targets. type KoiProc struct { diff --git a/packages/instwin/CMakeLists.txt b/packages/instwin/CMakeLists.txt index 1ca51c97..2cfc6aa6 100644 --- a/packages/instwin/CMakeLists.txt +++ b/packages/instwin/CMakeLists.txt @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.5) project(instwin VERSION 0.1.0 - DESCRIPTION "Koishi Desktop Installer." + DESCRIPTION "Cordis Desktop Installer." HOMEPAGE_URL "https://koishi.chat" LANGUAGES C CXX ) diff --git a/packages/instwin/src/windows/mainwindow.ui b/packages/instwin/src/windows/mainwindow.ui index 46422f23..319db20b 100644 --- a/packages/instwin/src/windows/mainwindow.ui +++ b/packages/instwin/src/windows/mainwindow.ui @@ -11,7 +11,7 @@ - Install Koishi + Install Cordis @@ -103,7 +103,7 @@ - Installing Koishi. This may take a while. + Installing Cordis. This may take a while. diff --git a/packages/shellcomm/CMakeLists.txt b/packages/shellcomm/CMakeLists.txt index 569670f5..7f3517d8 100644 --- a/packages/shellcomm/CMakeLists.txt +++ b/packages/shellcomm/CMakeLists.txt @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.0) project(shellcomm VERSION 0.1.0 - DESCRIPTION "Common utilities for Koishi Desktop Shell." + DESCRIPTION "Common utilities for Cordis Desktop Shell." HOMEPAGE_URL "https://koishi.chat" LANGUAGES C CXX ) diff --git a/packages/shelllinux/CMakeLists.txt b/packages/shelllinux/CMakeLists.txt index dd3af5d2..d8ff2c87 100644 --- a/packages/shelllinux/CMakeLists.txt +++ b/packages/shelllinux/CMakeLists.txt @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.0) project(koishell VERSION 0.1.0 - DESCRIPTION "Shell for Koishi Desktop." + DESCRIPTION "Shell for Cordis Desktop." HOMEPAGE_URL "https://koishi.chat" LANGUAGES C CXX ) diff --git a/packages/shellmac/Sources/KoiShell/mode/webview/menu.swift b/packages/shellmac/Sources/KoiShell/mode/webview/menu.swift index c32f2ba3..a95558e2 100644 --- a/packages/shellmac/Sources/KoiShell/mode/webview/menu.swift +++ b/packages/shellmac/Sources/KoiShell/mode/webview/menu.swift @@ -67,7 +67,7 @@ extension NSApplicationDelegate { } func populateHelpMenu(_ del: KSWebViewDelegate, _ helpMenu: NSMenu) { - let koishiDocumentationMenuItem = helpMenu.addItem(withTitle: "Koishi Documentation", action: #selector(del.openDocumentation), keyEquivalent: "h") + let koishiDocumentationMenuItem = helpMenu.addItem(withTitle: "Cordis Documentation", action: #selector(del.openDocumentation), keyEquivalent: "h") koishiDocumentationMenuItem.keyEquivalentModifierMask = [.command, .shift] } } diff --git a/packages/shellmac/Sources/KoiShell/mode/webview/window.swift b/packages/shellmac/Sources/KoiShell/mode/webview/window.swift index 416545eb..6b1bf88b 100644 --- a/packages/shellmac/Sources/KoiShell/mode/webview/window.swift +++ b/packages/shellmac/Sources/KoiShell/mode/webview/window.swift @@ -71,7 +71,7 @@ class KSWebViewDelegate: NSObject, NSApplicationDelegate, NSWindowDelegate, WKSc appearance = window.appearance initAppearance = window.appearance - window.title = "\(self.name) - Koishi" + window.title = "\(self.name) - Cordis" window.titlebarAppearsTransparent = true // window.titleVisibility = .hidden // window.appearance = NSAppearance(named: NSAppearance.Name.vibrantLight) @@ -96,7 +96,7 @@ class KSWebViewDelegate: NSObject, NSApplicationDelegate, NSWindowDelegate, WKSc let appMenu = NSMenu(title: "Application") appMenuItem.submenu = appMenu - let appMenuAbout = appMenu.addItem(withTitle: "About Koishi Console", action: #selector(NSApp.orderFrontStandardAboutPanel(_:)), keyEquivalent: "") + let appMenuAbout = appMenu.addItem(withTitle: "About Cordis Console", action: #selector(NSApp.orderFrontStandardAboutPanel(_:)), keyEquivalent: "") appMenuAbout.target = NSApp appMenu.addItem(NSMenuItem.separator()) let appMenuServices = appMenu.addItem(withTitle: "Services", action: nil, keyEquivalent: "") @@ -110,7 +110,7 @@ class KSWebViewDelegate: NSObject, NSApplicationDelegate, NSWindowDelegate, WKSc let appMenuShowAll = appMenu.addItem(withTitle: "Show All", action: #selector(NSApp.unhideAllApplications), keyEquivalent: "") appMenuShowAll.target = NSApp appMenu.addItem(NSMenuItem.separator()) - let appMenuQuit = appMenu.addItem(withTitle: "Quit Koishi Console", action: #selector(NSApp.terminate), keyEquivalent: "q") + let appMenuQuit = appMenu.addItem(withTitle: "Quit Cordis Console", action: #selector(NSApp.terminate), keyEquivalent: "q") appMenuQuit.target = NSApp let consoleMenuItem = mainMenu.addItem(withTitle: "Console", action: nil, keyEquivalent: "") diff --git a/packages/shellwin/CMakeLists.txt b/packages/shellwin/CMakeLists.txt index 2d5bf6e4..0816000f 100644 --- a/packages/shellwin/CMakeLists.txt +++ b/packages/shellwin/CMakeLists.txt @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 3.0) project(koishell VERSION 0.1.0 - DESCRIPTION "Shell for Koishi Desktop." + DESCRIPTION "Shell for Cordis Desktop." HOMEPAGE_URL "https://koishi.chat" LANGUAGES C CXX ) diff --git a/packages/shellwin/include/koishell/mode/webview.hpp b/packages/shellwin/include/koishell/mode/webview.hpp index 08272a3b..cae58707 100644 --- a/packages/shellwin/include/koishell/mode/webview.hpp +++ b/packages/shellwin/include/koishell/mode/webview.hpp @@ -11,7 +11,7 @@ using njson = nlohmann::json; namespace KoiShell { const wchar_t *const KoiShellWebViewClass = L"KoiShellWebViewClass"; -const wchar_t *const KoiShellWebViewTitleSuffix = L" - Koishi"; +const wchar_t *const KoiShellWebViewTitleSuffix = L" - Cordis"; class WebViewWindow { HINSTANCE hInstance; diff --git a/packages/unfold/main.go b/packages/unfold/main.go index 82d3823f..fa1116b9 100644 --- a/packages/unfold/main.go +++ b/packages/unfold/main.go @@ -93,7 +93,7 @@ func main() { func help() { fmt.Print(` -"unfold" for Koishi Desktop +"unfold" for Cordis Desktop Available modes: ensure - Ensure user data folder exists. Used for installation.