Skip to content

Commit

Permalink
=bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexWoroschilow committed Nov 24, 2020
1 parent 1f3f287 commit 5e0888a
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 19 deletions.
29 changes: 26 additions & 3 deletions AppDir/AppRun
Original file line number Diff line number Diff line change
@@ -1,6 +1,29 @@
#! /bin/bash
set -e
# Copyright 2020 Alex Woroschilow ([email protected])
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
set -ex

cd ${HOME}
PATH=${PATH}:${APPDIR}/bin
PATH=${PATH}:${APPDIR}/turtl
export PATH=${PATH}

exec ${APPDIR}/application/turtl $@
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${APPDIR}/lib
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${APPDIR}/turtl
LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${APPDIR}/lib64
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}

XDG_DATA_DIRS=${XDG_DATA_DIRS}:${APPDIR}/share
export XDG_DATA_DIRS=${XDG_DATA_DIRS}

cd ${OWD}

exec ${APPDIR}/turtl/turtl $@
49 changes: 33 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,23 +1,40 @@
SOURCE="https://github.com/turtl/desktop/releases/download/v0.7.2.5/turtl-0.7.2.5-linux64.tar.bz2"
DESTINATION="turtl.tar.bz2"
OUTPUT="Turtl.AppImage"
# Copyright 2020 Alex Woroschilow ([email protected])
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
PWD:=$(shell pwd)


all:
echo "Building: $(OUTPUT)"
wget -O $(DESTINATION) -c $(SOURCE)
mkdir --parents $(PWD)/build
mkdir --parents $(PWD)/build/AppDir
mkdir --parents $(PWD)/build/AppDir/turtl

tar -xf $(DESTINATION)
# rm -rf AppDir/application

mkdir --parents AppDir/application
cp -r turtl-linux64/turtl/* AppDir/application
wget --output-document=$(PWD)/build/build.tar.bz2 https://github.com/turtl/desktop/releases/download/v0.7.2.5/turtl-0.7.2.5-linux64.tar.bz2
tar -xf $(PWD)/build/build.tar.bz2 -C $(PWD)/build/

chmod +x AppDir/AppRun
wget --output-document=$(PWD)/build/build.rpm http://mirror.centos.org/centos/8/AppStream/x86_64/os/Packages/gtk2-2.24.32-4.el8.x86_64.rpm
cd $(PWD)/build && rpm2cpio $(PWD)/build/build.rpm | cpio -idmv && cd ..

export ARCH=x86_64 && bin/appimagetool.AppImage AppDir $(OUTPUT)
chmod +x $(OUTPUT)
wget --output-document=$(PWD)/build/build.rpm http://mirror.centos.org/centos/8/AppStream/x86_64/os/Packages/GConf2-3.2.6-22.el8.x86_64.rpm
cd $(PWD)/build && rpm2cpio $(PWD)/build/build.rpm | cpio -idmv && cd ..

rm -f $(DESTINATION)
rm -rf AppDir/application
rm -rf turtl-linux64
cp --force --recursive $(PWD)/build/usr/* $(PWD)/build/AppDir/
cp --force --recursive $(PWD)/build/turtl-linux64/turtl/* $(PWD)/build/AppDir/turtl
cp --force --recursive $(PWD)/AppDir/* $(PWD)/build/AppDir

chmod +x $(PWD)/build/AppDir/AppRun
chmod +x $(PWD)/build/AppDir/*.desktop

export ARCH=x86_64 && $(PWD)/bin/appimagetool.AppImage $(PWD)/build/AppDir $(PWD)/Turtl.AppImage
chmod +x $(PWD)/Turtl.AppImage

clean:
rm -rf $(PWD)/build

0 comments on commit 5e0888a

Please sign in to comment.