-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Add Motrix #2334
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Motrix #2334
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# EditorConfig helps developers define and maintain consistent coding styles | ||
# between different editors and IDEs (editorconfig.org) | ||
|
||
root = true | ||
|
||
[*] | ||
continuation_indent_size = 4 | ||
indent_size = 2 | ||
indent_style = space | ||
max_line_length = 120 | ||
|
||
# Keep these unchanged | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# | ||
# https://help.github.com/articles/dealing-with-line-endings/#platform-all | ||
* text eol=lf |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# Modifed from https://github.com/flathub/net.veloren.veloren/raw/master/net.veloren.veloren.yaml | ||
|
||
name: Auto update | ||
|
||
env: | ||
BUILDER_TOOLS_URL: https://github.com/flatpak/flatpak-builder-tools | ||
BUILDER_TOOLS_BRANCH: master | ||
YQ_VERSION: "v4.6.1" | ||
YQ_BINARY: yq_linux_amd64 | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
update: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Install dependencies | ||
run: | | ||
set -e | ||
sudo apt install python3-toml python3-aiohttp | ||
|
||
- uses: actions/checkout@v2 | ||
|
||
- name: Download flatpak-builder-tools | ||
run: | | ||
git clone -b ${BUILDER_TOOLS_BRANCH} \ | ||
${BUILDER_TOOLS_URL} \ | ||
builder-tools | ||
|
||
# Rather than track the tip of a branch | ||
- name: Get the current tag | ||
run: | | ||
set -e | ||
|
||
mkdir ~/bin | ||
wget https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/${YQ_BINARY} -O ~/bin/yq && \ | ||
chmod +x ~/bin/yq | ||
|
||
TAG=`~/bin/yq e '.modules.[] | select(.name == "motrix") | .sources.[] | select(.url == "https://github.com/agalwood/Motrix.git") | .tag' net.agalwood.Motrix.yml` | ||
|
||
echo "TAG=$TAG" >> $GITHUB_ENV | ||
|
||
- name: Run update | ||
run: | | ||
set -e | ||
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | ||
git config user.name "Workflow trigger" | ||
python3 ./update.py net.agalwood.Motrix-git.json --ref ${{ env.TAG }} -g builder-tools/node/flatpak-node-generator.py --generator-arg=--electron-node-headers --generator-arg=--xdg-layout --generator-arg=-r --generator-arg=yarn --generator-arg=yarn.lock | ||
git push https://${GITHUB_ACTOR}:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# | ||
# Excludes | ||
.flatpak-builder/ | ||
.idea/ | ||
build/ | ||
flatpak-builder-tools/ | ||
spellchecker/ | ||
standard-notes/ | ||
.flatpak | ||
.DS_Store | ||
Thumbs.db | ||
*.iml | ||
|
||
# | ||
# Includes |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "shared-modules"] | ||
path = shared-modules | ||
url = https://github.com/flathub/shared-modules |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"type": "git", | ||
"url": "https://github.com/agalwood/Motrix.git", | ||
"ref": "v1.6.10" | ||
} | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
[Desktop Entry] | ||
Categories=Network;FileTransfer; | ||
Exec=start-motrix %U | ||
GenericName=Torrent Client | ||
Icon=net.agalwood.Motrix | ||
Keywords=Torrent;Bittorrent;Download; | ||
Name=Motrix | ||
Comment=A full-featured download manager | ||
StartupNotify=true | ||
StartupWMClass=motrix | ||
Terminal=false | ||
Type=Application | ||
MimeType=application/x-bittorrent;x-scheme-handler/magnet;x-scheme-handler/mo;x-scheme-handler/motrix;x-scheme-handler/thunder; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<component type="desktop-application"> | ||
<id>net.agalwood.Motrix</id> | ||
|
||
<name>Motrix</name> | ||
<summary>A full-featured download manager</summary> | ||
|
||
<developer_name>AGALWOOD</developer_name> | ||
|
||
<project_license>MIT</project_license> | ||
<metadata_license>CC0-1.0</metadata_license> | ||
|
||
<recommends> | ||
<control>pointing</control> | ||
<control>keyboard</control> | ||
<control>touch</control> | ||
</recommends> | ||
|
||
<categories> | ||
<category>Network</category> | ||
<category>FileTransfer</category> | ||
</categories> | ||
|
||
<description> | ||
<p> | ||
A full-featured download manager that supports downloading HTTP, FTP, BitTorrent, Magnet, etc. | ||
</p> | ||
<ul> | ||
<li> | ||
🕹 | ||
Simple and clear user interface | ||
</li> | ||
<li> | ||
🦄 | ||
Support BitTorrent & Magnet | ||
</li> | ||
<li> | ||
☑️ | ||
BitTorrent selective download | ||
</li> | ||
<li> | ||
📡 | ||
Update tracker list every day automatically | ||
</li> | ||
<li> | ||
🔌 | ||
UPnP & NAT-PMP Port Mapping | ||
</li> | ||
<li> | ||
🎛 | ||
Up to 10 tasks concurrently download | ||
</li> | ||
<li> | ||
🚀 | ||
Single task maximum support 64 thread download | ||
</li> | ||
<li> | ||
🕶 | ||
Mock User-Agent | ||
</li> | ||
<li> | ||
🔔 | ||
Download completed Notification | ||
</li> | ||
<li> | ||
💻 | ||
Ready for Touch Bar (Mac only) | ||
</li> | ||
<li> | ||
🤖 | ||
Resident system tray for quick operation | ||
</li> | ||
<li> | ||
🌑 | ||
Dark mode | ||
</li> | ||
<li> | ||
🗑 | ||
Delete related files when removing tasks (optional) | ||
</li> | ||
<li> | ||
🌍 | ||
I18n | ||
</li> | ||
<li> | ||
🛠 | ||
More features in development | ||
</li> | ||
</ul> | ||
</description> | ||
|
||
<launchable type="desktop-id">net.agalwood.Motrix.desktop</launchable> | ||
|
||
<url type="homepage">https://motrix.app/</url> | ||
<url type="bugtracker">https://github.com/agalwood/Motrix/issues/</url> | ||
<url type="help">https://github.com/agalwood/Motrix/wiki</url> F438 | ||
<url type="translate">https://github.com/agalwood/Motrix/blob/master/CONTRIBUTING.md#-translation-guide</url> | ||
|
||
<content_rating type="oars-1.1" /> | ||
|
||
<screenshots> | ||
<screenshot type="default"> | ||
<image>https://github.com/agalwood/Motrix/raw/master/screenshots/electron-apps-banner.png</image> | ||
</screenshot> | ||
<screenshot> | ||
<image>https://github.com/agalwood/Motrix/raw/master/screenshots/motrix-task-list-downloading-light%402x.png</image> | ||
</screenshot> | ||
<screenshot> | ||
<image>https://github.com/agalwood/Motrix/raw/master/screenshots/motrix-task-list-downloading-dark%402x.png</image> | ||
</screenshot> | ||
</screenshots> | ||
|
||
<releases> | ||
<release version="1.6.10" date="2021-05-07" /> | ||
</releases> | ||
</component> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,140 @@ | ||
app-id: net.agalwood.Motrix | ||
runtime: org.freedesktop.Platform | ||
runtime-version: "20.08" | ||
sdk: org.freedesktop.Sdk | ||
base: org.electronjs.Electron2.BaseApp | ||
base-version: "20.08" | ||
sdk-extensions: | ||
- org.freedesktop.Sdk.Extension.node14 | ||
# Electron doesn't use a traditional locale format so separate-locales is useless. | ||
separate-locales: false | ||
command: start-motrix | ||
finish-args: | ||
- --device=dri | ||
- --filesystem=xdg-download | ||
- --filesystem=xdg-documents | ||
- --share=ipc | ||
- --share=network | ||
- --socket=x11 | ||
- --talk-name=org.freedesktop.Notifications | ||
modules: | ||
- shared-modules/libsecret/libsecret.json | ||
|
||
- name: yarn | ||
buildsystem: simple | ||
build-commands: | ||
- cp -a * $FLATPAK_DEST | ||
# Only used for building, so clean it up afterwards. | ||
cleanup: | ||
- "*" | ||
sources: | ||
- type: archive | ||
url: https://github.com/yarnpkg/yarn/releases/download/v1.22.10/yarn-v1.22.10.tar.gz | ||
sha256: 7e433d4a77e2c79e6a7ae4866782608a8e8bcad3ec6783580577c59538381a6e | ||
x-checker-data: | ||
type: anitya | ||
project-id: 13363 | ||
url-template: https://github.com/yarnpkg/yarn/releases/download/$version/yarn-v$version.tar.gz | ||
- name: motrix | ||
buildsystem: simple | ||
build-options: | ||
# Add the node bin directory. | ||
append-path: /usr/lib/sdk/node14/bin:/app/yarn/bin:/run/build/motrix/flatpak-node/chromedrive | ||
env: | ||
# Don't add ELECTRON_CACHE | ||
XDG_CACHE_HOME: /run/build/motrix/flatpak-node/cache | ||
# npm_config_nodedir: /usr/lib/sdk/node14 | ||
npm_config_offline: "true" | ||
npm_config_no_save: "true" | ||
npm_config_cache: /run/build/motrix/flatpak-node/npm-cache | ||
npm_config_loglevel: verbose | ||
# https://stackoverflow.com/questions/25146976/can-i-get-npm-gyp-to-use-ccache | ||
CXX: ccache g++ | ||
CC: ccache gcc | ||
arch: | ||
# https://github.com/sass/node-sass/issues/3033#issuecomment-763180778 | ||
# The architecture of Electron, see https://electronjs.org/docs/tutorial/support#supported-platforms | ||
# for supported architectures. | ||
i386: | ||
env: | ||
npm_config_arch: ia32 | ||
npm_config_target_arch: ia32 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. neither (it's harmless though, just clutter) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Well, let's just leave it there? As they are supported by electron and someone might find it useful |
||
x86_64: | ||
env: | ||
npm_config_arch: x64 | ||
npm_config_target_arch: x64 | ||
arm: | ||
env: | ||
npm_config_arch: armv7l | ||
npm_config_target_arch: armv7l | ||
aarch64: | ||
env: | ||
npm_config_arch: arm64 | ||
npm_config_target_arch: arm64 | ||
|
||
build-commands: | ||
# Use the offline mirror. | ||
- HOME=$PWD yarn config --offline set yarn-offline-mirror $FLATPAK_BUILDER_BUILDDIR/flatpak-node/yarn-mirror | ||
|
||
# Translated from .travis.yml | ||
# - yarn --offline add -g xvfb-maybe | ||
- yarn --offline --pure-lockfile --$npm_config_arch | ||
|
||
- node $FLATPAK_BUILDER_BUILDDIR/.electron-vue/build.js | ||
- yarn --offline run electron-builder --linux dir --$npm_config_arch -c.linux.target=dir | ||
--publish=never | ||
|
||
# Remove unneeded files | ||
- rm $FLATPAK_BUILDER_BUILDDIR/release/linux*-unpacked/chrome-sandbox | ||
|
||
# Copy the resulting, unpacked directory to $FLATPAK_DEST. | ||
- cp -r $FLATPAK_BUILDER_BUILDDIR/release/linux*-unpacked $FLATPAK_DEST/motrix | ||
|
||
# Retire this at some point when an SVG is available | ||
- for size in 512; do [[ -e "static/${size}x${size}.png" ]] && install | ||
-Dm644 "$FLATPAK_BUILDER_BUILDDIR/static/${size}x${size}.png" "/app/share/icons/hicolor/${size}x${size}/apps/${FLATPAK_ID}.png"; | ||
done | ||
- install -Dm644 "$FLATPAK_BUILDER_BUILDDIR/static/mo-tray-dark-normal@2x.png" "/app/share/icons/hicolor/symbolic/apps/${FLATPAK_ID}-symbolic.png" | ||
- cp -r $FLATPAK_BUILDER_BUILDDIR/extra/linux/. $FLATPAK_DEST/motrix | ||
sources: | ||
- type: git | ||
url: https://github.com/agalwood/Motrix.git | ||
tag: v1.6.10 | ||
commit: 166aba77474df5dd65da20ee1548004c9f078bdd | ||
x-checker-data: | ||
type: anitya | ||
project-id: 197314 | ||
tag-template: v$version | ||
stable-only: true | ||
# Add the flatpak-node-generator generated sources. | ||
# Note to generate recursively with -r since the repo is composed by submodules | ||
# No need to generate a separate one for ./app | ||
- generated-sources.json | ||
- name: start-script | ||
buildsystem: simple | ||
build-commands: | ||
# Install the wrapper script to start it. | ||
- install -Dm 755 start-motrix.sh $FLATPAK_DEST/bin/start-motrix | ||
sources: | ||
# Our runner script. | ||
- type: script | ||
dest-filename: start-motrix.sh | ||
commands: | ||
# Use zypak to call the electron binary to enable sandboxing and prevents no sandbox error | ||
# Note the hyphen | ||
- export TMPDIR=$XDG_RUNTIME_DIR/app/$FLATPAK_ID | ||
- zypak-wrapper /app/motrix/motrix "$@" | ||
- name: metainfo | ||
buildsystem: simple | ||
build-commands: | ||
- install -Dm644 net.agalwood.Motrix.metainfo.xml $FLATPAK_DEST/share/metainfo/$FLATPAK_ID.metainfo.xml | ||
sources: | ||
- type: file | ||
path: net.agalwood.Motrix.metainfo.xml | ||
- name: desktop-entry | ||
buildsystem: simple | ||
build-commands: | ||
- install -Dm644 net.agalwood.Motrix.desktop $FLATPAK_DEST/share/applications/$FLATPAK_ID.desktop | ||
sources: | ||
- type: file | ||
path: net.agalwood.Motrix.desktop |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this file isn't referenced anywhere in the manifest.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. It's used to auto update the
generated-sources.json
: https://github.com/flathub/flathub/pull/2334/files#diff-3db03b056e588432b22814fac93c11d44c8a4d8d958713cd2bf70b1d1d0ab48dR107