Skip to content

Commit

Permalink
ubuntu CI: initial
Browse files Browse the repository at this point in the history
  • Loading branch information
dxli committed Aug 20, 2023
1 parent f188e76 commit 9e6ab7d
Show file tree
Hide file tree
Showing 8 changed files with 286 additions and 44 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:

- run: sudo ${{ github.workspace }}/scripts/ubuntu-install/createAppImage.sh

- run: cd ${{ github.workspace }}
#- run: cd ${{ github.workspace }}

- run: ${{ github.workspace }}/scripts/ubuntu-install/createSnap.sh
#- run: ${{ github.workspace }}/scripts/ubuntu-install/createSnap.sh

- name: Uploading AppImage
uses: actions/upload-artifact@v3
Expand All @@ -33,12 +33,12 @@ jobs:
name: LibreCAD3.AppImage
retention-days: 2

- name: Uploading snap
uses: actions/upload-artifact@v3
with:
path: ${{ github.workspace }}/librecad**snap
name: LibreCAD3.snap
retention-days: 2
#- name: Uploading snap
# uses: actions/upload-artifact@v3
# with:
# path: ${{ github.workspace }}/librecad**snap
# name: LibreCAD3.snap
# retention-days: 2

windows:
name: Building LibreCAD3 on windows runner
Expand All @@ -64,9 +64,9 @@ jobs:
- name: Install Qt5
uses: jurplel/install-qt-action@v3
with:
version: 5.15.14
version: 5.15.2

- run: setx QTDIR "${{ env.Qt5_DIR }}\5.15.14\msvc2019_64"
- run: setx QTDIR "${{ env.Qt5_DIR }}\5.15.2\msvc2019_64"

- run: setx QT_QPA_PLATFORM_PLUGIN_PATH "${{ env.Qt5_DIR }}\plugins\platforms\\"

Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ message(" - Use Cairo: ${WITH_CAIRO}")

message("\n")

if(WITH_CAIRO)
if (WITH_CAIRO)
add_definitions(-DWITH_CAIRO)
endif(WITH_QT_UI)
endif(WITH_CAIRO)

#Add each LibreCAD component
add_subdirectory("lckernel")
Expand Down
57 changes: 57 additions & 0 deletions desktop/librecad.desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
[Desktop Entry]
Version=1.0
Type=Application
Name=LibreCAD
GenericName=CAD system
GenericName[da]=Computerhjulpet design (CAD)
GenericName[de]=System für computerunterstützte Konstruktion
GenericName[it]=Sistema CAD
GenericName[ja]=コンピュータ支援設計 (CAD) システム
GenericName[ru]=Система автоматизированного проектирования
GenericName[sk]=CAD systém
GenericName[uk]=Система автоматизованого проектування
Comment=A professional CAD System
Comment[es]=Un sistema CAD profesional
Comment[ru]=Профессиональная CAD система
Comment[sq]=Një sistem profesional CAD
Comment[be]=Прафэсійная CAD-сыстэма
Comment[ast]=Un sistema CAD profesional
Comment[bn]=পেশাদারী CAD পদ্ধতি
Comment[bs]=Profesionalni sistem CAD
Comment[pt_BR]=Um sistema CAD profissional
Comment[bg]=Професионална CAD система
Comment[ca]=Un sistema CAD professional
Comment[ca@valencia]=Un sistema CAD professional
Comment[zh_HK]=專業 CAD 系統
Comment[da]=Et professionelt CAD-system
Comment[cs]=Profesionální CAD systém
Comment[crh]=Profesyonel CAD Sistemi
Comment[zh_TW]=專業 CAD 系統
Comment[zh_CN]=一个专业的 CAD 系统
Comment[nl]=Een professioneel CAD-systeem
Comment[fi]=Ammattimainen CAD-järjestelmä
Comment[fr]=Un système de CAO professionnel
Comment[gl]=Un sistema de CAD profesional
Comment[de]=Ein professionelles CAD-System
Comment[el]=Ένα επαγγελματικό σύστημα σχεδίασης CAD
Comment[is]=Hágæða teiknikerfi (CAD)
Comment[hu]=Professzionális CAD-rendszer
Comment[it]=Un sistema CAD professionale
Comment[ja]=プロフェッショナル CAD システム
Comment[ky]=Кесиптик CAD - тутуму
Comment[ms]=Sistem CAD profesional
Comment[nb]=Et profesjonelt CAD-system
Comment[pt]=Um sistema CAD profissional
Comment[pl]=Profesjonalny system CAD
Comment[oc]=Un sistèma de CAO professional
Comment[ro]=Un sistem profesional CAD
Comment[tg]=Системаи касбии CAD
Comment[sv]=Professionellt CAD-system
Comment[sl]=Profesionalni sistem CAD
Comment[uk]=Професійна САПР
Comment[tr]=Profesyonel CAD Sistemi
TryExec=librecad
Exec=librecad %F
Icon=librecad
Categories=Graphics;Engineering;
MimeType=image/vnd.dxf;
163 changes: 163 additions & 0 deletions lcUI/ui/icons/librecad.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 14 additions & 12 deletions scripts/ubuntu-install/createAppImage.sh
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@

mkdir build
echo "Begin AppImage building"
cd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=On
make -j 4

sudo make install DESTDIR=AppDir

sudo cp ../AppImage/librecad.* AppDir/
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
export QTDEPLOY=linuxdeploy-x86_64.AppImage
export QTDEPLOYPLUGIN=linuxdeploy-plugin-qt-x86_64.AppImage
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/$QTDEPLOY
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/$QTDEPLOYPLUGIN

chmod a+x linuxdeploy-x86_64.AppImage
chmod a+x linuxdeploy-plugin-qt-x86_64.AppImage

sudo cp ../AppImage/librecad.* AppDir/
sudo cp /usr/local/lib/libdxfrw.so.1 AppDir/usr/lib
cp -v ../lcUI/ui/icons/librecad.svg AppDir/
cp -v ../desktop/librecad.desktop AppDir/
#sudo cp ../AppImage/librecad.* AppDir/
#sudo cp /usr/local/lib/libdxfrw.so.1 AppDir/usr/lib

sudo LD_LIBRARY_PATH=AppDir/usr/lib/x86_64-linux-gnu/:AppDir/usr/lib64:AppDir/usr/lib ./$QTDEPLOY --appdir AppDir \
--output appimage \
--executable AppDir/usr/bin/librecad \
--desktop-file AppDir/librecad.desktop \
--icon-file AppDir/librecad.svg --plugin qt

sudo LD_LIBRARY_PATH=AppDir/usr/lib/x86_64-linux-gnu/:AppDir/usr/lib64:AppDir/usr/lib ./linuxdeploy-x86_64.AppImage --appdir AppDir --output appimage --executable AppDir/usr/bin/librecad --desktop-file AppDir/librecad.desktop --icon-file AppDir/librecad.svg --plugin qt
55 changes: 37 additions & 18 deletions scripts/ubuntu-install/installDependenciesAndBuildRepo.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
sudo apt update
sudo apt upgrade
sudo apt install -qq cmake qttools5-dev qttools5-dev-tools libqt5opengl5-dev liblua5.2-dev git gcc \
libcairo2-dev libpango-1.0-0 libpango1.0-dev libboost-dev libboost-log-dev libboost-program-options-dev \
sudo apt upgrade -y
sudo apt install -y -qq cmake qttools5-dev qttools5-dev-tools libqt5opengl5-dev liblua5.3-dev git gcc \
libcairo2-dev libpango-1.0-0 libpango1.0-dev libboost-dev libboost-all-dev libboost-program-options-dev \
libqt5svg5-dev libgtest-dev libeigen3-dev libcurl4-gnutls-dev libgtk-3-dev libglew-dev rapidjson-dev \
libbz2-dev libglfw3-dev libglm-dev libfltk1.3-dev doxygen mkdocs qtchooser

libbz2-dev libglfw3-dev libglm-dev libfltk1.3-dev doxygen mkdocs qtchooser freeglut3-dev fuse

#This is for versions older that 20.04, like ubuntu 18.04

Expand All @@ -19,19 +18,39 @@ libbz2-dev libglfw3-dev libglm-dev libfltk1.3-dev doxygen mkdocs qtchooser
#sudo rm /etc/apt/trusted.gpg.d/kitware.gpg
#sudo apt update
#sudo apt install cmake
echo on
echo "building LibreCAD"
git submodule update

cd /usr/src/gtest
sudo cmake CMakeLists.txt
sudo make

cd lib #meeded in ubuntu 20.04+
sudo cp ./*.a /usr/lib

cd
git clone --branch LibreCAD_3 https://github.com/LibreCAD/libdxfrw
cd libdxfrw
mkdir release
cd release
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_SHARED_LIBS=ON ..
make
mkdir -p libdxfrw/release
pushd libdxfrw/release
echo "building dxfrw"
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=On ..
make -j 4
echo "installing dxfrw"
sudo make install
popd

echo "building LibreCAD"
mkdir build
pushd build
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -DBUILD_SHARED_LIBS=On
make -j 4
echo "installing LibreCAD"
sudo make install DESTDIR=AppDir
popd
pwd
ls
find . -type d

#cd /usr/src/gtest
#sudo cmake CMakeLists.txt
#sudo make


#cd lib #meeded in ubuntu 20.04+
#sudo cp ./*.a /usr/lib



2 changes: 1 addition & 1 deletion scripts/windows-install/addPathVariables.ps1
Original file line number Diff line number Diff line change
@@ -1 +1 @@
[Environment]::SetEnvironmentVariable('Path', $env:Path + ';${{ env.Qt5_DIR }}\5.15.14\msvc2019_64;${{ github.workspace }}\LibreCAD_3\out\build\x64-Debug\lib;${{ env.Qt5_DIR }}\5.15.14\msvc2019_64\bin', 'User')
[Environment]::SetEnvironmentVariable('Path', $env:Path + ';${{ env.Qt5_DIR }}\5.15.2\msvc2019_64;${{ github.workspace }}\LibreCAD_3\out\build\x64-Debug\lib;${{ env.Qt5_DIR }}\5.15.2\msvc2019_64\bin', 'User')
3 changes: 2 additions & 1 deletion scripts/windows-install/installConan.bat
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
pip install conan
pip install conan
pip install mkdocs

0 comments on commit 9e6ab7d

Please sign in to comment.