Compare commits

..
Author SHA1 Message Date
gfdgd-xi ed3ee1ee23 新增README 2024-01-29 10:39:08 +08:00
gfdgd-xi 72233f07ed 实现应用安装以及对话框显示安装结果的功能 2024-01-29 10:32:19 +08:00
gfdgd-xi 6d8e706e39 优化对话框 2024-01-28 22:08:26 +08:00
gfdgd-xi d067983c0d 修改 2024-01-26 12:44:14 +08:00
gfdgd-xi 497b23fe8d 新增图标 2024-01-24 22:44:48 +08:00
gfdgd-xi 14ac76396e 初步支持安装deb 2024-01-23 22:48:21 +08:00
gfdgd-xi ea4e1d5da7 使用DTK框架 2024-01-22 22:51:31 +08:00
gfdgd-xi 8090ac0f8d 初步可以运行命令 2024-01-21 22:42:58 +08:00
gfdgd-xi 8eec84a689 创建基础文件 2024-01-21 21:59:04 +08:00
35 changed files with 737 additions and 674 deletions
+73
View File
@@ -0,0 +1,73 @@
# This file is used to ignore files which are generated
# ----------------------------------------------------------------------------
*~
*.autosave
*.a
*.core
*.moc
*.o
*.obj
*.orig
*.rej
*.so
*.so.*
*_pch.h.cpp
*_resource.rc
*.qm
.#*
*.*#
core
!core/
tags
.DS_Store
.directory
*.debug
Makefile*
*.prl
*.app
moc_*.cpp
ui_*.h
qrc_*.cpp
Thumbs.db
*.res
*.rc
/.qmake.cache
/.qmake.stash
# qtcreator generated files
*.pro.user*
# xemacs temporary files
*.flc
# Vim temporary files
.*.swp
# Visual Studio generated files
*.ib_pdb_index
*.idb
*.ilk
*.pdb
*.sln
*.suo
*.vcproj
*vcproj.*.*.user
*.ncb
*.sdf
*.opensdf
*.vcxproj
*vcxproj.*
# MinGW generated files
*.Debug
*.Release
# Python byte code
*.pyc
# Binaries
# --------
*.dll
*.exe
-3
View File
@@ -1,3 +0,0 @@
# Default ignored files
/shelf/
/workspace.xml
-8
View File
@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>
-6
View File
@@ -1,6 +0,0 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>
-4
View File
@@ -1,4 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7" project-jdk-type="Python SDK" />
</project>
-8
View File
@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/deepin-wine-run.iml" filepath="$PROJECT_DIR$/.idea/deepin-wine-run.iml" />
</modules>
</component>
</project>
Generated
-6
View File
@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>
+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="64px" height="64px" viewBox="0 0 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 41.2 (35397) - http://www.bohemiancoding.com/sketch -->
<title>dialog-apply</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="dialog-apply">
<image id="Bitmap" x="1" y="2" width="62" height="62" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAA+CAYAAABzwahEAAAABGdBTUEAA1teXP8meAAABQhJREFUaAXlmol2ozAMANu973v//yv3ProammEVAwWT5hVcvacaHFvWSLKhaS8vziuXhfnyvvj44qroKO+Lj9ffzjlSaznb47pU7DnGVrjccp2VeYhjru9O+OniJ5jopmqHVn0Q1ygixN+4RhEhnOt45zPG8c53ji1jVomLrpock5yvszj/8GDsT7S/Q9c6ic1Hod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l/G0okWWQLwn7+GGqmZ6Fxegk444ycpUPZM5fo3qWwn6lCtqCZHjy6xhxcAu5+z/AEgGc8J6gRHrN/rj5Lm5cU3jOEtrxn110Cno2U8Myn9Hm9pfStiLg8i/Am9imUNcksmfb0FhofZ6UWHIMlPLCcqLw00BKARYvHuKWCXcqatzHWI8Moa3l661d0zYtlPD/y/wjncMqjOIVSdvn9+EvcU4ZkYo2QFF6e2E7YZUsBKqzAVllVsIUIe1XiPFoUJ1ECQDmq9OEgzuo49wRDhwmecw0cLbYYxzzVuWVZV0GHvc5p2rVSBiBD5GBwbYUYLOdaorQEAwUsQ3rNZ46Py/VbysUxcopoJ0MJWraOyesJI3jZ+jktYnt9t+KnDq+YOjol2xMwt0xyjK0QueU6q4s5xvvVrYuvNjAzsbRf3pfTS7Dyvhy/+v4fra1pWYxQ1MYAAAAASUVORK5CYII="></image>
<ellipse id="Oval" fill="#59D2C6" cx="32" cy="32" rx="28" ry="28"></ellipse>
<polyline id="Path-5" stroke="#FFFFFF" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" points="44 22 44 34 27 34"></polyline>
<path d="M15.5810585,35.2161988 C14.707864,34.5445108 14.7174539,33.4481124 15.5810585,32.7838012 L25.4189415,25.2161988 C26.292136,24.5445108 27,24.8982124 27,25.9907951 L27,42.0092049 C27,43.1086907 26.2825461,43.4481124 25.4189415,42.7838012 L15.5810585,35.2161988 Z" id="Triangle" fill="#FFFFFF"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="64px" height="64px" viewBox="0 0 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 41.2 (35397) - http://www.bohemiancoding.com/sketch -->
<title>dialog-cancel</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="dialog-cancel">
<image id="Bitmap" x="1" y="2" width="62" height="62" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAA+CAYAAABzwahEAAAABGdBTUEAA1teXP8meAAABQhJREFUaAXlmol2ozAMANu973v//yv3ProammEVAwWT5hVcvacaHFvWSLKhaS8vziuXhfnyvvj44qroKO+Lj9ffzjlSaznb47pU7DnGVrjccp2VeYhjru9O+OniJ5jopmqHVn0Q1ygixN+4RhEhnOt45zPG8c53ji1jVomLrpock5yvszj/8GDsT7S/Q9c6ic1HodkegTAIcbnadu84RmqkBMY5FMd+Hdpobk0I6ONQWgKKnhQAAcLOYnGOpWlGfoYFy3ixscqBrPnkMAd4twJdVZWl0wdbsw3QKPMsQzKMVi0c49cIa7h9qACTUG2rBjxDsyhOfD+01QufOMEAEHwUqQr8EnCBzTTQlBmlfdeCH+5/wIWfrYQacCILNMCU9lbEg869L/yN/s2Bm21LitJmoa0Jhxx+LYa/CVxoxmCQTG8ROtzqxFLHV68PHw2bKfAMTXlzkm6pvIck1z1kHt89fCfLfgyciQifaeBH17OPH1QlvqNmXqaegBNxTOhnIi37em+Cz5lh4D9wWXKJs1fI9LnfxvL6t3lNtp8e/B+U/FjGgecUZzB7e6/iGx4sN5Z6zjaD91jiZZJggIXKlq8bU2acDxnEAbHlR1fn/IIfcgjeTxHcaDCglWwLOZp1wRkEvPd7PdCEza0ssMHYiaDc0Em29/Cigr81AhNsA3CzTalv4beuGqglY2GCrc+6F4LzCLM0lhjcyxiZel5LXXAH7AWoxk9OeMH7w+w+gJPUSfAWnt1TVTDIONlGiMZ9AIf1Mu9xAjB4mWdUIwIbjF2iBYeNjpYPN9g6aGAF7zvobFwGGYfXQLTIfsTmjXu75czL1rEKTobp4LWuVYHNBPelTQfKl4util+cdvBk3Chw6rWecZ9aV5Y68HTyq1urAhuMfcYBFZxAGAz6WxG5JsF5ZX3eCm3igAm2I3Cybcb58FloawJTBh/scT7kgGvpkJMngx/tZ7LOl/Do69BWBBa5YOwkH2SWO1/MURotnPAwwAJTv7/jerSkebWjPJjwLXTP8j6cB5i/AfonpS7rOeMA0sle4FtJ3nT8D4O43J3gOwz+Q0Nf5pBMHWJknaDwGPgaukf5EE6TZcCPsg1MmXH6iIwTCMA7Oncm+IzvGfoIYSrjDmLyi1CCsZe/sLwMX1+F8jezXOazpQ7s0aCDIY3E7WaFfwTgQAPaA43DbSBTGQdeIQjc8zzklB81FP13LTy6PocCDDjbVV/LRE4ebjGnEyaonAdvQreYeTINNL4Bzbbk6aTvcXksUxnPo4wWLZl/G0okWWQLwn7+GGqmZ6Fxegk444ycpUPZM5fo3qWwn6lCtqCZHjy6xhxcAu5+z/AEgGc8J6gRHrN/rj5Lm5cU3jOEtrxn110Cno2U8Myn9Hm9pfStiLg8i/Am9imUNcksmfb0FhofZ6UWHIMlPLCcqLw00BKARYvHuKWCXcqatzHWI8Moa3l661d0zYtlPD/y/wjncMqjOIVSdvn9+EvcU4ZkYo2QFF6e2E7YZUsBKqzAVllVsIUIe1XiPFoUJ1ECQDmq9OEgzuo49wRDhwmecw0cLbYYxzzVuWVZV0GHvc5p2rVSBiBD5GBwbYUYLOdaorQEAwUsQ3rNZ46Py/VbysUxcopoJ0MJWraOyesJI3jZ+jktYnt9t+KnDq+YOjol2xMwt0xyjK0QueU6q4s5xvvVrYuvNjAzsbRf3pfTS7Dyvhy/+v4fra1pWYxQ1MYAAAAASUVORK5CYII="></image>
<ellipse id="Oval" fill="#E04141" cx="32" cy="32" rx="28" ry="28"></ellipse>
<path d="M42.4871169,40.0184985 C43.1684837,40.6998652 43.1732122,41.7998504 42.4870678,42.4859947 C41.805674,43.1673886 40.7030688,43.1695411 40.0195716,42.4860438 L21.5128831,23.9793553 C20.8315163,23.2979886 20.8267878,22.1980034 21.5129322,21.5118591 C22.194326,20.8304652 23.2969312,20.8283127 23.9804284,21.5118099 L42.4871169,40.0184985 Z" id="Rectangle" fill="#FFFFFF"></path>
<circle id="Oval-3" stroke="#FFFFFF" stroke-width="3" cx="32" cy="32" r="14.5"></circle>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="64px" height="64px" viewBox="0 0 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 41.2 (35397) - http://www.bohemiancoding.com/sketch -->
<title>dialog-error</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="dialog-error">
<image id="Bitmap" x="1" y="2" width="62" height="62" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAA+CAYAAABzwahEAAAABGdBTUEAA1teXP8meAAABQhJREFUaAXlmol2ozAMANu973v//yv3ProammEVAwWT5hVcvacaHFvWSLKhaS8vziuXhfnyvvj44qroKO+Lj9ffzjlSaznb47pU7DnGVrjccp2VeYhjru9O+OniJ5jopmqHVn0Q1ygixN+4RhEhnOt45zPG8c53ji1jVomLrpock5yvszj/8GDsT7S/Q9c6ic1HodkegTAIcbnadu84RmqkBMY5FMd+Hdpobk0I6ONQWgKKnhQAAcLOYnGOpWlGfoYFy3ixscqBrPnkMAd4twJdVZWl0wdbsw3QKPMsQzKMVi0c49cIa7h9qACTUG2rBjxDsyhOfD+01QufOMEAEHwUqQr8EnCBzTTQlBmlfdeCH+5/wIWfrYQacCILNMCU9lbEg869L/yN/s2Bm21LitJmoa0Jhxx+LYa/CVxoxmCQTG8ROtzqxFLHV68PHw2bKfAMTXlzkm6pvIck1z1kHt89fCfLfgyciQifaeBH17OPH1QlvqNmXqaegBNxTOhnIi37em+Cz5lh4D9wWXKJs1fI9LnfxvL6t3lNtp8e/B+U/FjGgecUZzB7e6/iGx4sN5Z6zjaD91jiZZJggIXKlq8bU2acDxnEAbHlR1fn/IIfcgjeTxHcaDCglWwLOZp1wRkEvP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1pWYxQ1MYAAAAASUVORK5CYII="></image>
<ellipse id="Oval" fill="#C51818" cx="32" cy="32" rx="28" ry="28"></ellipse>
<path d="M40.7494771,20.5594658 C41.4928588,19.8160841 42.6929596,19.8109252 43.4415538,20.5595194 C44.1849651,21.3029306 44.1873135,22.50589 43.4416074,23.2515961 L23.2505229,43.4426806 C22.5071412,44.1860623 21.3070404,44.1912212 20.5584462,43.442627 C19.8150349,42.6992158 19.8126865,41.4962564 20.5583926,40.7505503 L40.7494771,20.5594658 Z" id="Rectangle" fill="#FFFFFF"></path>
<path d="M43.4405842,40.7476216 C44.1838994,41.4909368 44.1890579,42.6909303 43.4405307,43.4394576 C42.6971859,44.1828023 41.4943341,44.1851506 40.7486947,43.4395111 L20.5594158,23.2502322 C19.8161006,22.506917 19.8109421,21.3069235 20.5594693,20.5583962 C21.3028141,19.8150515 22.5056659,19.8127032 23.2513053,20.5583427 L43.4405842,40.7476216 Z" id="Rectangle" fill="#FFFFFF"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.2 KiB

+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="64px" height="64px" viewBox="0 0 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 41.2 (35397) - http://www.bohemiancoding.com/sketch -->
<title>dialog-information</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="dialog-information">
<image id="Bitmap" x="1" y="2" width="62" height="62" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAA+CAYAAABzwahEAAAABGdBTUEAA1teXP8meAAABQhJREFUaAXlmol2ozAMANu973v//yv3ProammEVAwWT5hVcvacaHFvWSLKhaS8vziuXhfnyvvj44qroKO+Lj9ffzjlSaznb47pU7DnGVrjccp2VeYhjru9O+OniJ5jopmqHVn0Q1ygixN+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/LRE4ebjGnEyaonAdvQreYeTINNL4Bzbbk6aTvcXksUxnPo4wWLZl/G0okWWQLwn7+GGqmZ6Fxegk444ycpUPZM5fo3qWwn6lCtqCZHjy6xhxcAu5+z/AEgGc8J6gRHrN/rj5Lm5cU3jOEtrxn110Cno2U8Myn9Hm9pfStiLg8i/Am9imUNcksmfb0FhofZ6UWHIMlPLCcqLw00BKARYvHuKWCXcqatzHWI8Moa3l661d0zYtlPD/y/wjncMqjOIVSdvn9+EvcU4ZkYo2QFF6e2E7YZUsBKqzAVllVsIUIe1XiPFoUJ1ECQDmq9OEgzuo49wRDhwmecw0cLbYYxzzVuWVZV0GHvc5p2rVSBiBD5GBwbYUYLOdaorQEAwUsQ3rNZ46Py/VbysUxcopoJ0MJWraOyesJI3jZ+jktYnt9t+KnDq+YOjol2xMwt0xyjK0QueU6q4s5xvvVrYuvNjAzsbRf3pfTS7Dyvhy/+v4fra1pWYxQ1MYAAAAASUVORK5CYII="></image>
<ellipse id="Oval" fill="#988AD3" cx="32" cy="32" rx="28" ry="28"></ellipse>
<path d="M39,41.5 C39.1075261,41.9690455 38.3560093,42.5622173 36.5,44 C34.0039875,45.9532142 32.633344,46.5 30.5,46.5 C28.9426589,46.5 27.936,45.3421565 27.936,44.0264496 C27.936,41 31,31.0055951 31,29.5 C31,27.6918926 26,32 25.5,30.5 C25.2400137,29.720041 25.199988,29.4927164 27.6,28.0956256 C30.000012,26.6985349 31.9146595,26 33.344,26 C34.944008,26 35.744,26.7053168 35.744,28.1159715 C35.744,31 31.628,43 33.344,43 C34.544,43.9994914 38.5,39.3189217 39,41.5 Z" id="i" fill="#FFFFFF"></path>
<circle id="Oval-2" fill="#FFFFFF" cx="33" cy="20" r="3"></circle>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.0 KiB

+14
View File
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="64px" height="64px" viewBox="0 0 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 41.2 (35397) - http://www.bohemiancoding.com/sketch -->
<title>dialog-ok</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="dialog-ok">
<image id="Bitmap" x="1" y="2" width="62" height="62" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAA+CAYAAABzwahEAAAABGdBTUEAA1teXP8meAAABQhJREFUaAXlmol2ozAMANu973v//yv3ProammEVAwWT5hVcvacaHFvWSLKhaS8vziuXhfnyvvj44qroKO+Lj9ffzjlSaznb47pU7DnGVrjccp2VeYhjru9O+OniJ5jopmqHVn0Q1ygixN+4RhEhnOt45zPG8c53ji1jVomLrpock5yvszj/8GDsT7S/Q9c6ic1HodkegTAIcbnadu84RmqkBMY5FMd+Hdpobk0I6ONQWgKKnhQAAcLOYnGOpWlGfoYFy3ixscqBrPnkMAd4twJdVZWl0wdbsw3QKPMsQzKMVi0c49cIa7h9qACTUG2rBjxDsyhOfD+01QufOMEAEHwUqQr8EnCBzTTQlBmlfdeCH+5/wIWfrYQacCILNMCU9lbEg869L/yN/s2Bm21LitJmoa0Jhxx+LYa/CVxoxmCQTG8ROtzqxFLHV68PHw2bKfAMTXlzkm6pvIck1z1kHt89fCfLfgyciQifaeBH17OPH1QlvqNmXqaegBNxTOhnIi37em+Cz5lh4D9wWXKJs1fI9LnfxvL6t3lNtp8e/B+U/FjGgecUZzB7e6/iGx4sN5Z6zjaD91jiZZJggIXKlq8bU2acDxnEAbHlR1fn/IIfcgjeTxHcaDCglWwLOZp1wRkEvPd7PdCEza0ssMHYiaDc0Em29/Cigr81AhNsA3CzTalv4beuGqglY2GCrc+6F4LzCLM0lhjcyxiZel5LXXAH7AWoxk9OeMH7w+w+gJPUSfAWnt1TVTDIONlGiMZ9AIf1Mu9xAjB4mWdUIwIbjF2iBYeNjpYPN9g6aGAF7zvobFwGGYfXQLTIfsTmjXu75czL1rEKTobp4LWuVYHNBPelTQfKl4util+cdvBk3Chw6rWecZ9aV5Y68HTyq1urAhuMfcYBFZxAGAz6WxG5JsF5ZX3eCm3igAm2I3Cybcb58FloawJTBh/scT7kgGvpkJMngx/tZ7LOl/Do69BWBBa5YOwkH2SWO1/MURotnPAwwAJTv7/jerSkebWjPJjwLXTP8j6cB5i/AfonpS7rOeMA0sle4FtJ3nT8D4O43J3gOwz+Q0Nf5pBMHWJknaDwGPgaukf5EE6TZcCPsg1MmXH6iIwTCMA7Oncm+IzvGfoIYSrjDmLyi1CCsZe/sLwMX1+F8jezXOazpQ7s0aCDIY3E7WaFfwTgQAPaA43DbSBTGQdeIQjc8zzklB81FP13LTy6PocCDDjbVV/LRE4ebjGnEyaonAdvQreYeTINNL4Bzbbk6aTvcXksUxnPo4wWLZl/G0okWWQLwn7+GGqmZ6Fxegk444ycpUPZM5fo3qWwn6lCtqCZHjy6xhxcAu5+z/AEgGc8J6gRHrN/rj5Lm5cU3jOEtrxn110Cno2U8Myn9Hm9pfStiLg8i/Am9imUNcksmfb0FhofZ6UWHIMlPLCcqLw00BKARYvHuKWCXcqatzHWI8Moa3l661d0zYtlPD/y/wjncMqjOIVSdvn9+EvcU4ZkYo2QFF6e2E7YZUsBKqzAVllVsIUIe1XiPFoUJ1ECQDmq9OEgzuo49wRDhwmecw0cLbYYxzzVuWVZV0GHvc5p2rVSBiBD5GBwbYUYLOdaorQEAwUsQ3rNZ46Py/VbysUxcopoJ0MJWraOyesJI3jZ+jktYnt9t+KnDq+YOjol2xMwt0xyjK0QueU6q4s5xvvVrYuvNjAzsbRf3pfTS7Dyvhy/+v4fra1pWYxQ1MYAAAAASUVORK5CYII="></image>
<ellipse id="Oval" fill="#7ED321" cx="32" cy="32" rx="28" ry="28"></ellipse>
<polyline id="Path-4" stroke="#FFFFFF" stroke-width="4" stroke-linecap="round" stroke-linejoin="round" points="18 32 27.5104121 42.0104121 46 23"></polyline>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="64px" height="64px" viewBox="0 0 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 41.2 (35397) - http://www.bohemiancoding.com/sketch -->
<title>dialog-question</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="dialog-question">
<image id="Bitmap" x="1" y="2" width="62" height="62" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAA+CAYAAABzwahEAAAABGdBTUEAA1teXP8meAAABQhJREFUaAXlmol2ozAMANu973v//yv3ProammEVAwWT5hVcvacaHFvWSLKhaS8vziuXhfnyvvj44qroKO+Lj9ffzjlSaznb47pU7DnGVrjccp2VeYhjru9O+OniJ5jopmqHVn0Q1ygixN+4RhEhnOt45zPG8c53ji1jVomLrpock5yvszj/8GDsT7S/Q9c6ic1HodkegTAIcbnadu84RmqkBMY5FMd+Hdpobk0I6ONQWgKKnhQAAcLOYnGOpWlGfoYFy3ixscqBrPnkMAd4twJdVZWl0wdbsw3QKPMsQzKMVi0c49cIa7h9qACTUG2rBjxDsyhOfD+01QufOMEAEHwUqQr8EnCBzTTQlBmlfdeCH+5/wIWfrYQacCILNMCU9lbEg869L/yN/s2Bm21LitJmoa0Jhxx+LYa/CVxoxmCQTG8ROtzqxFLHV68PHw2bKfAMTXlzkm6pvIck1z1kHt89fCfLfgyciQifaeBH17OPH1QlvqNmXqaegBNxTOhnIi37em+Cz5lh4D9wWXKJs1fI9LnfxvL6t3lNtp8e/B+U/FjGgecUZzB7e6/iGx4sN5Z6zjaD91jiZZJggIXKlq8bU2acDxnEAbHlR1fn/IIfcgjeTxHcaDCglWwLOZp1wRkEvPd7PdCEza0ssMHYiaDc0Em29/Cigr81AhNsA3CzTalv4beuGqglY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5FF" cx="32" cy="32" rx="28" ry="28"></ellipse>
<path d="M32,40 C30.3153053,40 29,41.3153053 29,43 C29,44.6605881 30.3264079,46 32,46 C33.6735921,46 35,44.6605881 35,43 C35,41.3153053 33.6846947,40 32,40 Z" id="Path" fill="#FFFFFF"></path>
<path d="M32.468,16.96 C27.4238833,16.96 23.58,20.0244775 23.58,24.1702907 C23.58,26.1861804 25.003148,27.77337 27.032,27.77337 C28.9057249,27.77337 30.124,26.4889526 30.124,24.7281068 C30.124,23.0803988 29.3642533,22.3265653 27.8296148,21.9566688 C27.4706135,21.8638914 27.316,21.7167857 27.316,21.4183975 C27.316,20.1849102 29.1314221,18.7367478 31.64,18.7367478 C34.4418576,18.7367478 36.072,20.4206734 36.072,23.4265357 C36.072,25.5483621 35.3753311,26.8992916 33.4522353,29.2779172 C33.2518819,29.5253283 30,32.5 30,35 C30,35.916658 30,37 31,37.5 C32,38 32.1923697,36.5680604 32.6329793,35.0204247 C33.0706287,34.087734 34.2408493,32.7804809 37.3328167,31.0068188 C40.882884,28.675952 41.968,26.858853 41.968,23.9843519 C41.968,19.7046154 38.1785728,16.96 32.468,16.96 Z" id="Path" fill="#FFFFFF"></path>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.5 KiB

+15
View File
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="64px" height="64px" viewBox="0 0 64 64" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<!-- Generator: Sketch 41.2 (35397) - http://www.bohemiancoding.com/sketch -->
<title>dialog-warning</title>
<desc>Created with Sketch.</desc>
<defs></defs>
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="dialog-warning">
<image id="Bitmap" x="1" y="2" width="62" height="62" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAD4AAAA+CAYAAABzwahEAAAABGdBTUEAA1teXP8meAAABQhJREFUaAXlmol2ozAMAN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MA7Oncm+IzvGfoIYSrjDmLyi1CCsZe/sLwMX1+F8jezXOazpQ7s0aCDIY3E7WaFfwTgQAPaA43DbSBTGQdeIQjc8zzklB81FP13LTy6PocCDDjbVV/LRE4ebjGnEyaonAdvQreYeTINNL4Bzbbk6aTvcXksUxnPo4wWLZl/G0okWWQLwn7+GGqmZ6Fxegk444ycpUPZM5fo3qWwn6lCtqCZHjy6xhxcAu5+z/AEgGc8J6gRHrN/rj5Lm5cU3jOEtrxn110Cno2U8Myn9Hm9pfStiLg8i/Am9imUNcksmfb0FhofZ6UWHIMlPLCcqLw00BKARYvHuKWCXcqatzHWI8Moa3l661d0zYtlPD/y/wjncMqjOIVSdvn9+EvcU4ZkYo2QFF6e2E7YZUsBKqzAVllVsIUIe1XiPFoUJ1ECQDmq9OEgzuo49wRDhwmecw0cLbYYxzzVuWVZV0GHvc5p2rVSBiBD5GBwbYUYLOdaorQEAwUsQ3rNZ46Py/VbysUxcopoJ0MJWraOyesJI3jZ+jktYnt9t+KnDq+YOjol2xMwt0xyjK0QueU6q4s5xvvVrYuvNjAzsbRf3pfTS7Dyvhy/+v4fra1pWYxQ1MYAAAAASUVORK5CYII="></image>
<ellipse id="Oval" fill="#F39800" cx="32" cy="32" rx="28" ry="28"></ellipse>
<path d="M32.041368,39 L32.041368,39 C30.7366037,39 29.6679395,38.0426848 29.6260007,36.8352603 L29.0015777,18.8661959 C28.9472125,17.2994188 30.3047888,16 31.9994292,16 L31.9994292,16 C33.6894097,16 35.0454327,17.2907943 34.998834,18.8532592 L34.4567354,36.823761 C34.4210097,38.0369352 33.3507923,39 32.041368,39 L32.041368,39 Z" id="Shape" fill="#FFFFFF"></path>
<ellipse id="Oval" fill="#FFFFFF" cx="32" cy="46" rx="3" ry="3"></ellipse>
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 2.9 KiB

+1
View File
File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 11 KiB

-1
View File
@@ -1 +0,0 @@
允许使用程序里任意内容
+15 -78
View File
@@ -1,81 +1,18 @@
# wine 运行器 <p width=100px align="center"><img src="https://storage.deepin.org/thread/202208031419283599_deepin-wine-runner.png"></p>
<h1 align="center">Wine 运行器 Aptss 安装器</h1>
#### 介绍 <hr>
一个图形化了以下命令的程序 <a href='https://gitee.com/gfdgd-xi/deep-wine-runner/stargazers'><img src='https://gitee.com/gfdgd-xi/deep-wine-runner/badge/star.svg?theme=dark' alt='star'></img></a>
<a href='https://gitee.com/gfdgd-xi/deep-wine-runner/members'><img src='https://gitee.com/gfdgd-xi/deep-wine-runner/badge/fork.svg?theme=dark' alt='fork'></img></a>
```
WINEPREFIX=容器路径 winewine的路径) 可执行文件路径
```
让你的 deepin-wine 打包轻松一点
是使用 Python3 的 tkinter 构建的
(自己美术功底太差,图标只能在网络上找了)
(测试平台:deepin 20.1 1030UOS 家庭版 21
#### 软件架构
i386 和 amd64deepin-wine、deepin-wine5、wine、wine64、deepin-wine5-stable、deepin-wine6-stable 运行在哪就运行在哪
#### 安装教程
1. 安装所需依赖
```
sudo apt install python3 python3-tk git
# 可选
# sudo apt install deepin-wine deepin-wine5 wine wine64
```
2. 下载本程序
```
git clone https://gitee.com/gfdgd-xi/deep-wine-runner.git
```
3. 运行本程序
## 介绍
此工具用于在 Debian 发行版调试/安装Wine运行器打包的应用,不需要手动输入星火的命令/等上架商店就可以安装来自星火应用商店的依赖如 deepin-wine6-stable、spark-dwine-helper 等常用打包依赖
## 如何编译
``` ```
sudo apt install qtbase5-dev qttools5-dev-tools
git clone https://gitee.com/gfdgd-xi/deep-wine-runner
cd deep-wine-runner cd deep-wine-runner
chmod 777 main.py git checkout AptssInstaller
./main.py qmake .
``` make -j4
./aptss-installer
```
#### 使用说明
(均在软件的“小提示”里有说明)
1、使用终端运行该程序,可以看到 wine 以及程序本身的提示和报错
2、wine 32 位和 64 位的容器互不兼容
#### 更新日志
1.3.0 更新内容:
1、修改了窗口显示控件的库(从 tkinter 到 tkinter.ttk
2、添加了更多 wine 可以选择(deepin-wine、deepin-wine5、wine、wine64、deepin-wine5-stable、deepin-wine6-stable
3、修改了程序的提示信息
1.2.0 更新内容:
1、修改布局方式
2、轻度梳理代码布局
1.1.2 更新内容(未发布发行版):
1、进行了细节优化
1.1.1 更新内容:
1、使用多线程,防止界面假死
2、添加软件图标
1.1 更新内容:
1、修改了代码的部分内容,使其支持容器路径可带空格无需“\”转义,以及支持手动保存运行脚本到桌面
1.0 更新内容:
1、实现内容
#### 特技
难道是使用 tkinter 进行构建吗?所以没有咯
+12
View File
@@ -0,0 +1,12 @@
<RCC>
<qresource prefix="/">
<file>Icon/MessageBox/dialog-apply.svg</file>
<file>Icon/MessageBox/dialog-cancel.svg</file>
<file>Icon/MessageBox/dialog-error.svg</file>
<file>Icon/MessageBox/dialog-information.svg</file>
<file>Icon/MessageBox/dialog-ok.svg</file>
<file>Icon/MessageBox/dialog-question.svg</file>
<file>Icon/MessageBox/dialog-warning.svg</file>
<file>Icon/deepin-wine-runner.svg</file>
</qresource>
</RCC>
+38
View File
@@ -0,0 +1,38 @@
QT += core gui
PKGCONFIG += dtkcore dtkgui dtkwidget
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
VERSION = 1.0.0
CONFIG += c++17 link_pkgconfig
# You can make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += \
installdeb.cpp \
main.cpp \
mainwindow.cpp \
messagebox.cpp
HEADERS += \
installdeb.h \
mainwindow.h \
messagebox.h
FORMS += \
mainwindow.ui
TRANSLATIONS += \
aptss-installer_zh_CN.ts
CONFIG += lrelease
CONFIG += embed_translations
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target
unix:!macx: LIBS += -lqtermwidget5 -lapt-pkg # 这一行让我查了好久
RESOURCES += \
Resources.qrc
+27
View File
@@ -0,0 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="zh_CN">
<context>
<name>MainWindow</name>
<message>
<location filename="mainwindow.ui" line="14"/>
<source>MainWindow</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="30"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="37"/>
<source></source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="60"/>
<source>1</source>
<translation type="unfinished"></translation>
</message>
</context>
</TS>
-9
View File
@@ -1,9 +0,0 @@
Package: spark-deepin-wine-runner
Version: 1.3.1
Maintainer: gfdgd xi <3025613752@qq.com>
Homepage: https://gitee.com/gfdgd-xi/deep-wine-runner
Architecture: all
Priority: optional
Depends: python3, python3-tk
Description: gfdgd xi make's wine runner
-273
View File
@@ -1,273 +0,0 @@
#!/usr/bin/env python3
# 使用系统默认的 python3 运行
###########################################################################################
# 作者:gfdgd xi
# 版本:1.3.1
# 更新时间:2021年05月23日
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
# 基于 Python3 的 tkinter 构建
###########################################################################################
#################
# 引入所需的库
#################
import tkinter as tk
import tkinter.ttk as ttk
import tkinter.filedialog
import tkinter.messagebox
import os
import sys
import time
import json
import shutil
import threading
import webbrowser
###################
# 程序所需事件
###################
# 打开程序官网
def OpenProgramURL():
webbrowser.open_new_tab(programUrl)
# 读取文本文档
def readtxt(path):
f = open(path, "r") # 设置文件对象
str = f.read() # 获取内容
f.close() # 关闭文本对象
return str # 返回结果
# 写入文本文档
def write_txt(path, things):
file = open(path, 'w', encoding='UTF-8') # 设置文件对象
file.write(things) # 写入文本
file.close() # 关闭文本对象
# 获取用户桌面目录
def get_desktop_path():
for line in open(get_home() + "/.config/user-dirs.dirs"): # 以行来读取配置文件
desktop_index = line.find("XDG_DESKTOP_DIR=\"") # 寻找是否有对应项,有返回 0,没有返回 -1
if desktop_index != -1: # 如果有对应项
break # 结束循环
if desktop_index == -1: # 如果是提前结束,值一定≠-1,如果是没有提前结束,值一定=-1
return -1
else:
get = line[17:-2] # 截取桌面目录路径
get_index = get.find("$HOME") # 寻找是否有对应的项,需要替换内容
if get != -1: # 如果有
get = get.replace("$HOME", get_home()) # 则把其替换为用户目录(~)
return get # 返回目录
# 获取用户主目录
def get_home():
return os.path.expanduser('~')
# 第一个浏览按钮事件
def liulanbutton():
path = tkinter.filedialog.askdirectory(title="选择 wine 容器", initialdir=json.loads(readtxt(get_home() + "/.config/deepin-wine-runner/WineBotton.json"))["path"])
if path != "" and path != "()":
e1.set(path)
write_txt(get_home() + "/.config/deepin-wine-runner/WineBotton.json", json.dumps({"path": path})) # 写入配置文件
# 第二个浏览按钮事件
def liulanexebutton():
path = tkinter.filedialog.askopenfilename(title="选择 exe 可执行文件", filetypes=[("exe 可执行文件", "*.exe"), ("EXE 可执行文件", "*.EXE"), ("所有文件", "*.*")], initialdir=json.loads(readtxt(get_home() + "/.config/deepin-wine-runner/FindExe.json"))["path"])
if path != "" and path != "()":
e2.set(path) # 显示路径
write_txt(get_home() + "/.config/deepin-wine-runner/FindExe.json", json.dumps({"path": os.path.dirname(path)})) # 写入配置文件
# 使用多线程运行可执行文件
def runexebutton():
run = threading.Thread(target=runexebutton_threading)
run.start()
def DisableButton(things):
a = {True: tk.DISABLED, False: tk.NORMAL}
button1.configure(state=a[things])
button2.configure(state=a[things])
button3.configure(state=a[things])
e1.configure(state=a[things])
e2.configure(state=a[things])
o1.configure(state=a[things])
# 运行可执行文件的线程
def runexebutton_threading():
DisableButton(True)
if e1.get() == "" or e2.get() == "": # 判断文本框是否有内容
tkinter.messagebox.showinfo(title="提示", message="没有填写需要使用的 wine 容器或需要运行的 exe 应用")
else: # 如果都有
os.system("WINEPREFIX='" + e1.get() + "' " + wine[o1_text.get()] + " '" + e2.get() + "'") # 运行
findExeHistory.append(e1.get()) # 将记录写进数组
wineBottonHistory.append(e2.get()) # 将记录写进数组
print(ListToDictionary(findExeHistory))
write_txt(get_home() + "/.config/deepin-wine-runner/FindExeHistory.json", str(json.dumps(ListToDictionary(findExeHistory)))) # 将历史记录的数组转换为字典并写入
write_txt(get_home() + "/.config/deepin-wine-runner/WineBottonHistory.json", str(json.dumps(ListToDictionary(wineBottonHistory)))) # 将历史记录的数组转换为字典并写入
e1['value'] = findExeHistory
e2['value'] = wineBottonHistory
DisableButton(False)
# 显示“关于这个程序”窗口
def about_this_program():
global about
tkinter.messagebox.showinfo(title="关于这个程序", message=about)
# 显示“提示”窗口
def helps():
global tips
tkinter.messagebox.showinfo(title="提示", message=tips)
# 显示更新内容窗口
def UpdateThings():
tkinter.messagebox.showinfo(title="更新内容", message=updateThings)
# 生成 shell 文件在桌面
# (第四个按钮的事件)
def make_desktop_on_desktop():
if combobox1.get() == "" or e2.get() == "" or e1.get() == "": # 判断文本框是否有内容
tkinter.messagebox.showinfo(title="提示", message="没有填写需要使用的 wine 容器或需要运行的 exe 应用或保存的文件名")
else: # 如果都有
if os.path.exists(get_desktop_path() + "/" + combobox1.get() + ".sh"): # 判断目录是否有该文件,如果有
choose = tkinter.messagebox.askokcancel(title="提示", message="文件已经存在,是否覆盖?") # 询问用户是否覆盖
if choose: # 如要覆盖
os.remove(get_desktop_path() + "/" + combobox1.get() + ".sh") # 删除该文件
else: # 如不覆盖
return # 结束
os.mknod(get_desktop_path() + "/" + combobox1.get() + ".sh") # 创建文本文档
write_txt(get_desktop_path() + "/" + combobox1.get() + ".sh", "#!/bin/bash\n" + "WINEPREFIX='" + e1.get() + "' " + wine[o1_text.get()] + " '" + e2.get() + "'") # 写入文本文档
os.system("chmod 777 '" + get_desktop_path() + "/" + combobox1.get() + ".sh" + "'") # 赋予可执行权限
shellHistory.append(combobox1.get()) # 将记录写进数组
write_txt(get_home() + "/.config/deepin-wine-runner/ShellHistory.json", str(json.dumps(ListToDictionary(shellHistory)))) # 将历史记录的数组转换为字典并写入
combobox1['value'] = shellHistory
tkinter.messagebox.showinfo(title="提示", message="生成完成!") # 显示完成对话框
# 数组转字典
def ListToDictionary(list):
dictionary = {}
for i in range(len(list)):
dictionary[i] = list[i]
return dictionary
def CleanProgramHistory():
if tkinter.messagebox.askokcancel(title="警告", message="删除后将无法恢复,你确定吗?\n删除后软件将会自动重启。"):
shutil.rmtree(get_home() + "/.config/deepin-wine-runner")
ReStartProgram()
# 重启本应用程序
def ReStartProgram():
python = sys.executable
os.execl(python, python, * sys.argv)
###########################
# 加载配置
###########################
if not os.path.exists(get_home() + "/.config/deepin-wine-runner"): # 如果没有配置文件夹
os.mkdir(get_home() + "/.config/deepin-wine-runner") # 创建配置文件夹
if not os.path.exists(get_home() + "/.config/deepin-wine-runner/ShellHistory.json"): # 如果没有配置文件
write_txt(get_home() + "/.config/deepin-wine-runner/ShellHistory.json", json.dumps({})) # 创建配置文件
if not os.path.exists(get_home() + "/.config/deepin-wine-runner/FindExeHistory.json"): # 如果没有配置文件
write_txt(get_home() + "/.config/deepin-wine-runner/FindExeHistory.json", json.dumps({})) # 创建配置文件
if not os.path.exists(get_home() + "/.config/deepin-wine-runner/WineBottonHistory.json"): # 如果没有配置文件
write_txt(get_home() + "/.config/deepin-wine-runner/WineBottonHistory.json", json.dumps({})) # 创建配置文件
if not os.path.exists(get_home() + "/.config/deepin-wine-runner/FindExe.json"): # 如果没有配置文件
write_txt(get_home() + "/.config/deepin-wine-runner/FindExe.json", json.dumps({"path": "~"})) # 写入(创建)一个配置文件
if not os.path.exists(get_home() + "/.config/deepin-wine-runner/WineBotton.json"): # 如果没有配置文件
write_txt(get_home() + "/.config/deepin-wine-runner/WineBotton.json", json.dumps({"path": "~/.deepinwine"})) # 写入(创建)一个配置文件
###########################
# 设置变量
###########################
# 如果要添加其他 wine,请在字典添加其名称和执行路径
# 在数组添加其名称
wineName = ["deepin-wine", "deepin-wine","deepin-wine5", "wine", "wine64", "deepin-wine5 stable(需运行使用 deepin-wine5 stable 打包的应用后才能使用)", "deepin-wine6 stable 32 位(需运行使用 deepin-wine6 stable 打包的应用后才能使用)", "deepin-wine6 stable 64 位(需运行使用 deepin-wine6 stable 打包的应用后才能使用)"]
wine = {"deepin-wine": "deepin-wine", "deepin-wine5": "deepin-wine5", "wine": "wine", "wine64": "wine64", "deepin-wine5 stable(需运行使用 deepin-wine5 stable 打包的应用后才能使用)": "~/.deepinwine/deepin-wine5-stable/bin/wine", "deepin-wine6 stable 32 位(需运行使用 deepin-wine6 stable 打包的应用后才能使用)": "~/.deepinwine/deepin-wine6-stable/bin/wine", "deepin-wine6 stable 64 位(需运行使用 deepin-wine6 stable 打包的应用后才能使用)": "~/.deepinwine/deepin-wine6-stable/bin/wine64"}
shellHistory = list(json.loads(readtxt(get_home() + "/.config/deepin-wine-runner/ShellHistory.json")).values())
findExeHistory = list(json.loads(readtxt(get_home() + "/.config/deepin-wine-runner/FindExeHistory.json")).values())
wineBottonHistory = list(json.loads(readtxt(get_home() + "/.config/deepin-wine-runner/WineBottonHistory.json")).values())
###########################
# 程序信息
###########################
programUrl = "https://gitee.com/gfdgd-xi/deep-wine-runner"
version = "1.3.1"
goodRunSystem = "Linux"
about = '''一个基于 Python3 的 tkinter 制作的 wine 运行器
版本:{}
适用平台:{}
tkinter 版本:{}
程序官网:{}
©2020-{} gfdgd xi'''.format(version, goodRunSystem, tk.TkVersion, programUrl, time.strftime("%Y"))
tips = '''提示:
1、使用终端运行该程序,可以看到 wine 以及程序本身的提示和报错
2、wine 32 位和 64 位的容器互不兼容'''
updateThingsString = '''1、添加了历史记录,使用更加方便
2、增加“更新内容”项
3、支持浏览窗口的默认路径为上次访问的路径
4、支持清空历史记录
5、代码结构优化
6、修改了控件大小'''
title = "wine 运行器 {}".format(version)
updateTime = "2021年05月23日"
updateThings = "{} 更新内容:\n{}\n更新时间:{}".format(version, updateThingsString, updateTime, time.strftime("%Y"))
###########################
# 窗口创建
###########################
window = tk.Tk() # 创建窗口
window.title(title) # 设置标题
# 设置变量以修改和获取值项
o1_text = tk.StringVar()
combobox1 = tk.StringVar()
o1_text.set("deepin-wine")
# 创建控件
button1 = ttk.Button(window, text="浏览", command=liulanbutton) # 创建按钮控件
button2 = ttk.Button(window, text="浏览", command=liulanexebutton) # 创建按钮控件
button3 = ttk.Button(window, text="启动", command=runexebutton) # 创建按钮控件
button5 = ttk.Button(window, text="创建用于运行的 shell 文件到桌面", command=make_desktop_on_desktop) # 创建按钮控件
label1 = ttk.Label(window, text="选择你想要使用的 wine 容器:") # 创建标签控件
label2 = ttk.Label(window, text="选择要启动的 Windows 应用") # 创建标签控件
label3 = ttk.Label(window, text="选择要使用的 wine 版本") # 创建标签控件
label4 = ttk.Label(window, text="设置文件名,以便把上方填写的信息写入到 shell 文件里") # 创建标签控件
e1 = ttk.Combobox(window, width=100) # 创建文本框控件
e2 = ttk.Combobox(window, width=100) # 创建文本框控件
combobox1 = ttk.Combobox(window, width=100)
o1 = ttk.OptionMenu(window, o1_text, *wineName) # 创建选择框控件
menu = tk.Menu(window) # 设置菜单栏
programmenu = tk.Menu(menu, tearoff=0) # 设置“程序”菜单栏
menu.add_cascade(label="程序", menu=programmenu)
programmenu.add_command(label="清空软件历史记录", command=CleanProgramHistory)
programmenu.add_separator() # 设置分界线
programmenu.add_command(label="退出程序", command=window.quit) # 设置“退出程序”项
help = tk.Menu(menu, tearoff=0) # 设置“帮助”菜单栏
menu.add_cascade(label="帮助", menu=help)
help.add_command(label="程序官网", command=OpenProgramURL) # 设置“程序官网”项
help.add_separator()
help.add_command(label="小提示", command=helps) # 设置“小提示”项
help.add_command(label="更新内容", command=UpdateThings) # 设置“更新内容”项
help.add_command(label="关于这个程序", command=about_this_program) # 设置“关于这个程序”项
# 设置控件
e1['value'] = findExeHistory
e2['value'] = wineBottonHistory
combobox1['value'] = shellHistory
# 添加控件
window.config(menu=menu) # 显示菜单栏
label1.grid(row=0, column=0)
label2.grid(row=1, column=0)
label3.grid(row=2, column=0)
label4.grid(row=4, column=0)
e1.grid(row=0, column=1)
e2.grid(row=1, column=1)
#combobox1.grid(row=4, column=1)
combobox1.grid(row=4, column=1)
button1.grid(row=0, column=2)
button2.grid(row=1, column=2)
button3.grid(row=3, column=0, columnspan=3)
button5.grid(row=5, column=0, columnspan=3)
o1.grid(row=2, column=1)
# 启动窗口
window.mainloop()
@@ -1,10 +0,0 @@
[Desktop Entry]
Name=deepin-wine 运行器
Version=1.1.1
Exec=/usr/bin/deepin-wine-runner
Icon=/usr/share/icons/hicolor/256x256/apps/spark-deepin-wine-runner.png
Type=Application
Terminal=false
StartupNotify=true
Encoding=UTF-8
Categories=System;Wine;
Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB

+1
View File
File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 11 KiB

+74
View File
@@ -0,0 +1,74 @@
#include "installdeb.h"
#include "messagebox.h"
#include <QDateTime>
#include <QObject>
#include <QMessageBox>
#include <QMainWindow>
InstallDEB::InstallDEB(QTermWidget *terminal, DMainWindow *mainWindow)
{
this->terminal = terminal;
this->mainWindow = mainWindow;
}
void InstallDEB::AddCommand(QString command){
this->commandList.append(command);
}
void InstallDEB::SetCommandAfterRootRun(QString command){
commandAfterRootRun = command;
}
void InstallDEB::RunCommand(bool withRoot){
this->terminal->setEnabled(true);
this->runStatus = true;
// 写入为 Bash 文件,方便执行
QString commandCode = "#!/bin/bash\n";
QString bashPath = "/tmp/deepin-wine-runner-aptss-installer-" + QString::number(QDateTime::currentMSecsSinceEpoch()) + ".sh";
for(int i = 0; i < this->commandList.size(); i++){
commandCode += this->commandList.at(i) + "\n";
}
commandCode += "rm -rfv '" + bashPath + "'";
QFile file(bashPath);
file.open(QFile::WriteOnly);
if(!file.isWritable()){
throw "Can't write the file!";
}
file.write(commandCode.toUtf8());
file.close();
system(("chmod +x '" + bashPath + "'").toUtf8()); // 赋予运行权限
this->terminal->setColorScheme("DarkPastels");
if(withRoot){
QString bashMainPath = "/tmp/deepin-wine-runner-aptss-installer-root-" + QString::number(QDateTime::currentMSecsSinceEpoch()) + ".sh";
QString commandCode = "#!/bin/bash\n"\
"pkexec env DISPLAY=$DISPLAY bash '" + bashPath + "'\n" +
this->commandAfterRootRun +
"\nrm -rfv '" + bashMainPath + "'\n"
"rm -rfv '" + bashPath + "'";
QFile file(bashMainPath);
file.open(QFile::WriteOnly);
if(!file.isWritable()){
throw "Can't write the file!";
}
file.write(commandCode.toUtf8());
file.close();
system(("chmod +x '" + bashMainPath + "'").toUtf8()); // 赋予运行权限
this->terminal->setShellProgram("/usr/bin/bash");
this->terminal->setArgs(QStringList() << bashMainPath);
}
else{
this->terminal->setShellProgram("/usr/bin/bash");
this->terminal->setArgs(QStringList() << bashPath);
}
//this->terminal->setAutoClose(1);
//this->terminal->setAutoFillBackground(1);
/*QObject::connect(this->terminal, &QTermWidget::finished, this->mainWindow, [this](){
MessageBox *message = new MessageBox();
message->information("提示", "应用安装完成");
this->mainWindow->sendMessage(QIcon(":/Icon/MessageBox/dialog-information.svg"), "应用安装完成");
});*/
this->terminal->startShellProgram();
}
+24
View File
@@ -0,0 +1,24 @@
#ifndef INSTALLDEB_H
#define INSTALLDEB_H
#include <QObject>
#include <qtermwidget5/qtermwidget.h>
#include <DMainWindow>
DWIDGET_USE_NAMESPACE
class InstallDEB
{
public:
InstallDEB(QTermWidget *terminal, DMainWindow *mainWindow = NULL);
void AddCommand(QString command);
void RunCommand(bool withRoot=false);
void SetCommandAfterRootRun(QString command);
QStringList commandList;
private:
QTermWidget *terminal;
QString commandAfterRootRun;
DMainWindow *mainWindow = NULL;
bool runStatus;
};
#endif // INSTALLDEB_H
+78
View File
@@ -0,0 +1,78 @@
#include "mainwindow.h"
#include <QLocale>
#include <QTranslator>
#include <DApplication>
#include <DMessageBox>
#include <iostream>
#include <DApplicationSettings>
#include "messagebox.h"
DWIDGET_USE_NAMESPACE
using namespace std;
int main(int argc, char *argv[])
{
// 强制使用 DTK 平台插件
QVector<char *> fakeArgs(argc + 2);
fakeArgs[0] = argv[0];
fakeArgs[1] = const_cast<char *>("-platformtheme");
fakeArgs[2] = const_cast<char *>("deepin");
for(int i = 1; i < argc; i++){
fakeArgs[i + 2] = argv[i];
}
int fakeArgc = argc + 2;
DApplication a(fakeArgc, fakeArgs.data());
a.setApplicationLicense("GPLV3");
a.setOrganizationName("gfdgd_xi");
a.setApplicationName("deepin-wine-runner-aptss-installer");
a.setWindowIcon(QIcon(":/Icon/deepin-wine-runner.svg"));
a.setApplicationDescription("Wine运行器是一个能让Linux用户更加方便地运行Windows应用的程序。原版的 Wine 只能使用命令操作,且安装过程较为繁琐,对小白不友好。于是该运行器为了解决该痛点,内置了对Wine图形化的支持、Wine 安装器、微型应用商店、各种Wine工具、自制的Wine程序打包器、运行库安装工具等。");
a.setApplicationVersion("3.6.1");
a.setProductIcon(QIcon(":/Icon/deepin-wine-runner.svg"));
a.setProductName("aptss 应用安装器");
a.setApplicationHomePage("https://gitee.com/gfdgd-xi/deep-wine-runner");
//DApplication::setApplicationHomePage("https://gitee.com/gfdgd-xi/deep-wine-runner");
DApplication::setOrganizationName("gfdgd_xi");
DApplication::setApplicationName("deepin-wine-runner-aptss-installer");
if(argc > 0){
// 用于显示对话框
qDebug() << argv[1];
if(QString(argv[1]) == "--messagebox-information"){
if(argc < 4){
qDebug() << "参数有误!";
return 1;
}
MessageBox().information(argv[2], argv[3]);
return a.exec();
}
if(QString(argv[1]) == "--messagebox-error"){
if(argc < 4){
qDebug() << "参数有误!";
return 1;
}
MessageBox().critical(argv[2], argv[3]);
return a.exec();
}
}
if(system("which aptss")){
MessageBox().critical("错误", "无法检测到 aptss\n请确保您已安装星火应用商店并更新至最新版本");
a.exec();
return 1;
}
QTranslator translator;
const QStringList uiLanguages = QLocale::system().uiLanguages();
for (const QString &locale : uiLanguages) {
const QString baseName = "aptss-installer_" + QLocale(locale).name();
if (translator.load(":/i18n/" + baseName)) {
a.installTranslator(&translator);
break;
}
}
DApplicationSettings settings; // 定义 DApplicationSettings,自动保存主题设置
MainWindow w;
w.show();
return a.exec();
}
-268
View File
@@ -1,268 +0,0 @@
#!/usr/bin/env python3
# 使用系统默认的 python3 运行
###########################################################################################
# 作者:gfdgd xi
# 版本:1.3.2
# 更新时间:2021年07月27日
# 感谢:感谢 wine 以及 deepin-wine 团队,提供了 wine 和 deepin-wine 给大家使用,让我能做这个程序
# 基于 Python3 的 tkinter 构建
###########################################################################################
#################
# 引入所需的库
#################
import tkinter as tk
import tkinter.ttk as ttk
import tkinter.filedialog
import tkinter.messagebox
import os
import sys
import time
import json
import shutil
import threading
import webbrowser
###################
# 程序所需事件
###################
# 打开程序官网
def OpenProgramURL():
webbrowser.open_new_tab(programUrl)
# 读取文本文档
def readtxt(path):
f = open(path, "r") # 设置文件对象
str = f.read() # 获取内容
f.close() # 关闭文本对象
return str # 返回结果
# 写入文本文档
def write_txt(path, things):
file = open(path, 'w', encoding='UTF-8') # 设置文件对象
file.write(things) # 写入文本
file.close() # 关闭文本对象
# 获取用户桌面目录
def get_desktop_path():
for line in open(get_home() + "/.config/user-dirs.dirs"): # 以行来读取配置文件
desktop_index = line.find("XDG_DESKTOP_DIR=\"") # 寻找是否有对应项,有返回 0,没有返回 -1
if desktop_index != -1: # 如果有对应项
break # 结束循环
if desktop_index == -1: # 如果是提前结束,值一定≠-1,如果是没有提前结束,值一定=-1
return -1
else:
get = line[17:-2] # 截取桌面目录路径
get_index = get.find("$HOME") # 寻找是否有对应的项,需要替换内容
if get != -1: # 如果有
get = get.replace("$HOME", get_home()) # 则把其替换为用户目录(~)
return get # 返回目录
# 获取用户主目录
def get_home():
return os.path.expanduser('~')
# 第一个浏览按钮事件
def liulanbutton():
path = tkinter.filedialog.askdirectory(title="选择 wine 容器", initialdir=json.loads(readtxt(get_home() + "/.config/deepin-wine-runner/WineBotton.json"))["path"])
if path != "" and path != "()":
e1.set(path)
write_txt(get_home() + "/.config/deepin-wine-runner/WineBotton.json", json.dumps({"path": path})) # 写入配置文件
# 第二个浏览按钮事件
def liulanexebutton():
path = tkinter.filedialog.askopenfilename(title="选择 exe 可执行文件", filetypes=[("exe 可执行文件", "*.exe"), ("EXE 可执行文件", "*.EXE"), ("所有文件", "*.*")], initialdir=json.loads(readtxt(get_home() + "/.config/deepin-wine-runner/FindExe.json"))["path"])
if path != "" and path != "()":
e2.set(path) # 显示路径
write_txt(get_home() + "/.config/deepin-wine-runner/FindExe.json", json.dumps({"path": os.path.dirname(path)})) # 写入配置文件
# 使用多线程运行可执行文件
def runexebutton():
run = threading.Thread(target=runexebutton_threading)
run.start()
def DisableButton(things):
a = {True: tk.DISABLED, False: tk.NORMAL}
button1.configure(state=a[things])
button2.configure(state=a[things])
button3.configure(state=a[things])
e1.configure(state=a[things])
e2.configure(state=a[things])
o1.configure(state=a[things])
# 运行可执行文件的线程
def runexebutton_threading():
DisableButton(True)
if e1.get() == "" or e2.get() == "": # 判断文本框是否有内容
tkinter.messagebox.showinfo(title="提示", message="没有填写需要使用的 wine 容器或需要运行的 exe 应用")
else: # 如果都有
os.system("WINEPREFIX='" + e1.get() + "' " + wine[o1_text.get()] + " '" + e2.get() + "'") # 运行
findExeHistory.append(e1.get()) # 将记录写进数组
wineBottonHistory.append(e2.get()) # 将记录写进数组
print(ListToDictionary(findExeHistory))
write_txt(get_home() + "/.config/deepin-wine-runner/FindExeHistory.json", str(json.dumps(ListToDictionary(findExeHistory)))) # 将历史记录的数组转换为字典并写入
write_txt(get_home() + "/.config/deepin-wine-runner/WineBottonHistory.json", str(json.dumps(ListToDictionary(wineBottonHistory)))) # 将历史记录的数组转换为字典并写入
e1['value'] = findExeHistory
e2['value'] = wineBottonHistory
DisableButton(False)
# 显示“关于这个程序”窗口
def about_this_program():
global about
tkinter.messagebox.showinfo(title="关于这个程序", message=about)
# 显示“提示”窗口
def helps():
global tips
tkinter.messagebox.showinfo(title="提示", message=tips)
# 显示更新内容窗口
def UpdateThings():
tkinter.messagebox.showinfo(title="更新内容", message=updateThings)
# 生成 shell 文件在桌面
# (第四个按钮的事件)
def make_desktop_on_desktop():
if combobox1.get() == "" or e2.get() == "" or e1.get() == "": # 判断文本框是否有内容
tkinter.messagebox.showinfo(title="提示", message="没有填写需要使用的 wine 容器或需要运行的 exe 应用或保存的文件名")
else: # 如果都有
if os.path.exists(get_desktop_path() + "/" + combobox1.get() + ".sh"): # 判断目录是否有该文件,如果有
choose = tkinter.messagebox.askokcancel(title="提示", message="文件已经存在,是否覆盖?") # 询问用户是否覆盖
if choose: # 如要覆盖
os.remove(get_desktop_path() + "/" + combobox1.get() + ".sh") # 删除该文件
else: # 如不覆盖
return # 结束
os.mknod(get_desktop_path() + "/" + combobox1.get() + ".sh") # 创建文本文档
write_txt(get_desktop_path() + "/" + combobox1.get() + ".sh", "#!/bin/bash\n" + "WINEPREFIX='" + e1.get() + "' " + wine[o1_text.get()] + " '" + e2.get() + "'") # 写入文本文档
os.system("chmod 777 '" + get_desktop_path() + "/" + combobox1.get() + ".sh" + "'") # 赋予可执行权限
shellHistory.append(combobox1.get()) # 将记录写进数组
write_txt(get_home() + "/.config/deepin-wine-runner/ShellHistory.json", str(json.dumps(ListToDictionary(shellHistory)))) # 将历史记录的数组转换为字典并写入
combobox1['value'] = shellHistory
tkinter.messagebox.showinfo(title="提示", message="生成完成!") # 显示完成对话框
# 数组转字典
def ListToDictionary(list):
dictionary = {}
for i in range(len(list)):
dictionary[i] = list[i]
return dictionary
def CleanProgramHistory():
if tkinter.messagebox.askokcancel(title="警告", message="删除后将无法恢复,你确定吗?\n删除后软件将会自动重启。"):
shutil.rmtree(get_home() + "/.config/deepin-wine-runner")
ReStartProgram()
# 重启本应用程序
def ReStartProgram():
python = sys.executable
os.execl(python, python, * sys.argv)
###########################
# 加载配置
###########################
if not os.path.exists(get_home() + "/.config/deepin-wine-runner"): # 如果没有配置文件夹
os.mkdir(get_home() + "/.config/deepin-wine-runner") # 创建配置文件夹
if not os.path.exists(get_home() + "/.config/deepin-wine-runner/ShellHistory.json"): # 如果没有配置文件
write_txt(get_home() + "/.config/deepin-wine-runner/ShellHistory.json", json.dumps({})) # 创建配置文件
if not os.path.exists(get_home() + "/.config/deepin-wine-runner/FindExeHistory.json"): # 如果没有配置文件
write_txt(get_home() + "/.config/deepin-wine-runner/FindExeHistory.json", json.dumps({})) # 创建配置文件
if not os.path.exists(get_home() + "/.config/deepin-wine-runner/WineBottonHistory.json"): # 如果没有配置文件
write_txt(get_home() + "/.config/deepin-wine-runner/WineBottonHistory.json", json.dumps({})) # 创建配置文件
if not os.path.exists(get_home() + "/.config/deepin-wine-runner/FindExe.json"): # 如果没有配置文件
write_txt(get_home() + "/.config/deepin-wine-runner/FindExe.json", json.dumps({"path": "~"})) # 写入(创建)一个配置文件
if not os.path.exists(get_home() + "/.config/deepin-wine-runner/WineBotton.json"): # 如果没有配置文件
write_txt(get_home() + "/.config/deepin-wine-runner/WineBotton.json", json.dumps({"path": "~/.deepinwine"})) # 写入(创建)一个配置文件
###########################
# 设置变量
###########################
# 如果要添加其他 wine,请在字典添加其名称和执行路径
# 在数组添加其名称
wineName = ["deepin-wine", "deepin-wine","deepin-wine5", "wine", "wine64", "deepin-wine5 stable", "deepin-wine6 stable 32 位"]
wine = {"deepin-wine": "deepin-wine", "deepin-wine5": "deepin-wine5", "wine": "wine", "wine64": "wine64", "deepin-wine5 stable": "deepin-wine5-stable", "deepin-wine6 stable": "deepin-wine6-stable"}
shellHistory = list(json.loads(readtxt(get_home() + "/.config/deepin-wine-runner/ShellHistory.json")).values())
findExeHistory = list(json.loads(readtxt(get_home() + "/.config/deepin-wine-runner/FindExeHistory.json")).values())
wineBottonHistory = list(json.loads(readtxt(get_home() + "/.config/deepin-wine-runner/WineBottonHistory.json")).values())
###########################
# 程序信息
###########################
programUrl = "https://gitee.com/gfdgd-xi/deep-wine-runner"
version = "1.3.2"
goodRunSystem = "Linux"
about = '''一个基于 Python3 的 tkinter 制作的 wine 运行器
版本:{}
适用平台:{}
tkinter 版本:{}
程序官网:{}
©2020-{} gfdgd xi'''.format(version, goodRunSystem, tk.TkVersion, programUrl, time.strftime("%Y"))
tips = '''提示:
1、使用终端运行该程序,可以看到 wine 以及程序本身的提示和报错
2、wine 32 位和 64 位的容器互不兼容'''
updateThingsString = '''1、修改了 wine 选项的说明和 wine 的启动方式'''
title = "wine 运行器 {}".format(version)
updateTime = "2021年07月27日"
updateThings = "{} 更新内容:\n{}\n更新时间:{}".format(version, updateThingsString, updateTime, time.strftime("%Y"))
###########################
# 窗口创建
###########################
window = tk.Tk() # 创建窗口
window.title(title) # 设置标题
# 设置变量以修改和获取值项
o1_text = tk.StringVar()
combobox1 = tk.StringVar()
o1_text.set("deepin-wine")
# 创建控件
button1 = ttk.Button(window, text="浏览", command=liulanbutton) # 创建按钮控件
button2 = ttk.Button(window, text="浏览", command=liulanexebutton) # 创建按钮控件
button3 = ttk.Button(window, text="启动", command=runexebutton) # 创建按钮控件
button5 = ttk.Button(window, text="创建用于运行的 shell 文件到桌面", command=make_desktop_on_desktop) # 创建按钮控件
label1 = ttk.Label(window, text="选择你想要使用的 wine 容器:") # 创建标签控件
label2 = ttk.Label(window, text="选择要启动的 Windows 应用") # 创建标签控件
label3 = ttk.Label(window, text="选择要使用的 wine 版本") # 创建标签控件
label4 = ttk.Label(window, text="设置文件名,以便把上方填写的信息写入到 shell 文件里") # 创建标签控件
e1 = ttk.Combobox(window, width=100) # 创建文本框控件
e2 = ttk.Combobox(window, width=100) # 创建文本框控件
combobox1 = ttk.Combobox(window, width=100)
o1 = ttk.OptionMenu(window, o1_text, *wineName) # 创建选择框控件
menu = tk.Menu(window) # 设置菜单栏
programmenu = tk.Menu(menu, tearoff=0) # 设置“程序”菜单栏
menu.add_cascade(label="程序", menu=programmenu)
programmenu.add_command(label="清空软件历史记录", command=CleanProgramHistory)
programmenu.add_separator() # 设置分界线
programmenu.add_command(label="退出程序", command=window.quit) # 设置“退出程序”项
help = tk.Menu(menu, tearoff=0) # 设置“帮助”菜单栏
menu.add_cascade(label="帮助", menu=help)
help.add_command(label="程序官网", command=OpenProgramURL) # 设置“程序官网”项
help.add_separator()
help.add_command(label="小提示", command=helps) # 设置“小提示”项
help.add_command(label="更新内容", command=UpdateThings) # 设置“更新内容”项
help.add_command(label="关于这个程序", command=about_this_program) # 设置“关于这个程序”项
# 设置控件
e1['value'] = findExeHistory
e2['value'] = wineBottonHistory
combobox1['value'] = shellHistory
# 添加控件
window.config(menu=menu) # 显示菜单栏
label1.grid(row=0, column=0)
label2.grid(row=1, column=0)
label3.grid(row=2, column=0)
label4.grid(row=4, column=0)
e1.grid(row=0, column=1)
e2.grid(row=1, column=1)
#combobox1.grid(row=4, column=1)
combobox1.grid(row=4, column=1)
button1.grid(row=0, column=2)
button2.grid(row=1, column=2)
button3.grid(row=3, column=0, columnspan=3)
button5.grid(row=5, column=0, columnspan=3)
o1.grid(row=2, column=1)
# 启动窗口
window.mainloop()
+86
View File
@@ -0,0 +1,86 @@
#include "mainwindow.h"
#include "ui_mainwindow.h"
#include "installdeb.h"
#include "messagebox.h"
#include <qtermwidget5/qtermwidget.h>
#include <QMessageBox>
#include <QFile>
#include <DTitlebar>
#include <QDesktopServices>
#include <DApplication>
#include <DFileDialog>
MainWindow::MainWindow(QWidget *parent)
: DMainWindow(parent)
, ui(new Ui::MainWindow)
{
ui->setupUi(this);
// 自定义标题栏
DTitlebar *bar = this->titlebar();
bar->setTitle("aptss 应用安装器");
bar->setIcon(QIcon(":/Icon/deepin-wine-runner.svg"));
bar->setBackgroundTransparent(true);
QMenu *openProgramWebsite = bar->menu()->addMenu("项目地址");
QAction *openProgramGitee = new QAction(DApplication::style()->standardIcon(QStyle::SP_DirLinkOpenIcon), "Gitee");
QAction *openProgramGithub = new QAction("Github");
QAction *openProgramSourceforge = new QAction("Sourceforge");
openProgramWebsite->addAction(openProgramGitee);
openProgramWebsite->addAction(openProgramGithub);
openProgramWebsite->addAction(openProgramSourceforge);
connect(openProgramGitee, &QAction::triggered, this, [](){
QDesktopServices::openUrl(QUrl("https://gitee.com/gfdgd-xi/deep-wine-runner"));
});
connect(openProgramGithub, &QAction::triggered, this, [](){
QDesktopServices::openUrl(QUrl("https://github.com/gfdgd-xi/deep-wine-runner"));
});
connect(openProgramSourceforge, &QAction::triggered, this, [](){
QDesktopServices::openUrl(QUrl("https://sourceforge.net/project/deep-wine-runner"));
});
terminal = new QTermWidget(0);
terminal->setColorScheme("DarkPastels");
terminal->setAutoClose(0);
ui->gridLayout->addWidget(terminal, 1, 0);
}
MainWindow::~MainWindow()
{
delete ui;
}
void MainWindow::on_installPath_clicked()
{
if(ui->debPath->text().replace(" ", "") == ""){
MessageBox *message = new MessageBox(this);
message->critical("提示", "您没有输入 deb 包,无法继续");
return;
}
if(!QFile::exists(ui->debPath->text())){
MessageBox *message = new MessageBox(this);
message->critical("提示", "您选择的 deb 包不存在");
return;
}
InstallDEB *deb = new InstallDEB(terminal, this);
deb->AddCommand("set -e");
deb->AddCommand("aptss update");
deb->AddCommand("aptss install \"" + ui->debPath->text() + "\" -y");
deb->SetCommandAfterRootRun("if [[ $? != 0 ]]; then \n"\
" '" + QCoreApplication::applicationFilePath() + "' --messagebox-error 错误 安装失败! > /dev/null 2>&1 \n"\
"else \n"
" '" + QCoreApplication::applicationFilePath() + "' --messagebox-information 提示 安装完成! > /dev/null 2>&1 \n"\
"fi");
deb->RunCommand(1);
}
void MainWindow::on_browserButton_clicked()
{
QString filePath = DFileDialog::getOpenFileName(this, "选择 deb 包", QDir::homePath(), "deb 包(*.deb);;所有文件(*.*)");
if(filePath != ""){
ui->debPath->setText(filePath);
}
}
+28
View File
@@ -0,0 +1,28 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <DMainWindow>
#include <qtermwidget5/qtermwidget.h>
DWIDGET_USE_NAMESPACE
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public DMainWindow
{
Q_OBJECT
public:
MainWindow(QWidget *parent = nullptr);
~MainWindow();
private slots:
void on_installPath_clicked();
void on_browserButton_clicked();
private:
QTermWidget *terminal = new QTermWidget(0);
Ui::MainWindow *ui;
};
#endif // MAINWINDOW_H
+68
View File
@@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow">
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>800</width>
<height>600</height>
</rect>
</property>
<property name="windowTitle">
<string>aptss 应用安装器</string>
</property>
<property name="windowIcon">
<iconset resource="Resources.qrc">
<normaloff>:/Icon/deepin-wine-runner.svg</normaloff>:/Icon/deepin-wine-runner.svg</iconset>
</property>
<widget class="QWidget" name="centralwidget">
<layout class="QGridLayout" name="gridLayout">
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLineEdit" name="debPath"/>
</item>
<item>
<widget class="QPushButton" name="browserButton">
<property name="text">
<string>浏览</string>
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="installPath">
<property name="text">
<string>安装</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</widget>
<action name="action1">
<property name="text">
<string>1</string>
</property>
</action>
</widget>
<resources>
<include location="Resources.qrc"/>
</resources>
<connections/>
</ui>
+86
View File
@@ -0,0 +1,86 @@
#include "messagebox.h"
#include <QGridLayout>
#include <DLabel>
#include <DPushButton>
#include <DTitlebar>
#include <QScreen>
MessageBox::MessageBox(DWidget *parent){
this->parent = parent;
}
void MessageBox::ShowMessageBox(QString iconPath, QString title, QString text){
DMainWindow *messageBox = new DMainWindow();
DWidget *widget = new DWidget();
QGridLayout *layout = new QGridLayout();
DPushButton *ok = new DPushButton("确定");
QObject::connect(ok, &DPushButton::clicked, messageBox, [messageBox](){
messageBox->close();
});
DTitlebar *bar = messageBox->titlebar();
bar->setTitle(title);
bar->setIcon(QIcon(":/Icon/deepin-wine-runner.svg"));
bar->setMenuVisible(false);
bar->setBackgroundTransparent(true);
layout->addWidget(new DLabel("<img src='" + iconPath + "'>"));
layout->addWidget(new DLabel(text), 0, 1);
layout->addWidget(ok, 1, 0, 1, 2);
widget->setLayout(layout);
messageBox->setEnableBlurWindow(false);
messageBox->setEnableSystemResize(false);
messageBox->setWindowFlags(messageBox->windowFlags() &~ Qt::WindowMaximizeButtonHint &~ Qt::Dialog &~ Qt::WindowMinimizeButtonHint);
messageBox->setCentralWidget(widget);
messageBox->setWindowTitle(title);
// 设置窗口顶置
messageBox->setWindowFlag(Qt::WindowStaysOnTopHint);
messageBox->show();
messageBox->resize(messageBox->frameSize().width(), messageBox->frameSize().height());
//// 根据窗口信息获取中点
if(this->parent == NULL){
/// 如果没有传入窗口
// 获取主屏幕信息
int screenWidth = QGuiApplication::primaryScreen()->geometry().width();
int screenHeight = QGuiApplication::primaryScreen()->geometry().height();
// 获取对话框信息
int messageBoxWidth = messageBox->frameSize().width();
int messageBoxHeight = messageBox->frameSize().height();
// 计算坐标
int x = (screenWidth / 2) - (messageBoxWidth / 2);
int y = (screenHeight / 2) - (messageBoxHeight / 2);
messageBox->move(x, y);
qDebug() << screenWidth;
qDebug() << screenHeight;
qDebug() << messageBoxWidth;
qDebug() << messageBoxHeight;
qDebug() << x << y;
return;
}
// 获取窗口信息
int parentWindowX = this->parent->frameGeometry().x();
int parentWindowY = this->parent->frameGeometry().y();
int parentWindowWidth = this->parent->frameGeometry().width();
int parentWindowHeight = this->parent->frameGeometry().height();
int messageBoxWidth = messageBox->frameSize().width();
int messageBoxHeight = messageBox->frameSize().height();
// 计算坐标
int x = parentWindowX + ((parentWindowWidth / 2) - (messageBoxWidth / 2));
int y = parentWindowY + ((parentWindowHeight / 2) - (messageBoxHeight / 2));
messageBox->move(x, y);
qDebug() << parentWindowX;
qDebug() << parentWindowY;
qDebug() << parentWindowWidth;
qDebug() << parentWindowHeight;
qDebug() << messageBoxWidth;
qDebug() << messageBoxHeight;
qDebug() << x << y;
}
void MessageBox::information(QString title, QString text){
ShowMessageBox(":/Icon/MessageBox/dialog-information.svg", title, text);
}
void MessageBox::critical(QString title, QString text){
ShowMessageBox(":/Icon/MessageBox/dialog-error.svg", title, text);
}
+22
View File
@@ -0,0 +1,22 @@
#ifndef MESSAGEBOX_H
#define MESSAGEBOX_H
#include <DMainWindow>
#include <QObject>
#include <DWidget>
DWIDGET_USE_NAMESPACE
class MessageBox
{
//Q_OBJECT
public:
explicit MessageBox(DWidget *parent = nullptr);
void information(QString title, QString text);
void critical(QString title, QString text);
private:
void ShowMessageBox(QString iconPath, QString title, QString text);
DWidget *parent;
signals:
};
#endif // MESSAGEBOX_H
Binary file not shown.

Before

Width:  |  Height:  |  Size: 35 KiB