Compare commits

...

131 Commits
1.5 ... 2.4.0.2

Author SHA1 Message Date
ef2f8592ae update spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-08-31 11:05:09 +00:00
7315456776 2401 2023-08-04 18:10:29 +08:00
fddb71eb7d update spark-dwine-launch/run-template_v1.sh.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-07-26 04:33:22 +00:00
0c5ae361ea update spark-dwine-launch/run-template_v1.sh.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-07-25 14:32:53 +00:00
2d21b9721a update spark-dwine-launch/run-template_v1.sh.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-07-25 14:32:09 +00:00
30ef714d71 !18 Block wine mono installer
Merge pull request !18 from RX6900XT/master
2023-07-25 14:31:39 +00:00
09711a2199 update spark-dwine-launch/run-template_v1.sh.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-07-25 14:31:26 +00:00
RX6900XT
aeb777882e update spark-dwine-launch/run-template_v1.sh.
Signed-off-by: RX6900XT <qq482961502@gmail.com>
2023-07-23 15:24:22 +00:00
610bbf4ab2 update README.md.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-07-16 14:35:41 +00:00
1e1926a500 2.4.0 2023-07-16 22:30:57 +08:00
dc23f78232 !17 Add call WeChat process
Merge pull request !17 from RX6900XT/master
2023-07-16 13:35:26 +00:00
RX6900XT
f8efcc9690 update spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh.
Signed-off-by: RX6900XT <qq482961502@gmail.com>
2023-07-16 13:34:27 +00:00
RX6900XT
4733489cd5 update spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh.
Signed-off-by: RX6900XT <qq482961502@gmail.com>
2023-07-16 13:09:42 +00:00
RX6900XT
021a0d6ebd update spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh.
Signed-off-by: RX6900XT <qq482961502@gmail.com>
2023-07-16 07:55:25 +00:00
78ab76da83 !16 run.sh update
Merge pull request !16 from RX6900XT/master
2023-07-12 14:34:36 +00:00
RX6900XT
104ed56e1a update spark-dwine-launch/run-template_v1.sh.
Signed-off-by: RX6900XT <qq482961502@gmail.com>
2023-07-12 10:03:36 +00:00
8fcfd0c5b5 update spark-dwine-launch/run-template_v1.sh.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-07-09 16:59:12 +00:00
378226dc92 不再在启动的时候 &,适配dcm.建议有相关需求的在run.sh中就指定或者使用screen -s 2023-05-22 16:12:38 +08:00
4207be55e2 仅仅在是链接时候才确认是mydoc 2023-04-21 17:09:26 +08:00
34698b710e 2.3 2023-04-21 17:03:14 +08:00
93364b1057 修复旧的wine6容器反而找不到文档位置
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-04-21 00:12:16 +00:00
38bca59428 update spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_updater.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-04-20 23:57:12 +00:00
e85a14badf update spark-dwine-launch/postrm_template.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-04-19 05:47:24 +00:00
16085fe911 update spark-dwine-launch/postrm_template.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-04-19 05:46:36 +00:00
e829b54682 修复wine8下找不到文档的问题 2023-04-19 13:26:47 +08:00
f69c86864f Merge remote-tracking branch 'refs/remotes/origin/master' 2023-04-14 14:47:56 +08:00
53b12e1b8d get_tray_window 2023-04-14 14:47:46 +08:00
1d175af65c runv4忘记改了,私密马赛
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-04-13 08:54:33 +00:00
f5d453d699 使用spark_updater 2023-04-13 16:48:07 +08:00
cde60a5892 update spark-dwine-helper/build.sh.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-04-13 07:02:51 +00:00
2f41cc88b2 自带kill.sh 2023-04-12 21:49:55 +08:00
b262273a1d wine8 2023-04-12 17:38:28 +08:00
cb80f7be6b update spark-dwine-helper/build.sh.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-04-12 09:16:18 +00:00
cd551d8b1c enable-all 2023-04-05 16:25:41 +08:00
47cdf1548e bash启动 2023-02-07 16:52:37 +08:00
15223243a1 翻译 runv4 2023-01-30 14:45:24 +08:00
50438391d8 国际化支持 2023-01-30 14:37:45 +08:00
71d952ad4f update spark-dwine-launch/run-template_v1.sh.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-01-21 07:43:22 +00:00
b655dcaebd mailmaster
cloudmusic
去阴影优化
2023-01-07 22:42:23 +08:00
fc6f0500cb 支持解压包时候显示进度条 2023-01-07 14:21:44 +08:00
f5faa0626b !15 QQMusic 支援自动升级
Merge pull request !15 from RX6900XT/master
2023-01-07 02:58:49 +00:00
f42fd047ca update spark-dwine-launch/postrm_template.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-01-06 11:47:39 +00:00
2446a5730d update spark-dwine-launch/postrm_template.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2023-01-04 04:15:42 +00:00
RX6900XT
545e038c08 update spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh.
Signed-off-by: RX6900XT <qq482961502@gmail.com>
2022-12-29 09:53:30 +00:00
RX6900XT
a21cd7eb88 update spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh.
Signed-off-by: RX6900XT <qq482961502@gmail.com>
2022-12-29 09:41:53 +00:00
RX6900XT
2186616fb6 update spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh.
Signed-off-by: RX6900XT <qq482961502@gmail.com>
2022-12-29 09:36:23 +00:00
RX6900XT
3e40ad7829 update spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh.
Signed-off-by: RX6900XT <qq482961502@gmail.com>
2022-12-29 09:05:43 +00:00
71307bfd24 汉化注释
把MIMETYPE相关功能去除:现在已经不再使用此种方式管理
把自动发送到桌面相关功能去除:不如用户自己管理
2022-12-27 20:41:32 +08:00
8159a39189 !14 加入postinst和prerm
Merge pull request !14 from RX6900XT/master
2022-12-27 12:36:34 +00:00
RX6900XT
5c03d17353 update spark-dwine-launch/postrm_template.
Signed-off-by: RX6900XT <qq482961502@gmail.com>
2022-12-27 06:38:29 +00:00
RX6900XT
5f6c062335 update spark-dwine-launch/postinst_template.
Signed-off-by: RX6900XT <qq482961502@gmail.com>
2022-12-27 06:36:57 +00:00
RX6900XT
069d063031 update spark-dwine-launch/postrm_template.
Signed-off-by: RX6900XT <qq482961502@gmail.com>
2022-12-27 06:31:10 +00:00
RX6900XT
a09f65944c update spark-dwine-launch/postinst_template.
Signed-off-by: RX6900XT <qq482961502@gmail.com>
2022-12-27 06:29:34 +00:00
RX6900XT
2d347d3be3 update spark-dwine-launch/prerm_template.
Signed-off-by: RX6900XT <qq482961502@gmail.com>
2022-12-27 05:56:17 +00:00
RX6900XT
25abbb29b6 update spark-dwine-launch/postinst_template.
Signed-off-by: RX6900XT <qq482961502@gmail.com>
2022-12-27 05:53:17 +00:00
RX6900XT
6e21ae24a4 update spark-dwine-launch/postrm_template.
Signed-off-by: RX6900XT <qq482961502@gmail.com>
2022-12-27 05:46:56 +00:00
RX6900XT
806da4f51b update spark-dwine-launch/prerm_template.
Signed-off-by: RX6900XT <qq482961502@gmail.com>
2022-12-27 05:37:44 +00:00
RX6900XT
f7d7bfe241 update spark-dwine-launch/postrm_template.
Signed-off-by: RX6900XT <qq482961502@gmail.com>
2022-12-26 01:27:14 +00:00
RX6900XT
a615900805 update spark-dwine-launch/prerm_template.
Signed-off-by: RX6900XT <qq482961502@gmail.com>
2022-12-26 01:24:10 +00:00
RX6900XT
308270ddee 重命名 spark-dwine-launch/prerm 為 spark-dwine-launch/prerm_template 2022-12-26 01:23:31 +00:00
RX6900XT
52f5d1a6af update spark-dwine-launch/postinst_template.
Signed-off-by: RX6900XT <qq482961502@gmail.com>
2022-12-26 01:22:41 +00:00
RX6900XT
b8fa265cb7 重命名 spark-dwine-launch/postinst 為 spark-dwine-launch/postinst_template 2022-12-26 01:20:29 +00:00
RX6900XT
329a783374 postinst and prerm
Signed-off-by: RX6900XT <qq482961502@gmail.com>
2022-12-26 01:19:53 +00:00
a0c73e3f92 !13 update spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh.
Merge pull request !13 from RX6900XT/N/A
2022-12-16 06:25:06 +00:00
RX6900XT
ce53400e78 update spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh.
Signed-off-by: RX6900XT <qq482961502@gmail.com>
2022-12-16 00:13:48 +00:00
9b09272e73 符号错误 2022-12-15 20:15:26 +08:00
7205faad3c !12 修正ㄍCloud
Merge pull request !12 from RX6900XT/master
2022-12-15 12:09:06 +00:00
RX6900XT
1dd8abe2c6 update spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh.
Signed-off-by: RX6900XT <qq482961502@gmail.com>
2022-12-15 10:35:58 +00:00
RX6900XT
88acc48015 update spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh.
修正eCloud结束时开启文字编辑器

Signed-off-by: RX6900XT <qq482961502@gmail.com>
2022-12-15 10:07:32 +00:00
2f56cd05a6 麒麟企业微信优化段加入 2022-11-21 17:51:33 +08:00
1335bb9d02 update spark-dwine-launch/postrm_template.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-11-04 15:25:17 +00:00
b127c26b3d 修改: spark-dwine-helper/postrm
新文件:   spark-dwine-launch/postrm_template
2022-11-03 19:40:52 +08:00
75df70235a Unix转Dos路径,修复部分应用不支持Linux路径(跟进 deepin-wine-helper) 2022-10-13 22:52:30 +08:00
c7f510202d 错别字
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-10-11 12:34:35 +00:00
de07b48d36 Deepin-QQ-Spark 优化段加入 2022-10-11 15:58:21 +08:00
18fed0ace9 update spark-dwine-helper/build.sh.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-10-08 11:51:46 +00:00
b4e5f8d74f IE8 优化段 新增 2022-10-01 23:34:56 +08:00
RX6900XT
452caaa5da !11 加入tim
* update spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh.
2022-09-29 03:12:29 +00:00
c14bc5081f 在run.sh模板中新增ENABLE_DOT_NET相关设置 @gfd 2022-09-09 13:41:44 +08:00
b6695cbd37 设置助手 新增 支持一键刷新所有缩放设置到与系统同步 2022-09-09 13:32:13 +08:00
8dfdedefdc !10 修复缺失.exe后缀名导致无效的问题
Merge pull request !10 from gfdgd xi/master
2022-09-06 14:15:29 +00:00
63a781a703 update spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh.
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-09-06 14:14:55 +00:00
2ba6e5a135 修复缺失.exe后缀名的问题 2022-09-06 22:08:47 +08:00
5ac9a2c907 !9 新增禁用winemenubuilder.exe
* 新增禁用winemenubuilder.exe
2022-09-06 13:33:06 +00:00
b9d52c2e85 新增禁用winemenubuilder.exe 2022-09-06 20:20:41 +08:00
ac923c3349 为防止屏蔽.net,去掉
Signed-off-by: shenmo <jifengshenmo@outlook.com>
2022-08-31 15:55:50 +00:00
RX6900XT
4ce18687e5 !8 容器优化段以及启动器更正段
* update spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh.
* update spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh.
2022-08-20 23:49:01 +00:00
RX6900XT
2f703b413d !7 容器优化段以及启动器更正段
* update spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh.
* update spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh.
2022-08-14 23:45:14 +00:00
788cf76655 修复 postrm写入不正确 2022-08-11 23:31:49 +08:00
dae6f3dd65 修改: spark-dwine-helper/build.sh 2022-08-10 17:58:19 +08:00
4c0c6c3e62 update spark-dwine-launch/run-template_v1.sh. 2022-08-09 16:17:47 +00:00
8a41c4e86c update spark-dwine-launch/run-template_v1.sh. 2022-08-09 16:15:13 +00:00
RX6900XT
3411fe4fab !5 容器优化段以及启动器更正段
* update spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh.
* update spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh.
* update spark-dwine-launch/run-template_v1.sh.
* update spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh.
2022-08-06 03:16:35 +00:00
13620cb464 修改helper文案
修改目录结构
2022-07-29 20:58:21 +08:00
1af6f3d759 update spark-dwine-launch/run-template_v1.sh. 2022-07-03 09:43:56 +00:00
623c006cbe !2 屏蔽mono和gecko安装器
Merge pull request !2 from RX6900XT/master
2022-07-03 09:43:44 +00:00
RX6900XT
b23682d424 update spark-dwine-launch/run-template_v1.sh.
屏蔽mono和gecko安装器
2022-07-03 08:16:45 +00:00
f600ec56af !1 添加了AliIm-taobao和Spark-WeCom的优化
Merge pull request !1 from RX6900XT/master
2022-06-29 05:48:14 +00:00
RX6900XT
766a975b34 update spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh. 2022-06-29 03:28:56 +00:00
RX6900XT
7f8759510f update spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh.
添加了Spark-WeCom的优化支持
2022-06-29 03:24:38 +00:00
8485c66a87 修复路径问题 2022-06-22 07:41:28 +00:00
8e5ddd4215 添加卸载时清理 2022-06-20 01:14:20 +08:00
c5f8c2308a 已无必要提示,已recommends管理工具 2022-06-20 00:14:03 +08:00
08f2da0038 修改: spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh 2022-06-19 22:38:21 +08:00
57a3262264 修改: spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh 2022-06-19 22:17:17 +08:00
e893040b98 现在支持图形化设置缩放 2022-06-19 21:57:10 +08:00
3e36c11e88 修改: spark-dwine-helper/build.sh
重命名:   spark-dwine-helper/package-source/uos-assests/opt/apps/store.spark-app.spark-dwine-helper/entries/applications/store.spark-app.spark-dwine-helper.desktop -> spark-dwine-helper/package-source/uos-assets/opt/apps/store.spark-app.spark-dwine-helper/entries/applications/store.spark-app.spark-dwine-helper.desktop
	重命名:   spark-dwine-helper/package-source/uos-assests/opt/apps/store.spark-app.spark-dwine-helper/entries/icons/hicolor/scalable/apps/store.spark-app.spark-dwine-helper.png -> spark-dwine-helper/package-source/uos-assets/opt/apps/store.spark-app.spark-dwine-helper/entries/icons/hicolor/scalable/apps/store.spark-app.spark-dwine-helper.png
2022-06-19 19:58:27 +08:00
14f366bb46 修改: spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4.sh
删除:     spark-dwine-helper/spark_run_custom.sh
2022-06-18 19:19:57 +08:00
cbf7dbd838 适配双打包方式 2022-06-18 19:11:53 +08:00
6c672fdf55 修改: spark-dwine-helper/pkgu/DEBIAN/postinst
修改:     spark-dwine-helper/pkgu/DEBIAN/postrm
	新文件:   spark-dwine-helper/pkgu/opt/apps/store.spark-app.spark-dwine-helper/entries/applications/store.spark-app.spark-dwine-helper.desktop
	新文件:   spark-dwine-helper/pkgu/opt/apps/store.spark-app.spark-dwine-helper/entries/icons/hicolor/scalable/apps/store.spark-app.spark-dwine-helper.png
2022-06-17 16:31:13 +08:00
b48c1adad9 support-uos 2022-06-17 16:03:19 +08:00
52fcf57512 删除: hello-gitlink 2022-06-17 15:41:49 +08:00
46d8e02d9c 新文件: hello-gitlink 2022-06-15 00:02:10 +08:00
0a0d3f4055 修改: spark-dwine-helper/pkg/opt/durapps/spark-dwine-helper/scale-set-helper/set-wine-scale.sh 2022-06-13 00:32:02 +08:00
a3b83b1b91 修改: spark-dwine-helper/pkg/opt/durapps/spark-dwine-helper/scale-set-helper/set-wine-scale.sh 2022-06-13 00:30:49 +08:00
6694c47fe4 修改: spark-dwine-helper/pkg/DEBIAN/control
新文件:   spark-dwine-helper/pkg/opt/durapps/spark-dwine-helper/scale-set-helper/bunny.txt
	修改:     spark-dwine-helper/pkg/opt/durapps/spark-dwine-helper/scale-set-helper/get-scale.sh
	修改:     spark-dwine-helper/pkg/opt/durapps/spark-dwine-helper/scale-set-helper/set-wine-scale.sh
2022-06-13 00:29:20 +08:00
04b3e1dd9b update spark-dwine-helper/pkg/DEBIAN/control. 2022-06-12 01:14:22 +00:00
09dadd36e8 update spark-dwine-helper/pkg/opt/deepinwine/tools/spark_run_v4.sh. 2022-06-12 01:13:57 +00:00
18845940e1 update spark-dwine-launch/run-template_v1.sh. 2022-06-11 14:32:54 +00:00
d8671e5863 update spark-dwine-helper/pkg/opt/durapps/spark-dwine-helper/scale-set-helper/get-scale.sh. 2022-06-11 08:44:50 +00:00
c863f369b6 update spark-dwine-helper/pkg/DEBIAN/control. 2022-06-10 12:28:44 +00:00
3ec2118ddb update spark-dwine-helper/pkg/opt/deepinwine/tools/spark_run_v4.sh. 2022-06-10 12:27:52 +00:00
93f096bca5 修改: spark-dwine-helper/pkg/opt/deepinwine/tools/spark_run_v4.sh
重命名:   spark-dwine-helper/pkg/opt/durapps/spark-dwine-helper/spark-get-scale.sh -> spark-dwine-helper/pkg/opt/durapps/spark-dwine-helper/scale-set-helper/get-scale.sh
	重命名:   spark-dwine-helper/pkg/opt/durapps/spark-dwine-helper/set-dwine-scale.sh -> spark-dwine-helper/pkg/opt/durapps/spark-dwine-helper/scale-set-helper/set-wine-scale.sh
	修改:     spark-dwine-helper/spark_run_custom.sh
2022-06-10 19:51:09 +08:00
43e11b2e7f update spark-dwine-helper/pkg/DEBIAN/control. 2022-06-10 11:45:04 +00:00
39be413b97 update spark-dwine-helper/spark_run_custom.sh. 2022-06-10 11:44:27 +00:00
63b63d7cfa update spark-dwine-helper/pkg/opt/deepinwine/tools/spark_run_v4.sh. 2022-06-10 11:43:44 +00:00
ec73153de1 update spark-dwine-helper/pkg/opt/durapps/spark-dwine-helper/spark-get-scale.sh. 2022-06-10 11:03:56 +00:00
6ad27cca3f update spark-dwine-helper/pkg/opt/durapps/spark-dwine-helper/spark-get-scale.sh. 2022-06-10 10:59:47 +00:00
ad9535b5a0 update spark-dwine-helper/pkg/DEBIAN/control. 2022-06-07 07:13:32 +00:00
e6673676bd 修改: spark-dwine-helper/pkg/opt/durapps/spark-dwine-helper/spark-get-scale.sh
修改:     spark-dwine-launch/run-template_v1.sh
2022-05-31 22:39:35 +08:00
01761b00ab 修改: spark-dwine-helper/pkg/DEBIAN/control
修改:     spark-dwine-helper/pkg/opt/deepinwine/tools/spark_run_v4.sh
	修改:     spark-dwine-helper/pkg/opt/durapps/spark-dwine-helper/set-dwine-scale.sh
2022-05-31 22:27:40 +08:00
64 changed files with 1348 additions and 867 deletions

View File

@@ -2,3 +2,9 @@
#### 介绍
Modify deepin-wine to make it perform better
#### 如何加入应用适配
把适配文件放入`/opt/deepinwine/tools/spark_run_v4_app_configs/$BOTTLENAME.sh`即可
具体编写方式请参考 https://gitee.com/deepin-community-store/spark-wine/tree/master/spark-dwine-helper/s-wine-helper/deepinwine/tools/spark_run_v4_app_configs

134
spark-dwine-helper/build.sh Executable file
View File

@@ -0,0 +1,134 @@
#/bin/bash
DEPEND=`dpkg -l | grep fakeroot`
if [ "$DEPEND" = "" ] ; then
echo "未安装依赖fakeroot 本脚本退出"
exit 1
fi
if [ $# -lt 1 ]; then
echo "无参数,无法启动。用法 $0 版本号"
echo "No option detected, exit. Usage: $0 version"
exit 1
fi
version="$1"
######################################################
echo "build debian package"
mkdir -p pkg/DEBIAN
cp -r ./s-wine-helper pkg/opt
SIZE=`du -s ./pkg`
SIZE=`echo ${SIZE%%.*}`
cat << EOF >pkg/DEBIAN/control
Package: spark-dwine-helper
Version: $version
Architecture: all
Maintainer: shenmo <shenmo@spark-app.store>
Installed-Size: $SIZE
Depends: zenity, p7zip-full, fonts-noto-cjk,transhell
Section: utils
Priority: extra
Recommends: spark-dwine-helper-settings
Multi-Arch: foreign
Provides: store.spark-app.spark-dwine-helper(=$version)
Replaces: store.spark-app.spark-dwine-helper(<=$version)
Homepage: https://gitee.com/deepin-community-store/spark-wine
Description: Spark Deepin Wine Helper
EOF
cp postrm pkg/DEBIAN/postrm
chmod +x pkg/DEBIAN/postrm
cd pkg && fakeroot dpkg-deb -Z xz -b . ../
cd ..
echo "普通deb包已经准备好正在生成UOS deb包"
rm -rf pkg/
#################################################################
mkdir -p pkg/DEBIAN
cp -r uos-package-assets/opt pkg/
cp -r s-wine-helper/* pkg/opt
cat << EOF >pkg/opt/apps/store.spark-app.spark-dwine-helper/info
{
"appid": "store.spark-app.spark-dwine-helper",
"name": "store.spark-app.spark-dwine-helper",
"version": "$version",
"arch": ["amd64,arm64,mipsel64,sw64"],
"permissions": {
"autostart": false,
"notification": false,
"trayicon": false,
"clipboard": false,
"account": false,
"bluetooth": false,
"camera": false,
"audio_record": false,
"installed_apps": false
}
}
EOF
SIZE=`du -s ./pkg`
SIZE=`echo ${SIZE%%.*}`
cat << EOF >pkg/DEBIAN/control
Package: store.spark-app.spark-dwine-helper
Version: $version
Architecture: all
Maintainer: shenmo <shenmo@spark-app.store>
Installed-Size: $SIZE
Depends: zenity, p7zip-full, fonts-noto-cjk,transhell
Section: utils
Priority: extra
Recommends: spark-dwine-helper-settings
Provides: spark-dwine-helper(=$version)
Conflicts: spark-dwine-helper
Replaces: spark-dwine-helper(<=$version)
Multi-Arch: foreign
Homepage: https://gitee.com/deepin-community-store/spark-wine
Description: Spark Deepin Wine Helper
EOF
cd pkg && fakeroot dpkg-deb -Z xz -b . ../
cd ..
echo "UOS deb包已经准备好"
rm -rf pkg/
########################################
mkdir -p pkg/DEBIAN
cp -r spark-dwine-helper-settings/* pkg/
SIZE=`du -s ./pkg`
SIZE=`echo ${SIZE%%.*}`
cat << EOF >pkg/DEBIAN/control
Package: spark-dwine-helper-settings
Version: 1.3.2
Architecture: all
Maintainer: shenmo <shenmo@spark-app.store>
Installed-Size: $SIZE
Depends: spark-dwine-helper(>=1.6),transhell,zenity
Section: utils
Priority: extra
Multi-Arch: foreign
Homepage: https://gitee.com/deepin-community-store/spark-wine
Description: Spark Deepin Wine Helper
EOF
cd pkg && fakeroot dpkg-deb -Z xz -b . ../
cd ..
echo "helper deb包已经准备好"
rm -rf pkg/

View File

@@ -1,11 +0,0 @@
Package: spark-dwine-helper
Version: 1.5
Architecture: all
Maintainer: shenmo <shenmo@spark-app.store>
Installed-Size: 2293
Depends: zenity:amd64, p7zip-full:amd64, fonts-noto-cjk,deepin-wine-helper(>=5.1)
Section: utils
Priority: extra
Multi-Arch: foreign
Homepage: https://www.spark-app.store/
Description: Spark Deepin Wine Helper

View File

@@ -1,666 +0,0 @@
#!/bin/bash
# Copyright (C) 2016 Deepin, Inc.
# Copyright (C) 2022 The Spark Project
#
# Author: Li LongYu <lilongyu@linuxdeepin.com>
# Peng Hao <penghao@linuxdeepin.com>
#
# Modifier: shenmo <shenmo@spark-app.store>
#
# diff: Now will run set-dwine-scale.sh in stage RunApp before CallApp
# Deleted Deepin-* to simplify the script
#
WINEPREFIX="$HOME/.deepinwine/@public_bottle_name@"
APPDIR="/opt/deepinwine/apps/@public_bottle_name@"
APPVER="@deb_version_string@"
APPTAR="files.7z"
BOTTLENAME=""
WINE_CMD="deepin-wine"
#这里会被后续覆盖,似乎没啥用
LOG_FILE=$0
PUBLIC_DIR="/var/public"
SHELL_DIR=$(dirname $0)
SHELL_DIR=$(realpath "$SHELL_DIR")
if [ $SPECIFY_SHELL_DIR ]; then
SHELL_DIR=$SPECIFY_SHELL_DIR
fi
if [ $APPRUN_CMD ]; then
WINE_CMD=$APPRUN_CMD
fi
if [ $SPECIFY_SHELL_DIR ]; then
SHELL_DIR=$SPECIFY_SHELL_DIR
fi
UsePublicDir()
{
if [ -z "$USE_PUBLIC_DIR" ]; then
echo "Don't use public dir"
return 1
fi
if [ ! -d "$PUBLIC_DIR" ];then
echo "Not found $PUBLIC_DIR"
return 1
fi
if [ ! -r "$PUBLIC_DIR" ];then
echo "Can't read for $PUBLIC_DIR"
return 1
fi
if [ ! -w "$PUBLIC_DIR" ];then
echo "Can't write for $PUBLIC_DIR"
return 1
fi
if [ ! -x "$PUBLIC_DIR" ];then
echo "Can't excute for $PUBLIC_DIR"
return 1
fi
return 0
}
########关于公共文件夹,暂时意义不明
_DeleteRegistry()
{
env WINEPREFIX="$WINEPREFIX" $WINE_CMD reg DELETE "$1" /f &> /dev/null
}
#########功能:删除注册表
init_log_file()
{
if [ ! -d "$DEBUG_LOG" ];then
return
fi
LOG_DIR=$(realpath $DEBUG_LOG)
if [ -d "$LOG_DIR" ];then
LOG_FILE="${LOG_DIR}/${LOG_FILE##*/}.log"
echo "" > "$LOG_FILE"
debug_log "LOG_FILE=$LOG_FILE"
fi
}
debug_log_to_file()
{
if [ -d "$DEBUG_LOG" ];then
echo -e "${1}" >> "$LOG_FILE"
fi
}
debug_log()
{
echo "${1}"
}
################log相关功能
HelpApp()
{
echo " Extra Commands:"
echo " -r/--reset Reset app to fix errors"
echo " -e/--remove Remove deployed app files"
echo " -h/--help Show program help info"
}
#############帮助文件
FixLink()
{
if [ -d ${WINEPREFIX} ]; then
CUR_DIR=$PWD
cd "${WINEPREFIX}/dosdevices"
rm c: z: y:
ln -s -f ../drive_c c:
ln -s -f / z:
ln -s -f $HOME y:
cd $CUR_DIR
ls -l "${WINEPREFIX}/dosdevices"
fi
}
###########会在应用启动和解压时执行,驱动器绑定
DisableWrite()
{
if [ -d "${1}" ]; then
chmod +w "${1}"
rm -rf "${1}"
fi
mkdir "${1}"
chmod -w "${1}"
}
########如果有该文件夹则删除然后再创建一个不允许写入的这东西是被用在了QQ启动上看来腾讯不怎么好对付
is_autostart()
{
AUTOSTART="/opt/deepinwine/tools/autostart"
if [ -f "$AUTOSTART.all" ]&&[ -f "/opt/apps/$1/files/run.sh" ];then
return 0
fi
if [ -f $AUTOSTART ];then
grep -c "$1" $AUTOSTART > /dev/null
return $?
fi
return 1
}
#########自动启动相关,等用到了再研究
urldecode() { : "${*//+/ }"; echo -e "${_//%/\\x}"; }
#######url转义
#arg 1: windows process file path
#arg 2-*: windows process args
CallProcess()
{
#get file full path
path="$1"
path=$(echo ${path/c:/${WINEPREFIX}/drive_c})
path=$(echo ${path//\\/\/})
#kill bloack process
is_autostart $DEB_PACKAGE_NAME
autostart=$?
if [ $autostart -ne 0 ];then
$SHELL_DIR/kill.sh "$BOTTLENAME" block
fi
#change current dir to excute path
path=$(dirname "$path")
cd "$path"
pwd
#Set default mime type
if [ -n "$MIME_TYPE" ]; then
xdg-mime default "$DEB_PACKAGE_NAME".desktop "$MIME_TYPE"
fi
debug_log_to_file "Starting process $* ..."
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$@" &
#start autobottle
if [ $autostart -eq 0 ];then
$SHELL_DIR/autostart_wine.sh $DEB_PACKAGE_NAME
fi
}
###通用启动APP逻辑。对于没有被case捕捉的非适配APP则直接执行此部分。似乎已经有了防止残留的功能
###一些自定义的应用不会使用这个启动,而另一些则会调用这个
###有设置mimetype和自动启动(这个暂时没分析)的功能
CallZhuMu()
{
#change current dir to excute path
path=$(dirname "$path")
cd "$path"
pwd
#Set default mime type
if [ -n "$MIME_TYPE" ]; then
xdg-mime default "$DEB_PACKAGE_NAME".desktop "$MIME_TYPE"
fi
debug_log_to_file "Starting process $* ..."
if [ -n "$2" ];then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$1" "--url=$2" &
else
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$1" &
fi
}
CallQQGame()
{
debug_log "run $1"
$SHELL_DIR/kill.sh qqgame block
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$1" &
}
CallQQ()
{
if [ ! -f "$WINEPREFIX/../.QQ_run" ]; then
debug_log "first run time"
$SHELL_DIR/add_hotkeys
$SHELL_DIR/fontconfig
touch "$WINEPREFIX/../.QQ_run"
fi
DisableWrite "${WINEPREFIX}/drive_c/Program Files/Tencent/QQ/Bin/QQLiveMPlayer"
DisableWrite "${WINEPREFIX}/drive_c/Program Files/Tencent/QQ/Bin/QQLiveMPlayer1"
DisableWrite "${WINEPREFIX}/drive_c/Program Files/Tencent/QzoneMusic"
DisableWrite "${WINEPREFIX}/drive_c/Program Files/Tencent/QQBrowser"
DisableWrite "${WINEPREFIX}/drive_c/Program Files/Common Files/Tencent/QQBrowser"
DisableWrite "${WINEPREFIX}/drive_c/users/Public/Application Data/Tencent/QQBrowserBin"
DisableWrite "${WINEPREFIX}/drive_c/users/Public/Application Data/Tencent/QQBrowserDefault"
DisableWrite "${WINEPREFIX}/drive_c/users/${USER}/Application Data/Tencent/QQBrowserDefault"
DisableWrite "${WINEPREFIX}/drive_c/users/Public/Application Data/Tencent/QQPCMgr"
DisableWrite "${WINEPREFIX}/drive_c/Program Files/Common Files/Tencent/QQPCMgr"
DisableWrite "${WINEPREFIX}/drive_c/Program Files/Common Files/Tencent/HuaYang"
DisableWrite "${WINEPREFIX}/drive_c/users/${USER}/Application Data/Tencent/HuaYang"
CallProcess "$@"
}
CallTIM()
{
if [ ! -f "$WINEPREFIX/../.QQ_run" ]; then
debug_log "first run time"
$SHELL_DIR/add_hotkeys
####似乎是给dde-control-center添加快捷键
$SHELL_DIR/fontconfig
####暂时无法得知用途和用法
# If the bottle not exists, run reg may cost lots of times
# So create the bottle befor run reg
env WINEPREFIX="$WINEPREFIX" $WINE_CMD uninstaller --list
touch $WINEPREFIX/../.QQ_run
fi
CallProcess "$@"
#disable Tencent MiniBrowser
_DeleteRegistry "HKCU\\Software\\Tencent\\MiniBrowser"
}
CallWeChat()
{
export DISABLE_RENDER_CLIPBOARD=1
CallProcess "$@"
}
CallWangWang()
{
chmod 700 "$WINEPREFIX/drive_c/Program Files/AliWangWang/9.12.10C/wwbizsrv.exe"
chmod 700 "$WINEPREFIX/drive_c/Program Files/Alibaba/wwbizsrv/wwbizsrv.exe"
if [ $# = 3 ] && [ -z "$3" ];then
EXEC_PATH="c:/Program Files/AliWangWang/9.12.10C/WWCmd.exe"
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$EXEC_PATH" "$2" &
else
CallProcess "$@"
fi
}
CallWXWork()
{
if [ -d "${WINEPREFIX}/drive_c/users/${USER}/Application Data/Tencent/WXWork/Update" ]; then
rm -rf "${WINEPREFIX}/drive_c/users/${USER}/Application Data/Tencent/WXWork/Update"
fi
if [ -d "${WINEPREFIX}/drive_c/users/${USER}/Application Data/Tencent/WXWork/upgrade" ]; then
rm -rf "${WINEPREFIX}/drive_c/users/${USER}/Application Data/Tencent/WXWork/upgrade"
fi
#Support use native file dialog
CallProcess "$@"
}
CallDingTalk()
{
debug_log "run $1"
$SHELL_DIR/kill.sh DingTalk block
CallProcess "$@"
}
CallMeiTuXiuXiu()
{
#set -- "$1" "${2#file://*}"
local path=$(urldecode "$2")
path=${path/file:\/\//}
set -- "$1" "$path"
if [ "$path" ];then
CallProcess "$@"
else
CallProcess "$1"
fi
}
CallFastReadPDF()
{
#set -- "$1" "${2#file://*}"
local path=$(urldecode "$2")
path=${path/file:\/\//}
set -- "$1" "$path"
if [ "$path" ];then
CallProcess "$@"
else
CallProcess "$1"
fi
}
CallEvernote()
{
#set -- "$1" "${2#file://*}"
local path=$(urldecode "$2")
path=${path/file:\/\//}
set -- "$1" "$path"
if [ "$path" ];then
CallProcess "$@"
else
CallProcess "$1"
fi
}
CallTencentVideo()
{
if [ -f "${WINEPREFIX}/drive_c/Program Files/Tencent/QQLive/Upgrade.dll" ]; then
rm -rf "${WINEPREFIX}/drive_c/Program Files/Tencent/QQLive/Upgrade.dll"
fi
CallProcess "$@"
}
CallFoxmail()
{
sed -i '/LogPixels/d' ${WINEPREFIX}/user.reg
CallProcess "$@"
}
CallTHS()
{
$SHELL_DIR/kill.sh ths block
debug_log "Start run $1"
#get file full path
path="$1"
path=$(echo ${path/c:/${WINEPREFIX}/drive_c})
path=$(echo ${path//\\/\/})
#kill bloack process
name="${path##*/}"
$SHELL_DIR/kill.sh "$name" block
#change current dir to excute path
path=$(dirname "$path")
cd "$path"
pwd
#Set default mime type
if [ -n "$MIME_TYPE" ]; then
xdg-mime default "$DEB_PACKAGE_NAME".desktop "$MIME_TYPE"
fi
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$@" &
}
CallQQGameV2()
{
debug_log "run $1"
$SHELL_DIR/kill.sh QQMicroGameBox block
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$1" -action:force_download -appid:${2} -pid:8 -bin_version:1.1.2.4 -loginuin: &
}
CallPsCs6()
{
#get file full path
path="$1"
path=$(echo ${path/c:/${WINEPREFIX}/drive_c})
path=$(echo ${path//\\/\/})
#kill bloack process
name="${path##*/}"
$SHELL_DIR/kill.sh "$name" block
#change current dir to excute path
path=$(dirname "$path")
cd "$path"
pwd
#Set default mime type
if [ -n "$MIME_TYPE" ]; then
xdg-mime default "$DEB_PACKAGE_NAME".desktop "$MIME_TYPE"
fi
debug_log_to_file "Starting process $* ..."
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$@" &
}
#arg 1: exec file path
#arg 2: autostart ,or exec arg 1
#arg 3: exec arg 2
CallApp()
{
FixLink
debug_log "CallApp $BOTTLENAME arg count $#: $*"
case $BOTTLENAME in
"Deepin-WangWang")
CallWangWang "$@"
;;
"Deepin-ZhuMu")
CallZhuMu "$@"
;;
"Deepin-QQ"|"Wine-QQ"|"Spark-QQ")
CallQQ "$@"
;;
"Deepin-TIM")
CallTIM "$@"
;;
"Deepin-QQGame"*)
CallQQGame "$@"
;;
"Deepin-ATM")
CallATM "$@"
;;
"Deepin-WeChat")
CallWeChat "$@"
;;
"Deepin-WXWork")
CallWXWork "$@"
;;
"Deepin-Dding")
CallDingTalk "$@"
;;
"Deepin-MTXX")
CallMeiTuXiuXiu "$@"
;;
"Deepin-FastReadPDF")
CallFastReadPDF "$@"
;;
"Deepin-Evernote")
CallEvernote "$@"
;;
"Deepin-TencentVideo")
CallTencentVideo "$@"
;;
"Deepin-Foxmail")
CallFoxmail "$@"
;;
"Deepin-THS")
CallTHS "$@"
;;
"Deepin-QQHlddz")
CallQQGameV2 "$1" 363
;;
"Deepin-QQBydr")
CallQQGameV2 "$1" 1104632801
;;
"Deepin-QQMnsj")
CallQQGameV2 "$1" 1105856612
;;
"Deepin-QQSszb")
CallQQGameV2 "$1" 1105640244
;;
"Deepin-CS6")
CallPsCs6 "$@"
;;
*)
CallProcess "$@"
;;
esac
}
ExtractApp()
{
mkdir -p "$1"
7z x "$APPDIR/$APPTAR" -o"$1"
mv "$1/drive_c/users/@current_user@" "$1/drive_c/users/$USER"
sed -i "s#@current_user@#$USER#" $1/*.reg
FixLink
}
DeployApp()
{
ExtractApp "$WINEPREFIX"
if UsePublicDir;then
chgrp -R users "$WINEPREFIX"
chmod -R 0775 "$WINEPREFIX"
fi
echo "$APPVER" > "$WINEPREFIX/PACKAGE_VERSION"
}
RemoveApp()
{
rm -rf "$WINEPREFIX"
}
ResetApp()
{
debug_log "Reset $PACKAGENAME....."
read -p "* Are you sure?(Y/N)" ANSWER
if [ "$ANSWER" = "Y" -o "$ANSWER" = "y" -o -z "$ANSWER" ]; then
EvacuateApp
DeployApp
CallApp
fi
}
UpdateApp()
{
if [ -f "$WINEPREFIX/PACKAGE_VERSION" ] && [ "$(cat "$WINEPREFIX/PACKAGE_VERSION")" = "$APPVER" ]; then
return
fi
if [ -d "${WINEPREFIX}.tmpdir" ]; then
rm -rf "${WINEPREFIX}.tmpdir"
fi
case $BOTTLENAME in
"Deepin-Intelligent" | "Deepin-QQ" | "Deepin-TIM" | "Deepin-WeChat" | "Deepin-WXWork" | "Deepin-Dding")
rm -rf "$WINEPREFIX"
DeployApp
return
;;
esac
ExtractApp "${WINEPREFIX}.tmpdir"
$SHELL_DIR/updater -s "${WINEPREFIX}.tmpdir" -c "${WINEPREFIX}" -v
if UsePublicDir;then
chgrp -R users "$WINEPREFIX"
chmod -R 0775 "$WINEPREFIX"
fi
rm -rf "${WINEPREFIX}.tmpdir"
echo "$APPVER" > "$WINEPREFIX/PACKAGE_VERSION"
}
RunApp()
{
progpid=$(ps -ef | grep "zenity --progress --title=${BOTTLENAME}" | grep -v grep)
debug_log "run ${BOTTLENAME} progress pid $progpid"
if [ -n "$progpid" ]; then
debug_log "$BOTTLENAME is running"
exit 0
fi
if [ -d "$WINEPREFIX" ]; then
UpdateApp | progressbar "$BOTTLENAME" "更新$BOTTLENAME中..."
else
DeployApp | progressbar $BOTTLENAME "初始化$BOTTLENAME中..."
fi
############# WARNING: Here is the modified content: Now will run set-dwine-scale.sh
/opt/durapps/spark-dwine-helper/set-dwine-scale.sh "$WINEPREFIX"
CallApp "$@"
}
CreateBottle()
{
if [ -d "$WINEPREFIX" ]; then
UpdateApp
else
DeployApp
fi
}
ParseArgs()
{
if [ $# -eq 4 ];then
RunApp "$3"
elif [ $# -eq 5 ];then
RunApp "$3" "$5"
else
RunApp "$3" "$5" "$6"
fi
}
init_log_file
# Check if some visual feedback is possible
if command -v zenity >/dev/null 2>&1; then
progressbar()
{
WINDOWID="" zenity --progress --title="$1" --text="$2" --pulsate --width=400 --auto-close --no-cancel ||
WINDOWID="" zenity --progress --title="$1" --text="$2" --pulsate --width=400 --auto-close
}
else
progressbar()
{
cat -
}
fi
#####准备启动进程,分析在 https://shenmo7192.gitee.io/post/deepin-wine6%E7%9A%84run_v4%E8%84%9A%E6%9C%AC%E6%8E%A2%E7%B4%A2%E5%90%AF%E5%8A%A8%E6%96%B9%E5%BC%8F/
if [ $# -lt 3 ]; then
debug_log "参数个数小于3个"
exit 0
fi
BOTTLENAME="$1"
WINEPREFIX="$HOME/.deepinwine/$1"
if UsePublicDir;then
WINEPREFIX="$PUBLIC_DIR/$1"
fi
APPDIR="/opt/apps/${DEB_PACKAGE_NAME}/files"
if [ -f "$APPDIR/files.md5sum" ];then
APPVER="$(cat $APPDIR/files.md5sum)"
else
APPVER="$2"
fi
debug_log "Run $*"
#执行lnk文件通过判断第5个参数是否是“/Unix”来判断
if [ "$4" == "/Unix" ];then
RunApp "$3" "$4" "$5"
exit 0
fi
if [ $# -lt 4 ]; then
RunApp "$3"
exit 0
fi
case $4 in
"-r" | "--reset")
ResetApp
;;
"-c" | "--create")
CreateBottle
;;
"-e" | "--remove")
RemoveApp
;;
"-u" | "--uri")
ParseArgs "$@"
;;
"-f" | "--file")
ParseArgs "$@"
;;
"-h" | "--help")
HelpApp
;;
*)
echo "Invalid option: $4"
echo "Use -h|--help to get help"
exit 1
;;
esac
exit 0

View File

@@ -1,67 +0,0 @@
#/bin/bash
if [ $# -lt 1 ]; then
echo "无参数无法启动。请参考set-dwine-scale.sh使用"
echo "参数为CONTAINER_PATH"
echo "只读取第一个,其他参数会被放弃"
fi
CONTAINER_PATH="$1"
mkdir -p $HOME/.config/spark-wine/
#####全局参数位置
#####能到这一步的说明已经是没有自定义参数了,直接读全局覆盖没问题
#####
if [ !-f "$HOME/.config/spark-wine/scale.txt" ];then
cat $HOME/.config/spark-wine/scale.txt > $CONTAINER_PATH/scale.txt
echo "检测到已经设置过全局参数,直接复制"
exit
fi
Get_Dist_Name
if [ "$DISTRO" = "Deepin" ] || [ "$DISTRO" = "UniontechOS" ];then
echo 1.0 > $HOME/.config/spark-wine/scale.txt
cat $HOME/.config/spark-wine/scale.txt > $CONTAINER_PATH/scale.txt
#####就是1倍缩放
exit
fi
dimensions=`xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/'`
scale_factor=`zenity --list \
--width=700 \
--height=350 \
--title="您的分辨率是:$dimensions,请在以下选项中选择一个以运行应用" \
--column="缩放倍率" \
1.0 \
1.25 \
1.5 \
1.75 \
2.0`
case "$scale_factor" in
"")
zenity --info --text="默认为1倍缩放。您可以随时删除~/.config/spark-wine/scale.txt来重新设置" --width=500 --height=150
scale_factor="1.0"
;;
*)
zenity --info --text="缩放倍数为$scale_factor。已保存!您可以随时删除~/.config/spark-wine/scale.txt来重新设置" --width=500 --height=150
;;
esac
echo "$scale_factor" > $HOME/.config/spark-wine/scale.txt
cat $HOME/.config/spark-wine/scale.txt > $CONTAINER_PATH/scale.txt
#########>>>>>>>函数段
Get_Dist_Name()
{
if grep -Eqii "Deepin" /etc/issue || grep -Eq "Deepin" /etc/*-release; then
DISTRO='Deepin'
elif grep -Eqi "Uniontech" /etc/issue || grep -Eq "Uniontech" /etc/*-release; then
DISTRO='UniontechOS'
else
DISTRO='OtherOS'
fi
}

15
spark-dwine-helper/postrm Normal file
View File

@@ -0,0 +1,15 @@
#!/bin/bash
if [ "$1" = "remove" ] || [ "$1" = "purge" ];then
echo "清理卸载残留"
for username in $(ls /home)
do
echo /home/$username
if [ -d /home/$username/.config/spark-wine ]
then
rm -rf /home/$username/.config/spark-wine
fi
done
else
echo "非卸载,跳过清理"
fi

View File

@@ -0,0 +1,28 @@
#!/usr/bin/env python2
# vim: set ts=4 sw=4 fileencoding=utf-8:
# Luomio <nohappiness@gmail.com>
# Filename: dde-first-run.py
# Create Date: 27-03, 13
def get_tray_window():
try:
import gobject
from dbus import glib
import dbus
except ImportError:
return False
gobject.threads_init()
glib.init_threads()
bus = dbus.SessionBus()
traymanager = bus.get_object("com.deepin.dde.TrayManager", "/com/deepin/dde/TrayManager")
windows = traymanager.Get("com.deepin.dde.TrayManager","TrayIcons")
str="window_id:"
for i in xrange(len(windows)):
str += '{:#x} '.format(windows[i])
print(str)
if __name__ == "__main__":
get_tray_window()

View File

@@ -0,0 +1,277 @@
#!/bin/bash
#####因为arm版本的deepin-wine-helper不带这个又不想破坏x86兼容性故改名
APP_NAME="QQ"
LOG_FILE=$0
SHELL_DIR=${0%/*}
if [ $SPECIFY_SHELL_DIR ]; then
SHELL_DIR=$SPECIFY_SHELL_DIR
fi
PUBLIC_DIR="/var/public"
UsePublicDir()
{
if [ -z "$USE_PUBLIC_DIR" ]; then
echo "Don't use public dir"
return 1
fi
if [ ! -d "$PUBLIC_DIR" ];then
echo "Not found $PUBLIC_DIR"
return 1
fi
if [ ! -r "$PUBLIC_DIR" ];then
echo "Can't read for $PUBLIC_DIR"
return 1
fi
if [ ! -w "$PUBLIC_DIR" ];then
echo "Can't write for $PUBLIC_DIR"
return 1
fi
if [ ! -x "$PUBLIC_DIR" ];then
echo "Can't excute for $PUBLIC_DIR"
return 1
fi
return 0
}
WINE_BOTTLE="$HOME/.deepinwine"
if UsePublicDir;then
WINE_BOTTLE="$PUBLIC_DIR"
fi
get_wine_by_pid()
{
wine_path=$(cat /proc/$1/maps | grep -E "\/wine$|\/wine64$|\/wine |\/wine64 " | head -1 | awk '{print $6}')
if [ -z "$wine_path" ];then
cat /proc/$1/cmdline| xargs -0 -L1 -I{} echo {} | grep -E "\/wine$|\/wine64$|\/wine |\/wine64 " | head -1
else
echo $wine_path
fi
}
is_wine_process()
{
wine_module=$(get_wine_by_pid $1)
if [ -z "$wine_module" ];then
wine_module=$(cat /proc/$1/maps | grep -E "\/wineserver$" | head -1)
fi
echo $wine_module
}
get_prefix_by_pid()
{
WINE_PREFIX=$(xargs -0 printf '%s\n' < /proc/$1/environ | grep WINEPREFIX)
WINE_PREFIX=${WINE_PREFIX##*=}
if [ -z "$WINE_PREFIX" ] && [ -n "$(is_wine_process $1)" ]; then
#不指定容器的情况用默认容器目录
WINE_PREFIX="$HOME/.wine"
fi
if [ -n "$WINE_PREFIX" ];then
WINE_PREFIX=$(realpath $WINE_PREFIX)
echo $WINE_PREFIX
fi
}
get_wineserver()
{
if [ -z "$1" ];then
return
fi
targ_prefix=$(realpath $1)
ps -ef | grep wineserver | while read server_info ;do
debug_log_to_file "get server info: $server_info"
server_pid=$(echo $server_info | awk '{print $2}')
server_prefix=$(get_prefix_by_pid $server_pid)
debug_log_to_file "get server pid $server_pid, prefix: $server_prefix"
if [ "$targ_prefix" = "$server_prefix" ];then
server=$(echo $server_info | awk '{print $NF}')
if [ "-p0" = "$server" ];then
server=$(echo $server_info | awk '{print $(NF-1)}')
fi
debug_log_to_file "get server $server"
echo $server
return
fi
done
}
init_log_file()
{
if [ -d "$DEBUG_LOG" ];then
LOG_DIR=$(realpath $DEBUG_LOG)
if [ -d "$LOG_DIR" ];then
LOG_FILE="${LOG_DIR}/${LOG_FILE##*/}.log"
echo "" > "$LOG_FILE"
debug_log "LOG_FILE=$LOG_FILE"
fi
fi
}
debug_log_to_file()
{
if [ -d "$DEBUG_LOG" ];then
strDate=$(date)
echo -e "${strDate}:${1}" >> "$LOG_FILE"
fi
}
debug_log()
{
strDate=$(date)
echo "${strDate}:${1}"
}
init_log_file
get_bottle_path_by_process_id()
{
PID_LIST="$1"
PREFIX_LIST=""
for pid_var in $PID_LIST ; do
WINE_PREFIX=$(get_prefix_by_pid $pid_var)
#去掉重复项
for path in $(echo -e $PREFIX_LIST) ; do
if [[ $path == "$WINE_PREFIX" ]]; then
WINE_PREFIX=""
fi
done
if [ -d "$WINE_PREFIX" ]; then
debug_log_to_file "found $pid_var : $WINE_PREFIX"
PREFIX_LIST+="\n$WINE_PREFIX"
fi
done
echo -e $PREFIX_LIST
}
get_pid_by_process_name()
{
PID_LIST=""
for pid_var in $(ps -ef | grep -E -i "$1" | grep -v grep | awk '{print $2}');do
#通过判断是否加载wine来判断是不是wine进程
if [ -n "$(is_wine_process $pid_var)" ];then
PID_LIST+=" $pid_var"
fi
done
echo "$PID_LIST"
}
get_bottle_path_by_process_name()
{
PID_LIST=$(get_pid_by_process_name $1)
debug_log_to_file "get pid list: $PID_LIST"
get_bottle_path_by_process_id "$PID_LIST"
}
get_bottle_path()
{
if [ -z "$1" ];then
return 0
fi
if [ -f "$1/user.reg" ]; then
realpath "$1"
return 0
fi
if [ -f "$WINE_BOTTLE/$1/user.reg" ]; then
realpath "$WINE_BOTTLE/$1"
return 0
fi
get_bottle_path_by_process_name "$1"
}
kill_app()
{
debug_log "try to kill $1"
for path in $(get_bottle_path $1); do
if [ -n "$path" ];then
WINESERVER=$(get_wineserver "$path")
if [ -f "$WINESERVER" ];then
debug_log "kill $path by $WINESERVER"
env WINEPREFIX="$path" "$WINESERVER" -k
fi
PID_LIST=$(get_pid_by_process_name "exe|wine")
for tag_pid in $PID_LIST; do
bottle=$(get_bottle_path_by_process_id "$tag_pid")
bottle=${bottle:1}
if [ "$path" = "$bottle" ];then
echo "kill $tag_pid for $bottle"
kill -9 $tag_pid
fi
done
fi
done
#Kill defunct process
ps -ef | grep -E "$USER.*exe.*<defunct>"
ps -ef | grep -E "$USER.*exe.*<defunct>" | grep -v grep | awk '{print $2}' | xargs -i kill -9 {}
}
get_tray_window()
{
$SHELL_DIR/spark_get_tray_window | awk -F: '{print $2}'
}
get_stacking_window()
{
xprop -root _NET_CLIENT_LIST_STACKING | awk -F# '{print $2}' | sed -e 's/, / /g'
}
get_window_pid()
{
for winid in $(echo "$1" | sed -e 's/ /\n/g') ;
do
xprop -id $winid _NET_WM_PID | awk -F= '{print $2}'
done
}
get_window_bottle()
{
debug_log_to_file "get_window_bottle $1"
PID_LIST=$(get_window_pid "$1")
debug_log_to_file "get_window_bottle pid list: $PID_LIST"
get_bottle_path_by_process_id "$PID_LIST"
}
get_active_bottles()
{
TRAYWINDOWS=$(get_tray_window)
STACKINGWINDOWS=$(get_stacking_window)
debug_log_to_file "tray window id: $TRAYWINDOWS"
debug_log_to_file "stacking window id: $STACKINGWINDOWS"
PID_LIST="$TRAYWINDOWS $STACKINGWINDOWS"
get_window_bottle "$PID_LIST"
}
kill_exit_block_app()
{
TAGBOTTLE=$(get_bottle_path $1)
debug_log "tag bottle: $TAGBOTTLE"
ACTIVEBOTTLES=$(get_active_bottles)
debug_log "active bottles: $ACTIVEBOTTLES"
if [[ "$ACTIVEBOTTLES" != *"$TAGBOTTLE"* ]]; then
kill_app "$TAGBOTTLE"
fi
}
#get_active_bottles
#exit
debug_log "kill $1 $2"
if [ -n "$1" ]; then
APP_NAME="$1"
fi
if [ "$2" = "block" ]; then
kill_exit_block_app $APP_NAME $3
else
kill_app $APP_NAME
fi

View File

@@ -8,29 +8,18 @@
#
# Modifier: shenmo <shenmo@spark-app.store>
#
# diff: Now will run set-dwine-scale.sh in stage RunApp before CallApp
# Deleted Deepin-* to simplify the script
#
#
#
# 这是一个可以用于自定义的脚本为了增加易读性删除了大部分的case
# 请对照spark_run_v4.sh进行操作
# 建议把文件名中的custom换成你的app名字不要中文方便维护和识别
#
#
#
#
#
#
#
#
source /opt/durapps/transhell/transhell.sh
load_transhell_debug
WINEPREFIX="$HOME/.deepinwine/@public_bottle_name@"
APPDIR="/opt/deepinwine/apps/@public_bottle_name@"
APPVER="@deb_version_string@"
APPTAR="files.7z"
BOTTLENAME=""
WINE_CMD="deepin-wine"
#这里会被后续覆盖,似乎没啥用
LOG_FILE=$0
PUBLIC_DIR="/var/public"
@@ -48,32 +37,7 @@ if [ $SPECIFY_SHELL_DIR ]; then
SHELL_DIR=$SPECIFY_SHELL_DIR
fi
UsePublicDir()
{
if [ -z "$USE_PUBLIC_DIR" ]; then
echo "Don't use public dir"
return 1
fi
if [ ! -d "$PUBLIC_DIR" ];then
echo "Not found $PUBLIC_DIR"
return 1
fi
if [ ! -r "$PUBLIC_DIR" ];then
echo "Can't read for $PUBLIC_DIR"
return 1
fi
if [ ! -w "$PUBLIC_DIR" ];then
echo "Can't write for $PUBLIC_DIR"
return 1
fi
if [ ! -x "$PUBLIC_DIR" ];then
echo "Can't excute for $PUBLIC_DIR"
return 1
fi
return 0
}
########关于公共文件夹,暂时意义不明
_DeleteRegistry()
{
@@ -170,7 +134,7 @@ CallProcess()
is_autostart $DEB_PACKAGE_NAME
autostart=$?
if [ $autostart -ne 0 ];then
$SHELL_DIR/kill.sh "$BOTTLENAME" block
$SHELL_DIR/spark_kill.sh "$BOTTLENAME" block
fi
#change current dir to excute path
@@ -182,10 +146,25 @@ CallProcess()
if [ -n "$MIME_TYPE" ]; then
xdg-mime default "$DEB_PACKAGE_NAME".desktop "$MIME_TYPE"
fi
# Disable winemenubuilder
env WINEPREFIX="$WINEPREFIX" $WINE_CMD reg add 'HKEY_CURRENT_USER\Software\Wine\DllOverrides' /v winemenubuilder.exe /f
# Link to Document
if [ -L "$WINEPREFIX/drive_c/users/$(whoami)/My Documents" ]; then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD reg add 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders' /t REG_EXPAND_SZ /v Personal /d "%USERPROFILE%\My Documents" /f
else
env WINEPREFIX="$WINEPREFIX" $WINE_CMD reg add 'HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders' /t REG_EXPAND_SZ /v Personal /d "%USERPROFILE%\Documents" /f
fi
debug_log_to_file "Starting process $* ..."
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$@" &
############# WARNING: Here is the modified content: Now will run set-dwine-scale.sh
/opt/durapps/spark-dwine-helper/scale-set-helper/set-wine-scale.sh "$WINEPREFIX"
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$@"
#start autobottle
if [ $autostart -eq 0 ];then
@@ -196,40 +175,45 @@ CallProcess()
###一些自定义的应用不会使用这个启动,而另一些则会调用这个
###有设置mimetype和自动启动(这个暂时没分析)的功能
###########专属优化段:
####请在这里把CustomAPP换成你的APP名字
####非常不建议直接使用CustomAPP将来维护你自己都不知道哪个脚本给谁用了
####不要用中文
CallCustomAPP()
UnixUriToDosPath()
{
###请在这里添加在CallProcess之前的脚本即在启动应用前执行的。会在部署结束启动应用前打开
CallProcess "$@"
OPEN_FILE="$1"
if [ -f "$OPEN_FILE" ]; then
OPEN_FILE=$(realpath "$OPEN_FILE")
OPEN_FILE="z:$OPEN_FILE"
OPEN_FILE=$(echo $OPEN_FILE | sed -e 's/\//\\\\/g')
fi
echo $OPEN_FILE
}
#arg 1: exec file path
#arg 2: autostart ,or exec arg 1
#arg 3: exec arg 2
#### CallApp段根据容器名找专属优化没有就走通用启动
CallApp()
{
FixLink
debug_log "CallApp $BOTTLENAME arg count $#: $*"
case $BOTTLENAME in
"User-Custom")
#^---这里写你的容器名,就是解压到~/.deepinwine的那个文件夹名字
CallCustomAPP "$@"
#^---这里要和之前的那个对应
;;
*)
CallProcess "$@"
#仍然保留对未适配的APP的兼容
;;
esac
APP_CONFIG_PATH="/opt/deepinwine/tools/spark_run_v4_app_configs/${BOTTLENAME}.sh"
if [ -f "$APP_CONFIG_PATH" ]; then
echo "执行 ${BOTTLENAME}.sh ..."
source $APP_CONFIG_PATH
else
echo "$APP_CONFIG_PATH 文件不存在,执行通用启动"
CallProcess "$@"
fi
}
ExtractApp()
{
mkdir -p "$1"
7z x "$APPDIR/$APPTAR" -o"$1"
7z x "$APPDIR/$APPTAR" -o"$1" -bsp1 -bb1 -bse2 | grep --line-buffered -oP "(\d+(\.\d+)?(?=%))" | zenity --progress --title="$BOTTLENAME" --text="${TRANSHELL_CONTENT_UNPACKING} $BOTTLENAME..." --width=400 --auto-close --no-cancel
mv "$1/drive_c/users/@current_user@" "$1/drive_c/users/$USER"
sed -i "s#@current_user@#$USER#" $1/*.reg
FixLink
@@ -238,10 +222,6 @@ DeployApp()
{
ExtractApp "$WINEPREFIX"
if UsePublicDir;then
chgrp -R users "$WINEPREFIX"
chmod -R 0775 "$WINEPREFIX"
fi
echo "$APPVER" > "$WINEPREFIX/PACKAGE_VERSION"
@@ -270,7 +250,7 @@ UpdateApp()
fi
case $BOTTLENAME in
"Deepin-Intelligent" | "Deepin-QQ" | "Deepin-TIM" | "Deepin-WeChat" | "Deepin-WXWork" | "Deepin-Dding")
"Deepin-Intelligent" | "Deepin-QQ" | "Deepin-TIM" | "Deepin-WeChat" | "Deepin-WXWork" | "Deepin-Dding" | "Wine-QQ" | "Spark-QQ" | "Spark-weixin")
rm -rf "$WINEPREFIX"
DeployApp
return
@@ -278,12 +258,8 @@ UpdateApp()
esac
ExtractApp "${WINEPREFIX}.tmpdir"
$SHELL_DIR/updater -s "${WINEPREFIX}.tmpdir" -c "${WINEPREFIX}" -v
$SHELL_DIR/spark_updater -s "${WINEPREFIX}.tmpdir" -c "${WINEPREFIX}" -v
if UsePublicDir;then
chgrp -R users "$WINEPREFIX"
chmod -R 0775 "$WINEPREFIX"
fi
rm -rf "${WINEPREFIX}.tmpdir"
echo "$APPVER" > "$WINEPREFIX/PACKAGE_VERSION"
@@ -297,12 +273,10 @@ RunApp()
exit 0
fi
if [ -d "$WINEPREFIX" ]; then
UpdateApp | progressbar "$BOTTLENAME" "更新$BOTTLENAME中..."
UpdateApp
else
DeployApp | progressbar $BOTTLENAME "初始化$BOTTLENAME中..."
DeployApp
fi
############# WARNING: Here is the modified content: Now will run set-dwine-scale.sh
/opt/durapps/spark-dwine-helper/set-dwine-scale.sh "$WINEPREFIX"
CallApp "$@"
}
@@ -320,43 +294,32 @@ ParseArgs()
{
if [ $# -eq 4 ];then
RunApp "$3"
elif [ $# -eq 5 ];then
RunApp "$3" "$5"
elif [ -f "$5" ];then
if [ -n "$MIME_EXEC" ];then
RunApp "$MIME_EXEC" "$(UnixUriToDosPath "$5")" "${@:6}"
else
RunApp "$3" "$(UnixUriToDosPath "$5")" "${@:6}"
fi
else
RunApp "$3" "$5" "$6"
RunApp "$3" "${@:5}"
fi
}
init_log_file
# Check if some visual feedback is possible
if command -v zenity >/dev/null 2>&1; then
progressbar()
{
WINDOWID="" zenity --progress --title="$1" --text="$2" --pulsate --width=400 --auto-close --no-cancel ||
WINDOWID="" zenity --progress --title="$1" --text="$2" --pulsate --width=400 --auto-close
}
else
progressbar()
{
cat -
}
fi
#####准备启动进程,分析在 https://blog.shenmo.tech/post/deepin-wine6%E7%9A%84run_v4%E8%84%9A%E6%9C%AC%E6%8E%A2%E7%B4%A2%E5%90%AF%E5%8A%A8%E6%96%B9%E5%BC%8F/
if [ $# -lt 3 ]; then
debug_log "参数个数小于3个"
exit 0
fi
#####准备启动进程,分析在 https://shenmo7192.gitee.io/post/deepin-wine6%E7%9A%84run_v4%E8%84%9A%E6%9C%AC%E6%8E%A2%E7%B4%A2%E5%90%AF%E5%8A%A8%E6%96%B9%E5%BC%8F/
BOTTLENAME="$1"
WINEPREFIX="$HOME/.deepinwine/$1"
if UsePublicDir;then
WINEPREFIX="$PUBLIC_DIR/$1"
fi
APPDIR="/opt/apps/${DEB_PACKAGE_NAME}/files"
if [ -f "$APPDIR/files.md5sum" ];then

View File

@@ -0,0 +1,22 @@
#get file full path
path="$1"
path=$(echo ${path/c:/${WINEPREFIX}/drive_c})
path=$(echo ${path//\\/\/})
#kill bloack process
name="${path##*/}"
$SHELL_DIR/spark_kill.sh "$name" block
#change current dir to excute path
path=$(dirname "$path")
cd "$path"
pwd
#Set default mime type
if [ -n "$MIME_TYPE" ]; then
xdg-mime default "$DEB_PACKAGE_NAME".desktop "$MIME_TYPE"
fi
debug_log_to_file "Starting process $* ..."
CallProcess "$@"

View File

@@ -0,0 +1,4 @@
debug_log "run $1"
$SHELL_DIR/spark_kill.sh DingTalk block
CallProcess "$@"

View File

@@ -0,0 +1,9 @@
#set -- "$1" "${2#file://*}"
local path=$(urldecode "$2")
path=${path/file:\/\//}
set -- "$1" "$path"
if [ "$path" ];then
CallProcess "$@"
else
CallProcess "$1"
fi

View File

@@ -0,0 +1,9 @@
#set -- "$1" "${2#file://*}"
local path=$(urldecode "$2")
path=${path/file:\/\//}
set -- "$1" "$path"
if [ "$path" ];then
CallProcess "$@"
else
CallProcess "$1"
fi

View File

@@ -0,0 +1,2 @@
sed -i '/LogPixels/d' ${WINEPREFIX}/user.reg
CallProcess "$@"

View File

@@ -0,0 +1,9 @@
#set -- "$1" "${2#file://*}"
local path=$(urldecode "$2")
path=${path/file:\/\//}
set -- "$1" "$path"
if [ "$path" ];then
CallProcess "$@"
else
CallProcess "$1"
fi

View File

@@ -0,0 +1,25 @@
#!/bin/bash
if [ ! -f "$WINEPREFIX/../.QQ_run" ]; then
debug_log "first run time"
$SHELL_DIR/add_hotkeys
$SHELL_DIR/fontconfig
touch "$WINEPREFIX/../.QQ_run"
fi
DisableWrite "${WINEPREFIX}/drive_c/Program Files/Tencent/QQ/Bin/QQLiveMPlayer"
DisableWrite "${WINEPREFIX}/drive_c/Program Files/Tencent/QQ/Bin/QQLiveMPlayer1"
DisableWrite "${WINEPREFIX}/drive_c/Program Files/Tencent/QzoneMusic"
DisableWrite "${WINEPREFIX}/drive_c/Program Files/Tencent/QQBrowser"
DisableWrite "${WINEPREFIX}/drive_c/Program Files/Common Files/Tencent/QQBrowser"
DisableWrite "${WINEPREFIX}/drive_c/users/Public/Application Data/Tencent/QQBrowserBin"
DisableWrite "${WINEPREFIX}/drive_c/users/Public/Application Data/Tencent/QQBrowserDefault"
DisableWrite "${WINEPREFIX}/drive_c/users/${USER}/Application Data/Tencent/QQBrowserDefault"
DisableWrite "${WINEPREFIX}/drive_c/users/Public/Application Data/Tencent/QQPCMgr"
DisableWrite "${WINEPREFIX}/drive_c/Program Files/Common Files/Tencent/QQPCMgr"
DisableWrite "${WINEPREFIX}/drive_c/Program Files/Common Files/Tencent/HuaYang"
DisableWrite "${WINEPREFIX}/drive_c/users/${USER}/Application Data/Tencent/HuaYang"
CallProcess "$@"

View File

@@ -0,0 +1,3 @@
debug_log "run $1"
$SHELL_DIR/spark_kill.sh QQMicroGameBox block
CallProcess "$1" -action:force_download -appid:1104632801 -pid:8 -bin_version:1.1.2.4 -loginuin:

View File

@@ -0,0 +1,4 @@
#!/bin/bash
debug_log "run $1"
$SHELL_DIR/spark_kill.sh qqgame block
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$1" &

View File

@@ -0,0 +1,3 @@
debug_log "run $1"
$SHELL_DIR/spark_kill.sh QQMicroGameBox block
CallProcess "$1" -action:force_download -appid:363 -pid:8 -bin_version:1.1.2.4 -loginuin:

View File

@@ -0,0 +1,3 @@
debug_log "run $1"
$SHELL_DIR/spark_kill.sh QQMicroGameBox block
CallProcess "$1" -action:force_download -appid:1105856612 -pid:8 -bin_version:1.1.2.4 -loginuin:

View File

@@ -0,0 +1,3 @@
debug_log "run $1"
$SHELL_DIR/spark_kill.sh QQMicroGameBox block
CallProcess "$1" -action:force_download -appid:1105640244 -pid:8 -bin_version:1.1.2.4 -loginuin:

View File

@@ -0,0 +1,23 @@
$SHELL_DIR/spark_kill.sh ths block
debug_log "Start run $1"
#get file full path
path="$1"
path=$(echo ${path/c:/${WINEPREFIX}/drive_c})
path=$(echo ${path//\\/\/})
#kill bloack process
name="${path##*/}"
$SHELL_DIR/spark_kill.sh "$name" block
#change current dir to excute path
path=$(dirname "$path")
cd "$path"
pwd
#Set default mime type
if [ -n "$MIME_TYPE" ]; then
xdg-mime default "$DEB_PACKAGE_NAME".desktop "$MIME_TYPE"
fi
CallProcess "$@"

View File

@@ -0,0 +1,17 @@
#!/bin/bash
if [ ! -f "$WINEPREFIX/../.QQ_run" ]; then
debug_log "first run time"
$SHELL_DIR/add_hotkeys
####似乎是给dde-control-center添加快捷键
$SHELL_DIR/fontconfig
####暂时无法得知用途和用法
# If the bottle not exists, run reg may cost lots of times
# So create the bottle befor run reg
env WINEPREFIX="$WINEPREFIX" $WINE_CMD uninstaller --list
touch $WINEPREFIX/../.QQ_run
fi
CallProcess "$@"
#disable Tencent MiniBrowser
_DeleteRegistry "HKCU\\Software\\Tencent\\MiniBrowser"

View File

@@ -0,0 +1,5 @@
if [ -f "${WINEPREFIX}/drive_c/Program Files/Tencent/QQLive/Upgrade.dll" ]; then
rm -rf "${WINEPREFIX}/drive_c/Program Files/Tencent/QQLive/Upgrade.dll"
fi
CallProcess "$@"

View File

@@ -0,0 +1,9 @@
if [ -d "${WINEPREFIX}/drive_c/users/${USER}/Application Data/Tencent/WXWork/Update" ]; then
rm -rf "${WINEPREFIX}/drive_c/users/${USER}/Application Data/Tencent/WXWork/Update"
fi
if [ -d "${WINEPREFIX}/drive_c/users/${USER}/Application Data/Tencent/WXWork/upgrade" ]; then
rm -rf "${WINEPREFIX}/drive_c/users/${USER}/Application Data/Tencent/WXWork/upgrade"
fi
#Support use native file dialog
CallProcess "$@"

View File

@@ -0,0 +1,9 @@
#/bin/bash
chmod 700 "$WINEPREFIX/drive_c/Program Files/AliWangWang/9.12.10C/wwbizsrv.exe"
chmod 700 "$WINEPREFIX/drive_c/Program Files/Alibaba/wwbizsrv/wwbizsrv.exe"
if [ $# = 3 ] && [ -z "$3" ];then
EXEC_PATH="c:/Program Files/AliWangWang/9.12.10C/WWCmd.exe"
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$EXEC_PATH" "$2" &
else
CallProcess "$@"
fi

View File

@@ -0,0 +1,2 @@
export DISABLE_RENDER_CLIPBOARD=1
CallProcess "$@"

View File

@@ -0,0 +1,18 @@
#!/bin/bash
#change current dir to excute path
path=$(dirname "$path")
cd "$path"
pwd
#Set default mime type
if [ -n "$MIME_TYPE" ]; then
xdg-mime default "$DEB_PACKAGE_NAME".desktop "$MIME_TYPE"
fi
debug_log_to_file "Starting process $* ..."
if [ -n "$2" ];then
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$1" "--url=$2" &
else
env WINEPREFIX="$WINEPREFIX" $WINE_CMD "$1" &
fi

View File

@@ -0,0 +1,3 @@
rm -f "$WINEPREFIX/system.reg"
cp $APPDIR/system.reg "$WINEPREFIX/system.reg"
CallProcess "$@"

View File

@@ -0,0 +1,4 @@
#!/bin/bash
CallProcess "$@"
sleep 2
/opt/apps/com.163.music.spark/files/disable_cloudmusic_shadows

View File

@@ -0,0 +1,3 @@
CallProcess "$@"
sleep 2
/opt/apps/com.163.dashi.mailmaster.spark/files/disable_mailmaster_shadows

View File

@@ -0,0 +1,4 @@
if [ -f "${WINEPREFIX}/drive_c/ProgramData/Microsoft/Windows/Start\ Menu/Programs/MuBu.lnk" ]; then
chmod 555 ${WINEPREFIX}/drive_c/ProgramData/Microsoft/Windows/Start\ Menu/Programs/MuBu.lnk
fi
CallProcess "$@"

View File

@@ -0,0 +1,16 @@
if [ -e ${WINEPREFIX}/drive_c/Program\ Files/Tencent/QQMusic/QQMusic.exe ]; then
sleep 1
rm -rf ${WINEPREFIX}/drive_c/Program\ Files/Tencent/QQMusic/*.log
else
mkdir ${WINEPREFIX}/drive_c/Program\ Files/Tencent/updatetemp
mv ${WINEPREFIX}/drive_c/Program\ Files/Tencent/QQMusic/*.dll ${WINEPREFIX}/drive_c/Program\ Files/Tencent/updatetemp
mv ${WINEPREFIX}/drive_c/Program\ Files/Tencent/QQMusic/*.exe ${WINEPREFIX}/drive_c/Program\ Files/Tencent/updatetemp
mv ${WINEPREFIX}/drive_c/Program\ Files/Tencent/QQMusic/*.rdb ${WINEPREFIX}/drive_c/Program\ Files/Tencent/updatetemp
mv ${WINEPREFIX}/drive_c/Program\ Files/Tencent/QQMusic/*.log ${WINEPREFIX}/drive_c/Program\ Files/Tencent/updatetemp
mv ${WINEPREFIX}/drive_c/Program\ Files/Tencent/QQMusic/QQMusic* ${WINEPREFIX}/drive_c/Program\ Files/Tencent
rm -rf ${WINEPREFIX}/drive_c/Program\ Files/Tencent/QQMusic
rm -rf ${WINEPREFIX}/drive_c/Program\ Files/Tencent/updatetemp
rm -rf ${WINEPREFIX}/drive_c/Program\ Files/Tencent/*.log
mv ${WINEPREFIX}/drive_c/Program\ Files/Tencent/QQMusic* ${WINEPREFIX}/drive_c/Program\ Files/Tencent/QQMusic
fi
CallProcess "$@"

View File

@@ -0,0 +1 @@
Deepin-WXWork.sh

View File

@@ -0,0 +1,6 @@
if [ -f "${WINEPREFIX}/drive_c/users/${USER}/Application Data/douyin" ]; then
rm "${WINEPREFIX}/drive_c/users/${USER}/Application Data/douyin"
mv ${WINEPREFIX}/drive_c/users/${USER}/Application\ Data/*.tmp ${WINEPREFIX}/drive_c/users/${USER}/Application\ Data/douyin
chmod 755 ${WINEPREFIX}/drive_c/users/${USER}/Application\ Data/douyin
fi
CallProcess "$@"

View File

@@ -0,0 +1,2 @@
DisableWrite ${WINEPREFIX}/drive_c/users/${USER}/Temp
CallProcess "$@"

View File

@@ -0,0 +1,5 @@
if [ -w ${WINEPREFIX}/drive_c/users/${USER}/Application\ Data/飞项/Crashpad/reports ]; then
rm -rf ${WINEPREFIX}/drive_c/users/${USER}/Application\ Data/飞项/Crashpad/reports/*
chmod 555 ${WINEPREFIX}/drive_c/users/${USER}/Application\ Data/飞项/Crashpad/reports
fi
CallProcess "$@"

View File

@@ -0,0 +1,37 @@
echo
echo "⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⡟⠉⠻⣷⡄⠀⠀⠀⠀⠀⠀⢀⣀⣀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣴⣶⣶⣿⣿⡄⠀⠀⢀⣤⣾⠿⠻⣿⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣤⣾⣿⣏⡁⠀⠀⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣼⡿⢿⣿⣯⣀⣿⣿⡿⢿⣿⣿⣿⣿⣿⣷⣄⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢸⣿⣿⣶⣬⡙⠿⠋⣡⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣀⣀⣀⣀⣀⠀⠀⠀⠀⠀⠈⢻⣿⣿⠟⣁⣴⣤⡙⠻⣿⣿⣿⣿⣿⣿⣿⣿⡿⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠺⢿⣿⣿⣿⢿⠇⠀⠀⠀⠀⠀⠀⠹⣷⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠛⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⣖⣆⣀⣀⣀⣀⣀⣀⣀⡀⠀⠀⠀⠀⠀⠀⠀⠙⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠉⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⣿⠟⠛⠛⠛⠛⠛⠛⠛⠷⠿⠿⢿⣷⣶⣤⣤⣀⣸⣿⣿⣿⣿⣿⣿⠟⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⠛⢻⡏⠁⣈⢻⠙⣿⡆⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠛⣲⡟⠞⢀⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⣿⡇⠀⠀⠀⠀⢀⣀⣀⣤⣤⣤⣤⣤⣶⣶⣶⣶⣾⣿⣿⣿⣿⣿⣿⣿⣿⣶⣤⣄⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⣿⣷⣶⣾⡿⠿⠿⠛⢛⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⣄⠀⠀⠀⠀⠀⠀⠀⢀⣠⡤⣀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠙⠋⠀⠀⠀⠀⢀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⡄⠀⠀⠀⢠⣾⣿⣿⣿⣿⡆⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⣠⣿⣿⣿⣿⣥⣼⣿⣿⣿⣿⣿⣿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣆⠀⠀⠸⠽⠻⣿⡿⠟⠁⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⣼⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣾⣿⣁⣼⣿⣿⣿⣿⣿⢻⣿⡀⠙⣿⣿⣿⣿⣿⣧⠀⠀⠀⠀⣀⣤⣤⣄⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢰⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣾⣿⣿⣶⣿⣿⣿⣿⣿⣿⣇⠀⠀⠀⢿⣿⣿⣿⠇⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡄⠀⠀⠀⠉⠉⠁⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⡿⠿⠾⣿⣿⣿⣿⣿⣿⣿⡿⠷⣬⡻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡇⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣄⠀⢘⣿⣿⣿⣿⣿⠏⠀⠀⣀⣤⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠻⣿⣿⣿⣿⣿⣿⣿⣿⠁⠀⠈⠙⢿⣿⣷⣾⣿⠿⣿⣿⣇⣤⣶⣿⣿⠿⠛⠋⠙⠻⣿⣿⣿⣿⣿⣿⣿⣿⣧⡀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠉⠻⣿⣿⣿⣿⣷⠀⠀⣠⣶⣿⠿⠉⠁⠀⠀⠀⠉⠉⠉⠻⣿⣷⣄⠀⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣶⣤⣤⣤⣤⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠙⠿⣿⣿⣿⣷⠿⡿⠋⠀⠀⠀⠀⣄⢀⣀⠀⠀⠀⠀⠀⠙⢿⣷⣄⠀⢀⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠛⠀⠀⠀⠀⠀
⣀⣀⠀⠀⠀⠀⢀⣴⣿⣿⠛⠀⠀⢸⣧⡿⠀⠀⣸⠋⠋⠉⢻⡄⠀⠀⠀⠀⠀⠉⢁⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⠋⠁⠀⠀⠀⠀⠀⠀⠀
⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣄⠀⠀⠈⠀⠀⠀⢻⣀⣀⣀⣀⡿⠀⠀⠀⠀⠀⠀⠀⢉⣭⣭⣽⣿⣿⣿⣿⣿⣿⣿⣿⣦⣄⠀⠀⠀⠀⠀⣀⣤⡄
⠘⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣦⣄⣀⠀⠀⠀⠉⠀⠀⠉⠀⠀⠀⠀⠀⢀⣀⣴⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠃
⠀⠈⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⢟⣿⣿⣿⣿⣶⣶⡶⣶⣶⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠃⠀
⠀⠀⠀⠈⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⣿⢿⡸⣿⣿⣿⣿⣎⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠋⠀⠀⠀
⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣯⣽⣿⣿⡟⠁⠀⢙⣿⣿⣿⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡏⠉⠀⠀⠀⠀⠀⠀
⠀⠀⠀⢸⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⣿⣿⣿⣿⣿⣦⣶⣿⣿⣿⣿⣿⡿⠿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⠇⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⢿⣿⣿⣿⣿⣿⣿⣿⡿⠁⠀⠘⣿⣿⡿⠟⠉⢿⣯⣿⣿⣿⠁⠀⠀⠈⠻⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠃⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠙⠿⣿⣿⣿⣿⣿⡇⠀⠀⢸⡟⠋⠀⠀⠀⠀⠙⠛⠋⢸⠀⠀⠀⠀⠀⠘⣿⣿⣿⣿⣿⣿⣿⡿⠿⠛⠁⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀
⠀⠀⠀⠀⠀⠀⠀⠀⠉⠉⢻⣿⠀⠀⠀⢸⡇⠀⠀⠀⠀⠀⠀⠀⠀⢸⡆⠀⠀⠀⠀⠀⢻⣿⣿⣿⣿⠟⠋⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀"
echo "以此纪念2.4.0版本"
CallProcess "$@"

View File

@@ -0,0 +1,42 @@
#!/bin/bash
# 检查是否提供了-c和-s选项
if [[ ! "$*" =~ "-c" ]] || [[ ! "$*" =~ "-s" ]]; then
echo "用法: updater -c <目标目录> -s <源目录> [-v]"
exit 1
fi
# 解析命令行参数
while getopts ":c:s:v" opt; do
case $opt in
c)
destination_dir=$OPTARG
;;
s)
source_dir=$OPTARG
;;
v)
verbose=true
;;
\?)
echo "无效选项: -$OPTARG" >&2
exit 1
;;
:)
echo "选项 -$OPTARG 需要一个参数." >&2
exit 1
;;
esac
done
# 从源目录复制文件到目标目录
if [ "$verbose" = true ]; then
echo "正在从 $source_dir 复制文件到 $destination_dir"
fi
# 使用cp命令覆盖同名文件
cp -rf "$source_dir"/* "$destination_dir"
echo "文件复制完成!"
exit 0

View File

@@ -0,0 +1,2 @@
#!/bin/bash
TRANSHELL_CONTENT_UNPACKING="Unpacking"

View File

@@ -0,0 +1,2 @@
#!/bin/bash
TRANSHELL_CONTENT_UNPACKING="解包"

View File

@@ -0,0 +1,92 @@
___
( )
| | .-. ___ ___ .--. .--.
| |/ \ ( )( ) / \ / \
| .-. . | | | | ; ,-. ' | .-. ;
| | | | | | | | | | | | | | | |
| | | | | | | | | | | | | |/ |
| | | | | | | | | | | | | ' _.'
| | | | | | ; ' | ' | | | .'.-.
| | | | ' `-' / ' `-' | ' `-' /
(___)(___) '.__.' `.__. | `.__.'
( `-' ;
`.__.
___
( )
| |.-. .---. ___ .-. .--. ___ .-.
| / \ / .-, \ ( ) \ / \ ( ) \
| .-. | (__) ; | | ' .-. ; | .-. ; | .-. .
| | | | .'` | | / (___) | | | | | | | |
| | | | / .'| | | | | | | | | | | |
| | | | | / | | | | | | | | | | | |
| ' | | ; | ; | | | | ' | | | | | |
' `-' ; ' `-' | | | ' `-' / | | | |
`.__. `.__.'_. (___) `.__.' (___)(___)
___
( )
| |.-. ___ ___ ___ .-. ___ .-. ___ ___
| / \ ( )( ) ( ) \ ( ) \ ( )( )
| .-. | | | | | | .-. . | .-. . | | | |
| | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | ' | |
| | | | | | | | | | | | | | | | ' `-' |
| ' | | | | ; ' | | | | | | | | `.__. |
' `-' ; ' `-' / | | | | | | | | ___ | |
`.__. '.__.' (___)(___) (___)(___) ( )' |
; `-' '
.__.'
............ .....]OOOo]`....
... ........ ...=OOOOOOOOO\..
.../OOOOOOO`.... ..=OOO@/[\OOOOO.
..=OOOOOOOOO\... .,@OO^/....O@O@`
..OOOOOO[[OOO@`. .=OO@,...=.OOOO.
..OOOOO./O^,@OO` .=OO^....,.@OO^.
..\OOO@^...=OOOO.... .OOO^*..,`/OOO..
...\OOOOOOOooooO^... .=OO^...`=OO@`..
..=@O@OooOOOOO@`...........=@@O]].,@O@`...
.,@OoOO`...O@^......,]]]]/OOOOOOO@@... .
...\OO@]]]OOOO@@@@@@@@@@@@@@@@@@@OO.....
.....[@@OOO@@@@@@@@@@@@@@@@@@@@@@@@@@`..
..OOO@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@`....
.,@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@\...
....=@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@^..
...=@@@@@@@@@@@@@@@@@@@@@@`,\@@@@@@@@@@@@@^.
..,@@@@@@@@@@@@@@@@@@@@@@@O,[].\@@@@@@@@@@@.
../@@@@@@@@@@@@O@@@@@@@@@@@......\@@@@@@@@@^
.,@@@@@@@@@@@O`.\@@@@@@@@@/........\@@@@@@@@...
.=@@@@@@@@@/.....\@@@@@@@@/`...[O`..\@@@@@@@`...
.=@@@@@@@^,O[..,`.,@@@@@/../@@O[`...,@@@@@@@....
....@@@@@@@O`,@@O[]..,@/[`..=oo@O`,^...@@@@@@@@`..
....O@@@@@@@@`,OOO@^*\.........\..../.../@`.=^..
.. ...,@^=@@@^.\`...,^...........[[......O]//...
..,\]@@@\...[`....................=@@/....
.=@@\............,]/`........../@@@\.. .
.....@@@@@\.....................,/@@@@@@\...
...=@@@@@@@@\]..............]@@@@@@@@@@@@`.
...,@@@@@@@@@@@@@@/[\O@@O/[*./@@@@@@@@@@@@@\.......
...@@@@@@@@@@@@@@@^.,O@@@@^../@@@@@@@@@@@@@@@\.....
..........@@@@@@@@@@@@@@@@@`..`\/`../@@@@@@@@@@@@@@@@@@@@]]
........,@@@@@@@@@@@@@@@@/*[\].,`]/[[@@@@@@@@@@@@@@,[[[[`..
..,O\/@@@@@@@@@@@@@@@@@@@`...........O@@O@@@@@@@@@@\....
.....\@@@@@@@@@@@@@@@@@@@OO\`,O.. .,@OOO@@@@@@@@@@. ..
..../@@@@@@@@@@@@@@OO@`.^,O. ..=@OOO@@@@@@@@@.. .
...=@@@@@@@@@@@@@@@@@O[[.... ...\@@@@@@@@@@@/.. .
...=@@@@@@@@@@@@@@,^ ....O...\@@@@@@`
....@@@@@@@@@@@@@/.. ...^/\]/[\@@@@`.
.@@@@/@@@@@@@^O..... ...,@@^]..]@/...
...\@`.[@@@@@@...... .=`@@@@@^..^....
....`....[@@@O\.[,..........OO@@@@@^.,[[....
............\@@@\`...,`**,]@@@@@@@^.........
.. .,@@@@@@@@@@@@@@@@@@/...
..O@@@@@@@@@@@@@@@@@^...
..O@@@@@@^...=@@@@@@@...
..@@@@@@@\...=@@@@@@@^..
.=@@@@@@@@...=@@@@@@@O..
.=@@@@@@@@`..=@@@@@@@@..
.=@@@O@@@@^..=@@OO@@@@^.
.O@OOOOO@O^..=@OOOOOOO^.
.Oo/[\O/\O@..=/[\O/\o*O.
.O^......=O...^......*/.
.=\.....]O^...\\...]//.. .. ........

View File

@@ -0,0 +1,82 @@
#/bin/bash
source /opt/durapps/transhell/transhell.sh
load_transhell_debug
#########>>>>>>>函数段
Get_Dist_Name()
{
if grep -Eqii "Deepin" /etc/issue || grep -Eq "Deepin" /etc/*-release; then
DISTRO='Deepin'
elif grep -Eqi "UnionTech" /etc/issue || grep -Eq "UnionTech" /etc/*-release; then
DISTRO='UniontechOS'
elif grep -Eqi "UOS" /etc/issue || grep -Eq "UOS" /etc/*-release; then
DISTRO='UniontechOS'
else
DISTRO='OtherOS'
fi
}
#########<<<<<<<
if [ $# -lt 1 ]; then
echo "无参数无法启动。这是一个set-wine-scale的组件一般来说你不会需要单独启动这个脚本"
echo "请参考set-wine-scale.sh使用"
echo "参数为CONTAINER_PATH"
echo "只读取第一个,其他参数会被放弃"
fi
CONTAINER_PATH="$1"
if [ ! -f "$CONTAINER_PATH/user.reg" ];then
echo "错误找不到user.reg退出。你应当在文件解压结束后调用此脚本"
echo "E: Can not find user.reg. Exit. You should use this script after the extraction"
exit 1
fi
mkdir -p $HOME/.config/spark-wine/
#####全局参数位置
#####能到这一步的说明已经是没有自定义参数了,直接读全局覆盖没问题
#####
if [ -f "$HOME/.config/spark-wine/scale.txt" ];then
cat $HOME/.config/spark-wine/scale.txt > $CONTAINER_PATH/scale.txt
echo "检测到已经设置过全局参数,直接复制"
echo "全局参数的位置在$HOME/.config/spark-wine/scale.txt如果需要更换请删除此文件重新生成"
exit
fi
Get_Dist_Name
if [ "$DISTRO" = "Deepin" ] || [ "$DISTRO" = "UniontechOS" ];then
echo 1.0 > $HOME/.config/spark-wine/scale.txt
cat $HOME/.config/spark-wine/scale.txt > $CONTAINER_PATH/scale.txt
#####就是1倍缩放
exit
fi
dimensions=`xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/'`
scale_factor=`zenity --list \
--width=700 \
--height=350 \
--title="${TRANSHELL_CONTENT_YOUR_DIMENSION_IS} $dimensions ${TRANSHELL_CONTENT_PLEASE_CHOOSE_ONE_BELOW}" \
--column="${TRANSHELL_CONTENT_OPTION}" \
1.0 \
1.25 \
1.5 \
1.75 \
2.0`
case "$scale_factor" in
"")
zenity --info --text="${TRANSHELL_CONTENT_1_SCALE_AS_DEFAULT}${TRANSHELL_CONTENT_YOU_CAN_USE_SPARK_WINE_HELPER_SETTINGS_TO_ADJUST}" --width=500 --height=150
scale_factor="1.0"
;;
*)
zenity --info --text="${TRANSHELL_CONTENT_SCALE_IS} $scale_factor ${TRANSHELL_CONTENT_SAVED}${TRANSHELL_CONTENT_YOU_CAN_USE_SPARK_WINE_HELPER_SETTINGS_TO_ADJUST}" --width=500 --height=150
;;
esac
echo "$scale_factor" > $HOME/.config/spark-wine/scale.txt
cat $HOME/.config/spark-wine/scale.txt > $CONTAINER_PATH/scale.txt

View File

@@ -7,14 +7,14 @@ help() {
-s|--set-scale-factor 直接指定缩放。支持1.01.251.51.752.0
path 容器目录
本脚本具有超级兔力。
--------------------------------------------------------------------
Usage: $0 [-h|--help] [-s|--set-scale-factor] path
-h|--help Show this text
-s|--set-scale-factor Set scale factor direcly. Support 1.01.251.51.752.0
path Wine Container directory path
This script have super bunny power.
EOF
}
#########################帮助文件结束#############################
@@ -30,6 +30,13 @@ parse_args() {
appointed_scale_factor="$2"
;;
"bunny")
cat /opt/durapps/spark-dwine-helper/scale-set-helper/bunny.txt
exit
;;
*)
CONTAINER_PATH="$1"
@@ -43,8 +50,10 @@ parse_args "$@"
#####先看看PATH对不对
if [ ! -f "$CONTAINER_PATH/user.reg" ];then
echo "错误找不到user.reg退出。你应当在文件解压结束后调用此脚本"
echo "错误找不到user.reg退出。你应当在文件解压结束后调用此脚本"
echo "如果你不清楚如何使用这个脚本,请使用 $0 -h"
echo "E: Can not find user.reg. Exit. You should use this script after the extraction"
echo "If you don't know how to use this script, try $0 -h"
exit 1
fi
@@ -52,14 +61,14 @@ fi
if [ "$appointed_scale_factor" = "" ];then
#########未指定下,读取$CONTAINER_PATH/scale.txt。如果没有优先$DEEPIN_WINE_SCALE设置然后是手动
if [ !-f "$CONTAINER_PATH/scale.txt" ];then
if [ ! -f "$CONTAINER_PATH/scale.txt" ];then
echo "E: No SCALE profile found. try to use DEEPIN_WINE_SCALE"
echo "错误没有检测到缩放设置读取DEEPIN_WINE_SCALE"
if [ "$DEEPIN_WINE_SCALE" = "" ];then
echo "E: No DEEPIN_WINE_SCALE found. Use spark-get-scale to Set "
echo "错误没有检测到DEEPIN_WINE_SCALEspark-get-scale设置"
/opt/durapps/spark-dwine-helper/spark-get-scale.sh "$CONTAINER_PATH"
echo "E: No DEEPIN_WINE_SCALE found. Use get-scale.sh to Set "
echo "错误没有检测到DEEPIN_WINE_SCALE用get-scale.sh设置"
/opt/durapps/spark-dwine-helper/scale-set-helper/get-scale.sh "$CONTAINER_PATH"
wine_scale=`cat $CONTAINER_PATH/scale.txt`
echo "检测到的缩放倍数为:$wine_scale"
echo "Scale is $wine_scale"
@@ -71,11 +80,12 @@ if [ !-f "$CONTAINER_PATH/scale.txt" ];then
fi
else
wine_scale=`cat $CONTAINER_PATH/scale.txt`
echo "检测到的缩放倍数为:$wine_scale"
echo "Scale is $wine_scale"
fi
#####非deepin发行版似乎没有这个变量暂时不清楚这个变量是哪个组件做的

View File

@@ -0,0 +1,8 @@
#!/bin/bash
TRANSHELL_CONTENT_OPTION="Options"
TRANSHELL_CONTENT_YOUR_DIMENSION_IS="Your dimension is "
TRANSHELL_CONTENT_PLEASE_CHOOSE_ONE_BELOW="Please choose one option below"
TRANSHELL_CONTENT_1_SCALE_AS_DEFAULT="Setting 1.0 scale as default"
TRANSHELL_CONTENT_SCALE_IS="Scale multiple is "
TRANSHELL_CONTENT_SAVED="saved."
TRANSHELL_CONTENT_YOU_CAN_USE_SPARK_WINE_HELPER_SETTINGS_TO_ADJUST="You can use spark wine helper settings to adjust settings"

View File

@@ -0,0 +1,8 @@
#!/bin/bash
TRANSHELL_CONTENT_OPTION="选项"
TRANSHELL_CONTENT_YOUR_DIMENSION_IS="您的分辨率是:"
TRANSHELL_CONTENT_PLEASE_CHOOSE_ONE_BELOW="请在以下选项中选择一个"
TRANSHELL_CONTENT_1_SCALE_AS_DEFAULT="默认为1倍缩放。"
TRANSHELL_CONTENT_SCALE_IS="缩放倍数为"
TRANSHELL_CONTENT_SAVED="已保存"
TRANSHELL_CONTENT_YOU_CAN_USE_SPARK_WINE_HELPER_SETTINGS_TO_ADJUST="您可以使用星火wine助手设置来重新设置"

View File

@@ -0,0 +1,109 @@
#/bin/bash
source /opt/durapps/transhell/transhell.sh
load_transhell_debug
until [ "$IS_CLOSE" = "1" ];do
CHOSEN_SETTINGS=`zenity --list \
--width=700 \
--height=350 \
--title="${TRANSHELL_CONTENT_WELCOME_AND_CHOOSE_ONE_TO_RUN}" \
--column="${TRANSHELL_CONTENT_OPTION}" \
"${TRANSHELL_CONTENT_SET_GLOBAL_SCALE}" \
"${TRANSHELL_CONTENT_SET_APP_SCALE}" \
"${TRANSHELL_CONTENT_SYNC_APP_SCALE_WITH_GLOBAL}" \
"${TRANSHELL_CONTENT_ONLY_AVAILABLE_TO_SPARK_DWINE_HELPER_APP}" `
echo "$CHOSEN_SETTINGS"
case "$CHOSEN_SETTINGS" in
"${TRANSHELL_CONTENT_SET_GLOBAL_SCALE}")
########
zenity --info --text="${TRANSHELL_CONTENT_THIS_WILL_NOT_TAKE_EFFECT_IN_DEEPIN_BECAUSE_READ_ENVIRONMENT_FIRST}" --width=500 --height=150
dimensions=`xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/'`
scale_factor=`zenity --list \
--width=700 \
--height=350 \
--title="${TRANSHELL_CONTENT_YOUR_DIMENSION_IS} $dimensions ${TRANSHELL_CONTENT_PLEASE_CHOOSE_ONE_BELOW}" \
--column="${TRANSHELL_CONTENT_OPTION}" \
1.0 \
1.25 \
1.5 \
1.75 \
2.0`
case "$scale_factor" in
"")
zenity --info --text="${TRANSHELL_CONTENT_1_SCALE_AS_DEFAULT}" --width=500 --height=150
scale_factor="1.0"
;;
*)
zenity --info --text="${TRANSHELL_CONTENT_SCALE_IS} $scale_factor ${TRANSHELL_CONTENT_SAVED}" --width=500 --height=150
;;
esac
echo "$scale_factor" > $HOME/.config/spark-wine/scale.txt
;;
########
"${TRANSHELL_CONTENT_SET_APP_SCALE}")
zenity --info --text="${TRANSHELL_CONTENT_PLEASE_CHOOSE_WINE_BOTTLE_DIRECTORY}" --width=500 --height=150
CONTAINER_PATH=`zenity --file-selection --filename="$HOME/.deepinwine/" --directory`
if [ ! -f "$CONTAINER_PATH/user.reg" ];then
zenity --info --text="${TRANSHELL_CONTENT_ERROR_NO_USER_REG_AS_NOT_A_WINE_BOTTLE}" --width=500 --height=150
else
dimensions=`xdpyinfo | grep dimensions | sed -r 's/^[^0-9]*([0-9]+x[0-9]+).*$/\1/'`
scale_factor=`zenity --list \
--width=700 \
--height=350 \
--title="${TRANSHELL_CONTENT_YOUR_DIMENSION_IS} $dimensions ${TRANSHELL_CONTENT_PLEASE_CHOOSE_ONE_BELOW}" \
--column="${TRANSHELL_CONTENT_OPTION}" \
1.0 \
1.25 \
1.5 \
1.75 \
2.0 \
${TRANSHELL_CONTENT_SYNC_SCALE_WITH_GLOBAL} `
case "$scale_factor" in
"")
zenity --info --text="${TRANSHELL_CONTENT_1_SCALE_AS_DEFAULT}" --width=500 --height=150
scale_factor="1.0"
/opt/durapps/spark-dwine-helper/scale-set-helper/set-wine-scale.sh -s $scale_factor $CONTAINER_PATH
;;
"${TRANSHELL_CONTENT_SYNC_SCALE_WITH_GLOBAL}")
zenity --info --text="${TRANSHELL_CONTENT_WILL_SYNC_SCALE_WITH_GLOBAL}" --width=500 --height=150
rm $CONTAINER_PATH/scale.txt
;;
*)
zenity --info --text="${TRANSHELL_CONTENT_SCALE_IS} $scale_factor ${TRANSHELL_CONTENT_SAVED}" --width=500 --height=150
/opt/durapps/spark-dwine-helper/scale-set-helper/set-wine-scale.sh -s $scale_factor $CONTAINER_PATH
;;
esac
fi
;;
"${TRANSHELL_CONTENT_SYNC_APP_SCALE_WITH_GLOBAL}")
find ${HOME}/.deepinwine/ -name "scale.txt" -type f -print -exec rm -rf {} \;
zenity --info --text="${TRANSHELL_CONTENT_BOTTLES_BELOW_HAVE_SYNCED_SCALE_WITH_GLOBAL}\n`cd ${HOME}/.deepinwine/ && ls`" --width=500 --height=150
;;
"${TRANSHELL_CONTENT_ONLY_AVAILABLE_TO_SPARK_DWINE_HELPER_APP}")
;;
*)
IS_CLOSE="1"
;;
esac
done

View File

@@ -0,0 +1,18 @@
#!/bin/bash
TRANSHELL_CONTENT_WELCOME_AND_CHOOSE_ONE_TO_RUN="Welcome to spark wine helper settingsPlease choose one option below to excute"
TRANSHELL_CONTENT_OPTION="Options"
TRANSHELL_CONTENT_SET_GLOBAL_SCALE="Set global scale"
TRANSHELL_CONTENT_SET_APP_SCALE="Set app scale"
TRANSHELL_CONTENT_SYNC_APP_SCALE_WITH_GLOBAL="Sync all the wine app scale with global scale in one key"
TRANSHELL_CONTENT_ONLY_AVAILABLE_TO_SPARK_DWINE_HELPER_APP="Note: The options above only take effect on spark-dwine-helper apps"
TRANSHELL_CONTENT_THIS_WILL_NOT_TAKE_EFFECT_IN_DEEPIN_BECAUSE_READ_ENVIRONMENT_FIRST="NoteThis option is invalid in deepin/UOS,for the script will read deepin/UOS scale settings first"
TRANSHELL_CONTENT_YOUR_DIMENSION_IS="Your dimension is "
TRANSHELL_CONTENT_PLEASE_CHOOSE_ONE_BELOW="Please choose one option below"
TRANSHELL_CONTENT_1_SCALE_AS_DEFAULT="Setting 1.0 scale as default"
TRANSHELL_CONTENT_SCALE_IS="Scale multiple is "
TRANSHELL_CONTENT_SAVED="saved."
TRANSHELL_CONTENT_PLEASE_CHOOSE_WINE_BOTTLE_DIRECTORY="Please choose the directory the app you want to adjust inPlease choose DIRECTORY instead of file"
TRANSHELL_CONTENT_ERROR_NO_USER_REG_AS_NOT_A_WINE_BOTTLE="Euser.reg can not be found.This is not a wine bottle"
TRANSHELL_CONTENT_SYNC_SCALE_WITH_GLOBAL="Sync with global scale settings"
TRANSHELL_CONTENT_WILL_SYNC_SCALE_WITH_GLOBAL="Will sync with global scale settings"
TRANSHELL_CONTENT_BOTTLES_BELOW_HAVE_SYNCED_SCALE_WITH_GLOBAL="The scale settings of apps in bottle below is already syncd with global scale settings"

View File

@@ -0,0 +1,18 @@
#!/bin/bash
TRANSHELL_CONTENT_WELCOME_AND_CHOOSE_ONE_TO_RUN="欢迎使用星火wine助手控制中心请在以下选项中选择一个执行"
TRANSHELL_CONTENT_OPTION="选项"
TRANSHELL_CONTENT_SET_GLOBAL_SCALE="设置全局缩放"
TRANSHELL_CONTENT_SET_APP_SCALE="设置单独应用缩放"
TRANSHELL_CONTENT_SYNC_APP_SCALE_WITH_GLOBAL="一键将所有已安装应用的缩放设置改为与全局缩放一致"
TRANSHELL_CONTENT_ONLY_AVAILABLE_TO_SPARK_DWINE_HELPER_APP="备注以上操作仅对使用了spark-dwine-helper的应用生效"
TRANSHELL_CONTENT_THIS_WILL_NOT_TAKE_EFFECT_IN_DEEPIN_BECAUSE_READ_ENVIRONMENT_FIRST="请注意此选项对deepin/UOS无效会优先读取deepin/UOS的缩放设置进行缩放"
TRANSHELL_CONTENT_YOUR_DIMENSION_IS="您的分辨率是:"
TRANSHELL_CONTENT_PLEASE_CHOOSE_ONE_BELOW="请在以下选项中选择一个"
TRANSHELL_CONTENT_1_SCALE_AS_DEFAULT="默认为1倍缩放。"
TRANSHELL_CONTENT_SCALE_IS="缩放倍数为"
TRANSHELL_CONTENT_SAVED="已保存"
TRANSHELL_CONTENT_PLEASE_CHOOSE_WINE_BOTTLE_DIRECTORY="请在接下来的文件选择框选中所需的应用所在的容器文件夹(注意要选择文件夹)"
TRANSHELL_CONTENT_ERROR_NO_USER_REG_AS_NOT_A_WINE_BOTTLE="错误找不到user.reg.这不是一个wine容器"
TRANSHELL_CONTENT_SYNC_SCALE_WITH_GLOBAL="与全局设置同步"
TRANSHELL_CONTENT_WILL_SYNC_SCALE_WITH_GLOBAL="将会与全局设置同步"
TRANSHELL_CONTENT_BOTTLES_BELOW_HAVE_SYNCED_SCALE_WITH_GLOBAL="以下容器中的应用的缩放设置已与全局设置同步"

View File

@@ -0,0 +1,13 @@
[Desktop Entry]
Categories=Utility;
Encoding=UTF-8
Exec=bash -c "/opt/durapps/spark-dwine-helper/spark-dwine-helper-settings/settings.sh"
Icon=spark-dwine-helper-settings
MimeType=
Name=Spark Wine Helper Settings
Name[zh_CN]=星火wine助手设置
StartupWMClass=spark-dwine-helper-settings
Terminal=False
Type=Application
NoDisplay=false
X-Deepin-Vendor=user-custom

View File

@@ -0,0 +1,13 @@
[Desktop Entry]
Categories=Utility;
Encoding=UTF-8
Exec=sh -c "/opt/durapps/spark-dwine-helper/spark-dwine-helper-settings/settings.sh"
Icon=store.spark-app.spark-dwine-helper
MimeType=
Name=Spark Wine Helper Settings
Name[zh_CN]=星火wine助手设置
StartupWMClass=spark-dwine-helper-settings
Terminal=False
Type=Application
NoDisplay=true
X-Deepin-Vendor=user-custom

View File

@@ -0,0 +1,40 @@
#!/bin/bash
PACK_NAME="" #软件包名
BOTTLE_NAME="" #容器名
ACTIVEX_NAME=""
MAKE_AUTOSTART="" #若需要开机自启则填写1
make_autostart()
{
for username in $(ls /home)
do
echo /home/$username
if [ -d "/home/$username/.config/autostart" ]
then
cp /opt/apps/$PACK_NAME/entries/applications/$PACK_NAME.desktop /home/$username/.config/autostart/
sed -i "s#%u#\"autostart\"#" /home/$username/.config/autostart/$PACK_NAME.desktop
fi
done
}
if [ -n "$MAKE_AUTOSTART" ]; then
make_autostart
fi
if [ -n "$ACTIVEX_NAME" ]; then
if [ ! -d "/usr/lib/mozilla/plugins" ];then
mkdir -p /usr/lib/mozilla/plugins
fi
cp /usr/local/share/pipelight/libpipelight.so /usr/lib/mozilla/plugins/libpipelight-$ACTIVEX_NAME.so
fi
# Make sure the script returns 0
true

View File

@@ -0,0 +1,58 @@
#!/bin/bash
if [ "$1" = "remove" ] || [ "$1" = "purge" ];then
echo "清理卸载残留"
BOTTLE_NAME="" #在引号中填写容器名
PACK_NAME="" #在引号中填写软件包名
ACTIVEX_NAME="" #activex相关若未使用可不设置
MAKE_AUTOSTART="" #如果先前设置了开机自启则在此处填写1
### 以下为功能段,若只用于打包则以下内容可不看,只填写上方即可
make_autostart()
{
for username in $(ls /home)
do
echo /home/$username
if [ -d "/home/$username/.config/autostart" ]
then
rm /home/$username/.config/autostart/$PACK_NAME.desktop
fi
done
}
if [ -n "$MAKE_AUTOSTART" ]; then
make_autostart
fi
if [ -n "$ACTIVEX_NAME" ]; then
rm /usr/lib/mozilla/plugins/libpipelight-$ACTIVEX_NAME.so
fi
if [ -z $BOTTLE_NAME ];then
echo "W: 没有指定容器,跳过清理容器。请手动前往 ~/.deepinwine/ 下删除"
exit
fi
if [ -e /opt/deepinwine/tools/spark_kill.sh ];then
/opt/deepinwine/tools/spark_kill.sh $BOTTLE_NAME
###这里注意如果没写BOTTLE_NAME,会把QQ杀了
fi
for username in $(ls /home)
do
echo /home/$username
if [ -d /home/$username/.deepinwine/$BOTTLE_NAME ]
then
rm -rf /home/$username/.deepinwine/$BOTTLE_NAME
fi
done
else
echo "非卸载,跳过清理"
fi

View File

@@ -14,6 +14,24 @@
#
#
#######################函数段。下文调用的额外功能会在此处声明
Get_Dist_Name()
{
if grep -Eqii "Deepin" /etc/issue || grep -Eq "Deepin" /etc/*-release; then
DISTRO='Deepin'
elif grep -Eqi "UnionTech" /etc/issue || grep -Eq "UnionTech" /etc/*-release; then
DISTRO='UniontechOS'
elif grep -Eqi "UOS" /etc/issue || grep -Eq "UOS" /etc/*-release; then
DISTRO='UniontechOS'
else
DISTRO='OtherOS'
fi
}
####获得发行版名称
#########################预设值段
version_gt() { test "$(echo "$@" | tr " " "\n" | sort -V | head -n 1)" != "$1"; }
@@ -23,13 +41,17 @@ APPVER="版本号"
EXEC_PATH="启动路径"
##### 软件在wine中的启动路径
START_SHELL_PATH="/opt/deepinwine/tools/spark_run_v4.sh"
ENABLE_DOT_NET=""
####若使用spark-wine时需要用到.net则请把ENABLE_DOT_NET设为true同时在依赖中写spark-wine7-mono
export MIME_TYPE=""
#####没什么用
export DEB_PACKAGE_NAME="包名"
####这里写包名才能在启动的时候正确找到files.7z,似乎也和杀残留进程有关
export APPRUN_CMD="deepin-wine6-stable"
#####wine启动指令建议
EXPORT_ENVS=""
#EXPORT_ENVS="wine的动态链接库路径"
##例如我的wine应用是使用的dwine6的32位容器那么我要填LD_LIBRARY_PATH=$LD_LIBRARY;/opt/deepin-wine6-stable/lib
## 如果用不到就不填,不要删除前面的注释用的#
export SPECIFY_SHELL_DIR=`dirname $START_SHELL_PATH`
@@ -47,7 +69,7 @@ DISABLE_ATTACH_FILE_DIALOG=""
##############<<<<<<<<<禁用文件选择工具开始
Get_Dist_Name
#此功能实现参见结尾函数段
#此功能实现参见开头函数段
if [ "$DISTRO" != "Deepin" ] && [ "$DISTRO" != "UniontechOS" ];then
DISABLE_ATTACH_FILE_DIALOG="1"
echo "非deepin/UOS默认关闭系统自带的文件选择工具使用Wine的"
@@ -57,9 +79,22 @@ echo "To用户打包者没有打开这个功能这证明启用这个功能
fi
##############>>>>>>>>>禁用文件选择工具结束
##############<<<<<<<<<屏蔽mono和gecko安装器开始
##默认屏蔽mono和gecko安装器
if [ "$APPRUN_CMD" = "spark-wine7-devel" ] || [ "$APPRUN_CMD" = "spark-wine" ]|| [ "$APPRUN_CMD" = "spark-wine8" ] && [ -z "$ENABLE_DOT_NET" ];then
export WINEDLLOVERRIDES="mscoree=d,mshtml=d"
export WINEDLLOVERRIDES="control.exe=d"
#### "为了降低打包体积默认关闭gecko和momo如有需要注释此行仅对spark-wine7-devel有效"
fi
##############>>>>>>>>>屏蔽mono和gecko安装器结束
#########################执行段
if [ -z "$DISABLE_ATTACH_FILE_DIALOG" ];then
export ATTACH_FILE_DIALOG=1
fi
@@ -72,24 +107,10 @@ if [ -n "$EXEC_PATH" ];then
if [ -z "${EXEC_PATH##*.lnk*}" ];then
$START_SHELL_PATH $BOTTLENAME $APPVER "C:/windows/command/start.exe" "/Unix" "$EXEC_PATH" "$@"
else
$START_SHELL_PATH $BOTTLENAME $APPVER "$EXEC_PATH" "$@"
$START_SHELL_PATH $BOTTLENAME $APPVER "C:/windows/command/start.exe" "/Unix" "$EXEC_PATH" "$@"
fi
else
$START_SHELL_PATH $BOTTLENAME $APPVER "uninstaller.exe" "$@"
fi
#######################函数段。上文调用的额外功能会在此处声明
Get_Dist_Name()
{
if grep -Eqii "Deepin" /etc/issue || grep -Eq "Deepin" /etc/*-release; then
DISTRO='Deepin'
elif grep -Eqi "Uniontech" /etc/issue || grep -Eq "Uniontech" /etc/*-release; then
DISTRO='UniontechOS'
else
DISTRO='OtherOS'
fi
}
####获得发行版名称