UOS shop please #73

Closed
opened 2026-02-20 22:21:55 -05:00 by deekerman · 9 comments
Owner

Originally created by @1433223anpeng on GitHub (Jun 19, 2021).

我下载了ubuntu版本的可以安装在deepin里面,作者要是有时间的话可以去看一下UOS应用打包规范,没兴趣,的话,我想拆包,在打包然后上架UOS商店,网站写你的可以吗

Originally created by @1433223anpeng on GitHub (Jun 19, 2021). 我下载了ubuntu版本的可以安装在deepin里面,作者要是有时间的话可以去看一下UOS应用打包规范,没兴趣,的话,我想拆包,在打包然后上架UOS商店,网站写你的可以吗
Author
Owner

@rustdesk commented on GitHub (Jun 19, 2021):

感兴趣,我马上就做,谢谢你的提醒

@rustdesk commented on GitHub (Jun 19, 2021): 感兴趣,我马上就做,谢谢你的提醒
Author
Owner

@rustdesk commented on GitHub (Jun 19, 2021):

你有打包脚本吗?我就不用看规范了。

@rustdesk commented on GitHub (Jun 19, 2021): 你有打包脚本吗?我就不用看规范了。
Author
Owner

@1433223anpeng commented on GitHub (Jun 19, 2021):

我去写打包脚本,昨晚宿舍断网了

@1433223anpeng commented on GitHub (Jun 19, 2021): 我去写打包脚本,昨晚宿舍断网了
Author
Owner

@1433223anpeng commented on GitHub (Jun 19, 2021):

脚本写好了
如下
#!/usr/bin/bash

#使用脚本前,确保安装好unar和fakeroot
#脚本有一个参数, 还有就是把Ubuntu的包放在同级目录,参数是Ubuntu的包名称
#例如 ./rustdeskpac.sh rustdesk-1.1.6.deb

appid="com.rustdesk"
name="RustDesk"
version=echo ${1}|grep -P "\d+\.\d+\.\d+" -o

#拆包
unar ${1}
cd ${1%.*}
unar control.tar.xz
unar data.tar.xz

cd ../

#创建打包目录
mkdir deb_pac

cd deb_pac

#复制control文件
mkdir DEBIAN
cp ../${1%.*}/control/control ./DEBIAN
echo "Git: https://github.com/rustdesk/rustdesk" >> DEBIAN/control

#写入bin文件
mkdir opt/apps/${appid}/files/ -p
cp ../${1%.*}/data/usr/bin opt/apps/${appid}/files/ -r

#写入info文件
cat > opt/apps/${appid}/info << EOF
{
"appid": "${appid}",
"name": "${name}",
"version": "${version}",
"arch": ["amd64"],
"permissions": {
"autostart": true,
"notification": true,
"trayicon": true,
"clipboard": true,
"account": true,
"bluetooth": true,
"camera": true,
"audio_record": true,
"installed_apps": false
},
"support-plugins": [
"plugin/demo"
],
"plugins": [
"plugin/webbrowser",
"plugin/office"
]
}
EOF

#复制desktop文件 修改
mkdir opt/apps/${appid}/entries/applications/ -p
cp ../${1%.*}/data/usr/share/applications/rustdesk.desktop opt/apps/${appid}/entries/applications/
sed "s/Exec=rustdesk/Exec=/opt/apps/${appid}/files/bin/rustdesk/g" opt/apps/${appid}/entries/applications/rustdesk.desktop -i
sed "s/Icon=rustdesk/Icon=${appid}/g" opt/apps/${appid}/entries/applications/rustdesk.desktop -i

#复制图标文件
cp ../${1%.*}/data/usr/share/icons opt/apps/${appid}/entries/ -r
mv opt/apps/${appid}/entries/icons/hicolor/256x256@2x opt/apps/${appid}/entries/icons/hicolor/256x256
cp opt/apps/${appid}/entries/icons/hicolor/256x256 opt/apps/${appid}/entries/icons/hicolor/scalable -r

#批量重命名图标
array=(find opt/apps/${appid}/entries/icons -name "rustdesk.png" |tr -s "\n" " ")
for i in ${array[@]}
do
mv ${i} ${i%/*}/${appid}.png

done

#复制service文件
mkdir usr/share/ -p
cp ../${1%.*}/data/usr/share/rustdesk usr/share/ -r

#生成md5文件
find usr opt -type f |xargs -i md5sum {} > DEBIAN/md5sums

cd ../

fakeroot dpkg -b deb_pac "${appid}_${version}_linux_amd64.deb"

rm -r ${1%.*} deb_pac

@1433223anpeng commented on GitHub (Jun 19, 2021): 脚本写好了 如下 #!/usr/bin/bash #使用脚本前,确保安装好unar和fakeroot #脚本有一个参数, 还有就是把Ubuntu的包放在同级目录,参数是Ubuntu的包名称 #例如 ./rustdeskpac.sh rustdesk-1.1.6.deb appid="com.rustdesk" name="RustDesk" version=`echo ${1}|grep -P "\d+\.\d+\.\d+" -o` #拆包 unar ${1} cd ${1%.*} unar control.tar.xz unar data.tar.xz cd ../ #创建打包目录 mkdir deb_pac cd deb_pac #复制control文件 mkdir DEBIAN cp ../${1%.*}/control/control ./DEBIAN echo "Git: https://github.com/rustdesk/rustdesk" >> DEBIAN/control #写入bin文件 mkdir opt/apps/${appid}/files/ -p cp ../${1%.*}/data/usr/bin opt/apps/${appid}/files/ -r #写入info文件 cat > opt/apps/${appid}/info << EOF { "appid": "${appid}", "name": "${name}", "version": "${version}", "arch": ["amd64"], "permissions": { "autostart": true, "notification": true, "trayicon": true, "clipboard": true, "account": true, "bluetooth": true, "camera": true, "audio_record": true, "installed_apps": false }, "support-plugins": [ "plugin/demo" ], "plugins": [ "plugin/webbrowser", "plugin/office" ] } EOF #复制desktop文件 修改 mkdir opt/apps/${appid}/entries/applications/ -p cp ../${1%.*}/data/usr/share/applications/rustdesk.desktop opt/apps/${appid}/entries/applications/ sed "s/Exec=rustdesk/Exec=\/opt\/apps\/${appid}\/files\/bin\/rustdesk/g" opt/apps/${appid}/entries/applications/rustdesk.desktop -i sed "s/Icon=rustdesk/Icon=${appid}/g" opt/apps/${appid}/entries/applications/rustdesk.desktop -i #复制图标文件 cp ../${1%.*}/data/usr/share/icons opt/apps/${appid}/entries/ -r mv opt/apps/${appid}/entries/icons/hicolor/256x256@2x opt/apps/${appid}/entries/icons/hicolor/256x256 cp opt/apps/${appid}/entries/icons/hicolor/256x256 opt/apps/${appid}/entries/icons/hicolor/scalable -r #批量重命名图标 array=(`find opt/apps/${appid}/entries/icons -name "rustdesk.png" |tr -s "\n" " "`) for i in ${array[@]} do mv ${i} ${i%/*}/${appid}.png done #复制service文件 mkdir usr/share/ -p cp ../${1%.*}/data/usr/share/rustdesk usr/share/ -r #生成md5文件 find usr opt -type f |xargs -i md5sum {} > DEBIAN/md5sums cd ../ fakeroot dpkg -b deb_pac "${appid}_${version}_linux_amd64.deb" rm -r ${1%.*} deb_pac
Author
Owner

@rustdesk commented on GitHub (Jun 20, 2021):

非常感谢

@rustdesk commented on GitHub (Jun 20, 2021): 非常感谢
Author
Owner

@rustdesk commented on GitHub (Jun 20, 2021):

有没有兴趣搞点代码?这位同志也是学生,https://github.com/rustdesk/rustdesk/issues/87

@rustdesk commented on GitHub (Jun 20, 2021): 有没有兴趣搞点代码?这位同志也是学生,https://github.com/rustdesk/rustdesk/issues/87
Author
Owner

@1433223anpeng commented on GitHub (Jun 20, 2021):

有兴趣,我在极客时间买了 rust的课,准备暑假学一下

@1433223anpeng commented on GitHub (Jun 20, 2021): 有兴趣,我在极客时间买了 rust的课,准备暑假学一下
Author
Owner

@rustdesk commented on GitHub (Jun 20, 2021):

瞎花钱,我手把手教你

@rustdesk commented on GitHub (Jun 20, 2021): > 课 瞎花钱,我手把手教你
Author
Owner

@1433223anpeng commented on GitHub (Jun 20, 2021):

嗯嗯,可以的我6月27号就放假,谢谢你

@1433223anpeng commented on GitHub (Jun 20, 2021): 嗯嗯,可以的我6月27号就放假,谢谢你
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/rustdesk-rustdesk#73
No description provided.