Added scripts to build AppImage & build instructions

This commit is contained in:
cis-kuldeep 2021-05-27 19:06:27 +05:30
parent 16a11775e8
commit 9051862ebe
No known key found for this signature in database
GPG Key ID: 67B47D8A06FA45E4
5 changed files with 83 additions and 0 deletions

43
docs/AppImage_Build.md Normal file
View File

@ -0,0 +1,43 @@
# PyBitmessage AppImage Build instructions
## Requirements
First make sure you have `dpkg` and `appimagetool` installed.
From packages/AppImage/ Dir run `install.sh` to install the appimagetool.
```
sudo ./install.sh
```
## Build and Install
This script requires PyBitmessage .deb package.
Download the latest version from https://storage.bitmessage.org/binaries/
Once you have downloaded the package and have `dpkg` and `appimagetool` installed:
You can start to build the appimage
### Clone the source code
```
git clone git://github.com/Bitmessage/PyBitmessage.git
```
This will install the base app to your local flatpak user repository, it
takes a while to compile because QT4 and PyQt4 have to be build, among others. But this is only required once.
### Build
Run build.sh
Usage: ./build.sh "path to deb package"
Example ./build.sh ~/Downloads/pybitmessage_0.6.3.2-1_amd64.deb
```
cd PyBitmessage/packages/AppImage
./build.sh ~/Downloads/pybitmessage_0.6.3.2-1_amd64.deb
```
# Run
```
./PyBitmessage-x86_64.AppImage
```
## Cleanup
The script performs a cleanup, deletes the intermediate AppDir & tmp files.

5
packages/AppImage/AppRun Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
SELF_DIR="$(dirname "$(readlink -f "$0")")"
cd "$SELF_DIR/usr/bin/"
exec "pybitmessage"

Binary file not shown.

30
packages/AppImage/build.sh Executable file
View File

@ -0,0 +1,30 @@
#!/bin/sh
#####################################################################
# Usage: ./build.sh "path to deb package"
# Example ./build.sh ~/Downloads/pybitmessage_0.6.3.2-1_amd64.deb
#####################################################################
#CleanUp Old Builds
rm -rf AppDir/
rm -rf tmp/
mkdir AppDir
mkdir tmp
echo 'Building from inputFile:' $1
dpkg -x $1 tmp/
mv tmp/usr/ AppDir/usr/
cp AppRun AppDir/
cp AppDir/usr/share/applications/pybitmessage.desktop AppDir/
cp AppDir/usr/share/icons/hicolor/24x24/apps/pybitmessage.png AppDir/
ARCH=x86_64 appimagetool AppDir/
##Clean-up
rm -rf AppDir/
rm -rf tmp/
echo "Build Successful"
echo "Run ./PyBitmessage-x86_64.AppImage"

5
packages/AppImage/install.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
wget -O "appimagetool" "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
chmod a+x appimagetool
mv appimagetool /usr/bin/