├── .github └── workflows │ └── release.yml ├── AppRun ├── LICENSE ├── README.md └── discord.desktop /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | 2 | name: Release 3 | on: 4 | schedule: 5 | - cron: "5 */12 * * *" 6 | push: 7 | branches: 8 | - "master" 9 | workflow_dispatch: 10 | 11 | 12 | jobs: 13 | Discord: 14 | runs-on: ubuntu-22.04 15 | strategy: 16 | matrix: 17 | version: ['3.8'] 18 | steps: 19 | - uses: actions/checkout@v2 20 | 21 | - name: Download Discord 22 | run: | 23 | mkdir discord 24 | cd discord 25 | wget https://discord.com/api/download\?platform\=linux\&format\=tar.gz 26 | mv * discord.tar.gz 27 | tar -xf discord.tar.gz 28 | cd .. 29 | 30 | - name: Patch to include files 31 | run: | 32 | cd discord 33 | cp ../AppRun Discord/. 34 | chmod +x Discord/AppRun 35 | cp ../discord.desktop Discord/. 36 | cd .. 37 | 38 | - name: Patch AppImage 39 | run: | 40 | sudo apt install libfuse2 -y 41 | cd discord 42 | wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage 43 | chmod +x *.AppImage 44 | ./appimagetool-x86_64.AppImage Discord -n -u 'gh-releases-zsync|srevinsaju|discord-appimage|stable|Discord*.AppImage.zsync' Discord-$(cat Discord/resources/build_info.json | jq -r .version)-x86_64.AppImage 45 | mkdir dist 46 | mv Discord*.AppImage dist/. 47 | mv *.zsync dist/. 48 | cd dist 49 | chmod +x *.AppImage 50 | cd .. 51 | 52 | 53 | - name: Upload artifact 54 | uses: actions/upload-artifact@v4 55 | with: 56 | name: discord-continuous-x86_64.AppImage 57 | path: 'discord/dist/*' 58 | 59 | 60 | Release: 61 | needs: [Discord] 62 | runs-on: ubuntu-latest 63 | 64 | steps: 65 | - uses: actions/download-artifact@v4 66 | with: 67 | name: discord-continuous-x86_64.AppImage 68 | path: ./artifacts-dir 69 | 70 | - name: Release 71 | uses: marvinpinto/action-automatic-releases@latest 72 | with: 73 | title: Discord Stable AppImage Builds 74 | automatic_release_tag: stable 75 | prerelease: false 76 | draft: false 77 | files: | 78 | ./artifacts-dir/* 79 | repo_token: ${{ secrets.GITHUB_TOKEN }} 80 | 81 | Discord-PTB: 82 | runs-on: ubuntu-22.04 83 | strategy: 84 | matrix: 85 | version: ['3.8'] 86 | steps: 87 | - uses: actions/checkout@v2 88 | 89 | - name: Download Discord 90 | run: | 91 | mkdir discord 92 | cd discord 93 | wget https://discord.com/api/download/ptb\?platform\=linux\&format\=tar.gz 94 | mv * discord.tar.gz 95 | tar -xf discord.tar.gz 96 | cd .. 97 | 98 | - name: Patch to include files 99 | run: | 100 | cd discord 101 | cp ../AppRun DiscordPTB/. 102 | chmod +x DiscordPTB/AppRun 103 | sed 's,BIN="$APPDIR/Discord",BIN="$APPDIR/DiscordPTB",g' -i DiscordPTB/AppRun 104 | cp ../discord.desktop DiscordPTB/. 105 | cd .. 106 | 107 | - name: Patch AppImage 108 | run: | 109 | sudo apt install libfuse2 -y 110 | cd discord 111 | wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage 112 | chmod +x *.AppImage 113 | rm DiscordPTB/discord*ptb*.desktop 114 | ls DiscordPTB 115 | ./appimagetool-x86_64.AppImage DiscordPTB -n -u 'gh-releases-zsync|srevinsaju|discord-appimage|canary|Discord*.AppImage.zsync' Discord-$(cat DiscordPTB/resources/build_info.json | jq -r .version)-x86_64.AppImage 116 | mkdir dist 117 | mv Discord*.AppImage dist/. 118 | mv *.zsync dist/. 119 | cd dist 120 | chmod +x *.AppImage 121 | cd .. 122 | 123 | 124 | - name: Upload artifact 125 | uses: actions/upload-artifact@v4 126 | with: 127 | name: discord-ptb-continuous-x86_64.AppImage 128 | path: 'discord/dist/*' 129 | 130 | 131 | Release-PTB: 132 | needs: [Discord-PTB] 133 | runs-on: ubuntu-latest 134 | 135 | steps: 136 | - uses: actions/download-artifact@v4 137 | with: 138 | name: discord-ptb-continuous-x86_64.AppImage 139 | path: ./artifacts-dir 140 | 141 | - name: Release 142 | uses: marvinpinto/action-automatic-releases@latest 143 | with: 144 | title: Discord Public Test AppImage Builds 145 | automatic_release_tag: ptb 146 | prerelease: true 147 | draft: false 148 | files: | 149 | ./artifacts-dir/* 150 | repo_token: ${{ secrets.GITHUB_TOKEN }} 151 | 152 | Discord-Canary: 153 | runs-on: ubuntu-22.04 154 | strategy: 155 | matrix: 156 | version: ['3.8'] 157 | steps: 158 | - uses: actions/checkout@v2 159 | 160 | - name: Download Discord 161 | run: | 162 | mkdir discord 163 | cd discord 164 | wget https://discord.com/api/download/canary\?platform\=linux\&format\=tar.gz 165 | mv * discord.tar.gz 166 | tar -xf discord.tar.gz 167 | cd .. 168 | 169 | - name: Patch to include files 170 | run: | 171 | cd discord 172 | cp ../AppRun DiscordCanary/. 173 | chmod +x DiscordCanary/AppRun 174 | sed 's,BIN="$APPDIR/Discord",BIN="$APPDIR/DiscordCanary",g' -i DiscordCanary/AppRun 175 | cp ../discord.desktop DiscordCanary/. 176 | cd .. 177 | 178 | - name: Patch AppImage 179 | run: | 180 | sudo apt install libfuse2 -y 181 | cd discord 182 | wget https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage 183 | chmod +x *.AppImage 184 | rm DiscordCanary/discord*canary*.desktop 185 | ls DiscordCanary 186 | ./appimagetool-x86_64.AppImage DiscordCanary -n -u 'gh-releases-zsync|srevinsaju|discord-appimage|canary|Discord*.AppImage.zsync' Discord-$(cat DiscordCanary/resources/build_info.json | jq -r .version)-x86_64.AppImage 187 | mkdir dist 188 | mv Discord*.AppImage dist/. 189 | mv *.zsync dist/. 190 | cd dist 191 | chmod +x *.AppImage 192 | cd .. 193 | 194 | 195 | - name: Upload artifact 196 | uses: actions/upload-artifact@v4 197 | with: 198 | name: discord-canary-continuous-x86_64.AppImage 199 | path: 'discord/dist/*' 200 | 201 | 202 | Release-Canary: 203 | needs: [Discord-Canary] 204 | runs-on: ubuntu-latest 205 | 206 | steps: 207 | - uses: actions/download-artifact@v4 208 | with: 209 | name: discord-canary-continuous-x86_64.AppImage 210 | path: ./artifacts-dir 211 | 212 | - name: Release 213 | uses: marvinpinto/action-automatic-releases@latest 214 | with: 215 | title: Discord Canary AppImage Builds 216 | automatic_release_tag: canary 217 | prerelease: true 218 | draft: false 219 | files: | 220 | ./artifacts-dir/* 221 | repo_token: ${{ secrets.GITHUB_TOKEN }} 222 | -------------------------------------------------------------------------------- /AppRun: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | 4 | if [ ! -z "$DEBUG" ] ; then 5 | env 6 | set -x 7 | fi 8 | 9 | THIS="$0" 10 | # http://stackoverflow.com/questions/3190818/ 11 | args=("$@") 12 | NUMBER_OF_ARGS="$#" 13 | 14 | if [ -z "$APPDIR" ] ; then 15 | # Find the AppDir. It is the directory that contains AppRun. 16 | # This assumes that this script resides inside the AppDir or a subdirectory. 17 | # If this script is run inside an AppImage, then the AppImage runtime likely has already set $APPDIR 18 | path="$(dirname "$(readlink -f "${THIS}")")" 19 | while [[ "$path" != "" && ! -e "$path/$1" ]]; do 20 | path=${path%/*} 21 | done 22 | export APPDIR="$path" 23 | fi 24 | path="$(dirname "$(readlink -f "${THIS}")")" 25 | export APPDIR="$path" 26 | echo $APPDIR 27 | 28 | export PATH="${APPDIR}:${APPDIR}/usr/sbin:${PATH}" 29 | export XDG_DATA_DIRS="./share/:/usr/share/gnome:/usr/local/share/:/usr/share/:${XDG_DATA_DIRS}" 30 | export LD_LIBRARY_PATH="${APPDIR}/usr/lib:${LD_LIBRARY_PATH}" 31 | export XDG_DATA_DIRS="${APPDIR}"/usr/share/:"${XDG_DATA_DIRS}":/usr/share/gnome/:/usr/local/share/:/usr/share/ 32 | export GSETTINGS_SCHEMA_DIR="${APPDIR}/usr/share/glib-2.0/schemas:${GSETTINGS_SCHEMA_DIR}" 33 | 34 | BIN="$APPDIR/Discord" 35 | 36 | if [ -z "$APPIMAGE_EXIT_AFTER_INSTALL" ] ; then 37 | trap atexit EXIT 38 | fi 39 | 40 | isEulaAccepted=1 41 | 42 | atexit() 43 | { 44 | if [ $isEulaAccepted == 1 ] ; then 45 | if [ $NUMBER_OF_ARGS -eq 0 ] ; then 46 | exec "$BIN" 47 | else 48 | exec "$BIN" "${args[@]}" 49 | fi 50 | fi 51 | } 52 | 53 | error() 54 | { 55 | if [ -x /usr/bin/zenity ] ; then 56 | LD_LIBRARY_PATH="" zenity --error --text "${1}" 2>/dev/null 57 | elif [ -x /usr/bin/kdialog ] ; then 58 | LD_LIBRARY_PATH="" kdialog --msgbox "${1}" 2>/dev/null 59 | elif [ -x /usr/bin/Xdialog ] ; then 60 | LD_LIBRARY_PATH="" Xdialog --msgbox "${1}" 2>/dev/null 61 | else 62 | echo "${1}" 63 | fi 64 | exit 1 65 | } 66 | 67 | yesno() 68 | { 69 | TITLE=$1 70 | TEXT=$2 71 | if [ -x /usr/bin/zenity ] ; then 72 | LD_LIBRARY_PATH="" zenity --question --title="$TITLE" --text="$TEXT" 2>/dev/null || exit 0 73 | elif [ -x /usr/bin/kdialog ] ; then 74 | LD_LIBRARY_PATH="" kdialog --title "$TITLE" --yesno "$TEXT" || exit 0 75 | elif [ -x /usr/bin/Xdialog ] ; then 76 | LD_LIBRARY_PATH="" Xdialog --title "$TITLE" --clear --yesno "$TEXT" 10 80 || exit 0 77 | else 78 | echo "zenity, kdialog, Xdialog missing. Skipping ${THIS}." 79 | exit 0 80 | fi 81 | } 82 | 83 | check_dep() 84 | { 85 | DEP=$1 86 | if [ -z $(which "$DEP") ] ; then 87 | echo "$DEP is missing. Skipping ${THIS}." 88 | exit 0 89 | fi 90 | } 91 | 92 | if [ -z "$APPIMAGE" ] ; then 93 | APPIMAGE="$APPDIR/AppRun" 94 | # not running from within an AppImage; hence using the AppRun for Exec= 95 | fi 96 | 97 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2020 Srevin Saju 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 |
7 | (Unofficial) Continuous Integration to create Discord AppImages directly from `*.tar.gz`.
8 |
9 | Report bug
10 | ·
11 | Request feature
12 | ·
13 | Download AppImage
14 |