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