Skip to content
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

Passing the system's proxy to pkg2appimage and change the downloader for downloading the dependencies. #502

Open
hongyi-zhao opened this issue Jan 10, 2022 · 0 comments

Comments

@hongyi-zhao
Copy link

hongyi-zhao commented Jan 10, 2022

I figured out the following BaiduyunNetdisk.yml adapted from here which is also used by this PR:

# BaiduyunNetDisk
# Warning: This application currently cannot run on ubuntu 16.04.7 LTS and lower.ONLY ubuntu 18.04LTS and up are supported. Working hard to fix it.
# More detail:This application require 3.3.0 of the Protocal Buffer runtime libary to run. however ubuntu 16.04.7LTS came with 2.6.1 version. I'm trying to ask the software developer for help. When there's a fix I will patch it.
#Author: linlinger
app: BaiduyunNetdisk

ingredients:
  packages:
    - libgtk-3-0
    - libnotify4
    - libnss3
    - libxss1
    - libxtst6
    - xdg-utils
    - libatspi2.0-0
    - libuuid1
    - libappindicator3-1
    - libsecret-1-0
    
  dist: focal
  sources: 
    - deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
  script:
    - curl -O https://issuepcdn.baidupcs.com/issue/netdisk/LinuxGuanjia/4.3.0/baidunetdisk_4.3.0_amd64.deb
script:
  - cp ./usr/share/applications/baidunetdisk.desktop ./
  - cp ./usr/share/icons/hicolor/scalable/apps/baidunetdisk.svg ./
  -  echo  '#!/bin/bash
  - HERE="$(dirname "$(readlink -f "${0}")")"
  - 
  - export LD_LIBRARY_PATH="$HERE/usr/lib":$LD_LIBRARY_PATH
  - export LD_LIBRARY_PATH="$HERE/usr/lib/i386-linux-gnu":$LD_LIBRARY_PATH
  - export LD_LIBRARY_PATH="$HERE/lib":$LD_LIBRARY_PATH
  - export LD_LIBRARY_PATH="$HERE/lib/i386-linux-gnu":$LD_LIBRARY_PATH
  - "$HERE/opt/baidunetdisk/baidunetdisk" "$@" | cat' > AppRun

Then I try to build the appimage for baidunetdisk with the following steps according to the guidance here

$ curl -O -Lx socks5://127.0.0.1:18888 https://github.com$(curl -Lsx socks5://127.0.0.1:18888 https://github.com/AppImage/pkg2appimage/releases | grep "pkg2appimage-.*-x86_64.AppImage" | head -n 1 | cut -d '"' -f 2)
$ chmod  +x pkg2appimage-*.AppImage
$ ./pkg2appimage-1807-x86_64.AppImage BaiduyunNetdisk.yml

I noticed that pkg2appimage will use wget as the downloader by default. And I want to achieve the following goals: Passing the system's proxy - currently, I've two proxies: http://127.0.0.1:8080 and socks5://127.0.0.1:18888 running on my host - to the download called by pkg2appimage and customize the downloader for downloading the dependencies, say, using curl.

Are there any tips for achieving this goal?

Regards,
HZ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant