diff --git a/.travis.yml b/.travis.yml index 113f5e500ae8d1caff9fe30e7d482f589955274a..3663e7b93be7eeea3f22e3b6c5afbe83bc63fd95 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,25 +7,15 @@ os: linux before_install: - sudo add-apt-repository --yes ppa:beineri/opt-qt57-trusty - sudo apt-get update -qq - + - curl https://transfer.sh/DHN4B/linuxdeployqt-799f704-x86-64.appimage -o linuxdeployqt.appimage + install: - sudo apt-get -y install binutils qt57base qt57quickcontrols qt57quickcontrols2 qt57svg desktop-file-utils + - sudo install -m 755 -p linuxdeployqt.appimage /usr/local/bin/linuxdeployqt.appimage + - rm linuxdeployqt.appimage script: - source /opt/qt57/bin/qt57-env.sh - - /opt/qt57/bin/qmake xdgurl.pro - - make -j7 - - strip ./xdgurl - - mkdir -p xdgurl.AppDir/usr/bin - - cp ./xdgurl xdgurl.AppDir/ - - cp /usr/bin/{update-desktop-database,desktop-file-validate,desktop-file-install} xdgurl.AppDir/usr/bin - - wget https://transfer.sh/DHN4B/linuxdeployqt-799f704-x86-64.appimage - - chmod a+x linuxdeployqt-799f704-x86-64.appimage - - export VERSION=$(git describe --always) - - ./linuxdeployqt-*.appimage ./xdgurl.AppDir/xdgurl -qmldir=./src/app/qml -verbose=2 -bundle-non-qt-libs # https://github.com/probonopd/linuxdeployqt/issues/25 - - ./linuxdeployqt-*.appimage ./xdgurl.AppDir/xdgurl -qmldir=./src/app/qml -verbose=2 -bundle-non-qt-libs # twice because of #25 - - ./linuxdeployqt-*.appimage --appimage-extract # So that we can do the next line manually - - rm ./xdgurl.AppDir/AppRun && mv ./xdgurl.AppDir/desktopintegration ./xdgurl.AppDir/AppRun && chmod a+x ./xdgurl.AppDir/AppRun - - ./squashfs-root/usr/bin/appimagetool ./xdgurl.AppDir/ - - AI=$(ls xdgurl-release-*.AppImage) + - sh pkg/build.sh appimage + - AI=$(ls pkg/build/xdgurl-release-*.AppImage) - curl --upload-file "$AI" "https://transfer.sh/$AI" diff --git a/README.md b/README.md index 33ea45edc8c2bfb05dc6d5c47e1a15542ff175de..1f85dd2431f344db0c31f6a4a75801133bcca413 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# xdgurl [](https://travis-ci.org/xdgurl/xdgurl) +# xdgurl An install helper program for desktop stuff. @@ -13,7 +13,3 @@ https://www.linux-apps.com/p/1136805/ And please check the xdgurl wiki for more information. https://github.com/xdgurl/xdgurl/wiki - -## Download - -Each build from Travis CI is available for download as an [AppImage](Http://appimage.org) for 64-bit Linux. You can find the download link in the Travis CI [build log](https://travis-ci.org/xdgurl/xdgurl). Towords the end of the log file, look for a line with an URL that begins with with `https://transfer.sh/`. This is the download link. Download the AppImage, [make it executable](http://discourse.appimage.org/t/how-to-make-an-appimage-executable/80), and run. No root, no installation, does not touch any of the libaries on your system, can run alongside other versions you might already have. diff --git a/pkg/build.sh b/pkg/build.sh index 2e96ccf75f4e901111d8610388e331b341507d19..26bf5d0ade649fdea2f309f1934394c3b7acd7d3 100644 --- a/pkg/build.sh +++ b/pkg/build.sh @@ -55,12 +55,60 @@ build_arch() { makepkg -s } +build_appimage() { + #sudo add-apt-repository ppa:beineri/opt-qt57-xenial + #sudo apt update + #sudo apt install build-essential fuse desktop-file-utils + #sudo apt install qt57base qt57svg qt57quickcontrols qt57quickcontrols2 + #curl https://transfer.sh/DHN4B/linuxdeployqt-799f704-x86-64.appimage -o linuxdeployqt.appimage + #sudo install -m 755 -p linuxdeployqt.appimage /usr/local/bin/linuxdeployqt.appimage + #sudo modprobe fuse + #source /opt/qt57/bin/qt57-env.sh + + cd $PROJDIR + export VERSION=$(git describe --always) + + cd $PARENTDIR + tar -czvf $TMPDIR/$PROJNAME.tar.gz --exclude ".git" $PROJNAME + + mkdir $BUILDDIR + + mv $TMPDIR/$PROJNAME.tar.gz $BUILDDIR + tar -xzvf $BUILDDIR/$PROJNAME.tar.gz -C $BUILDDIR + + cd $BUILDDIR/$PROJNAME + /opt/qt57/bin/qmake + make + strip xdgurl + + cd $BUILDDIR + + mkdir -p $BUILDDIR/xdgurl.AppDir/usr/bin + install -m 755 -p $BUILDDIR/$PROJNAME/xdgurl $BUILDDIR/xdgurl.AppDir/xdgurl + install -m 644 -p $BUILDDIR/$PROJNAME/src/desktop/xdgurl.desktop $BUILDDIR/xdgurl.AppDir/xdgurl.desktop + install -m 644 -p $BUILDDIR/$PROJNAME/src/desktop/xdgurl.svg $BUILDDIR/xdgurl.AppDir/xdgurl.svg + install -m 755 -p /usr/bin/update-desktop-database $BUILDDIR/xdgurl.AppDir/usr/bin/update-desktop-database + install -m 755 -p /usr/bin/desktop-file-validate $BUILDDIR/xdgurl.AppDir/usr/bin/desktop-file-validate + install -m 755 -p /usr/bin/desktop-file-install $BUILDDIR/xdgurl.AppDir/usr/bin/desktop-file-install + + linuxdeployqt.appimage $BUILDDIR/xdgurl.AppDir/xdgurl -qmldir=$BUILDDIR/$PROJNAME/src/app/qml -verbose=2 -bundle-non-qt-libs # https://github.com/probonopd/linuxdeployqt/issues/25 + linuxdeployqt.appimage $BUILDDIR/xdgurl.AppDir/xdgurl -qmldir=$BUILDDIR/$PROJNAME/src/app/qml -verbose=2 -bundle-non-qt-libs # twice because of #25 + + rm $BUILDDIR/xdgurl.AppDir/AppRun + install -m 755 -p $BUILDDIR/$PROJNAME/src/desktop/appimage-desktopintegration $BUILDDIR/xdgurl.AppDir/AppRun + + linuxdeployqt.appimage --appimage-extract + ./squashfs-root/usr/bin/appimagetool $BUILDDIR/xdgurl.AppDir +} + if [ $1 ] && [ $1 = 'ubuntu' ]; then build_ubuntu elif [ $1 ] && [ $1 = 'fedora' ]; then build_fedora elif [ $1 ] && [ $1 = 'arch' ]; then build_arch +elif [ $1 ] && [ $1 = 'appimage' ]; then + build_appimage else - echo 'sh build.sh [ubuntu|fedora|arch]' + echo 'sh build.sh [ubuntu|fedora|arch|appimage]' fi diff --git a/xdgurl.AppDir/desktopintegration b/src/desktop/appimage-desktopintegration similarity index 99% rename from xdgurl.AppDir/desktopintegration rename to src/desktop/appimage-desktopintegration index d4de5de7996d419dd8869a26aa9fea68c89cdfe8..bc48aea4b4ea720d2ff1339d2acde0e6c730de44 100644 --- a/xdgurl.AppDir/desktopintegration +++ b/src/desktop/appimage-desktopintegration @@ -178,7 +178,7 @@ if [ -z "$SKIP" ] ; then # For TryExec quotes is not supported, so, space must be replaced to \s # https://askubuntu.com/questions/175404/how-to-add-space-to-exec-path-in-a-thumbnailer-descrption/175567 desktop-file-install --rebuild-mime-info-cache \ - --vendor=$VENDORPREFIX --set-key=Exec --set-value="\"${APPIMAGE}\" %U" \ + --vendor=$VENDORPREFIX --set-key=Exec --set-value="\"${APPIMAGE}\" %u" \ --set-key=X-AppImage-Comment --set-value="Generated by ${THIS}" \ --set-icon="$ICONFILE" --set-key=TryExec --set-value=${APPIMAGE// /\\s} "$DESKTOPFILE" \ --dir "$DESTINATION_DIR_DESKTOP" diff --git a/xdgurl.AppDir/xdgurl.desktop b/xdgurl.AppDir/xdgurl.desktop deleted file mode 100644 index aba57f117912ed2f3ba256709fd5dac7464a5735..0000000000000000000000000000000000000000 --- a/xdgurl.AppDir/xdgurl.desktop +++ /dev/null @@ -1,9 +0,0 @@ -[Desktop Entry] -Name=xdgurl -Exec=xdgurl %u -Icon=xdgurl -Type=Application -Terminal=false -NoDisplay=true -Categories=Network;Utility; -MimeType=x-scheme-handler/xdg;x-scheme-handler/xdgs; diff --git a/xdgurl.AppDir/xdgurl.png b/xdgurl.AppDir/xdgurl.png deleted file mode 100644 index d84b877c8b7fe52be9af3e03ee8331c4010477b3..0000000000000000000000000000000000000000 Binary files a/xdgurl.AppDir/xdgurl.png and /dev/null differ