update some code

This commit is contained in:
superconvert 2022-08-18 06:43:52 +08:00
parent 46d18d4cf2
commit 23ee4ebf24
4 changed files with 32 additions and 28 deletions

View File

@ -16,21 +16,12 @@
# #
#---------------------------------------------- #----------------------------------------------
echo "${CYAN}--- build disk --- ${NC}" echo "${CYAN}--- build disk --- ${NC}"
# 创建磁盘 64M # 创建磁盘 128M 或 256M
if [ "${with_gcc}" = false ]; then if [ "${with_gcc}" = false ]; then
dd if=/dev/zero of=disk.img bs=1M count=128 create_disk disk.img 128
else else
dd if=/dev/zero of=disk.img bs=1M count=256 create_disk disk.img 256
fi fi
# 对磁盘进行分区一个主分区
fdisk disk.img << EOF
n
p
w
EOF
echo "${GREEN}+++ build disk ok +++${NC}" echo "${GREEN}+++ build disk ok +++${NC}"
# 磁盘镜像挂载到具体设备 # 磁盘镜像挂载到具体设备

View File

@ -74,3 +74,21 @@ ls_dir() {
done done
} }
# 创建一个磁盘文件并分区
create_disk() {
# 输入参数磁盘文件和大小
disk=$1
size=$2
# 创建一个磁盘文件
dd if=/dev/zero of=${disk} bs=1M count=${size}
# 对磁盘进行分区一个主分区
fdisk ${disk} << EOF
n
p
w
EOF
}

View File

@ -1,5 +1,8 @@
#!/bin/sh #!/bin/sh
# 导入公共环境
. ./common.sh
#---------------------------------------------- #----------------------------------------------
# #
# 制作磁盘 # 制作磁盘
@ -13,18 +16,7 @@ fi
echo "${CYAN}开始制作磁盘...${NC}" echo "${CYAN}开始制作磁盘...${NC}"
# 创建磁盘 64M # 创建磁盘 64M
dd if=/dev/zero of=extra.img bs=1M count=64 create_disk extra.img 64
# 对磁盘进行分区一个主分区
fdisk extra.img << EOF
n
p
w
EOF
echo "${GREEN}磁盘制作成功!!!${NC}" echo "${GREEN}磁盘制作成功!!!${NC}"
echo ".........................................................." echo ".........................................................."

View File

@ -420,7 +420,7 @@ ms_link="-Wl,-rpath-link=${xfce_loc_lib}"
# 编译 pixman # 编译 pixman
if [ ! -f .pixman ]; then if [ ! -f .pixman ]; then
echo "${CYAN}build pixman begin${NC}" && cd ${PIXMAN_SRC_DIR} && ./configure ${CFGOPT} --enable-gtk=no echo "${CYAN}build pixman begin${NC}" && cd ${PIXMAN_SRC_DIR} && ./configure ${CFGOPT} --enable-libpng=yes
make -j8 && make install DESTDIR=${xfce_install} && echo "ok" > ../.pixman || exit make -j8 && make install DESTDIR=${xfce_install} && echo "ok" > ../.pixman || exit
cd .. && echo "${GREEN}build pixman end${NC}" cd .. && echo "${GREEN}build pixman end${NC}"
fi fi
@ -742,9 +742,12 @@ if [ "${with_xfce_test}" = true ]; then
echo "xfce4-session" > ~/.xsession echo "xfce4-session" > ~/.xsession
# xfdesktop 需要库的路径, xfdesktop 不能运行,基本上桌面就是黑屏了,可能有 dock 栏和最上面的状态栏 # xfdesktop 需要库的路径, xfdesktop 不能运行,基本上桌面就是黑屏了,可能有 dock 栏和最上面的状态栏
echo "/root/test/a/usr/lib" > /etc/ld.so.conf.d/xfce4.conf # echo "/root/test/a/usr/lib" > /etc/ld.so.conf.d/xfce4.conf
echo "/root/test/a/usr/local/lib" >> /etc/ld.so.conf.d/xfce4.conf # echo "/root/test/a/usr/local/lib" >> /etc/ld.so.conf.d/xfce4.conf
echo "/root/test/a/usr/lib/x86_64-linux-gnu" >> /etc/ld.so.conf.d/xfce4.conf # echo "/root/test/a/usr/lib/x86_64-linux-gnu" >> /etc/ld.so.conf.d/xfce4.conf
libdir=`pwd`"/a/usr"
echo "XDG_CONFIG_HOME=\"/usr/local/etc/xdg\"" >> /etc/environment
echo "LD_LIBRARY_PATH=\"${libdir}/lib:${libdir}/local/lib:${libdir}/lib/x86_64-linux-gnu\"" >> /etc/environment
# 重启系统,然后可以利用 windows 下 remote desktop 体验最新版本的 xfce4 了, 最新版本的 xfce4 还是很漂亮的 # 重启系统,然后可以利用 windows 下 remote desktop 体验最新版本的 xfce4 了, 最新版本的 xfce4 还是很漂亮的
# reboot # reboot