[ feedback] 用deepin-ide编译deepin-ide
Tofloor
poster avatar
sshnuke
deepin
2023-09-05 16:35
Author

既然deepin-ide已经出来了,那么我们不如来试试用魔法打败魔法,用deepin-ide编译deepin-ide

首先不管先有鸡还是先有蛋,我们得先有deepin-ide才能编译一个deepin-ide出来

这里我们直接使用github上已经提供的构建好的deepin-unioncode的deb包来安装

之前测试在deepin v23上直接安装这个deb是缺依赖的,为了节省时间我就直接在uos v20 home 22.0上安装成功了(uos 20 pro 1060也实测ok,deepin 20.x应该同理也行)

然后我们下载gitee上的deepin-unioncode源码好了,这个下起来快些

git clone https://gitee.com/deepin-community/deepin-unioncode

接着我们打开刚安装好的deepin-unioncode,来导入deepin-unioncode的工程文件(CMakeList)

这里我们先打开deepin-unioncode的工具-选项来确认机器上的cmake和相关工具已经安装好了,如果没有的话需要安装

sudo apt install build-essential image.png

然后我们文件-打开工程-C/C++-cmake来打开我们刚刚下载的deepin-unioncode工程文件image.png

image.png

image.png

打开后deepin-unioncode会预扫描cmake文件,检查依赖项,因为我们是白板家庭版,会缺少一堆依赖包没装,所以第一次打开是这样的

image.png

这是在提醒我们有依赖包没装

经过我一番尝试凑齐了需要安装的依赖包清单

sudo apt install qtbase5-dev qttools5-dev-tools qttools5-dev lxqt-build-tools clang doxygen libjsoncpp-dev libclang-7-dev libqt5script5 qtscript5-dev

全部安装完后我们再次打开工程,可以看到不再报错了

image.png

那么我们Ctrl-B,编译开始!

image.png

居然有违规内容发不出图,那么编译过程大家就自行脑补吧

Reply Favorite View the author
All Replies
1 / 2
To page
把一切操作变成GUI
deepin
Backbone of ecological co-construction group
2023-09-05 17:30
#1

结果呢?

Reply View the author
yanjuner
Super Moderator
2023-09-05 17:38
#2

最后咋样了嘛

你倒是接着说啊

Reply View the author
阿尼樱奈奈
Moderator
2023-09-05 17:39
#3

confused doubt

Reply View the author
sshnuke
deepin
2023-09-05 18:31
#4

后面还有几个包要装,要不然会编译错误,我还在挨个排查

Reply View the author
爱开发
deepin
2023-09-05 18:37
#5

我编译出来的,打开项目就会崩:

[default][2023-09-05 10:36:57.332][Info][processutil.cpp ProcessUtil::execute(const QString&, const QStringList&, const QString&, const QProcessEnvironment&, ProcessUtil::ReadCallBack):: 44]"python3" "-V" exitCode:  0 exitStatus:  QProcess::NormalExit
terminate called after throwing an instance of 'std::bad_optional_access'
  what():  bad optional access
[1]    27608 IOT instruction  ./deepin-unioncode
Reply View the author
sshnuke
deepin
2023-09-05 18:38
#6

成了

还需要安装如下包才能编译通过

sudo apt install libzstd-dev libjson-c-dev libxcb-xinput-dev libxi-dev libdbus-1-dev libelf-dev libcapstone-dev libunwind-dev libelf-dev libelf++0 libelfin-dev

以下是deb安装的deepin-unioncode和用deepin-unioncode编译出来的deepin-unioncode同时运行

image.png

编译产物

image.png

Reply View the author
sshnuke
deepin
2023-09-05 18:39
#7
爱开发

我编译出来的,打开项目就会崩:

[default][2023-09-05 10:36:57.332][Info][processutil.cpp ProcessUtil::execute(const QString&, const QStringList&, const QString&, const QProcessEnvironment&, ProcessUtil::ReadCallBack):: 44]"python3" "-V" exitCode:  0 exitStatus:  QProcess::NormalExit
terminate called after throwing an instance of 'std::bad_optional_access'
  what():  bad optional access
[1]    27608 IOT instruction  ./deepin-unioncode

我已经编译成功并且打开了

Reply View the author
sshnuke
deepin
2023-09-05 18:47
#8

但是deepin ide没提供打deb和玲珑包工具,没法在deepin ide里一键打deb和玲珑包。。。。

Reply View the author
爱开发
deepin
2023-09-05 19:18
#9
sshnuke

我已经编译成功并且打开了

是 23 版本吗?

刚试了下 python 和 js 的项目,一打开就报错。
你编译出来的执行的时候需要加 sudo 吗?

Reply View the author
sshnuke
deepin
2023-09-05 19:44
#10
爱开发

是 23 版本吗?

刚试了下 python 和 js 的项目,一打开就报错。
你编译出来的执行的时候需要加 sudo 吗?

23不行 得用20

Reply View the author
lk-timeout
deepin
2023-09-09 23:19
#11

win系统可以安装吗,想尝试下

Reply View the author
cz012273
deepin
2023-12-17 22:42
#12

UOS22家庭版下还是提示缺少东西,内容如下:

CMake Error at CMakeLists.txt:94 (find_package):

By not providing "FindDtk.cmake" in CMAKE_MODULE_PATH this project has

asked CMake to find a package configuration file provided by "Dtk", but

CMake did not find one.

Could not find a package configuration file provided by "Dtk" with any of

the following names:

DtkConfig.cmake

dtk-config.cmake
Reply View the author
cz012273
deepin
2023-12-18 00:23
#13

再运行sudo apt install libdtkcore-dev libdtkgui-dev libdtkwidget-dev libdtkcore5-bin libkf5syntaxhighlighting-dev

补齐缺少的几个依赖后,可以编译了。

Reply View the author
cz012273
deepin
2023-12-18 00:50
#14

还是报错了!

make[2]: *** [src/plugins/core/CMakeFiles/plugin-core.dir/build.make:74:src/plugins/core/CMakeFiles/plugin-core.dir/mainframe/windowkeeper.cpp.o] 错误 1

16:40:25: make[2]: 离开目录“/home/CZDNUOS/build-deepin-unioncode-Desktop-Debug”

make[1]: *** [CMakeFiles/Makefile2:1317:src/plugins/core/CMakeFiles/plugin-core.dir/all] 错误 2

16:40:25: make[1]: 离开目录“/home/CZDNUOS/build-deepin-unioncode-Desktop-Debug”

make: *** [Makefile:133:all] 错误 2

进程/usr/bin/cmake退出,代码为2。

Reply View the author
cz012273
deepin
2023-12-18 07:06
#15

经试验,从1.2.0版本以后编译就开始报错,似乎和src/plugins/core/mainframe/windowkeeper.cpp文件中的修改有关。

Reply View the author
cz012273
deepin
2023-12-22 02:18
#16

用了个笨办法:按照gitee仓库中的源码,从1.1.19版本开始,逐天往后试,目前试验到11月7日可正常编译。(操作系统环境:UOS家庭版22.0)

Reply View the author
cz012273
deepin
2023-12-22 02:56
#17

11月10日正常编译。

Reply View the author
cz012273
deepin
2023-12-22 03:26
#18
It has been deleted!
cz012273
deepin
2023-12-22 05:28
#19

11月13日也编译成功了。

Reply View the author
cz012273
deepin
2023-12-22 14:15
#20

11月14日,在将src/plugins/recent/mainframe/displayitemdelegate.cpp中下面这句注释掉之后,编译通过!
#include

Reply View the author
1 / 2
To page