compile peazip from sources         
DOWNLOAD PEAZIP         
ONLINE SUPPORT         
SCREENSHOTS         
BENCHMARKS         
DONATE


build peazip package from sources







Sources 10.1.0
free rar zip software

COMPILE AND BUILD PEAZIP FROM SOURCES


Compile and build PeaZip cross-platform archiver from source code with Lazarus/FPC

Port PeaZip to new Operating Systems and architectures

Assemble installers for more package managers


Software license: LGPL3, free of charge for any use
Supported systems: All target Operating Systems and architectures supported by Lazarus/FPC

download peazip code basePeaZip source package (ZIP)

Sources of PeaZip as ZIP package, requires Lazarus / FreePascal IDE for building and compiling the app

peazip deb rpm packages structurePeaZip packages examples (ZIP)

Examples of DEB and RPM packages structures to help building packages for distribution

PeaZip Git repository

PeaZip project Git repository on GitHub
Port PeaZip to new Operating Systems and architectures
Assemble installers for more package managers

ALL DOWNLOADS

PEAZIP LINUX

PEAZIP MACOS

PEAZIP WINDOWS

SOURCES

PLUGINS

THEMES

Download PeaZip free archiver sources

PeaZip free archiver sources are released under GNU LGPL v3 Open Source license, and are avilable as:

  • Git repository on GitHub
  • standalone, downloadable ZIP package containing source files
"Packages examples" peazip-x.y.z.pack.zip package is an optional addition to source package, as it is simply meant to help developers to create installer packages for different package management systems, and to provides examples of directory structures used to create DEB and RPM packages for the current release.

PeaZip is written in FreePascalfreepascal compiler, a powerful Open Source cross-platform programming language highly compatible with Delphi and ObjectPascal, and Lazaruslazarus ide IDE is required to compile, build, and edit the source code.

Lazarus/FPC supports many more platformsbuild cross platform applications (architectures and Operating Systems) than the ones PeaZip is built/tested for, following the "Write once, compile anywhere"compile peazip sources (WOCA) philosophy.
While PeaZip sources contains ASM sections, a Pure Pascal alternative implementation is always available to allow porting to new architectures.

Lazarus/FPC also supports multiple widgetsets (Win32/64, WinCE, GTK1, GTK2, Qt4/5, Carbon, Cocoa, fpGUI) to allow compilation of GUI applications for the various supported systems (BSD, Darwin, Linux, macOS, Windows/ReactOS) and to create different “flavours” of the application for platforms supporting multiple widgetsets, e.g. Linux.

In PeaZip's sourcecode platform-specific, OS-specific, and architecture-specific code sections are contained in conditional compilations blocks.

Portable and installable packages shares the same code base, PeaZip is natively an auto contained application as Lazarus tries to statically link the binaries containing all the dependencies (or as much as possible); only the packaging changes between the versions.
Windows setup scripts (.iss files) are written using InnoSetup, which also uses a Delphi-like syntax and are easily understandable for developers proficient in Delphi or ObjectPascal dialects.

Please note that PeaZip provides strong cryptographic functions, so please refer to cryptography laws and regulations that may apply in your country.


Quick start to compile PeaZip and build a distributable package


Source package contains "dev" subdirectory containing sources to compile the application's binaries, "res" subdirectory containing resources needed by the application, and a readme.txt file containing instructions to compile peazip and build a distributable package, either as Portable application and for many different package management systems.
  1. Download and install Lazarus IDEcross platfrom development for your OS / architecture platform. In case of troubles installing Lazarus, its foruminstall support is an excellent starting point for obtaining support from a friendly and competent community of developers using Lazarus / FreePascal.
  2. Add (peazip sources)/dev/metadarkstyle/metadarkstyle.lpk Lazarus package to the project  - otherwise it will be asked later by the IDE, reporting missing package error, when trying to compile peazip or pea binaries
  3. Compile sources in "dev" subdirectory, see below "Notes for developers" section for details about manual and automated compiling.
  4. Compiled binaries must be moved up one level, into package's root folder (where readme.txt file is); now dev subdir is no longer needed.
  5. Find appropriate builds of third party binaries for the intended target OS and architecture, and copy them into (peazip)/res/bin/ subfolders: please note that "res" folder provided in source package (as template for creating a working PeaZip port / distributable package) contains only non- OS / architecture -dependant resources, so res/bin is simply a placeholder, not containing actual binaries but rather only the directories the binaries need to be copied in.
  6. Zip the package to use / distribute it as a portable application, or
  7. Read further suggestions below in "Notes for developers" section to create an installable package for your intended OS target

Quick suggestion about the Lazarus IDE

On Linux and BSD, download and install FreePascal sources, FreePascal compiler, and Lazarus IDE packages from the Lazarus repository.
Lazarus currently uses GTK2 widget set by default on Linux, but it is possible to target other widget sets (and arcihtectures, in Project > Project Options, Configuration and Target),in example:
    • Qt5 requires installation of Qt bindingsqt5 apps
    • GTK3 (currently in alpha stage) requires GTK development library, e.g. in Ubuntu use sudo apt-get install libgtk-3-dev
 It is also possible to install Lazarus from your distribution's repository, and in some cases even non-GTK2 versions of Lazarus are available, automatically handling the extra dependencies.

On macOS, download and install FreePascal sources, FreePascal compiler, and Lazarus IDE packages from the Lazarus repository.
You will also need to install Apple's Xcodeapple xcode, and to separately install standalone Xcode Command Line Tools, using the command:
sudo xcode-select --install
Note: after updating macOS to a new release it is likely you need to also update Xcode and Xcode Command line Tools.
Lazarus currently uses Cocoa as default widget set on macOS.
Binaries are compiled for x84_64 architecture by default, so they will run both on old Intel and newer Apple Silicon (M1, M2...) Macs.
To change target architecture open main menu, Project > Project Options, Configuration and Target, set Darwin as destination OS, and aarch64 as destination CPU family.
Please note macOS will ask for permission to run to (or to access some paths) the first time you are running an unsigned binary.
Please refer to Lazarus' macOS programming tipsmacos app development for subjects as creation of universal binaries, code signing and notarization, and to create a macOS application bundle (in which PeaZip for macOS packages may be used as example).

Following table summarize the status of PeaZip project on different operating systems, architectures, widget sets, and package management systems: any help is deeply appreciated to port PeaZip to new platforms!

Operating System
Archirecture
Widget Set
Status
Linux
i386
GTK, GTK2, Qt4
legacy, available from third party, see links in Linux download sections
Linux
x86_64
GTK2, Qt5
released as portable and installable DEB and RPM packages, Flatpak available from third party
Linux
x86_64
GTK3
unreleased: compiles successfully, various graphic and fonts issues, Lazarus/FPC support is marked as alpha for GTK3
Linux
arm, aarch64
various
released as portable package, also available from third party, see links on Linux download pages
BSD
x86_64 GTK2
released as portable package, alternatives are available from third party linked on BSD download page
macOS
x86_64
Cocoa
released as installable DMG package, can also be used as portable app, run on Intel and Apple Silicon machines
macOS
aarch64
Cocoa
released as installable DMG package, can also be used as portable app, run on Apple Silicon machines only
Windows
i386
Win32
released as portable and installable EXE packages, recommended for legacy machines only
Windows 64 bit
x86_64
Win32
released as portable and installable EXE and MSIX packages, not as store app



Notes for developers



HOW TO COMPILE AND BUILD PEAZIP APP BINARIES


MANUALLY, FROM LAZARUS IDE GUI
Open .lpi project files in Lazarus IDE and use main menu Run > Build all to compile and build the binaries:
  • add /dev/metadarkstyle//metadarkstyle.lpk Lazarus package to the project, otherwise the IDE will ask later, notifying the missing lpk
  • project_peach.lpi builds peazip, the main app executable, file and archive manager
  • project_pea.lpi builds pea, to manage pea archives, and to provide file management, encryption (AES, Serpent, Twofish), and hashing / checksum routines (Whirlpool, SHA / SHA2 / SHA3, BLAKE2, Ripemd160, MD5, various CRCs)
On Windows systems you will also need to compile (peazip sources)/dev/dragdropfilesdll/dragdropfilesdll.lpi and copy dragdropfilesdll.dll in the same directory of peazip.exe

AUTOMATICALLY, FROM COMMAND LINE OR SCRIPT
Replace lazbuild string in following examples with the full qualified path to lazbuild binary if needed - e.g. on Windows it is usually C:\lazarus\lazbuild.exe.
Replace (peazip sources) with the full qualified path of PeaZip source's directory.
Run:
  • lazbuild --add-package (peazip sources)/dev/metadarkstyle/metadarkstyle.lpk
  • lazbuild --add-package (peazip sources)\dev\dragdropfilesdll\DragDropLazarus.lpk //only needed to build dragdropfilesdll.dll for Windows systems
  • lazbuild (peazip sources)/project_peach.lpi
  • lazbuild (peazip sources)/project_pea.lpi
  • lazbuild (peazip sources)\dev\dragdropfilesdll\dragdropfilesdll.lpi //only needed to build dragdropfilesdll.dll for Windows systems
On Linux systems Lazarus will currently build for GTK2 widget set by default:--widgetset= option allows to target different widget sets (Qt5, Qt6, GTK3...), assuming correct Pascal bindings are installed - please refer to Lazarus documentation for each specific widget-set.
In example, lazbuild --widgetset=qt5 project_peach.lpi will compile peazip binary for Qt5 libraries, if available to Lazarus IDE.


COMPILE TIME PEAZIP OPTIONS

From main menu, Options > Settings, Advanced tab it is possible to set PeaZip to NOT use non-free software or archive formats.
This behavior can be hardcoded setting HLIBRE_DIR constant in peazip (project_peach.lpi) at compile time:
0 not hardcoded, read from configuration;
1 hardcoded to allow only using known Free Software components
2 hardcoded to allow only using known Free Software components and known open archive formats (not encumbered by patents for read nor write)

It is now possible to hardcode paths of backend binaries, configuration, and resources at compile time in order to met specific FHS or security requirements - e.g. allowing paths only writeable with admin / root privileges.
Those paths are defined by HBINPATH, HCONFPATH, and HSHAREPATH constants.

It is now possible to define at compile time a list of known SHA256 hash values for known binaries invoked by PeaZip, in function "checkhash" in peach.pas source file. This list can be checked on demand to detect non-matching values, and in this case inform user that some binaries are unknown.


HOW TO ASSEMBLE PEAZIP APP PACKAGES


NAMING
PeaZip project packages follows this naming convention: name-version.architecture
DEB packages are an exception to this rule, following Debian naming convention: name_version_architecture
"name" states the pakage (i.e. PeaZip, PeaZip Portable, sources...)
"version" field starts with version number x.y.z, then states target OS (LINUX, WINDOWS, WIN64); on Linux systems is then declared the target widgetset (i.e. GKT2, Qt5), and finally the release number (usually -1).
"architecture" on Linux declare target architecture (on Debian amd64 is used in place of x86_64) and is omitted on Windows.

PORTABLE PACKAGES
PeaZip Portable should be built compressing a directory here referred as (peazip), containing:
  • pea and peazip binaries compiled for the target system (and dragdropfilesdll.dll on Windows) in root directory of the app
  • (peazip)/res directory which contains resources divided by type
    • (peazip)/res/portable empty file marking the package as portable
    • (peazip)/res/bin directory containing architecture dependent binaries, that should be compiled by respective third party sources for the target system: refer to THIRD PARTIES section below, or refer to the content of an existing package
    • (peazip)/res/share directory containing non-architecture dependent data such as texts, sample scripts, media, documentation: refer to DETAILS ABOUT RES/SHARE section for further information
    • (peazip)/res/conf directory containing configuration files, and user-created custom scripts, compression settings, archive layouts
    • For details on content of each res subpath plesase refer to (peazip sources)/res, and possibly to an existing up to date Portable package.
ASSEMBLE INSTALLERS
Installer packages can be built starting from portable package:
  1. Remove (peazip)/res/portable file, in this way the application will write configuration file to appropriate user specific directory for the known systems, $XDG_CONFIG_HOME/peazip or $HOME/.config/peazip for non_Windows systems following Open Deskptop standard.
  2. Take care to place resources in proper paths depending on the filesystem standards of the target system, e.g. (peazip)/res/bin and (peazip)/res/share should be replaced to links to pointing to (proper path)/peazip directory created in proper branches of the filesystem for the type of resources.
    • In example, in current Linux packages, (peazip) is written to /usr/lib/peazip, with (peazip)/res/bin being /usr/lib/peazip/res/bin directory, and (peazip)/res/share being a link to /usr/share/peazip directory.
    • This mechanism can be used, on systems not supporting Open Desktop standards, also to redirect configuraton folder, letting (peazip)/res/portable file, which tells the application to write configuration to (peazip)/res/conf which will be, in this case, replaced by a link.
  3. (required for Windows packages only), place "Configure peazip.exe" compiled from InnoSetup script peazip-setup_script_WIN*-configure.iss in (peazip)/res/bin directory
Download pages for Linux, macOS, and Windows, can provide examples of packages for a wide array of different installer technologies and for many different package management systems, such as Windows EXE, MSI, and MSIX installers, macOS DMG, Linux DEB, RPM, and flatpak - flatpak packages are maintained by third parties developers at FlatHub.

At its core, PeaZip is simply a standalone, as autocontained as possible application (just as the Portable versions, which shares the same code base) which is told to save the configuration in system-specific user's path, and a set of scripts (mostly collected in (peazip)/res/share/batch path, e.g. OpenDesktop .desktop files) which instructs the host system on how to pass input and parameters to PeaZip.

"Packages examples" package peazip-x.y.z.pack.zip provides examples of the directory structures used to create DEB and RPM packages for the current release, in order to help developers in assembling packages for distribution with different package managers.
It is not needed to compile sources, it is only meant as additional help to assemble packages.


DETAILS ABOUT RES/SHARE

(peazip)/res/share directory, containing non-architecture dependent resources, can be used "as is" on all systems and types of packages.
If desired, system dependent resources can be omitted to reduce the size of the package, i.e. in non-Windows packages it can be safely removed sample .bat and .reg files, being of no use.
This directory should contain (or link to) peazip_help.pdf in its root in order to provide offline help to users.

(peazip)/res/share/batch subfolder contains sample scripts to use PeaZip from command line, .desktop files, SendTo examples for Windows, and freedesktop_integration subpath which contains files for integration in desktop environments compliant with freedesktop standars (i.e. Gnome, KDE, and other common Linux DE)

(peazip)/res/share/copying contains copying.txt (the license file for PeaZip project sources, released under LGPLv3) and third-parties directory containing thir party licenses.

(peazip)/res/share/icons (required on Windows only) contains Windows icons; .png icons for non-Windows systems are available in batch/freedesktop_integration forlder

(peazip)/res/share/lang path contains translations of application's text, most of which are contributed by third parties translators

(peazip)/res/share/lang-wincontext (required on Windows only) path contains .reg files to localize app's context menus in Windows

(peazip)/res/share/presets contains preset files for PeaZip defining custom compression settings. Those files are editable, but user-defined custom compression settings should be saved in configuration directory consistently with PeaZip's behavior

(peazip)/res/share/readme files contains a minimal system-dependent explanation about the application, for Windows and Linux users

(peazip)/res/share/themes path contains themes for PeaZip project; themes are .7z files (with .theme suffix before .7z extension) containing graphic resources and the theme file, an UTF-8 with BOM file containing theming options


THIRD PARTIES TECHNOLOGIES

The units of crypto and math utilities library used in PeaZip are derived from Wolfgang Ehrhardt's crypto library (originally aes_2017-11-17.zip, crc_hash_2018-01-01.zip, fca_2017-11-17.zip, serpent_2017-11-17.zip, tf_2017-11-17.zip, and util_2018-11-27.zip libraries), released under Zlib license by Wolfgang Ehrhardt.
Libraries are kept up to date, in example were patched to allow build on aarch64 architecture.

7z (LGPL), p7zip (LGPL), 7-Zip-zstd codecs (LGPL), Brotli (MIT License), Zstandard (Dual license BSD / GPLv2), ARC (GPL), ZPAQ/LPAQ/PAQ8* (GPL), QUAD (LGPL) / BALZ (public domain) / BCM (Apache v2), strip and UPX (GPL) binaries are needed to support mainstream file formats.

Those binaries are not included in source package (but are included in the program's precompiled packages) and are intellectual property of respective Authors.

Up to date links to aforementioned projects are:

PeaZip can also support other binaries, which MUST NOT be included in base packages due their closed source nature: official PeaZip packages only contain software released under OSI-approved licenses.
  • WinAce UnACE (royalty free), to work with ACE files, can be supported as back-end binary if placed in (peazip)/res/bin/unace, but must not be included in packages because non-free license.
  • RarLab UnRar (royalty free) can be supported as back-end binary if placed in (peazip)/res/bin/unrar as alternative rar files extractor tool, but must not be included in packages because non-free license.
  • RarLab Rar.exe (shareware) can be supported as back-end binary if installed on the same system (PeaZip can auto-configure itself to use it to create RAR archives), but must not included in packages because it is non-free software AND has non royalty free license.

Synopsis: Download page of PeaZip sources (LGPLv3). Compile and build the application from source code with Lazarus/FPC, help porting PeaZip to new Operating Systems and architectures, package PeaZip binaries for more installers types and package managers systems. How to assemble Portable version and installable packages.

Topics: PeaZip source packages, code base Git repository, how to create portable or installable packages for PeaZip

PeaZip > Downloads > Compile and buid PeaZip from sources

RECOMMENDED PAGES
PEAZIP FILE MANAGER GUI

PORTABLE FILE ARCHIVER

FREE ZIP ARCHIVER
TAR FILES UTILITY
 
MACOS ZIP FILES UTILITY

OPEN ENCRYPTED FILES

CREATE PEAZIP CLI SCRIPTS
OPEN 7Z RAR TAR ZIP ARCHIVES
FREE RAR





Download PeaZip free archiver sources
DOWNLOADS
HOW TO ASSEMBLE PEAZIP APP PACKAGES
All PeaZip downloads
PeaZip for Linux
PeaZip for macOS
PeaZip for Windows
PeaZip sources
Notes for developers
SUPPORT
build peazip
Online help
Frequently Asked Questions

peazip file compression software
ABOUT
peazip free archiver utility
PeaZip project: TOS, Privacy
Releases Feed build peazip installers
PeaZip Wiki build peazip packages
Developer email compile peazip
Search knowledge-base
peazip source code repository