如何用sourceinsight寫核心程式碼
別的文章都會做很多說明, 鋪墊, 我就不多說了, 直接來重點
vim寫程式碼的時候, 有一種情況不是很好處理, 比如
struct a{int x; int y; iny z}
struct b{int x; int y; iny z}
pb->z想從這裡跳到到結構體b的定義需要編輯器理解pb的含義, 而不是簡單的字元查詢
那就讓我們來用source insight吧
以前都是用Windows掛samba來執行的, 缺點就是速度慢, kernel code檔案太多, 一共5w多個, 等同步要很久
還有人會把程式碼讓到windows機器來看, 這樣編輯, 編譯都需要同步, 不方便
思路就是把source insight放到本地來跑, 用wine可以, 但是source insight是i386的, 所以需要32位的wine, 編譯32位的wine需要一堆32位的package-devel包, alios7又沒有這些包
簡單來說, 用docker來解決這一些
來, 放個dockerfile在這裡, 你們都懂了
有了這東西, 寫程式碼能找到快感
FROM centos/systemd
MAINTAINER "shidao.ytt" <shidao.ytt@alibaba-inc.com>
#docker run --privileged -v /sys/fs/cgroup:/sys/fs/cgroup:ro -p 5901:5901 -d di
#docker build --rm --no-cache -t di .
RUN yum -y install bind-utils traceroute net-tools bash-completion tigervnc-server vim git wget epel-release
RUN yum -y install python2-pip
# pip install
RUN pip install --upgrade pip; pip install sshuttle
# install config vnc
RUN yum -y group install GNOME Desktop
RUN systemctl stop firewalld.service; systemctl disable firewalld.service
RUN cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver@:1.service
RUN sed -e `s|<USER>|root|` -e `s|/home||` -i /etc/systemd/system/vncserver@:1.service
RUN systemctl daemon-reload; systemctl enable vncserver@:1.service
RUN echo -e "111111
111111
n
" | vncpasswd
# install wine
RUN yum -y groupinstall `Development Tools`
RUN yum -y install libX11-devel freetype-devel alsa-lib-devel.i686 libsndfile-devel.i686 readline-devel.i686 glib2.i686 glibc-devel.i686 libgcc.i686 libstdc++-devel.i686 pulseaudio-libs-devel.i686 cmake portaudio-devel.i686 openal-soft-devel.i686 audiofile-devel.i686 freeglut-devel.i686 lcms-devel.i686 libieee1284-devel.i686 openldap-devel.i686 unixODBC-devel.i686 sane-backends-devel.i686 fontforge libgphoto2-devel.i686 isdn4k-utils-devel.i686 mesa-libGL-devel.i686 mesa-libGLU-devel.i686 libXxf86dga-devel.i686 libXxf86vm-devel.i686 giflib-devel.i686 cups-devel.i686 gsm-devel.i686 libv4l-devel.i686 fontpackages-devel ImageMagick-devel.i686 openal-soft-devel.i686 libX11-devel.i686 docbook-utils-pdf libtextcat tex-cm-lgc alsa-lib-devel audiofile-devel.i686 audiofile-devel cups-devel.i686 cups-devel dbus-devel.i686 dbus-devel fontconfig-devel.i686 fontconfig-devel freetype.i686 freetype-devel.i686 freetype-devel giflib-devel.i686 giflib-devel lcms-devel.i686 lcms-devel libICE-devel.i686 libICE-devel libjpeg-turbo-devel.i686 libjpeg-turbo-devel libpng-devel.i686 libpng-devel libSM-devel.i686 libSM-devel libusb-devel.i686 libusb-devel libX11-devel.i686 libX11-devel libXau-devel.i686 libXau-devel libXcomposite-devel.i686 libXcomposite-devel libXcursor-devel.i686 libXcursor-devel libXext-devel.i686 libXext-devel libXi-devel.i686 libXi-devel libXinerama-devel.i686 libXinerama-devel libxml2-devel.i686 libxml2-devel libXrandr-devel.i686 libXrandr-devel libXrender-devel.i686 libXrender-devel libxslt-devel.i686 libxslt-devel libXt-devel.i686 libXt-devel libXv-devel.i686 libXv-devel libXxf86vm-devel.i686 libXxf86vm-devel mesa-libGL-devel.i686 mesa-libGL-devel mesa-libGLU-devel.i686 mesa-libGLU-devel ncurses-devel.i686 ncurses-devel openldap-devel.i686 openldap-devel openssl-devel.i686 openssl-devel zlib-devel.i686 pkgconfig sane-backends-devel.i686 sane-backends-devel xorg-x11-proto-devel glibc-devel.i686 prelink fontforge flex bison libstdc++-devel.i686 pulseaudio-libs-devel.i686 gnutls-devel.i686 libgphoto2-devel.i686 openal-soft-devel openal-soft-devel.i686 isdn4k-utils-devel.i686 gsm-devel.i686 samba-winbind libv4l-devel.i686 cups-devel.i686 libtiff-devel.i686 gstreamer-devel.i686 gstreamer-plugins-base-devel.i686 gettext-devel.i686 libmpg123-devel.i686
RUN cd; wget http://dl.winehq.org/wine/source/2.x/wine-2.22.tar.xz; tar xJf wine-2.22.tar.xz; cd wine-2.22; ./configure; make -j60; make install
RUN yum clean all
CMD ["/usr/sbin/init"]
相關文章
- 寫程式碼如寫散文
- 重構程式碼(應如寫詩)
- 阿里如何用 AI 寫程式碼?阿里AI
- 程式碼如人
- 如何用PYTHON程式碼寫出音樂Python
- 寫程式碼如坐禪:你是哪一類程式設計師程式設計師
- 寫程式碼如坐禪:你是哪一類程式設計師?程式設計師
- 如何用 SpringBoot 優雅的寫程式碼Spring Boot
- 羽夏看Win系統核心——SourceInsight 配置 WRK
- 如何用 es6+ 寫出優雅的 js 程式碼JS
- [轉]如何用React寫小程式-2React
- 如何用不到 30 行程式碼寫一個模板引擎?行程
- 手寫ArrayList核心原始碼原始碼
- 手寫 ArrayList 核心原始碼原始碼
- 使用 SourceInsight 閱讀、編輯原始碼原始碼
- 好程式碼如文件,不言自明
- 怎樣用Sourceinsight編輯/瀏覽整個工程的程式碼
- 如何用python 寫 adb 命令指令碼Python指令碼
- 如何用 JMeter 編寫效能測試指令碼?JMeter指令碼
- 開發者故事|程式碼虐我千萬遍,我待程式碼如“初戀”
- 手寫 Java HashMap 核心原始碼JavaHashMap原始碼
- 如何編寫更棒的程式碼:11個核心要點
- 如何用JAVA程式碼操作HDFSJava
- html程式碼處理(如圖片、字型大小)HTML
- 如何用Java編寫一段程式碼引發記憶體洩露Java記憶體洩露
- Laravel核心程式碼學習--HTTP核心LaravelHTTP
- 《程式設計珠璣》程式碼之路12:如何用C/C++實現array[-1]並利用它寫出優美的程式碼程式設計C++
- SourceInsight使用詳解
- sourceInsight 入門教程
- 如何用java寫一個自動開機的程式Java
- 編碼如作文:寫出高可讀 JS 的 7 條原則JS
- 如何用C語言寫一個獲取視窗控制程式碼和其他資訊的小程式.C語言
- 核心程式碼1314
- 拓撲排序核心程式碼排序
- node之koa核心程式碼
- 享元模式 核心程式碼模式
- 30個類手寫Spring核心原理之AOP程式碼織入(5)Spring
- .Net Core——用程式碼寫程式碼?