-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
jdownloader2: init at 2.0 #136998
jdownloader2: init at 2.0 #136998
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 |
---|---|---|
|
@@ -9128,6 +9128,12 @@ | |
githubId = 801525; | ||
name = "rembo10"; | ||
}; | ||
remgodow = { | ||
email = "[email protected]"; | ||
github = "remgodow"; | ||
githubId = 10079854; | ||
name = "remgodow"; | ||
}; | ||
renatoGarcia = { | ||
email = "[email protected]"; | ||
github = "renatoGarcia"; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
{ stdenv, lib, fetchurl, writeScript, makeDesktopItem, copyDesktopItems, jre, imagemagick, coreutils }: | ||
|
||
let | ||
|
||
icon = fetchurl { | ||
url = "https://jdownloader.org/_media/vote/trazo.png"; | ||
sha256 = "3ebab992e7dd04ffcb6c30fee1a7e2b43f3537cb2b22124b30325d25bffdac29"; | ||
}; | ||
|
||
wrapper = writeScript "jdownloader" '' | ||
#! ${stdenv.shell} | ||
PATH=${lib.makeBinPath [ jre coreutils ]} | ||
JDJAR=''${XDG_DATA_HOME:-$HOME/.local/share}/jdownloader/JDownloader.jar | ||
dir=`dirname "$0"` | ||
if [ ! -f ''${JDJAR} ]; then | ||
install -Dm755 $dir/JDownloader.jar ''${JDJAR} | ||
fi | ||
${jre}/bin/java -jar ''${JDJAR} "''${@}" | ||
''; | ||
|
||
in stdenv.mkDerivation rec { | ||
pname = "jdownloader2"; | ||
version = "2.0"; | ||
|
||
#there is no https endpoint for this domain | ||
src = fetchurl { | ||
url = "https://archive.org/download/jdownloader_202109/JDownloader.jar"; | ||
sha256 = "9951b786e24fc3777a0df0a7b516ba53d0c8e778d6a69ebc29dcff86ee6b5829"; | ||
}; | ||
|
||
dontUnpack = true; | ||
|
||
nativeBuildInputs = [ imagemagick copyDesktopItems ]; | ||
|
||
desktopItems = [ | ||
(makeDesktopItem { | ||
name = "JDownloader 2"; | ||
exec = wrapper; | ||
icon = "jdownloader"; | ||
comment = "Free, open-source download management tool."; | ||
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. imho, "FOSS" is not relevant here. i would just say "Download manager" 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. I took that from the official website, the FOSS refers to JDownloader not the stuff you can download, I think. Sure thing, I can change that. 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. As for the package name, I can change that as well. For quite some time there were jdownloader and jdownloader2, the jdownloader is obsolete by now, but few people still use the jdownloader2 name as you can see on the repology https://repology.org/projects/?search=jdownloader |
||
desktopName = "JDownloader 2"; | ||
genericName = "JDownloader 2"; | ||
categories = "Network;"; | ||
}) | ||
]; | ||
|
||
installPhase = '' | ||
mkdir -pv $out/bin $out/share/applications | ||
cp ${src} $out/bin/JDownloader.jar | ||
|
||
# create icons | ||
for size in 16 32 48 64 72 96 128 192 512 1024; do | ||
mkdir -p $out/share/icons/hicolor/"$size"x"$size"/apps | ||
convert -resize "$size"x"$size" \ | ||
${icon} \ | ||
$out/share/icons/hicolor/"$size"x"$size"/apps/jdownloader.png | ||
done | ||
''; | ||
|
||
# Some easy metadata, in case I forget. | ||
meta = with lib; { | ||
homepage = "https://jdownloader.org/"; | ||
description = "Free, open-source download management tool"; | ||
license = licenses.gpl3Plus; | ||
platforms = platforms.unix; | ||
maintainers = with maintainers; [ remgodow ]; | ||
}; | ||
} |
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.
personally, i am NOT happy with auto-updates. should be "default off, enable on demand"
also, should be built from source. there is a mirror at https://github.com/mirror/jdownloader
the official repo is password-protected
that "source" contains 250 MByte build artifacts (wontfix*.jar
files) and 50 MByte sources (*.java
files in src/)ideally, we would download only the src/ folder, like github-downloader (via stackoverflow)
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.
So to begin with, JDownloader supports many websites via its plugin system, and those are always autoupdated. Main app does not update automatically, only checks for updates, here is more info
https://support.jdownloader.org/Knowledgebase/Article/View/updates-update-behavior
I did not try to build from source, and I'm not sure if it is possible without access to the main repo, for example they use proprietary libraries, and I believe there are closed source parts as well (kinda like VSCode). That would require some tinkering, as for ex. AUR packages are using the bootstrapper as well.
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.
Here is an issue from the mirror about missing dependencies from password-protected official repo. mirror/jdownloader#47
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.
the svn repos listed in https://jdownloader.org/knowledge/wiki/development/get-started are public, the issue is only a request to mirror these repos
im afraid yes ... im trying to build from source with headless eclipse, but at the end of the day, there will still be some binary blobs (
*.jar
files with closed source), so jdownloader has licenseunfree
→ use containers for better security?
pyload is missing : /
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.
https://github.com/mviereck/x11docker (via)
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.
https://github.com/jlesage/docker-jdownloader-2 has invented this wheel already : )
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.
yepp
jdownloader requires closed sources:
per jdownloader/build/newBuild/build.xml
i want to patch the myjdownloaderclient ...
in headless mode, jdownloader requires a valid account for myjdownloader
jd ignores json config
i have not-yet found a way to use a self-hosted api server, or to disable this completely ...
so much for "untrusted" software
relevant configkey is serverhost (default
api.jdownloader.org
) incfg/org.jdownloader.api.myjdownloader.MyJDownloaderSettings.json
but jd always says
so im back to binary patching ... or
pyLoad
binary patching - its simple, its fun
let jd update, to download jar files
get Core.jar from approot
open recaf
open Core.jar
classes > org > jd > api > myjd > myjdcontroller
Ctrl+F for: boolean isAlwaysConnectRequired
edit the assembler code
Ctrl+S, file > export > export to Core.patched.jar
in jd approot, replace Core.jar with Core.patched.jar
now, jd starts in headless mode, without requiring myjd login