Compatibility fixes
parent
ad10570fb3
commit
706fe0011f
30
Makefile
30
Makefile
|
@ -1,6 +1,6 @@
|
|||
Appname:=sailfish-python
|
||||
Appname:=$(shell cat appname.txt)
|
||||
prefix:=/usr
|
||||
temp:=/tmp/make
|
||||
temp:=/tmp/fpm
|
||||
builddir:=./build
|
||||
sdkpath:=$(HOME)/SailfishOS
|
||||
dependencies:=-d libsailfishapp-launcher -d python3-base -d pyotherside-qml-plugin-python3-qt5
|
||||
|
@ -12,7 +12,7 @@ jolla_wifi_ip:=Jolla
|
|||
|
||||
all: clean build-tmp rpm-virt rpm-jolla
|
||||
|
||||
make-jolla: build-tmp rpm-jolla send-jolla
|
||||
make-jolla-usb: build-tmp rpm-jolla send-jolla
|
||||
make-jolla-wifi: build-tmp rpm-jolla send-jolla-wifi
|
||||
make-jolla-ap: build-tmp rpm-jolla send-jolla-ap
|
||||
make-virt: build-tmp rpm-virt send-virt
|
||||
|
@ -30,32 +30,36 @@ build-tmp:
|
|||
install -m 755 ./dat/$(Appname).sh $(temp)/usr/bin/$(Appname)
|
||||
|
||||
rpm-virt:
|
||||
cd $(temp);fpm -f -s dir -t rpm $(dependencies) -p $(CURDIR)/$(Appname)-$(arch).rpm -n $(Appname) -a $(arch) --prefix / *
|
||||
cd $(temp);fpm -f -s dir -t rpm $(dependencies) -p $(CURDIR)/$(rpmname) -n $(Appname) -a $(arch) --prefix / *
|
||||
|
||||
rpm-jolla: arch:=noarch
|
||||
rpm-jolla:
|
||||
cd $(temp);fpm -f -s dir -t rpm $(dependencies) -p $(CURDIR)/$(Appname)-$(arch).rpm -n $(Appname) -a $(arch) --prefix / *
|
||||
cd $(temp);fpm -f -s dir -t rpm $(dependencies) -p $(CURDIR)/$(rpmname) -n $(Appname) -a $(arch) --prefix / *
|
||||
|
||||
send-virt:
|
||||
rsync -vrp --rsh='ssh -p2223 -i $(sdkpath)/vmshare/ssh/private_keys/SailfishOS_Emulator/root' ./$(Appname)-$(arch).rpm root@localhost:/home/nemo/Downloads
|
||||
ssh -p2223 -i $(sdkpath)/vmshare/ssh/private_keys/SailfishOS_Emulator/root root@localhost pkcon install-local -y /home/nemo/Downloads/$(Appname)-$(arch).rpm
|
||||
rsync -vrp --rsh='ssh -p2223 -i $(sdkpath)/vmshare/ssh/private_keys/SailfishOS_Emulator/root' ./$(rpmname) root@localhost:/tmp
|
||||
ssh -p2223 -i $(sdkpath)/vmshare/ssh/private_keys/SailfishOS_Emulator/root root@localhost pkcon install-local -y /tmp/$(rpmname) "&&" rm /tmp/$(rpmname)
|
||||
|
||||
send-jolla-wifi: arch:=noarch
|
||||
send-jolla-wifi:
|
||||
rsync -vrp ./$(Appname)-$(arch).rpm root@$(jolla_wifi_ip):/home/nemo/Downloads
|
||||
ssh root@$(jolla_wifi_ip) pkcon install-local -y /home/nemo/Downloads/$(Appname)-$(arch).rpm
|
||||
rsync -vrp ./$(rpmname) root@$(jolla_wifi_ip):/tmp
|
||||
ssh root@$(jolla_wifi_ip) pkcon install-local -y /tmp/$(rpmname) "&&" rm /tmp/$(rpmname)
|
||||
|
||||
send-jolla-ap: arch:=noarch
|
||||
send-jolla-ap: jolla_wifi_ip:=192.168.1.1
|
||||
send-jolla-ap:
|
||||
rsync -vrp ./$(Appname)-$(arch).rpm root@$(jolla_wifi_ip):/home/nemo/Downloads
|
||||
ssh root@$(jolla_wifi_ip) pkcon install-local -y /home/nemo/Downloads/$(Appname)-$(arch).rpm
|
||||
rsync -vrp ./$(rpmname) root@$(jolla_wifi_ip):/tmp
|
||||
ssh root@$(jolla_wifi_ip) pkcon install-local -y /tmp/$(rpmname) "&&" rm /tmp/$(rpmname)
|
||||
|
||||
send-jolla: arch:=noarch
|
||||
send-jolla:
|
||||
rsync -vrp ./$(Appname)-$(arch).rpm root@$(jolla_usb_ip):/home/nemo/Downloads
|
||||
ssh root@$(jolla_usb_ip) pkcon install-local -y /home/nemo/Downloads/$(Appname)-$(arch).rpm
|
||||
rsync -vrp ./$(Appname)-$(arch).rpm root@$(jolla_usb_ip):/tmp
|
||||
ssh root@$(jolla_usb_ip) pkcon install-local -y /tmp/$(Appname)-$(arch).rpm "&&" rm /tmp/$(Appname)-$(arch).rpm
|
||||
|
||||
|
||||
clean:
|
||||
rm -rf $(temp)
|
||||
rm -rf $(builddir)
|
||||
rm -rf ./$(rpmname)
|
||||
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
X-Nemo-Application-Type=silica-qt5
|
||||
Name=Scanner
|
||||
Name=sailfish-python
|
||||
Icon=icon-launcher-component-gallery
|
||||
Exec=sailfish-qml sailfish-scanner
|
||||
Exec=sailfish-qml sailfish-python
|
||||
|
|
|
@ -14,13 +14,18 @@ os.rename("./qml/"+oldname+".qml","./qml/"+newname+".qml")
|
|||
os.rename("./dat/"+oldname+".desktop","./dat/"+newname+".desktop")
|
||||
os.rename("./dat/"+oldname+".sh","./dat/"+newname+".sh")
|
||||
|
||||
makefile=open("./Makefile","r")
|
||||
def replaceInFile(oldname,newname,filename):
|
||||
makefile=open(filename,"r")
|
||||
maketxt=makefile.read()
|
||||
makefile.close()
|
||||
makefile=open("./Makefile","w")
|
||||
makefile=open(filename,"w")
|
||||
makefile.write(re.sub("Appname:="+oldname,"Appname:="+newname,maketxt))
|
||||
makefile.close()
|
||||
|
||||
for filename in ["./Makefile","./dat/"+newname+".desktop"]:
|
||||
replaceInFile(oldname,newname,filename)
|
||||
|
||||
|
||||
namefile=open("./appname.txt","w")
|
||||
namefile.write(newname+"\n")
|
||||
namefile.close()
|
||||
|
|
Binary file not shown.
Loading…
Reference in New Issue