forked from rustdesk/rustdesk
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild_appimage.py
More file actions
executable file
·23 lines (21 loc) · 870 Bytes
/
build_appimage.py
File metadata and controls
executable file
·23 lines (21 loc) · 870 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/python3
import os
def get_version():
with open("Cargo.toml") as fh:
for line in fh:
if line.startswith("version"):
return line.replace("version", "").replace("=", "").replace('"', '').strip()
return ''
if __name__ == '__main__':
# check version
version = get_version()
os.chdir("appimage")
os.system("sed -i 's/^Version=.*/Version=%s/g' rustdesk.desktop" % version)
os.system("sed -i 's/^ version: .*/ version: %s/g' AppImageBuilder.yml" % version)
# build appimage
ret = os.system("appimage-builder --recipe AppImageBuilder.yml --skip-test")
if ret == 0:
print("RustDesk AppImage build success :)")
print("Check AppImage in '/path/to/rustdesk/appimage/RustDesk-VERSION-TARGET_PLATFORM.AppImage'")
else:
print("RustDesk AppImage build failed :(")