Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • akiraohgaki/ocs-manager
  • dfn2/ocs-manager
  • azubieta/ocs-manager
  • rws77/ocs-manager
4 results
Show changes
......@@ -40,22 +40,22 @@ private slots:
void wsTextMessageReceived(const QString &message);
void wsBinaryMessageReceived(const QByteArray &message);
void itemMetadataSetChanged();
void itemDownloadStarted(QJsonObject result);
void itemDownloadFinished(QJsonObject result);
void itemDownloadProgress(QString id, qint64 bytesReceived, qint64 bytesTotal);
void itemSaveStarted(QJsonObject result);
void itemSaveFinished(QJsonObject result);
void itemInstallStarted(QJsonObject result);
void itemInstallFinished(QJsonObject result);
void itemUninstallStarted(QJsonObject result);
void itemUninstallFinished(QJsonObject result);
void itemHandlerMetadataSetChanged();
void itemHandlerDownloadStarted(QJsonObject result);
void itemHandlerDownloadFinished(QJsonObject result);
void itemHandlerDownloadProgress(QString id, qint64 bytesReceived, qint64 bytesTotal);
void itemHandlerSaveStarted(QJsonObject result);
void itemHandlerSaveFinished(QJsonObject result);
void itemHandlerInstallStarted(QJsonObject result);
void itemHandlerInstallFinished(QJsonObject result);
void itemHandlerUninstallStarted(QJsonObject result);
void itemHandlerUninstallFinished(QJsonObject result);
void updateCheckAllStarted(bool status);
void updateCheckAllFinished(bool status);
void updateUpdateStarted(QString itemKey, bool status);
void updateUpdateFinished(QString itemKey, bool status);
void updateUpdateProgress(QString itemKey, double progress);
void updateHandlerCheckAllStarted(bool status);
void updateHandlerCheckAllFinished(bool status);
void updateHandlerUpdateStarted(QString itemKey, bool status);
void updateHandlerUpdateFinished(QString itemKey, bool status);
void updateHandlerUpdateProgress(QString itemKey, double progress);
private:
void receiveMessage(const QString &id, const QString &func, const QJsonArray &data);
......
unix:!ios:!android {
contains(DEFINES, APP_DESKTOP) {
isEmpty(PREFIX) {
PREFIX = /usr/local
}
......
......@@ -6,3 +6,4 @@ Type=Application
Terminal=true
NoDisplay=true
Categories=Network;Utility;
X-AppImage-Integrate=false
......@@ -4,107 +4,112 @@
<context>
<name>ItemHandler</name>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="55"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="53"/>
<source>The item already installed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="62"/>
<source>The file already downloading</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="69"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="76"/>
<source>Downloading</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="119"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="125"/>
<source>Invalid OCS-URL</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="128"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="136"/>
<source>The item not installed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="142"/>
<source>Uninstalling</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="197"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="212"/>
<source>Uninstalled</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="222"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="237"/>
<source>Downloaded</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="252"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="291"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="267"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="311"/>
<source>Saving</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="264"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="306"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="284"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="328"/>
<source>Failed to save data</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="271"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="314"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="291"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="336"/>
<source>Saved</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="319"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="341"/>
<source>Installing</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="330"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="352"/>
<source>The file has been installed as program</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="335"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="357"/>
<source>The plasmoid has been installed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="340"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="362"/>
<source>The plasma look and feel has been installed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="345"/>
<source>The plasma desktop theme has been installed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="350"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="372"/>
<source>The KWin effect has been installed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="355"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="377"/>
<source>The KWin script has been installed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="360"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="382"/>
<source>The KWin window switcher has been installed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="363"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="385"/>
<source>The archive file has been extracted</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="366"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="380"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="388"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="402"/>
<source>The file has been installed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="370"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="384"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="392"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="406"/>
<source>Failed to installation</source>
<translation type="unfinished"></translation>
</message>
......
......@@ -4,107 +4,112 @@
<context>
<name>ItemHandler</name>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="55"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="53"/>
<source>The item already installed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="62"/>
<source>The file already downloading</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="69"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="76"/>
<source>Downloading</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="119"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="125"/>
<source>Invalid OCS-URL</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="128"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="136"/>
<source>The item not installed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="142"/>
<source>Uninstalling</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="197"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="212"/>
<source>Uninstalled</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="222"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="237"/>
<source>Downloaded</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="252"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="291"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="267"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="311"/>
<source>Saving</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="264"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="306"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="284"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="328"/>
<source>Failed to save data</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="271"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="314"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="291"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="336"/>
<source>Saved</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="319"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="341"/>
<source>Installing</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="330"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="352"/>
<source>The file has been installed as program</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="335"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="357"/>
<source>The plasmoid has been installed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="340"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="362"/>
<source>The plasma look and feel has been installed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="345"/>
<source>The plasma desktop theme has been installed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="350"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="372"/>
<source>The KWin effect has been installed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="355"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="377"/>
<source>The KWin script has been installed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="360"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="382"/>
<source>The KWin window switcher has been installed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="363"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="385"/>
<source>The archive file has been extracted</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="366"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="380"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="388"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="402"/>
<source>The file has been installed</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../app/src/handlers/itemhandler.cpp" line="370"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="384"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="392"/>
<location filename="../app/src/handlers/itemhandler.cpp" line="406"/>
<source>Failed to installation</source>
<translation type="unfinished"></translation>
</message>
......
include($${PWD}/qtlib/qtlib.pri)
include($${PWD}/qtil/qtil.pri)
unix:!ios:!android {
contains(DEFINES, APP_DESKTOP) {
INCLUDEPATH += $${PWD}/AppImageUpdate/include
DEPENDPATH += $${PWD}/AppImageUpdate/include
......@@ -8,18 +8,22 @@ unix:!ios:!android {
LIBS += \
-L$${PWD}/AppImageUpdate-prebuilt/src/ -lappimageupdate \
-L$${PWD}/AppImageUpdate-prebuilt/lib/zsync2/src/ -lzsync2 \
$${PWD}/AppImageUpdate-prebuilt/lib/zsync2/lib/hashlib/hashlib.a \
-L$${PWD}/AppImageUpdate-prebuilt/lib/ -lcpr \
-L$${PWD}/AppImageUpdate-prebuilt/lib/zsync2/lib/libzsync/ -lzsync \
-L$${PWD}/AppImageUpdate-prebuilt/lib/zsync2/lib/librcksum/ -lrcksum \
-L$${PWD}/AppImageUpdate-prebuilt/lib/zsync2/lib/zlib/ -lz \
-L$${PWD}/AppImageUpdate-prebuilt/lib/ -lcpr
-L$${PWD}/AppImageUpdate-prebuilt/lib/zsync2/lib/zlib/ -lzsync2_libz \
-L$${PWD}/AppImageUpdate-prebuilt/lib/libappimage/src/libappimage_shared/ -lappimage_shared
PRE_TARGETDEPS += \
$${PWD}/AppImageUpdate-prebuilt/src/libappimageupdate.a \
$${PWD}/AppImageUpdate-prebuilt/lib/zsync2/src/libzsync2.a \
$${PWD}/AppImageUpdate-prebuilt/lib/zsync2/lib/hashlib/hashlib.a \
$${PWD}/AppImageUpdate-prebuilt/lib/libcpr.a \
$${PWD}/AppImageUpdate-prebuilt/lib/zsync2/lib/libzsync/libzsync.a \
$${PWD}/AppImageUpdate-prebuilt/lib/zsync2/lib/librcksum/librcksum.a \
$${PWD}/AppImageUpdate-prebuilt/lib/zsync2/lib/zlib/libz.a \
$${PWD}/AppImageUpdate-prebuilt/lib/libcpr.a
$${PWD}/AppImageUpdate-prebuilt/lib/zsync2/lib/zlib/libzsync2_libz.a \
$${PWD}/AppImageUpdate-prebuilt/lib/libappimage/src/libappimage_shared/libappimage_shared.a
LIBS += -lcurl
}
ios|android|!isEmpty(APP_MOBILE) {
DEFINES += APP_MOBILE
} else {
} else:unix:!macx {
DEFINES += APP_DESKTOP
}
......
#!/bin/sh
PKGNAME='ocs-manager'
PKGVER='0.5.2'
PKGREL='1'
curl -L -o linuxdeployqt "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
chmod 755 linuxdeployqt
./linuxdeployqt --appimage-extract
sh scripts/import.sh
qmake PREFIX="/usr"
make
make INSTALL_ROOT="${PKGNAME}.AppDir" install
./squashfs-root/AppRun ${PKGNAME}.AppDir/usr/share/applications/${PKGNAME}.desktop -bundle-non-qt-libs -no-translations
install -D -m 755 /lib/x86_64-linux-gnu/libssl.so.1.0.0 ${PKGNAME}.AppDir/usr/lib/libssl.so.1.0.0
install -D -m 755 /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 ${PKGNAME}.AppDir/usr/lib/libcrypto.so.1.0.0
install -D -m 755 /lib/x86_64-linux-gnu/libz.so.1 ${PKGNAME}.AppDir/usr/lib/libz.so.1
./squashfs-root/AppRun ${PKGNAME}.AppDir/usr/share/applications/${PKGNAME}.desktop -appimage
mv *.AppImage ${PKGNAME}-${PKGVER}-${PKGREL}-x86_64.AppImage
#!/bin/bash
PKGNAME='ocs-manager'
PKGVER='0.8.1'
PKGREL='1'
#UPDINFO='zsync|http://***/ocs-manager-x86_64.AppImage.zsync'
APPDIR="${PKGNAME}.AppDir"
./scripts/prepare
qmake PREFIX=/usr
make
make INSTALL_ROOT=${APPDIR} install
curl -fsSL -o linuxdeployqt https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage
chmod 755 linuxdeployqt
./linuxdeployqt --appimage-extract
./squashfs-root/AppRun ${APPDIR}/usr/share/applications/${PKGNAME}.desktop -bundle-non-qt-libs -no-translations
install -D -m 755 /usr/lib/x86_64-linux-gnu/libfontconfig.so.1 ${APPDIR}/usr/lib/libfontconfig.so.1
install -D -m 755 /usr/lib/x86_64-linux-gnu/libfreetype.so.6 ${APPDIR}/usr/lib/libfreetype.so.6
install -D -m 755 /lib/x86_64-linux-gnu/libssl.so.1.0.0 ${APPDIR}/usr/lib/libssl.so.1.0.0
install -D -m 755 /lib/x86_64-linux-gnu/libcrypto.so.1.0.0 ${APPDIR}/usr/lib/libcrypto.so.1.0.0
install -D -m 755 /lib/x86_64-linux-gnu/libz.so.1 ${APPDIR}/usr/lib/libz.so.1
install -D -m 755 /usr/bin/unzip ${APPDIR}/usr/bin/unzip
install -D -m 755 /usr/lib/p7zip/7zr ${APPDIR}/usr/bin/7zr
install -D -m 755 /usr/bin/unar ${APPDIR}/usr/bin/unar
./squashfs-root/AppRun ${APPDIR}/usr/share/applications/${PKGNAME}.desktop -appimage
mv *-x86_64.AppImage ../${PKGNAME}-${PKGVER}-${PKGREL}-x86_64.AppImage
DISTFILES += $${PWD}/appimage/appimage.sh
DISTFILES += $${PWD}/appimage/appimagebuild
#!/bin/bash
PKGNAME='ocs-manager'
BUILDTYPE=''
if [ "${1}" ]; then
BUILDTYPE="${1}"
fi
PROJDIR="$(cd "$(dirname "${0}")/../" && pwd)"
BUILDVER="$(cd "${PROJDIR}" && git describe --always)"
BUILDDIR="${PROJDIR}/build_${PKGNAME}_${BUILDVER}_${BUILDTYPE}"
SRCARCHIVE="${BUILDDIR}/${PKGNAME}.tar.gz"
export_srcarchive() {
filepath="${1}"
$(cd "${PROJDIR}" && git archive --prefix="${PKGNAME}/" --output="${filepath}" HEAD)
}
build_snap() {
echo 'Not implemented yet'
}
build_flatpak() {
echo 'Not implemented yet'
}
build_appimage() {
cd "${PROJDIR}"
mkdir -p "${BUILDDIR}"
export_srcarchive "${SRCARCHIVE}"
tar -xzvf "${SRCARCHIVE}" -C "${BUILDDIR}"
cp "${PROJDIR}/pkg/appimage/appimage.sh" "${BUILDDIR}/${PKGNAME}"
cd "${BUILDDIR}/${PKGNAME}"
sh appimage.sh
}
if [ "${BUILDTYPE}" = 'snap' ]; then
build_snap
elif [ "${BUILDTYPE}" = 'flatpak' ]; then
build_flatpak
elif [ "${BUILDTYPE}" = 'appimage' ]; then
build_appimage
else
echo "sh $(basename "${0}") [snap|flatpak|appimage]"
exit 1
fi
......@@ -4,71 +4,57 @@ PKGNAME='ocs-manager'
PKGUSER='pkgbuilder'
BUILDTYPE=''
if [ "${1}" ]; then
BUILDTYPE="${1}"
fi
PKGSCRIPT="${0}"
PROJDIR="$(cd "$(dirname "${0}")/../" && pwd)"
BUILDSCRIPT="${PROJDIR}/scripts/build.sh"
TRANSFERLOG="${PROJDIR}/transfer.log"
transfer_file() {
filepath="${1}"
if [ -f "${filepath}" ]; then
filename="$(basename "${filepath}")"
echo "Uploading ${filename}" >> "${TRANSFERLOG}"
curl -T "${filepath}" "https://transfer.sh/${filename}" >> "${TRANSFERLOG}"
echo "" >> "${TRANSFERLOG}"
fi
}
build_snap() {
echo 'Not implemented yet'
}
BUILDDIR="${PROJDIR}/build_${PKGNAME}"
build_flatpak() {
echo 'Not implemented yet'
appimage() { # docker-image: ubuntu:14.04
install_build_deps_appimage
add_pkguser
su -c "export HOME=/home/${PKGUSER} && source /opt/qt59/bin/qt59-env.sh && "${PKGSCRIPT}" build_appimage" ${PKGUSER}
}
build_appimage() {
# docker-image: ubuntu:14.04
install_build_deps_appimage() {
apt update -qq
apt -y install software-properties-common
apt -y install curl git
#apt -y install build-essential qt5-default libqt5websockets5-dev
#apt -y install cmake libssl-dev libcurl4-gnutls-dev libxpm-dev
apt -y install libssl1.0.0 zlib1g
#apt -y install cmake automake libtool pkg-config wget desktop-file-utils libglib2.0-dev libcairo2-dev libssl-dev libcurl3 libcurl4-openssl-dev libxpm-dev
apt -y install libfontconfig1 libfreetype6 libssl1.0.0 zlib1g unzip p7zip unar
add-apt-repository -y ppa:beineri/opt-qt593-trusty
apt -y install software-properties-common
add-apt-repository -y ppa:beineri/opt-qt597-trusty
echo 'deb http://download.opensuse.org/repositories/home:/TheAssassin:/AppImageLibraries/xUbuntu_14.04/ /' > /etc/apt/sources.list.d/curl-httponly.list
curl -fsSL https://download.opensuse.org/repositories/home:TheAssassin:AppImageLibraries/xUbuntu_14.04/Release.key | apt-key add -
apt update -qq
apt -y install build-essential libgl1-mesa-dev qt59base qt59websockets
apt -y install build-essential mesa-common-dev libglu1-mesa-dev qt59base qt59websockets
curl -fsSL https://github.com/Kitware/CMake/releases/download/v3.13.3/cmake-3.13.3-Linux-x86_64.tar.gz | tar -xz --strip-components=1 -C /
apt -y install automake libtool pkg-config wget desktop-file-utils libglib2.0-dev libcairo2-dev libssl-dev libcurl3 libcurl4-openssl-dev libxpm-dev
}
curl -fsSL https://cmake.org/files/v3.10/cmake-3.10.0-rc5-Linux-x86_64.tar.gz | tar -xz --strip-components=1 -C /
apt -y install libssl-dev libcurl3 libcurl3-gnutls libcurl4-gnutls-dev libxpm-dev
build_appimage() {
rm -rf "${BUILDDIR}"
mkdir -p "${BUILDDIR}"
export_srcarchive "${BUILDDIR}/${PKGNAME}.tar.gz"
tar -xzf "${BUILDDIR}/${PKGNAME}.tar.gz" -C "${BUILDDIR}"
cp "${PROJDIR}/pkg/appimage/appimagebuild" "${BUILDDIR}/${PKGNAME}"
cd "${BUILDDIR}/${PKGNAME}"
./appimagebuild
}
add_pkguser() {
useradd -m ${PKGUSER}
export HOME="/home/${PKGUSER}"
chown -R ${PKGUSER}:${PKGUSER} "${PROJDIR}"
su -c "source /opt/qt59/bin/qt59-env.sh && sh "${BUILDSCRIPT}" ${BUILDTYPE}" ${PKGUSER}
chown -R ${PKGUSER} "${PROJDIR}"
}
transfer_file "$(find "${PROJDIR}/build_"*${BUILDTYPE} -type f -name "${PKGNAME}*.AppImage")"
export_srcarchive() {
if [ "${1}" ]; then
(cd "${PROJDIR}" && git archive --prefix="${PKGNAME}/" --output="${1}" HEAD)
fi
}
if [ "${BUILDTYPE}" = 'snap' ]; then
build_snap
elif [ "${BUILDTYPE}" = 'flatpak' ]; then
build_flatpak
elif [ "${BUILDTYPE}" = 'appimage' ]; then
build_appimage
else
echo "sh $(basename "${0}") [snap|flatpak|appimage]"
exit 1
if [ "${1}" ]; then
${1}
fi
......@@ -2,8 +2,8 @@
PROJDIR="$(cd "$(dirname "${0}")/../" && pwd)"
if [ ! -d "${PROJDIR}/lib/qtlib" ]; then
git clone https://github.com/akiraohgaki/qtlib.git -b release-0.2.1 --single-branch --depth=1 "${PROJDIR}/lib/qtlib"
if [ ! -d "${PROJDIR}/lib/qtil" ]; then
git clone https://github.com/akiraohgaki/qtil.git -b release-0.4.0 --single-branch --depth=1 "${PROJDIR}/lib/qtil"
fi
if [ ! -d "${PROJDIR}/lib/AppImageUpdate" ]; then
......@@ -14,6 +14,6 @@ fi
if [ ! -d "${PROJDIR}/lib/AppImageUpdate-prebuilt" ]; then
mkdir "${PROJDIR}/lib/AppImageUpdate-prebuilt"
cd "${PROJDIR}/lib/AppImageUpdate-prebuilt"
cmake "${PROJDIR}/lib/AppImageUpdate" -DUSE_SYSTEM_CURL=ON -DBUILD_CPR_TESTS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo
make libappimageupdate
cmake "${PROJDIR}/lib/AppImageUpdate" -DBUILD_QT_UI=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo
make libappimageupdate_static
fi
DISTFILES += \
$${PWD}/build-docker.sh \
$${PWD}/build.sh \
$${PWD}/import.sh
$${PWD}/package \
$${PWD}/prepare