<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>CP Editor – 安裝</title><link>/zh_tw/docs/installation/</link><description>Recent content in 安裝 on CP Editor</description><generator>Hugo -- gohugo.io</generator><language>zh_tw</language><atom:link href="/zh_tw/docs/installation/index.xml" rel="self" type="application/rss+xml"/><item><title>Docs: 在 Releases 中下載</title><link>/zh_tw/docs/installation/download-from-releases/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/zh_tw/docs/installation/download-from-releases/</guid><description>
&lt;p>你需要在
&lt;a href="https://github.com/cpeditor/cpeditor/releases" target="_blank" >Releases&lt;/a>
頁面找到你需要的版本，然後根據你的作業系統選擇相應的檔案並下載安裝。&lt;/p>
&lt;h3 id="windows">Windows&lt;/h3>
&lt;h4 id="安裝版">安裝版&lt;/h4>
&lt;p>安裝版需要將本軟體安裝在您的電腦。設定組態將儲存於系統的設定目錄中，且 CP Editor 會出現在系統的已安裝程式清單上。&lt;/p>
&lt;p>下載檔案列表中的 &lt;code>setup.exe&lt;/code> 並安裝它。&lt;/p>
&lt;h4 id="免安裝版">免安裝版&lt;/h4>
&lt;p>免安裝版無需安裝即可執行。其設定組態將與 CP Editor 的可執行檔置於同一目錄，CP Editor 不會出現在系統的已安裝程式清單上。&lt;/p>
&lt;p>下載檔案列表中的 &lt;code>portable.zip&lt;/code> 並解壓縮到您喜歡的地方。&lt;/p>
&lt;h3 id="大多數-linux-發行版">大多數 Linux 發行版&lt;/h3>
&lt;p>下載檔案列表中的 &lt;code>AppImage&lt;/code>，並賦予其執行權限（&lt;code>chmod +x &amp;lt;AppImagePath&amp;gt;&lt;/code>），再執行它。&lt;/p>
&lt;h3 id="debian-衍生的-linux-發行版">Debian 衍生的 Linux 發行版&lt;/h3>
&lt;p>在一些由 Debian 衍生的 Linux 發行版（如 Ubuntu, Linux Mint）您可以下載 &lt;code>.deb&lt;/code> 套件並在終端機執行這行命令：&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>sudo apt install &amp;lt;path to .deb package&amp;gt;
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>接著輸入 root 使用者的密碼並同意安裝。如果您習慣操作圖形介面，亦可使用像 &lt;code>Gdebi&lt;/code> 這樣的工具來安裝 &lt;code>deb&lt;/code> 套件。&lt;/p>
&lt;p>支援的發行版：Debian 10 Buster、Ubuntu 18.04 Bionic Beaver、Linux Mint 19 Tara 以及更新的版本（或其他由前述版本再衍生的發行版）。&lt;/p>
&lt;h3 id="macos">macOS&lt;/h3>
&lt;p>下載檔案列表中的 &lt;code>.dmg&lt;/code> 檔案並安裝它。&lt;/p>
&lt;p>在安裝過程中，您可能需要按幾次「好」以存取檔案系統。Apple 可能會警告您這個應用程式是來自未識別開發者的 Mac App。參考
&lt;a href="https://support.apple.com/zh-tw/guide/mac-help/mh40616/mac" target="_blank" >Apple 的 macOS 使用手冊&lt;/a>
將 CP Editor 授予例外。&lt;/p></description></item><item><title>Docs: Use package managers</title><link>/zh_tw/docs/installation/use-package-managers/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/zh_tw/docs/installation/use-package-managers/</guid><description>
&lt;h3 id="packaging-status">Packaging status&lt;/h3>
&lt;p>
&lt;a href="https://repology.org/project/cpeditor/versions" target="_blank" >&lt;img src="https://repology.org/badge/vertical-allrepos/cpeditor.svg" alt="Packaging status">&lt;/a>
&lt;/p>
&lt;p>Some of the packages are officially maintained while most of them are maintained by the community.&lt;/p>
&lt;p>However, at present, CP Editor is not available in many package repositories. Package maintainers can contact us if any help is needed. For example, we may add some scripts in our CI/CD workflow.&lt;/p>
&lt;p>Here are a few guidelines to install the packages.&lt;/p>
&lt;h3 id="snapcraft">Snapcraft&lt;/h3>
&lt;p>You can use
&lt;a href="https://snapcraft.io" target="_blank" >Snapcraft&lt;/a>
to install
&lt;a href="https://snapcraft.io/cpeditor" target="_blank" >cpeditor&lt;/a>
, which is available on most Linux distros.&lt;/p>
&lt;p>There are two channels available: &lt;code>latest/stable&lt;/code> and &lt;code>latest/edge&lt;/code>.&lt;/p>
&lt;p>Due to technical reasons, it was published using classic confinement, so you&amp;rsquo;ll need the &lt;code>--classic&lt;/code> option to install it.&lt;/p>
&lt;p>To install the latest stable version: &lt;code>sudo snap install cpeditor --classic&lt;/code>&lt;/p>
&lt;p>To install the latest alpha version: &lt;code>sudo snap install cpeditor --classic --channel=latest/edge&lt;/code>&lt;/p>
&lt;h3 id="aur">AUR&lt;/h3>
&lt;p>If you are using
&lt;a href="https://wiki.archlinux.org/title/Arch_Linux" target="_blank" >Arch Linux&lt;/a>
, it&amp;rsquo;s recommended to install CP Editor via
&lt;a href="https://wiki.archlinux.org/title/Arch_User_Repository" target="_blank" >AUR&lt;/a>
. AUR usually also works on Arch-based distros like Manjaro, but it sometimes fails due to reasons like different main repositories.&lt;/p>
&lt;p>There are two AUR packages for CP Editor:
&lt;a href="https://aur.archlinux.org/packages/cpeditor/" target="_blank" >cpeditor&lt;/a>
for the stable version and
&lt;a href="https://aur.archlinux.org/packages/cpeditor-git/" target="_blank" >cpeditor-git&lt;/a>
for the alpha version.&lt;/p>
&lt;p>If you are unfamiliar with AUR, it&amp;rsquo;s recommended to install
&lt;a href="https://github.com/Morganamilo/paru" target="_blank" >paru&lt;/a>
and use &lt;code>paru -S cpeditor&lt;/code> to install. You can also read the wiki on
&lt;a href="https://wiki.archlinux.org/title/Arch_User_Repository#Installing_and_upgrading_packages" target="_blank" >how to manually install an AUR package&lt;/a>
or
&lt;a href="https://wiki.archlinux.org/title/AUR_helpers" target="_blank" >AUR helpers&lt;/a>
.&lt;/p>
&lt;p>After the installation, you&amp;rsquo;ll be able to run CP Editor by &lt;code>cpeditor&lt;/code> in your terminal or launch from the start menu like other apps.&lt;/p></description></item><item><title>Docs: 編譯原始碼</title><link>/zh_tw/docs/installation/build-from-source/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/zh_tw/docs/installation/build-from-source/</guid><description>
&lt;ol>
&lt;li>
&lt;p>Clone 儲存庫及 submodules：&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>git clone --recurse-submodules https://github.com/cpeditor/cpeditor.git
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87">cd&lt;/span> cpeditor
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>安裝
&lt;a href="https://www.qt.io/download" target="_blank" >Qt&lt;/a>
(5.15 or higher),
&lt;a href="https://cmake.org/download/" target="_blank" >CMake&lt;/a>
(3.12 or higher) 及
&lt;a href="https://www.python.org/downloads/" target="_blank" >Python3&lt;/a>
。&lt;/p>
&lt;ul>
&lt;li>在 macOS 及某些 Linux 發行版，您可以透過套件管理系統來安裝。例如在 Arch Linux 上使用 &lt;code>sudo pacman -S qt5&lt;/code>，在 macOS 上使用&lt;code>brew install qt5&lt;/code>。&lt;/li>
&lt;li>您也可以用
&lt;a href="https://github.com/miurahr/aqtinstall" target="_blank" >aqtinstall&lt;/a>
安裝 Qt。&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>若 CMake 找不到 Qt 的安裝路徑，需要設定環境變數：&lt;code>CMAKE_PREFIX_PATH=%QtPath%/%QtVersion%/%Compiler%/lib/cmake&lt;/code>。以 macOS 而言，執行這個命令 &lt;code>export CMAKE_PREFIX_PATH=&amp;quot;/usr/local/Cellar/qt/5.15.1&amp;quot;&lt;/code>。&lt;/p>
&lt;/li>
&lt;li>
&lt;p>安裝
&lt;a href="https://github.com/KDE/extra-cmake-modules" target="_blank" >Extra CMake Modules&lt;/a>
和
&lt;a href="https://github.com/KDE/syntax-highlighting" target="_blank" >KDE (kf5) Syntax Highlighting&lt;/a>
。它們&lt;strong>不再&lt;/strong>作為子模組捆綁，必須在建置前安裝到系統中。&lt;/p>
&lt;ul>
&lt;li>
&lt;p>在 macOS 及某些 Linux 發行版，您可以透過套件管理系統來安裝。例如在 Arch Linux 上使用 &lt;code>sudo pacman -S syntax-highlighting5&lt;/code>，在 macOS 上使用
&lt;a href="https://github.com/KDE/homebrew-kde" target="_blank" >Homebrew KDE&lt;/a>
然後 &lt;code>brew install kde-mac/kde/kf5-syntax-highlighting&lt;/code>。&lt;/p>
&lt;/li>
&lt;li>
&lt;p>否則，您需要手動 clone 並建置安裝：&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>git clone --branch kf5 https://github.com/KDE/extra-cmake-modules.git
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87">cd&lt;/span> extra-cmake-modules
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>cmake -B build -S . -DBUILD_HTML_DOCS&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>OFF -DBUILD_MAN_DOCS&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>OFF -DBUILD_QTHELP_DOCS&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>OFF -DBUILD_TESTING&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>OFF
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>cmake --build build --config Release --target install &lt;span style="color:#8f5902;font-style:italic"># 可能需要 sudo&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87">cd&lt;/span> ..
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>git clone --branch kf5 https://github.com/KDE/syntax-highlighting.git
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87">cd&lt;/span> syntax-highlighting
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>cmake -B build -S . -DBUILD_HTML_DOCS&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>OFF -DBUILD_MAN_DOCS&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>OFF -DBUILD_QTHELP_DOCS&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>OFF -DBUILD_TESTING&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>OFF
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>cmake --build build --config Release --target install &lt;span style="color:#8f5902;font-style:italic"># 可能需要 sudo&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87">cd&lt;/span> ..
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;li>
&lt;p>執行下列命令。&lt;/p>
&lt;ul>
&lt;li>
&lt;p>Linux/macOS:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-sh" data-lang="sh">&lt;span style="display:flex;">&lt;span>mkdir build
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#204a87">cd&lt;/span> build
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>cmake .. -DCMAKE_BUILD_TYPE&lt;span style="color:#ce5c00;font-weight:bold">=&lt;/span>Release
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>cmake --build .
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;li>
&lt;p>Windows:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bat" data-lang="bat">&lt;span style="display:flex;">&lt;span> &lt;span style="color:#204a87;font-weight:bold">mkdir&lt;/span> build
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> &lt;span style="color:#204a87;font-weight:bold">cd&lt;/span> build
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> cmake ..
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span> cmake --build . --config Release
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;/li>
&lt;/ul>
&lt;/li>
&lt;/ol>
&lt;p>依據不同的系統，建置的檔案位於&lt;/p>
&lt;p>Linux：&lt;code>build/cpeditor&lt;/code>&lt;/p>
&lt;p>macOS：&lt;code>build/cpeditor.app&lt;/code>&lt;/p>
&lt;p>Windows：&lt;code>build\cpeditor.exe&lt;/code> 或 &lt;code>build\Release\cpeditor.exe&lt;/code>
若執行時發生缺少 DLL 的錯誤，您可以在 PATH 環境變數加上&lt;code>%QtPath%\%QtVersion%\%Compiler%\bin&lt;/code> (例如： &lt;code>D:\Qt\5.15.1\msvc2019_64\bin&lt;/code>)。&lt;/p></description></item><item><title>Docs: Use Artifacts</title><link>/zh_tw/docs/installation/use-artifacts/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>/zh_tw/docs/installation/use-artifacts/</guid><description>
&lt;p>If you want to use the latest version (even later than the beta release), but don&amp;rsquo;t want to build from source, you can download Artifacts from
&lt;a href="https://github.com/cpeditor/cpeditor/actions" target="_blank" >GitHub Actions&lt;/a>
.&lt;/p>
&lt;p>However, it&amp;rsquo;s not recommended to use Artifacts, they are more unstable than beta releases, and could be a work in progress. You should read the commit logs and even the source codes before using Artifacts.&lt;/p>
&lt;p>To run it on Windows/macOS, you should install from
&lt;a href="https://github.com/cpeditor/cpeditor/releases" target="_blank" >Releases&lt;/a>
first (usually any version is OK unless something like DLL missing happens). On Windows, replace &lt;code>cpeditor.exe&lt;/code> in your install folder with the Artifact. On macOS, run &lt;code>cp path/to/Artifact cpeditor.app/Contents/MacOs&lt;/code>, where &lt;code>cpeditor.app&lt;/code> is the one already installed on your machine.&lt;/p>
&lt;p>To run it on Ubuntu 18.04, you need to install Qt. Other Linux distributions may not support binaries compiled on Ubuntu 18.04.&lt;/p></description></item></channel></rss>