GithubHelp home page GithubHelp logo

persepolisdm / persepolis-windows-package-build Goto Github PK

View Code? Open in Web Editor NEW
29.0 4.0 10.0 50.69 MB

An instruction to build persepolis from source for windows

Home Page: https://persepolisdm.github.io/persepolis-windows-package-build/

License: GNU General Public License v3.0

Inno Setup 75.37% Python 24.63%
python inno-setup packaging pyinstaller windows

persepolis-windows-package-build's Introduction

Persepolis Microsoft Windows package build

windows package build for Persepolis Download Manager

We build stable releases safely and you don't need to build it yourself. You can download Persepolis Download Manager for Microsoft Windows from release page. If you want to build Persepolis for Windows yourself, then this instruction can help you.

step 1: Preparing

You can download project from our github page or using git clients.

You can download the stable version Source code from release page or last git version from the master branch. After downloading or cloning, extract and enter persepolis path. you can see this structure for directories now.

persepolis
├── man
├── persepolis
│   ├── gui
│   └── scripts
├── resources
├── test
└── xdg

You also need some file that we put them in this repository and we use them to build persepolis. so clone or download this repository alongside persepolis directory, we should have this structure finally:

persepolisarea
├── persepolis-windows-package-build
└── persepolis
  • 1-2 python

persepolis has been written in python so we need python3 to build it, after freezing and building the package there are no more need to python and its library. Download latest python3 and install it.

remember the destination directory and enable the “Add Python to PATH” option.

  • 1-3 dependencies & libraries

  • Install virtualenv with pip install virtualenv From windows terminal (powershell)

  • Create an environment with virtualenv venv in persepolis directory

  • Active it with .\venv\Scripts\activate

  • Install these libraries with pip

    pip install PySide6 requests pypiwin32 setproctitle psutil yt_dlp pyinstaller

  • Persepolis is gui for Aria2 so we need it, you can download latest or specific version according to your system from Aria2 release page

  • Persepolis uses ffmpeg for mixing videos (more info.). Download ffmpeg (we use latest gpl version).

  • Persepolis uses sthp to enable socks proxy option, so download the binary from releases page

step 2: test and run

Move aria2c.exe, sthp.exe and ffmpeg.exe to the test folder next to the test.py according to your system architecture

Open Windows terminal and Enter cloned persepolis directory with cd command and active env. run persepolis as test with this command.

python test/test.py

  • now persepolis should run as a python script. If you get some error you may had mistake. Open an issue here, We will help you :)

step 3: build and freeze

Now let's build persepolis!

run Windows terminal and enter persepolis folder and active env, so build Pesrpolis browser integration by pyinstaller with this command:

pyinstaller '.\resources\PersepolisBI.py' -F -i '..\persepolis-windows-package-build\persepolis2.ico' -n "PersepolisBI" --version-file '..\persepolis-windows-package-build\bi_version.py' --clean

and build persepolis with this command:

pyinstaller '.\persepolis\Persepolis Download Manager.py' -F -w -i '..\persepolis-windows-package-build\persepolis1.ico' -n "Persepolis Download Manager" --version-file '..\persepolis-windows-package-build\version.py' --clean

-w means it is a windowed app, not a console one.

-F Create a one-file bundled executable.

-i perseplois icon.

-n name of bundled executable.

--version-file add persepolis version resource from version.py to the exe.

If everything goes well, you have some output like this

pyinstaller

If you get error messages, you made mistake. Open an issue here, We will help you :)

  • After this, you have bundled executable file in dist folder, Move ffmpeg.exe, PersepolisBI.exe, sthp.exe and aria2c.exe next to the Persepolis Download Manager.exe. you can run it and test it, it works perfectly

step 4 (Optional): create package installer

You have executable perseplois and you can put it everywhere (next to the and ffmpeg.exe, PersepolisBI, sthp.exe and aria2c.exe) but we going to create a installer for windows.

  • Download and install Inno Setup
  • you can create your installation or use our standard one, I put theme in this repository for both 32 and 64 architecture (.iss files). you should edit [Files] section and LicenseFile, InfoAfterFile, OutputBaseFilename, SetupIconFile, UninstallDisplayIcon according to your directory name, also I put license, persepolis readme, after installation text and icon in this repository.
  • Build and compile installation if everything goes well, you have a persepolis installer.

Enjoy it. 😊

persepolis-windows-package-build's People

Contributors

alireza-amirsamimi avatar mostafaasadi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

persepolis-windows-package-build's Issues

Can we have a compiled .exe file

It's very time-consuming to build. So why don't you release a build version? That would be very helpful. Also, deb for linux.
Please think about it. Not everyone can build.

What are the advantages of "one-file" executable?

Hi.
Persepolis is currently bundled as a one-file executable (pyinstaller output). On each call, first it loads so many files in user temporary directory then launchs main gui. It takes some seconds and also bloats temp directory. Sometimes created temp folder will not clean after exit. It leads to 1GB or more on some cases.
I made a non "single-file" build. It runs faster and does not need to cache so much file.
I am just curious to know why you decided to use "single-file"?

Please Update this Repository

Hi.
This repository is outdated. For example ffmpeg is not included. Can you update this repository?
I am interested in debugging some windows related issues of persepolis as a playground to learn more about python ad javascript (web-extension).
I had no problem to set up an editable installation of persepolis. I just want to be able make an installer after bug-fixing is completed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.