Skip to content

Commit

Permalink
chore: Merge branch 'develop/main'
Browse files Browse the repository at this point in the history
Log:

Change-Id: I41a126db92ee990444ec4b7feb66505993854919
  • Loading branch information
deepin-mozart committed Jun 14, 2024
2 parents 17a85ae + 1254d86 commit 67b83dc
Show file tree
Hide file tree
Showing 133 changed files with 3,139 additions and 1,213 deletions.
2 changes: 2 additions & 0 deletions README.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ _The **dev** branch is current development branch, build dependencies may change

## Installation

*If you install the IDE on Ubuntu by source code, please refer to the [DTK dependent installation](./docs/dtk-install-guide.en.md). After the installation of the dtk environment and the basic qt environment, you can install the IDE through the following source installation method.*

1. Make sure you have installed all dependencies.

``` shell
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ _当前的开发分支为**dev**,编译依赖可能会在没有更新本说明

## 安装

*如若在Ubuntu上使用源码安装方式安装IDE,请先参考[DTK依赖安装](./docs/dtk-install-guide.md),在DTK环境以及基本qt环境安装完成后,可通过下面源码安装的方式安装本IDE。*

1. 确保已经安装所有依赖库。


Expand Down
2 changes: 1 addition & 1 deletion assets/configures/unioncode.desktop
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ MimeType=text/plain;application/x-code-workspace;
Name=Deepin Union Code
Path=/usr/bin
StartupNotify=false
StartupWMClass=Code
StartupWMClass=UnionCode
Type=Application
X-Deepin-Vendor=user-custom
6 changes: 5 additions & 1 deletion assets/templates/projects/dfm-extension/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,11 @@ project(%{ProjectName})
set(CMAKE_CXX_STANDARD 17)

# build
find_package(dfm-extension REQUIRED)
find_package(dfm-extension)
if (NOT dfm-extension_FOUND)
message(FATAL_ERROR "Could not find the libdfm-extension-dev, please download it first and then try again")
endif()

file(GLOB_RECURSE SRCS CONFIGURE_DEPENDS
"./*.h"
"./*.cpp"
Expand Down
2 changes: 1 addition & 1 deletion assets/translations/zh_CN.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2668,7 +2668,7 @@ repos path: %0</source>
<message>
<location filename="../../src/common/widget/outputpane.cpp" line="228"/>
<source>Clear</source>
<translation>清扫</translation>
<translation>清除</translation>
</message>
<message>
<location filename="../../src/common/widget/outputpane.cpp" line="238"/>
Expand Down
61 changes: 61 additions & 0 deletions docs/dtk-install-guide.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
## DTK Dependency Installation

For deepin-unioncode, the required dependency libraries include dtkcore, dtkwidget, dtkgui, and qt5integration, and this section describes the installation of these dependencies.

### 1. Source Code Pull

First you need to download the source code of the dtk dependency library in the [deepin github community](https://github.com/linuxdeepin):

[dtkcore](https://github.com/linuxdeepin/dtkcore)[dtkwidget](https://github.com/linuxdeepin/dtkwidget)[dtkgui](https://github.com/linuxdeepin/dtkgui)[qt5integration](https://github.com/linuxdeepin/qt5integration)

The dtkcore might rely on [dtkcommon](https://github.com/linuxdeepin/dtkcommon),qt5integration will depend on the [qt5platform-plugins](https://github.com/linuxdeepin/qt5platform-plugins)

### 2. Environmental Installation

First you need to install the qt environment and execute the following command

```shell
sudo apt update
sudo apt install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools qttools5-dev qt5-private-dev
```

### 3. DTK Installation

After the source code is pulled down, ensure that the required dependencies are properly installed and execute the following command in the directory location where the source code for each dependency library is located

```shell
sudo apt build-dep .
```

There are two ways to install dtk dependencies, one is the source code installation, and the second is the build-your-own-package installation. The source installation method is described in the README document of the respective dependent libraries, and will not be repeated here. This section describes how to install using a software package:

In the source root of the respective dependent library, use the following command to package

```shell
dpkg-buildpackage -us -uc -b -j16
```

"-j16" Specifies the parameter for multi-core execution, which can be increased or decreased according to the number of processor cores and performance.

The following errors may occur when installing dependent libraries:

![image-20240605152527906](./dtk-install/error1.png)

Cause: The dependent version failed to be properly packaged

The solution:

```shell
vim debian/rules
# Find "override_dh_shlibdeps:" in the opened file
# Add "dh_shlibdeps -- dpkg-shlibdps-params =--ignore-missing-info"
```

![image-20240605153447864](./dtk-install/solution1.png)

After all dependencies are successfully packaged, you can use the installation package to install the dependencies. After the installation, run commands to check whether the dependencies are successfully installed and whether their versions meet requirements.

```shell
apt policy libdtkcore5
# Other dependencies are viewed in the same way
```
61 changes: 61 additions & 0 deletions docs/dtk-install-guide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
## DTK依赖安装

对于Deepin-IDE,所需要的依赖库包括dtkcore,dtkwidget,dtkgui以及qt5integration,本部分介绍这几个依赖的安装。

### 1. 源码拉取

首先需要在深度的github社区中下载dtk依赖库的源码:

[dtkcore](https://github.com/linuxdeepin/dtkcore)[dtkwidget](https://github.com/linuxdeepin/dtkwidget)[dtkgui](https://github.com/linuxdeepin/dtkgui)[qt5integration](https://github.com/linuxdeepin/qt5integration)

其中,dtkcore可能会依赖[dtkcommon](https://github.com/linuxdeepin/dtkcommon),qt5integration会依赖[qt5platform-plugins](https://github.com/linuxdeepin/qt5platform-plugins)

### 2. 环境安装

首先需要安装qt环境,按照以下命令执行

```shell
sudo apt update
sudo apt install qtbase5-dev qtchooser qt5-qmake qtbase5-dev-tools qttools5-dev qt5-private-dev
```

### 3. 安装

源码拉下来之后,确保所需依赖都已正确安装,在每个依赖库的源码所在的目录位置执行以下命令

```shell
sudo apt build-dep .
```

接下来有两种方式来安装dtk依赖,一种是源码安装方式,第二种是自己构建软件包安装方式。源码安装方式在对应的各自依赖库的README文档中有介绍,这里不再赘述。这里介绍使用软件包安装方式:

在各自依赖库的源码根目录下,使用以下命令打包

```shell
dpkg-buildpackage -us -uc -b -j16
```

-j16为多核执行,可根据处理器核数和性能酌情增减。

安装依赖库时可能会出现以下错误:

![image-20240605152527906](./dtk-install/error1.png)

原因:依赖的版本问题导致无法正常打包

解决方法:

```shell
vim debian/rules
# 在打开的文件中找到override_dh_shlibdeps:
# 添加dh_shlibdeps --dpkg-shlibdeps-params=--ignore-missing-info
```

![image-20240605153447864](./dtk-install/solution1.png)

在所有依赖都成功打包后,可直接使用安装包进行依赖的安装,安装完成后使用命令查看依赖是否安装成功,以及依赖的版本是否满足要求。

```shell
apt policy libdtkcore5
# 其他依赖同理
```
Binary file added docs/dtk-install/error1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/dtk-install/solution1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions src/base/abstractdebugger.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ class AbstractDebugger : public QObject

virtual void startDebug() = 0;
virtual void startDebugRemote(const RemoteInfo &info) = 0;
virtual void attachDebug(const QString &processId) = 0;
virtual void detachDebug() = 0;

virtual void interruptDebug() = 0;
Expand Down
1 change: 1 addition & 0 deletions src/common/dialog/propertiesdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ PropertiesDialog::PropertiesDialog(QWidget *parent)
bool PropertiesDialog::insertPropertyPanel(const QString &itemName, PageWidget *panel)
{
widgts.insert(itemName, panel);
panel->readConfig();
leftBarModel->setStringList(leftBarModel->stringList() << itemName);
int index = stackWidget->count();
stackWidget->insertWidget(index, panel);
Expand Down
10 changes: 5 additions & 5 deletions src/common/find/abstractdocumentfind.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@ class AbstractDocumentFind : public QObject

virtual void findNext(const QString &txt) = 0;
virtual void findPrevious(const QString &txt) = 0;
virtual void replace(const QString &before, const QString &after) {};
virtual void replaceFind(const QString &before, const QString &after) {};
virtual void replaceAll(const QString &before, const QString &after) {};
virtual void findStringChanged() {};
virtual bool supportsReplace() const { return true; };
virtual void replace(const QString &before, const QString &after) {}
virtual void replaceFind(const QString &before, const QString &after) {}
virtual void replaceAll(const QString &before, const QString &after) {}
virtual void findStringChanged() {}
virtual bool supportsReplace() const { return true; }
};

#endif // ABSTRACTDOCUMENTFIND_H
3 changes: 2 additions & 1 deletion src/common/util/eventdefinitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ OPI_OBJECT(project,
OPI_INTERFACE(openProject, "kitName", "language", "workspace")
OPI_INTERFACE(activeProject, "kitName", "language", "workspace")
// out
OPI_INTERFACE(activedProject, "projectInfo")
OPI_INTERFACE(activatedProject, "projectInfo")
OPI_INTERFACE(deletedProject, "projectInfo")
OPI_INTERFACE(createdProject, "projectInfo")
OPI_INTERFACE(projectUpdated, "projectInfo")
Expand All @@ -43,6 +43,7 @@ OPI_OBJECT(editor,
OPI_INTERFACE(back)
OPI_INTERFACE(forward)
OPI_INTERFACE(gotoLine, "fileName", "line")
OPI_INTERFACE(gotoPosition, "fileName", "line", "column")

// (AnnotationType)type
OPI_INTERFACE(addAnnotation, "fileName", "title", "content", "line", "type")
Expand Down
Loading

0 comments on commit 67b83dc

Please sign in to comment.