mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
package as AppImage for Linux
This commit is contained in:
parent
0a7e92483c
commit
5c6c6ccb36
@ -24,7 +24,7 @@
|
||||
},
|
||||
|
||||
"files":
|
||||
[{"includePattern": "build/distrib/(VNote_linux_.*\\.tar\\.gz)", "uploadPattern": "$1",
|
||||
[{"includePattern": "build/(VNote_.*\\.AppImage)", "uploadPattern": "$1",
|
||||
"matrixParams": {"override": 1 }}],
|
||||
|
||||
"publish": true
|
||||
|
@ -14,7 +14,7 @@ matrix:
|
||||
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
- dev
|
||||
|
||||
before_install:
|
||||
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
|
||||
@ -24,6 +24,7 @@ before_install:
|
||||
install:
|
||||
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install p7zip-full ; fi
|
||||
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install chrpath ; fi
|
||||
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install openssl libssl-dev ; fi
|
||||
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install tree ; fi
|
||||
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then sudo apt-get install -qq gcc-6; sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 100 ; fi
|
||||
- if [[ "${TRAVIS_OS_NAME}" == "linux" ]]; then sudo apt-get install -qq g++-6; sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 100 ; fi
|
||||
@ -45,7 +46,7 @@ deploy:
|
||||
dry-run: false
|
||||
on:
|
||||
condition: $TRAVIS_OS_NAME = linux
|
||||
branch: master
|
||||
branch: dev
|
||||
- provider: bintray
|
||||
file: "./.macos_bintray.json"
|
||||
user: tamlok
|
||||
@ -54,4 +55,4 @@ deploy:
|
||||
dry-run: false
|
||||
on:
|
||||
condition: $TRAVIS_OS_NAME = osx
|
||||
branch: master
|
||||
branch: dev
|
||||
|
@ -11,48 +11,39 @@ cd ${project_dir}
|
||||
mkdir build
|
||||
cd build
|
||||
qmake -v
|
||||
qmake CONFIG-=debug CONFIG+=release -spec linux-g++-64 ../VNote.pro
|
||||
make
|
||||
qmake CONFIG+=release -spec linux-g++-64 ../VNote.pro
|
||||
make -j2
|
||||
|
||||
mkdir -p distrib/VNote
|
||||
cd distrib/VNote
|
||||
#
|
||||
# Pack AppImage using linuxdeployqt
|
||||
#
|
||||
mkdir dist
|
||||
INSTALL_ROOT=${project_dir}/build/dist make install ; tree dist/
|
||||
|
||||
# Copy VNote executable
|
||||
cp ../../src/VNote ./
|
||||
|
||||
# Copy ICU libraries
|
||||
cp "${qt_install_dir}/Qt/5.7/gcc_64/lib/libicui18n.so.56.1" "libicui18n.so.56"
|
||||
cp "${qt_install_dir}/Qt/5.7/gcc_64/lib/libicuuc.so.56.1" "libicuuc.so.56"
|
||||
cp "${qt_install_dir}/Qt/5.7/gcc_64/lib/libicudata.so.56.1" "libicudata.so.56"
|
||||
|
||||
mkdir platforms
|
||||
cp "${qt_install_dir}/Qt/5.7/gcc_64/plugins/platforms/libqxcb.so" "platforms/libqxcb.so"
|
||||
cp "${qt_install_dir}/Qt/5.7/gcc_64/plugins/platforms/libqminimal.so" "platforms/libqminimal.so"
|
||||
|
||||
cp "${qt_install_dir}/Qt/5.7/gcc_64/lib/libQt5WebEngineWidgets.so.5.7.0" "libQt5WebEngineWidgets.so.5"
|
||||
cp "${qt_install_dir}/Qt/5.7/gcc_64/lib/libQt5WebEngineCore.so.5.7.0" "libQt5WebEngineCore.so.5"
|
||||
cp "${qt_install_dir}/Qt/5.7/gcc_64/lib/libQt5Widgets.so.5.7.0" "libQt5Widgets.so.5"
|
||||
cp "${qt_install_dir}/Qt/5.7/gcc_64/lib/libQt5WebChannel.so.5.7.0" "libQt5WebChannel.so.5"
|
||||
cp "${qt_install_dir}/Qt/5.7/gcc_64/lib/libQt5Core.so.5.7.0" "libQt5Core.so.5"
|
||||
cp "${qt_install_dir}/Qt/5.7/gcc_64/lib/libQt5Gui.so.5.7.0" "libQt5Gui.so.5"
|
||||
cp "${qt_install_dir}/Qt/5.7/gcc_64/lib/libQt5DBus.so.5.7.0" "libQt5DBus.so.5"
|
||||
cp "${qt_install_dir}/Qt/5.7/gcc_64/lib/libQt5XcbQpa.so.5.7.0" "libQt5XcbQpa.so.5"
|
||||
cp "${qt_install_dir}/Qt/5.7/gcc_64/lib/libQt5Qml.so.5.7.0" "libQt5Qml.so.5"
|
||||
cp "${qt_install_dir}/Qt/5.7/gcc_64/lib/libQt5Network.so.5.7.0" "libQt5Network.so.5"
|
||||
|
||||
# Use chrpath to set up rpaths for Qt's libraries so they can find
|
||||
# each other
|
||||
chrpath -r \$ORIGIN/.. platforms/libqxcb.so
|
||||
chrpath -r \$ORIGIN/.. platforms/libqminimal.so
|
||||
# Copy SVG module
|
||||
mkdir -p dist/usr/plugins/iconengines
|
||||
mkdir -p dist/usr/plugins/imageformats
|
||||
cp "${qt_install_dir}"/Qt/5.7/gcc_64/plugins/iconengines/* dist/usr/plugins/iconengines/
|
||||
cp "${qt_install_dir}"/Qt/5.7/gcc_64/plugins/imageformats/* dist/usr/plugins/imageformats/
|
||||
|
||||
# Copy other project files
|
||||
cp "${project_dir}/README.md" "README.md"
|
||||
cp "${project_dir}/LICENSE" "LICENSE"
|
||||
echo ${version} > version
|
||||
echo "${TRAVIS_COMMIT}" >> version
|
||||
cp "${project_dir}/README.md" "dist/README.md"
|
||||
cp "${project_dir}/LICENSE" "dist/LICENSE"
|
||||
echo ${version} > dist/version
|
||||
echo "${TRAVIS_COMMIT}" >> dist/version
|
||||
|
||||
# Get linuxdeployqt tool
|
||||
wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
|
||||
chmod a+x linuxdeployqt*.AppImage
|
||||
./linuxdeployqt*.AppImage ./dist/usr/share/applications/*.desktop -bundle-non-qt-libs
|
||||
./linuxdeployqt*.AppImage ./dist/usr/share/applications/*.desktop -appimage
|
||||
|
||||
tree dist/
|
||||
|
||||
ls -l *.AppImage
|
||||
|
||||
mv VNote-*.AppImage VNote_x86_64_${version}.AppImage
|
||||
|
||||
# Package portable executable
|
||||
cd ..
|
||||
tar -czvf VNote_linux_x86_64_portable_${version}.tar.gz VNote
|
||||
|
||||
exit 0
|
||||
|
@ -43,7 +43,7 @@ ln -s /Applications ./Applications
|
||||
|
||||
cd ..
|
||||
hdiutil create -srcfolder ./VNote -format UDBZ ./VNote.dmg
|
||||
mv VNote.dmg VNote_mac_X64_${version}.dmg
|
||||
mv VNote.dmg VNote_X64_${version}.dmg
|
||||
cd ..
|
||||
|
||||
exit 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user