代码拉取完成,页面将自动刷新
同步操作将从 idea4good/GuiLite 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
./.sync.sh 1h1cpp
echo "Merge GuiLite source code into: 1 hearder & 1 source file"
echo ""
echo "Choose 1: Build for Linux"
echo "Choose 2: Build for Windows"
echo "Choose 3: Build for None OS or any OS"
echo "Choose 4: exit"
read -p "Please input:[1-3]:" input
# build GuiLite.h
cd core_include
cat api.h cmd_target.h rect.h resource.h theme.h surface.h display.h word.h bitmap.h wnd.h audio.h > core.h
mv core.h ../
cd ../widgets_include
cat button.h dialog.h keyboard.h edit.h gesture.h label.h list_box.h slide_group.h spinbox.h table.h wave_buffer.h wave_ctrl.h > widgets.h
mv widgets.h ../
cd ..
cat core.h widgets.h > GuiLiteRaw.h
rm core.h widgets.h
# build GuiLite-xxx.cpp
cppFileName="GuiLite-win.cpp"
cd core
cat *.cpp > core.cpp
mv core.cpp ../
cd adapter
while :
do
case $input in
1)
echo "Choose 1"
cat *linux*.cpp > adapter.cpp
cppFileName="GuiLite-linux.cpp"
break
;;
2)
echo "Choose 2"
cat *win*.cpp > adapter.cpp
break
;;
3)
echo "Choose 3"
cat *unknow*.cpp > adapter.cpp
cppFileName="GuiLite-unknow.cpp"
break
;;
*)
rm ../../GuiLiteRaw.h ../../core.cpp
exit 0
;;
esac
done
mv adapter.cpp ../../
cd ../../widgets
cat *.cpp > widgets.cpp
mv widgets.cpp ../
cd ..
cat core.cpp adapter.cpp widgets.cpp > GuiLiteRaw.cpp
rm core.cpp adapter.cpp widgets.cpp
# remove include core_include widgets_include from GuiLiteRaw.cpp
sed '/^#include.*core_include\|widgets_include.*/d' GuiLiteRaw.cpp > GuiLiteNoInclude.cpp
# include GuiLite.h to GuiLiteNoInclude.cpp
sed -i '1s/^/#include "GuiLite.h" /' GuiLiteNoInclude.cpp
# Delete empty lines or blank lines
sed '/^$/d' GuiLiteRaw.h > GuiLite.h
sed '/^$/d' GuiLiteNoInclude.cpp > $cppFileName
# Verify
gcc -c $cppFileName
# clean
rm GuiLiteRaw.h GuiLiteRaw.cpp GuiLiteNoInclude.cpp
echo "Done!"
echo "You could find GuiLite.h/$cppFileName in this folder"
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。