Compare commits

...

53 Commits

Author SHA1 Message Date
06b54f9b90 首个Bash版本 2022-08-11 12:45:05 +08:00
97c4362515 新建文件夹 2022-08-11 12:29:24 +08:00
8f6bee1346 1.8.1 2022-08-11 12:27:25 +08:00
00176f9919 新建文件夹AXVM 2022-08-03 23:07:22 +08:00
8678f122e1 Small Update 2022-07-28 20:04:59 +08:00
ae6c233239 基本完成 1.8.0的制作 2022-07-27 18:15:28 +08:00
6bf4202cc2 程序基本完成Tkinter转PyQt5以及修复键盘映射程序的无法退出和使用一段时间无法正常映射的问题 2022-07-26 14:57:48 +08:00
88ca313779 完成提取图标 2022-07-24 23:12:34 +08:00
27c39d96a9 完成主界面的QT转换以及核心两大功能安装和卸载的实现 2022-07-24 23:06:50 +08:00
b34877538a 初步迁移QT 2022-07-23 21:51:18 +08:00
eb44817201 初步Qt迁移 2022-07-23 12:44:33 +08:00
7f18273cca 1.7.0实现 2022-07-08 04:02:21 +08:00
d3970b8b28 1.7.0初步 2022-07-07 14:35:44 +08:00
293b382e9b 删除ubuntu专版安装包 2022-06-22 12:18:26 +08:00
c3800a2514 加ubuntu安装包 2022-06-21 18:28:50 +08:00
6b42f7eef6 改README 2022-06-21 18:18:35 +08:00
a6baf834c7 基本完工 2022-06-21 10:24:27 +08:00
3f9aa55d8d 即将打包 2022-06-21 10:01:24 +08:00
9660c8fb72 制作平滑升级包ing…… 2022-06-20 22:29:10 +08:00
acaa13e8ae 新增启动脚本 2022-06-20 09:22:23 +08:00
176025a3c5 更新开源许可证 2022-06-20 00:03:25 +00:00
8fb872d8ec 初步打包调试deb 2022-06-19 21:46:58 +08:00
79674c1c2f 小改deb脚本 2022-06-19 21:20:28 +08:00
b7f01d0ff6 更新了UEngine的Ubuntu安装程序 2022-06-19 21:04:16 +08:00
c030ab2c16 初步的未知来源安装开启功能完成 2022-06-19 14:03:40 +08:00
8747f69065 先立flag 2022-06-19 08:48:38 +08:00
b851b12a62 又加了一点点翻译 2022-06-18 23:01:23 +08:00
da0db9b0fb 没更新什么 2022-06-15 21:56:01 +08:00
22d1f1ab87 修改语言配置文件 2022-06-12 22:25:02 +08:00
4a5d060c43 API有误 2022-05-22 20:34:12 +08:00
d5b37e3951 更新README 2022-05-22 08:04:17 +08:00
ed2155b83e 1.6.1更新+API更新 2022-05-21 18:11:11 +08:00
05d977030c 添加忘记了的开发者名单以及添加了部分函数 2022-05-21 12:37:08 +08:00
c77bbceeb2 添加函数(包括打包deb的函数) 2022-05-21 12:06:17 +08:00
7f36a1ff3c 加了一点函数 2022-05-16 22:21:59 +08:00
d68f42c368 添加了API函数以及文档 2022-05-15 21:54:04 +08:00
c9a3db2f37 首次添加 API 接口 2022-05-15 20:14:02 +08:00
677ff4c16b 首次添加 API 接口 2022-05-15 20:13:18 +08:00
65eaf17d85 目前包没问题 2022-02-18 13:21:23 +08:00
72cf1e0881 修复巨大bug 2022-02-15 21:56:32 +08:00
c53ad469e5 deb包有一点小问题 2022-02-12 22:21:12 +08:00
34e4d83104 更新一下README 2022-02-12 22:15:17 +08:00
5b85af521e 完成1.6.0 2022-02-12 22:03:40 +08:00
158e99c3c4 即将完成! 2022-02-12 21:55:33 +08:00
5e31ca90c5 完善帮助文档 2022-02-11 19:25:47 +08:00
35fc896aaa 即将完成1.6.0 2022-02-11 16:38:03 +08:00
9510660321 新增程序彩蛋、更新窗口<初步>(昨天忘记上传了) 2022-02-09 11:50:23 +08:00
282bb35444 改一下README的老旧部分 2022-02-07 22:43:23 +08:00
bb813fc866 新增评分功能 2022-02-07 22:35:15 +08:00
d081862a4a 添加图标 2022-02-06 10:33:53 +08:00
09857468f7 1.5.3完成 2021-12-12 12:33:21 +08:00
2abc67e426 初步完成1.5.3 2021-12-12 11:28:22 +08:00
c4ab276ab5 更新 README 2021-11-28 20:47:52 +08:00
148 changed files with 28 additions and 13030 deletions

0
.idea/.gitignore generated vendored Normal file → Executable file
View File

0
.idea/inspectionProfiles/profiles_settings.xml generated Normal file → Executable file
View File

2
.idea/misc.xml generated Normal file → Executable file
View File

@@ -1,4 +1,4 @@
<?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" />
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (uengine-runner)" project-jdk-type="Python SDK" />
</project>

0
.idea/modules.xml generated Normal file → Executable file
View File

0
.idea/uengine-install.iml generated Normal file → Executable file
View File

1
.idea/vcs.xml generated Normal file → Executable file
View File

@@ -2,5 +2,6 @@
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
<mapping directory="$PROJECT_DIR$/Internet/random-questions/Question" vcs="Git" />
</component>
</project>

View File

@@ -1,129 +0,0 @@
import os
import sys
import threading
#import ttkthemes
import tkinter as tk
import tkinter.ttk as ttk
import tkinter.messagebox as messagebox
class AddVirtualMachine():
def ShowWindow():
messgae = tk.Toplevel()
chooseImageString = tk.StringVar()
chooseImageString.set("请选择……")
nameTips = tk.Label(messgae, text="虚拟机名称")
nameEntry = tk.Entry(messgae, width=50)
memoryTips = tk.Label(messgae, text="虚拟机内存分配")
memoryDefultValue = tk.Checkbutton(messgae, text="默认值")
memoryValue = tk.Scale(messgae, from_=1, orient=tk.HORIZONTAL)
chooseImageTips = tk.Label(messgae, text="选择虚拟机镜像:")
chooseImage = tk.OptionMenu(messgae, chooseImageString, [""])
quicklyFasterSpeed = tk.Checkbutton(messgae, text="启动 kvm 加速")
tipsThings = tk.Label(messgae, text="虚拟机备注:")
tipsThingsTips = tk.Text(messgae, height=5, width=50)
controlFrame = tk.Frame(messgae)
cancal = tk.Button(controlFrame ,text="取消")
ok = tk.Button(controlFrame, text="确定")
messgae.title("添加 Android X86 虚拟机")
messgae.resizable(0, 0)
memoryValue.set(33)
cancal.grid(row=0, column=0)
ok.grid(row=0, column=1)
nameTips.grid(row=0, column=0)
nameEntry.grid(row=0, column=1, columnspan=3)
memoryTips.grid(row=1, column=0)
memoryDefultValue.grid(row=1, column=1)
memoryValue.grid(row=1, column=2)
chooseImageTips.grid(row=2, column=0)
chooseImage.grid(row=2, column=1)
quicklyFasterSpeed.grid(row=2, column=2)
tipsThings.grid(row=3, column=0)
tipsThingsTips.grid(row=3, column=1, columnspan=3, rowspan=2, sticky=tk.W)
controlFrame.grid(row=5, column=3, sticky=tk.E)
#controlFrame.grid(row=5, column=2)
messgae.mainloop()
class DelVirtualMachine():
def Tips():
if messagebox.askokcancel(title="提示", message="你确定要删除此虚拟机吗?\n删除后将无法恢复!"):
messagebox.showinfo(title="提示", message="删除完毕!")
class AddVirtualImage():
def ShowWindow():
message = tk.Toplevel()
urlImageDownloadTips = tk.Label(message, text="可下载镜像:")
urlImageDownloadList = ttk.Treeview(message)
addImage = tk.Button(message, text="")
delImage = tk.Button(message, text="")
ImageTips = tk.Label(message, text="已下载镜像:")
ImageList = ttk.Treeview(message)
ok = tk.Button(message, text="确定")
message.title("下载新的镜像")
message.resizable(0, 0)
urlImageDownloadTips.grid(row=0, column=0, sticky=tk.W)
urlImageDownloadList.grid(row=1, column=0, rowspan=4)
addImage.grid(row=2, column=1)
delImage.grid(row=3, column=1)
ImageTips.grid(row=0, column=2, sticky=tk.W)
ImageList.grid(row=1, column=2, rowspan=4)
ok.grid(row=5, column=2, sticky=tk.E)
message.mainloop()
class SettingVirtualMachine():
pass
def RunVirtualMachine():
threading.Thread(target=os.system, args=["kvm --cdrom {} --hda {} -m {}G".format("", "", "")]).start()
window = tk.Tk()
virtualMachineList = ttk.Treeview(window)
addVirtualMachine = tk.Button(window, text="", command=AddVirtualMachine.ShowWindow)
delVirtualMachine = tk.Button(window, text="", command=DelVirtualMachine.Tips)
addVirtualMachineImage = tk.Button(window, text="", command=AddVirtualImage.ShowWindow)
settingVirtualMachine = tk.Button(window, text="⚙️")
runVirtualMachine = tk.Button(window, text="", command=RunVirtualMachine)
tipsThings = tk.Text(window, height=5, width=30)
menu = tk.Menu(window)
programMenu = tk.Menu(menu, tearoff=0)
yuanMenu = tk.Menu(menu, tearoff=0)
menu.add_cascade(label="程序", menu=programMenu)
menu.add_cascade(label="", menu=yuanMenu)
programMenu.add_command(label="退出程序", command=sys.exit)
yuanMenu.add_command(label="更换源")
yuanMenu.add_command(label="修改默认源")
#window.configure(bg="white")
#ttkthemes.ThemedStyle(window).set_theme("ubuntu")
window.title("Android X86 Runner")
window.resizable(0, 0)
window.config(menu=menu)
runVirtualMachine.configure(foreground="green")
#tipsThings.configure(bg="white", foreground="black", state=tk.DISABLED)
virtualMachineList.grid(row=0, column=0, rowspan=3)
addVirtualMachine.grid(row=0, column=1)
delVirtualMachine.grid(row=0, column=2)
addVirtualMachineImage.grid(row=0, column=3)
settingVirtualMachine.grid(row=0, column=4)
runVirtualMachine.grid(row=0, column=5)
tipsThings.grid(row=2, column=1, columnspan=5, sticky=tk.W)
window.mainloop()

373
LICENSE
View File

@@ -1,373 +0,0 @@
Mozilla Public License Version 2.0
==================================
1. Definitions
--------------
1.1. "Contributor"
means each individual or legal entity that creates, contributes to
the creation of, or owns Covered Software.
1.2. "Contributor Version"
means the combination of the Contributions of others (if any) used
by a Contributor and that particular Contributor's Contribution.
1.3. "Contribution"
means Covered Software of a particular Contributor.
1.4. "Covered Software"
means Source Code Form to which the initial Contributor has attached
the notice in Exhibit A, the Executable Form of such Source Code
Form, and Modifications of such Source Code Form, in each case
including portions thereof.
1.5. "Incompatible With Secondary Licenses"
means
(a) that the initial Contributor has attached the notice described
in Exhibit B to the Covered Software; or
(b) that the Covered Software was made available under the terms of
version 1.1 or earlier of the License, but not also under the
terms of a Secondary License.
1.6. "Executable Form"
means any form of the work other than Source Code Form.
1.7. "Larger Work"
means a work that combines Covered Software with other material, in
a separate file or files, that is not Covered Software.
1.8. "License"
means this document.
1.9. "Licensable"
means having the right to grant, to the maximum extent possible,
whether at the time of the initial grant or subsequently, any and
all of the rights conveyed by this License.
1.10. "Modifications"
means any of the following:
(a) any file in Source Code Form that results from an addition to,
deletion from, or modification of the contents of Covered
Software; or
(b) any new file in Source Code Form that contains any Covered
Software.
1.11. "Patent Claims" of a Contributor
means any patent claim(s), including without limitation, method,
process, and apparatus claims, in any patent Licensable by such
Contributor that would be infringed, but for the grant of the
License, by the making, using, selling, offering for sale, having
made, import, or transfer of either its Contributions or its
Contributor Version.
1.12. "Secondary License"
means either the GNU General Public License, Version 2.0, the GNU
Lesser General Public License, Version 2.1, the GNU Affero General
Public License, Version 3.0, or any later versions of those
licenses.
1.13. "Source Code Form"
means the form of the work preferred for making modifications.
1.14. "You" (or "Your")
means an individual or a legal entity exercising rights under this
License. For legal entities, "You" includes any entity that
controls, is controlled by, or is under common control with You. For
purposes of this definition, "control" means (a) the power, direct
or indirect, to cause the direction or management of such entity,
whether by contract or otherwise, or (b) ownership of more than
fifty percent (50%) of the outstanding shares or beneficial
ownership of such entity.
2. License Grants and Conditions
--------------------------------
2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license:
(a) under intellectual property rights (other than patent or trademark)
Licensable by such Contributor to use, reproduce, make available,
modify, display, perform, distribute, and otherwise exploit its
Contributions, either on an unmodified basis, with Modifications, or
as part of a Larger Work; and
(b) under Patent Claims of such Contributor to make, use, sell, offer
for sale, have made, import, and otherwise transfer either its
Contributions or its Contributor Version.
2.2. Effective Date
The licenses granted in Section 2.1 with respect to any Contribution
become effective for each Contribution on the date the Contributor first
distributes such Contribution.
2.3. Limitations on Grant Scope
The licenses granted in this Section 2 are the only rights granted under
this License. No additional rights or licenses will be implied from the
distribution or licensing of Covered Software under this License.
Notwithstanding Section 2.1(b) above, no patent license is granted by a
Contributor:
(a) for any code that a Contributor has removed from Covered Software;
or
(b) for infringements caused by: (i) Your and any other third party's
modifications of Covered Software, or (ii) the combination of its
Contributions with other software (except as part of its Contributor
Version); or
(c) under Patent Claims infringed by Covered Software in the absence of
its Contributions.
This License does not grant any rights in the trademarks, service marks,
or logos of any Contributor (except as may be necessary to comply with
the notice requirements in Section 3.4).
2.4. Subsequent Licenses
No Contributor makes additional grants as a result of Your choice to
distribute the Covered Software under a subsequent version of this
License (see Section 10.2) or under the terms of a Secondary License (if
permitted under the terms of Section 3.3).
2.5. Representation
Each Contributor represents that the Contributor believes its
Contributions are its original creation(s) or it has sufficient rights
to grant the rights to its Contributions conveyed by this License.
2.6. Fair Use
This License is not intended to limit any rights You have under
applicable copyright doctrines of fair use, fair dealing, or other
equivalents.
2.7. Conditions
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
in Section 2.1.
3. Responsibilities
-------------------
3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any
Modifications that You create or to which You contribute, must be under
the terms of this License. You must inform recipients that the Source
Code Form of the Covered Software is governed by the terms of this
License, and how they can obtain a copy of this License. You may not
attempt to alter or restrict the recipients' rights in the Source Code
Form.
3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then:
(a) such Covered Software must also be made available in Source Code
Form, as described in Section 3.1, and You must inform recipients of
the Executable Form how they can obtain a copy of such Source Code
Form by reasonable means in a timely manner, at a charge no more
than the cost of distribution to the recipient; and
(b) You may distribute such Executable Form under the terms of this
License, or sublicense it under different terms, provided that the
license for the Executable Form does not attempt to limit or alter
the recipients' rights in the Source Code Form under this License.
3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your choice,
provided that You also comply with the requirements of this License for
the Covered Software. If the Larger Work is a combination of Covered
Software with a work governed by one or more Secondary Licenses, and the
Covered Software is not Incompatible With Secondary Licenses, this
License permits You to additionally distribute such Covered Software
under the terms of such Secondary License(s), so that the recipient of
the Larger Work may, at their option, further distribute the Covered
Software under the terms of either this License or such Secondary
License(s).
3.4. Notices
You may not remove or alter the substance of any license notices
(including copyright notices, patent notices, disclaimers of warranty,
or limitations of liability) contained within the Source Code Form of
the Covered Software, except that You may alter any license notices to
the extent required to remedy known factual inaccuracies.
3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support,
indemnity or liability obligations to one or more recipients of Covered
Software. However, You may do so only on Your own behalf, and not on
behalf of any Contributor. You must make it absolutely clear that any
such warranty, support, indemnity, or liability obligation is offered by
You alone, and You hereby agree to indemnify every Contributor for any
liability incurred by such Contributor as a result of warranty, support,
indemnity or liability terms You offer. You may include additional
disclaimers of warranty and limitations of liability specific to any
jurisdiction.
4. Inability to Comply Due to Statute or Regulation
---------------------------------------------------
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Software due to
statute, judicial order, or regulation then You must: (a) comply with
the terms of this License to the maximum extent possible; and (b)
describe the limitations and the code they affect. Such description must
be placed in a text file included with all distributions of the Covered
Software under this License. Except to the extent prohibited by statute
or regulation, such description must be sufficiently detailed for a
recipient of ordinary skill to be able to understand it.
5. Termination
--------------
5.1. The rights granted under this License will terminate automatically
if You fail to comply with any of its terms. However, if You become
compliant, then the rights granted under this License from a particular
Contributor are reinstated (a) provisionally, unless and until such
Contributor explicitly and finally terminates Your grants, and (b) on an
ongoing basis, if such Contributor fails to notify You of the
non-compliance by some reasonable means prior to 60 days after You have
come back into compliance. Moreover, Your grants from a particular
Contributor are reinstated on an ongoing basis if such Contributor
notifies You of the non-compliance by some reasonable means, this is the
first time You have received notice of non-compliance with this License
from such Contributor, and You become compliant prior to 30 days after
Your receipt of the notice.
5.2. If You initiate litigation against any entity by asserting a patent
infringement claim (excluding declaratory judgment actions,
counter-claims, and cross-claims) alleging that a Contributor Version
directly or indirectly infringes any patent, then the rights granted to
You by any and all Contributors for the Covered Software under Section
2.1 of this License shall terminate.
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
end user license agreements (excluding distributors and resellers) which
have been validly granted by You or Your distributors under this License
prior to termination shall survive termination.
************************************************************************
* *
* 6. Disclaimer of Warranty *
* ------------------------- *
* *
* Covered Software is provided under this License on an "as is" *
* basis, without warranty of any kind, either expressed, implied, or *
* statutory, including, without limitation, warranties that the *
* Covered Software is free of defects, merchantable, fit for a *
* particular purpose or non-infringing. The entire risk as to the *
* quality and performance of the Covered Software is with You. *
* Should any Covered Software prove defective in any respect, You *
* (not any Contributor) assume the cost of any necessary servicing, *
* repair, or correction. This disclaimer of warranty constitutes an *
* essential part of this License. No use of any Covered Software is *
* authorized under this License except under this disclaimer. *
* *
************************************************************************
************************************************************************
* *
* 7. Limitation of Liability *
* -------------------------- *
* *
* Under no circumstances and under no legal theory, whether tort *
* (including negligence), contract, or otherwise, shall any *
* Contributor, or anyone who distributes Covered Software as *
* permitted above, be liable to You for any direct, indirect, *
* special, incidental, or consequential damages of any character *
* including, without limitation, damages for lost profits, loss of *
* goodwill, work stoppage, computer failure or malfunction, or any *
* and all other commercial damages or losses, even if such party *
* shall have been informed of the possibility of such damages. This *
* limitation of liability shall not apply to liability for death or *
* personal injury resulting from such party's negligence to the *
* extent applicable law prohibits such limitation. Some *
* jurisdictions do not allow the exclusion or limitation of *
* incidental or consequential damages, so this exclusion and *
* limitation may not apply to You. *
* *
************************************************************************
8. Litigation
-------------
Any litigation relating to this License may be brought only in the
courts of a jurisdiction where the defendant maintains its principal
place of business and such litigation shall be governed by laws of that
jurisdiction, without reference to its conflict-of-law provisions.
Nothing in this Section shall prevent a party's ability to bring
cross-claims or counter-claims.
9. Miscellaneous
----------------
This License represents the complete agreement concerning the subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. Any law or regulation which provides
that the language of a contract shall be construed against the drafter
shall not be used to construe this License against a Contributor.
10. Versions of the License
---------------------------
10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section
10.3, no one other than the license steward has the right to modify or
publish new versions of this License. Each version will be given a
distinguishing version number.
10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version
of the License under which You originally received the Covered Software,
or under the terms of any subsequent version published by the license
steward.
10.3. Modified Versions
If you create software not governed by this License, and you want to
create a new license for such software, you may create and use a
modified version of this License if you rename the license and remove
any references to the name of the license steward (except to note that
such modified license differs from this License).
10.4. Distributing Source Code Form that is Incompatible With Secondary
Licenses
If You choose to distribute Source Code Form that is Incompatible With
Secondary Licenses under the terms of this version of the License, the
notice described in Exhibit B of this License must be attached.
Exhibit A - Source Code Form License Notice
-------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to look
for such a notice.
You may add additional accurate notices of copyright ownership.
Exhibit B - "Incompatible With Secondary Licenses" Notice
---------------------------------------------------------
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.

View File

@@ -1,272 +0,0 @@
{
"zh_CN.UTF-8": {
"Main": {
"MainWindow": {
"Title": "UEngine 运行器",
"LabApkPath": "安装/卸载 APK",
"LabUninstallPath": "卸载 Apk",
"BtnFindApk": "浏览",
"BtnInstall": "安装",
"BtnShowUengineApp": "打开 UEngine 应用列表",
"BtnUninstallApkBrowser": "浏览",
"BtnUninstall": "卸载",
"Btngeticon": "保存图标",
"BtnSaveApk": "保存Apk",
"BtnApkInformation": "Apk 信息",
"Menu": [
{
"Name": "程序",
"Menu": [
"清空软件历史记录",
"退出程序"
]
},
{
"Name": "adb",
"Menu": [
"Adb 连接 UEngine",
{
"Name": "Adb 服务",
"Menu": [
"打开 Adb 服务",
"停止 Adb 服务",
"杀死 Adb 进程"
]
},
"显示 Adb 连接的设备",
"Adb 修改 UEngine 分辨率",
"Adb 查看 UEngine 应用列表",
"Adb 查看 UEngine 资源使用情况",
"打开 Adb 连接 UEngine 的终端",
"使用 Scrcpy 连接 UEngine只支持使用 Snap 安装的 Scrcpy",
{
"Name": "UEngine 使用 Adb",
"Menu": [
"Adb 连接 Connect UEngine",
"允许此设备使用 Adb 连接本 UEngine需要 Root",
"禁止任何设备使用 Adb 连接本 UEngine需要 Root"
]
}
]
},
{
"Name": "UEngine",
"Menu": [
"UEngine 系统设置",
"UEngine 应用打包",
{
"Name": "UEngine 服务",
"Menu": [
"启动 UEngine 服务(需要 Root",
"关闭 UEngine 服务(需要 Root",
"重启 UEngine 服务(需要 Root"
]
},
{
"Name": "UEngine 网络桥接",
"Menu": [
"启动 UEngine 网络桥接(需要 Root",
"关闭 UEngine 网络桥接(需要 Root",
"重启 UEngine 网络桥接(需要 Root",
"加载 UEngine 网络桥接(需要 Root",
"强制加载 UEngine 网络桥接(需要 Root"
]
},
{
"Name": "UEngine 快捷方式",
"Menu": [
"发送 UEngine 应用列表到桌面",
"发送 UEngine 应用列表到启动器",
"添加/删除指定的 UEngine 快捷方式",
"清空所有 UEngine 快捷方式"
]
},
{
"Name": "UEngine 使用 Adb",
"Menu": null
},
{
"Name": "UEngine 数据",
"Menu": [
"打开 UEngine 根目录",
"打开 UEngine 用户数据目录",
"清空 UEngine 数据(需要 Root"
]
},
"UEngine 键盘映射",
"UEngine 检测 CPU 是否支持运行",
"删除 UEngine 运行检查",
"重新安装 UEngine",
{
"Name": "获取 UEngine 最高权限",
"Menu": [
"安装已经制作好的 UEngine 带最高权限的镜像",
"构建 UEngine 带最高权限的镜像到用户主目录",
"安装默认的 UEngine 镜像"
]
}
]
},
{
"Name": "关于",
"Menu": [
"程序官网",
"关于",
"反馈程序问题和建议"
]
}
]
}
},
"Uengine Apk Builder": {
"Title": "UEngine APK 应用打包器",
"label1": "要打包的 apk 路径:",
"button2": "浏览",
"button3": " 打包",
"check": "使用前缀“uengine-dc”",
"Menu": [
{
"Name": "程序",
"Menu": [
"退出程序"
]
}
]
}
},
"en_US.UTF-8": {
"Main": {
"MainWindow": {
"Title": "UEngine Runner",
"LabApkPath": "Install Or Uninstall Apk:",
"BtnFindApk": "Find",
"BtnInstall": "Install",
"BtnShowUengineApp": "Open UEngine App List",
"BtnUninstallApkBrowser": "Find",
"BtnUninstall": "Uninstall",
"Btngeticon": "Save Apk Icon",
"BtnSaveApk": "Saving Installed App Apk",
"BtnApkInformation": "Apk Information",
"Menu": [
{
"Name": "Program",
"Menu": [
"Clean Program History",
"Exit The Program"
]
},
{
"Name": "adb",
"Menu": [
"Use Adb To Connect UEngine",
{
"Name": "Adb Services",
"Menu": [
"Open Adb Service",
"Close Adb Service",
"Kill Adb Program"
]
},
"Show Adb To Connect Devices",
"Use Adb To Change UEngine Display Size",
"Use Adb To Show UEngine Installing Program List",
"Use Adb To Show UEngine Using System Resources",
"Open Adb Console With UEngine",
"Use Scrcpy Connect UEngine (Only Support Using Scrcpy With Installing the Scrcpy)",
{
"Name": "UEngine Use Adb",
"Menu": [
"Use Adb To Connect UEngine",
"Allow This Devices Using Adb To Connect The UEngine (Allow Need Using For Root)",
"Unallow Any Devices Using Adb To Connect The UEngine (Unallow Need Using For Root)"
]
}
]
},
{
"Name": "UEngine",
"Menu": [
"UEngine System Control Panel",
"UEngine Android App Builder",
{
"Name": "UEngine Service",
"Menu": [
"Open UEngine Service (It Need Run With Root)",
"Close UEngine Service (It Need Run With Root)",
"Restart UEngine Service (It Need Run With Root)"
]
},
{
"Name": "UEngine Internet Connecting",
"Menu": [
"Open UEngine Internet Bridge (It Need Run With Root)",
"Close UEngine Internet Bridge (It Need Run With Root)",
"Restart UEngine Internet Bridge (It Need Run With Root)",
"Load UEngine Internet Bridge (It Need Run With Root)",
"Force Loading UEngine Internet Bridge (It Need Run With Root)"
]
},
{
"Name": "UEngine App Link",
"Menu": [
"Send UEngine Program List To Desktop",
"Send UEngine Program List To Launcher",
"Add Or Delete UEngine App Link",
"Delete All UEngine App Link"
]
},
{
"Name": "UEngine Use Adb",
"Menu": null
},
{
"Name": "UEngine Data",
"Menu": [
"Open UEngine Root Folder",
"Open UEngine User Folder",
"Delete All UEngine Data (It Need Run With Root)"
]
},
"UEngine Keyboard",
"UEngine Check CPU Can Or Can't Run",
"Delete UEngine Runing Checking",
"Reinstall UEngine",
{
"Name": "Get UEngine Root User",
"Menu": [
"Install UEngine Image With Root User",
"Build An UEngine Image With Root User In Your Home Path",
"Install Defult UEngine Image"
]
}
]
},
{
"Name": "About",
"Menu": [
"Program WebSize",
"Program Help",
"Upload Problem And Advice"
]
}
]
}
},
"Uengine Apk Builder": {
"Title": "UEngine APK Builder",
"label1": "Will Build APK Path",
"button2": "Find",
"button3": " Build",
"check": "Use Prefix With \"uengine-dc\"",
"Menu": [
{
"Name": "Program",
"Menu": [
"Exit The Program"
]
}
]
}
}
}

224
README.md
View File

@@ -1,224 +0,0 @@
# uengine 运行器 1.5.1
### 介绍
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;新版本Deepin/UOS发布后可以在应用商店安装部分官方已适配的安卓应用对爱好者来说不能自己安装APK软件包始终差点意思本程序可以为Deepin/UOS上的UEngine安卓运行环境安装自定义APK软件包并能发送安装的APK包启动菜单到桌面或系统菜单。
![1.5.2](https://storage.deepin.org/thread/202111281607295590_截图_选择区域_20211128160706.png)
测试平台UOS 家庭版deepin 20.2.2,UOS 专业版 1040
(自己美术功底太差,图标直接用 anbox 的了)
### 更新内容
#### V1.5.22021-11-28
**※1、支持安装和构建带 Root 的 UEngine 的镜像**
2、更新了反馈链接
![](https://storage.deepin.org/thread/202111281607295590_截图_选择区域_20211128160706.png)
#### V1.5.12021-10-05国庆节版
**※1、精简用户界面合并安装和卸载输入框和浏览按钮等**
**※2、修复安装以其的程序图标无法点击进入的问题deepin 社区版不存在此问题)**
**※3、支持在程序本体反馈问题**
4、修复了菜单栏的部分显示问题
5、支持显示 apk 的部分信息
6、支持删除 UEngine 程序运行检查以及重新安装 UEngine 的功能
7、自带有跳过家庭版必须有指定包名才能运行程序限制的脚本
8、补回依赖包“adb”
![1.5.1](https://storage.deepin.org/thread/202110051821076836_截图_dde-desktop_20211005182021.png)
#### V1.5.02021-09-21中秋节版
**没有什么实质性的功能,只是开始有多语言支持**
**※1、部分窗口支持英语**
2、修复在英语状态下启动器图标名称异常的问题
![1.5.0](https://storage.deepin.org/thread/202109202157289430_截图_选择区域_20210920215550.png)
#### V1.4.32021-09-11开学第一版
**※1、支持打包器打包的包名带前缀“uengine-dc”**
**※2、修复了两种情况可能导致程序卡住/出错无法继续运行的情况(配置文件夹不齐全和获取版本信息卡住两种情况)**
**※3、修改了 UEngine 打包器打包的应用包名可能有大写的情况**
4、支持一键使用 Scrcpy 连接 UEngine①先安装 adb 破解补丁②请确保是使用snap安装的 Scrcpy【目前只支持 snap 安装的 Scrcpy 进行连接】)
5、支持右键打包 apk
![1.4.3](https://storage.deepin.org/thread/202109111635389828_截图_选择区域_20210911163449.png)
#### V1.4.22021-08-30快开学了
**※1、添加adb破解补丁用于可以让adb连接UEngine并支持adb的部分操作;**
2、菜单栏的项目添加以及外观优化;
3、修复键盘映射无法添加新映射的问题并修改键盘映射启动方式;
4、把 uengine 改为 UEngine;
5、修改 pkexec 获取密码时显示的图标和文本;
6、添加了 UEngine 系统设置的快捷方式;
![1.4.2](https://storage.deepin.org/thread/202108301750554993_截图_选择区域_20210830134502.png)
#### V1.4.12021-08-26
**※1、初步支持键盘映射**
2、修复新版包在发送uengine列表快捷方式时会提示找不到文件
![1.4.1](https://storage.deepin.org/thread/20210826151947783_截图_选择区域_20210826151312.png)
#### V1.4.02021-08-19
**※1、添加新版打包方式deepin打包方式;**
**※2、支持测试运行/创建/删除uengine图标;**
**※3、支持提取安装的apk;**
**※4、支持打包deb包;**
5、修改菜单栏布局;
6、支持打开uengine数据目录和用户数据目录;
7、程序信息保存到json,非直接写入程序本体;
8、更多命令操作;
![1.4.0](https://storage.deepin.org/thread/202108191410327464_截图_选择区域_20210819140938.png)
#### V1.3.22021-08-16
**※1、支持uengine数据重置;**
**※2、支持修改uengine网络桥接的启动状态;**
**※3、支持右键安装/卸载;**
**※4、支持启用或禁用uengine;**
**※5、修复打包问题不会出现“dpkg:警告:卸载spark-uengine-runner时目录/opt/apps/uengine-runner非空因而不会删除该目录”的错误;**
![1.3.2](https://storage.deepin.org/thread/202108152141139401_截图_选择区域_20210815213948.png)
#### V1.3.12021-08-12
**※1、修复打包问题防止部分用户安装出错的问题;**
**※2、修复了程序无法提取图标时可以提取默认图标使用;**
![1.3.1](https://storage.deepin.org/thread/202108121509217807_截图_选择区域_20210812150849.png)
#### V1.3.02021-08-08
**※1、修改了界面布局;**
**※2、修复大多数新安装普通用户的路图标及启动菜单文件路径不存在导致安装APK报错的bugs;**
3、删除少量冗余代码调整代码顺序;
4、支持提取 apk 图标。
![1.3.0](https://storage.deepin.org/thread/202108082100582804_截图_tk_20210808210047.png)
#### V1.2.32021-08-02
1、调整部分控件名称
2、调整界面布局及界面风格
![1.2.3](https://images.gitee.com/uploads/images/2021/0802/080620_1dd289ca_7896131.png)
#### V1.2.22021-07-11
1、对程序错误的显示更加人性化
2、对 icon 的获取方式进行了升级;
3、增加了注释、删除部分冗余代码。
![1.2.2](https://images.gitee.com/uploads/images/2021/0711/145140_b04e51b7_7896131.png)
#### V1.2.12021-07-02
**※1、进行了安装方式的修改不使用 adb修复原无法安装和卸载的问题**
2、进行了部分优化
3、进行了功能缩水
4、修复 deb 打包错误。
![1.2.1](https://images.gitee.com/uploads/images/2021/0702/204040_6abb6f3f_7896131.png)
#### V1.2.02021-06-06
1、支持安装自动添加快捷方式、卸载删除快捷方式
2、支持使用包名或 APK 文件卸载程序;
3、支持查看安装的所有包名
4、进行了部分优化
![1.2.0](https://images.gitee.com/uploads/images/2021/0606/115536_0c0ddf38_7896131.png)
#### V1.1.02021-05-30
1、修改了因编写时出现的中、英文混用的情况
2、支持一键连接默认 IP
3、修复在不连接设备直接选择 apk 安装时会卡住的问题
4、修复在把“uengine 程序菜单”发送到桌面或启动器如果询问覆盖时点击取消会卡住的问题
5、修改了程序界面为白色调不和标题栏冲突矛盾
![1.1.0](https://images.gitee.com/uploads/images/2021/0530/133429_7e6bf629_7896131.png)
#### V1.0.02021-05-29
![1.0.0](https://images.gitee.com/uploads/images/2021/0529/173756_2e333c86_7896131.png)
### 源码安装教程
按下 <kbd>Ctrl</kbd>+<kbd>Alt</kbd>+<kbd>T</kbd> 打开终端,按以下内容操作:
1. 安装所需依赖
```bash
sudo apt install python3 python3-tk git python3-pip aapt uengine
python3 -m pip install ttkthemes
```
2. 下载本程序
```bash
git clone https://gitee.com/gfdgd-xi/uengine-runner.git
```
3. 运行本程序
```bash
sudo mkdir /opt/apps/uengine-runner
sudo cp uengine-runner /opt/apps/uengine-runner -rv
sudo cp getxmlimg.py /opt/apps/uengine-runner -rv
sudo cp icon.png /opt/apps/uengine-runner -rv
chmod 777 /opt/apps/uengine-runner/main.py
sudo cp /opt/apps/uengine-runner/main.py /usr/bin/uengine-runner
./main.py
```
4. 卸载本程序
```bash
sudo rm /usr/bin/uengine-runner -v
sudo rm /opt/apps/uengine-runner/ -rfv
pip3 uninstall ttkthemes
```
### 使用说明
1、需要你有使用 root 权限的能力;
2、需要安装 UEngine 才能使用UOS建议在商店安装一个安卓应用让系统自动安装 UEngine 及相关的依赖包;
3、提取 apk 图标的 apk 路径以“安装 apk”那栏为准;
4、如果报错是有关产生 .deksotp 文件有关,一般可以打开程序列表运行。如果想要连接其他手机,请使用 1.2.0 以前的版本,可以使用 adb 连接。
### 故障排除
提 issue 最好,当然有些问题自己无法解决,请大佬 push 一下
如果出现故障,尝试终端运行,如果是可以自行解决的问题,就**自行解决**,如果可以就**提 issues 并提供解决方案**,不行就**提 isscue 并提供程序和终端报错以及程序版本**
### 下载量
这里只统计蓝奏云的下载量,链接(每周更新一次):
[https://kdocs.cn/l/smrvazWGuKcY](https://kdocs.cn/l/smrvazWGuKcY)
### 已知问题
<p align="center"><img src='https://bbs.deepin.org/assets/image/raccoon/[sad].gif'></p>
![Error](https://storage.deepin.org/thread/202108101105396531_截图___tk__messagebox_20210810110449.png)
部分 app 无法读取出图片,已知:
| 程序 | 下载链接 |
| :-: | :-: |
| Firefox For Android | https://www.firefox.com.cn/download/ |
| 网易云音乐 For Android | https://music.163.com/#/download |
| 抖音 | https://www.wandoujia.com/apps/7461948 |
| 360 手机浏览器 | https://mse.360.cn/ |
| E-Go | 忘了 |
| 其他待测试…… | 其他待测试…… |
**注意:提取不出图标不代表未安装成功!**
### 贡献
<p align="center"><img src='https://bbs.deepin.org/assets/image/raccoon/blush.gif'></p>
非常欢迎大家的贡献
贡献的开发者列表:
| 开发者 | 邮箱 |
| :-: | :-: |
| gfdgd xi | 3025613752@qq.com |
| actionchen | 917981399@qq.com |
### 相关项目
| 项目名称 | 项目地址 |
| :-: | :-:|
| uengine-installer | https://gitee.com/Maicss/uengine-installer |
| uengine APK 打包器 | https://gitee.com/gfdgd-xi/uengine-apk-builder |
### 附测试生成图标无问题列表:
**至于能不能用就不测试了,这暂时不是重点**
| 程序 | 下载链接 |
|:-:|:-:|
| QQ 全家桶完整版、极速版、Android Pad 版) | https://im.qq.com |
| TIM | 忘了 |
| 微信 | https://weixin.qq.com |
| 百度翻译 | 忘了 |
| 百度网盘 | https://pan.baidu.com |
| 腾讯课堂 | 忘了 |
| 抖音极速版 | 忘了 |
| 豌豆荚 | 忘了 |
| 小猿口算 | 忘了 |
| Hyperbowl | 忘了 |
| bilibili | https://d.bilibili.com/download_app.html?bsource=app_bili |
| 蓝奏云 | https://up.woozooo.com/lanzouh5.apk |
| QQ 音乐完整版、Android Pad 版、TV 版、车载版) | https://y.qq.com/download/index.html |
| 360 手机卫士(完整版、极速版) | https://shouji.360.cn/v6/index.html |
| 360 清理大师(稳定版、尝鲜版) | http://shouji.360.cn/360cleandroid/ |
| 360 手机助手 | http://sj.360.cn/index.html |
| WPS Office For Android | https://www.wps.cn/ |
| 钉钉 for android | https://page.dingtalk.com/wow/dingtalk/act/download?spm=a3140.8196062.0.0.6f4c5c3dWBhYUM |
### ©2021-2021

View File

@@ -1,11 +0,0 @@
[Desktop Entry]
Categories=System;
Comment=UEngine 程序菜单
Encoding=UTF-8
Exec=/usr/bin/uengine launch.sh --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity
Icon=/opt/apps/uengine-runner/icon.png
MimeType=
Name=UEngine 程序菜单
StartupWMClass=UEngine 程序菜单
Terminal=false
Type=Application

Binary file not shown.

View File

@@ -1,10 +0,0 @@
Package: spark-uengine-runner
Version: 1.5.2
Maintainer: gfdgd xi <3025613752@qq.com>, actionchen<917981399@qq.com>
Homepage: [https://gitee.com/gfdgd-xi/uengine-runner, https://github.com/gfdgd-xi/uengine-runner]
Architecture: all
Priority: optional
Conflicts: com.gitee.uengine.runner.spark, spark-uengine-apk-builder
Depends: python3, python3-tk, python3-pip, aapt, uengine, python3-setuptools, deepin-terminal, curl, python3-pil, python3-pil.imagetk, python3-requests, adb, translate-shell, python3-xlib
Description: UEngine Runner for deepin and UOS

View File

@@ -1,10 +0,0 @@
#!/bin/sh
# 安装所需库
python3 -m pip install --upgrade ttkthemes -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
python3 -m pip install --upgrade pyautogui -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
python3 -m pip install --upgrade keyboard -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
python3 -m pip install --upgrade requests -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
# 刷新图标缓存
gtk-update-icon-cache /usr/share/icons/bloom
# 向服务器返回安装数加1不显示内容且忽略错误
curl http://120.25.153.144/uengine-runner/Install.php?Version=1.5.2 -s > /dev/null | true

View File

@@ -1,3 +0,0 @@
#!/bin/sh
# 刷新图标缓存
gtk-update-icon-cache /usr/share/icons/bloom

View File

@@ -1,373 +0,0 @@
Mozilla Public License Version 2.0
==================================
1. Definitions
--------------
1.1. "Contributor"
means each individual or legal entity that creates, contributes to
the creation of, or owns Covered Software.
1.2. "Contributor Version"
means the combination of the Contributions of others (if any) used
by a Contributor and that particular Contributor's Contribution.
1.3. "Contribution"
means Covered Software of a particular Contributor.
1.4. "Covered Software"
means Source Code Form to which the initial Contributor has attached
the notice in Exhibit A, the Executable Form of such Source Code
Form, and Modifications of such Source Code Form, in each case
including portions thereof.
1.5. "Incompatible With Secondary Licenses"
means
(a) that the initial Contributor has attached the notice described
in Exhibit B to the Covered Software; or
(b) that the Covered Software was made available under the terms of
version 1.1 or earlier of the License, but not also under the
terms of a Secondary License.
1.6. "Executable Form"
means any form of the work other than Source Code Form.
1.7. "Larger Work"
means a work that combines Covered Software with other material, in
a separate file or files, that is not Covered Software.
1.8. "License"
means this document.
1.9. "Licensable"
means having the right to grant, to the maximum extent possible,
whether at the time of the initial grant or subsequently, any and
all of the rights conveyed by this License.
1.10. "Modifications"
means any of the following:
(a) any file in Source Code Form that results from an addition to,
deletion from, or modification of the contents of Covered
Software; or
(b) any new file in Source Code Form that contains any Covered
Software.
1.11. "Patent Claims" of a Contributor
means any patent claim(s), including without limitation, method,
process, and apparatus claims, in any patent Licensable by such
Contributor that would be infringed, but for the grant of the
License, by the making, using, selling, offering for sale, having
made, import, or transfer of either its Contributions or its
Contributor Version.
1.12. "Secondary License"
means either the GNU General Public License, Version 2.0, the GNU
Lesser General Public License, Version 2.1, the GNU Affero General
Public License, Version 3.0, or any later versions of those
licenses.
1.13. "Source Code Form"
means the form of the work preferred for making modifications.
1.14. "You" (or "Your")
means an individual or a legal entity exercising rights under this
License. For legal entities, "You" includes any entity that
controls, is controlled by, or is under common control with You. For
purposes of this definition, "control" means (a) the power, direct
or indirect, to cause the direction or management of such entity,
whether by contract or otherwise, or (b) ownership of more than
fifty percent (50%) of the outstanding shares or beneficial
ownership of such entity.
2. License Grants and Conditions
--------------------------------
2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license:
(a) under intellectual property rights (other than patent or trademark)
Licensable by such Contributor to use, reproduce, make available,
modify, display, perform, distribute, and otherwise exploit its
Contributions, either on an unmodified basis, with Modifications, or
as part of a Larger Work; and
(b) under Patent Claims of such Contributor to make, use, sell, offer
for sale, have made, import, and otherwise transfer either its
Contributions or its Contributor Version.
2.2. Effective Date
The licenses granted in Section 2.1 with respect to any Contribution
become effective for each Contribution on the date the Contributor first
distributes such Contribution.
2.3. Limitations on Grant Scope
The licenses granted in this Section 2 are the only rights granted under
this License. No additional rights or licenses will be implied from the
distribution or licensing of Covered Software under this License.
Notwithstanding Section 2.1(b) above, no patent license is granted by a
Contributor:
(a) for any code that a Contributor has removed from Covered Software;
or
(b) for infringements caused by: (i) Your and any other third party's
modifications of Covered Software, or (ii) the combination of its
Contributions with other software (except as part of its Contributor
Version); or
(c) under Patent Claims infringed by Covered Software in the absence of
its Contributions.
This License does not grant any rights in the trademarks, service marks,
or logos of any Contributor (except as may be necessary to comply with
the notice requirements in Section 3.4).
2.4. Subsequent Licenses
No Contributor makes additional grants as a result of Your choice to
distribute the Covered Software under a subsequent version of this
License (see Section 10.2) or under the terms of a Secondary License (if
permitted under the terms of Section 3.3).
2.5. Representation
Each Contributor represents that the Contributor believes its
Contributions are its original creation(s) or it has sufficient rights
to grant the rights to its Contributions conveyed by this License.
2.6. Fair Use
This License is not intended to limit any rights You have under
applicable copyright doctrines of fair use, fair dealing, or other
equivalents.
2.7. Conditions
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
in Section 2.1.
3. Responsibilities
-------------------
3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any
Modifications that You create or to which You contribute, must be under
the terms of this License. You must inform recipients that the Source
Code Form of the Covered Software is governed by the terms of this
License, and how they can obtain a copy of this License. You may not
attempt to alter or restrict the recipients' rights in the Source Code
Form.
3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then:
(a) such Covered Software must also be made available in Source Code
Form, as described in Section 3.1, and You must inform recipients of
the Executable Form how they can obtain a copy of such Source Code
Form by reasonable means in a timely manner, at a charge no more
than the cost of distribution to the recipient; and
(b) You may distribute such Executable Form under the terms of this
License, or sublicense it under different terms, provided that the
license for the Executable Form does not attempt to limit or alter
the recipients' rights in the Source Code Form under this License.
3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your choice,
provided that You also comply with the requirements of this License for
the Covered Software. If the Larger Work is a combination of Covered
Software with a work governed by one or more Secondary Licenses, and the
Covered Software is not Incompatible With Secondary Licenses, this
License permits You to additionally distribute such Covered Software
under the terms of such Secondary License(s), so that the recipient of
the Larger Work may, at their option, further distribute the Covered
Software under the terms of either this License or such Secondary
License(s).
3.4. Notices
You may not remove or alter the substance of any license notices
(including copyright notices, patent notices, disclaimers of warranty,
or limitations of liability) contained within the Source Code Form of
the Covered Software, except that You may alter any license notices to
the extent required to remedy known factual inaccuracies.
3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support,
indemnity or liability obligations to one or more recipients of Covered
Software. However, You may do so only on Your own behalf, and not on
behalf of any Contributor. You must make it absolutely clear that any
such warranty, support, indemnity, or liability obligation is offered by
You alone, and You hereby agree to indemnify every Contributor for any
liability incurred by such Contributor as a result of warranty, support,
indemnity or liability terms You offer. You may include additional
disclaimers of warranty and limitations of liability specific to any
jurisdiction.
4. Inability to Comply Due to Statute or Regulation
---------------------------------------------------
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Software due to
statute, judicial order, or regulation then You must: (a) comply with
the terms of this License to the maximum extent possible; and (b)
describe the limitations and the code they affect. Such description must
be placed in a text file included with all distributions of the Covered
Software under this License. Except to the extent prohibited by statute
or regulation, such description must be sufficiently detailed for a
recipient of ordinary skill to be able to understand it.
5. Termination
--------------
5.1. The rights granted under this License will terminate automatically
if You fail to comply with any of its terms. However, if You become
compliant, then the rights granted under this License from a particular
Contributor are reinstated (a) provisionally, unless and until such
Contributor explicitly and finally terminates Your grants, and (b) on an
ongoing basis, if such Contributor fails to notify You of the
non-compliance by some reasonable means prior to 60 days after You have
come back into compliance. Moreover, Your grants from a particular
Contributor are reinstated on an ongoing basis if such Contributor
notifies You of the non-compliance by some reasonable means, this is the
first time You have received notice of non-compliance with this License
from such Contributor, and You become compliant prior to 30 days after
Your receipt of the notice.
5.2. If You initiate litigation against any entity by asserting a patent
infringement claim (excluding declaratory judgment actions,
counter-claims, and cross-claims) alleging that a Contributor Version
directly or indirectly infringes any patent, then the rights granted to
You by any and all Contributors for the Covered Software under Section
2.1 of this License shall terminate.
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
end user license agreements (excluding distributors and resellers) which
have been validly granted by You or Your distributors under this License
prior to termination shall survive termination.
************************************************************************
* *
* 6. Disclaimer of Warranty *
* ------------------------- *
* *
* Covered Software is provided under this License on an "as is" *
* basis, without warranty of any kind, either expressed, implied, or *
* statutory, including, without limitation, warranties that the *
* Covered Software is free of defects, merchantable, fit for a *
* particular purpose or non-infringing. The entire risk as to the *
* quality and performance of the Covered Software is with You. *
* Should any Covered Software prove defective in any respect, You *
* (not any Contributor) assume the cost of any necessary servicing, *
* repair, or correction. This disclaimer of warranty constitutes an *
* essential part of this License. No use of any Covered Software is *
* authorized under this License except under this disclaimer. *
* *
************************************************************************
************************************************************************
* *
* 7. Limitation of Liability *
* -------------------------- *
* *
* Under no circumstances and under no legal theory, whether tort *
* (including negligence), contract, or otherwise, shall any *
* Contributor, or anyone who distributes Covered Software as *
* permitted above, be liable to You for any direct, indirect, *
* special, incidental, or consequential damages of any character *
* including, without limitation, damages for lost profits, loss of *
* goodwill, work stoppage, computer failure or malfunction, or any *
* and all other commercial damages or losses, even if such party *
* shall have been informed of the possibility of such damages. This *
* limitation of liability shall not apply to liability for death or *
* personal injury resulting from such party's negligence to the *
* extent applicable law prohibits such limitation. Some *
* jurisdictions do not allow the exclusion or limitation of *
* incidental or consequential damages, so this exclusion and *
* limitation may not apply to You. *
* *
************************************************************************
8. Litigation
-------------
Any litigation relating to this License may be brought only in the
courts of a jurisdiction where the defendant maintains its principal
place of business and such litigation shall be governed by laws of that
jurisdiction, without reference to its conflict-of-law provisions.
Nothing in this Section shall prevent a party's ability to bring
cross-claims or counter-claims.
9. Miscellaneous
----------------
This License represents the complete agreement concerning the subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. Any law or regulation which provides
that the language of a contract shall be construed against the drafter
shall not be used to construe this License against a Contributor.
10. Versions of the License
---------------------------
10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section
10.3, no one other than the license steward has the right to modify or
publish new versions of this License. Each version will be given a
distinguishing version number.
10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version
of the License under which You originally received the Covered Software,
or under the terms of any subsequent version published by the license
steward.
10.3. Modified Versions
If you create software not governed by this License, and you want to
create a new license for such software, you may create and use a
modified version of this License if you rename the license and remove
any references to the name of the license steward (except to note that
such modified license differs from this License).
10.4. Distributing Source Code Form that is Incompatible With Secondary
Licenses
If You choose to distribute Source Code Form that is Incompatible With
Secondary Licenses under the terms of this version of the License, the
notice described in Exhibit B of this License must be attached.
Exhibit A - Source Code Form License Notice
-------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to look
for such a notice.
You may add additional accurate notices of copyright ownership.
Exhibit B - "Incompatible With Secondary Licenses" Notice
---------------------------------------------------------
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.

View File

@@ -1,272 +0,0 @@
{
"zh_CN.UTF-8": {
"Main": {
"MainWindow": {
"Title": "UEngine 运行器",
"LabApkPath": "安装/卸载 APK",
"LabUninstallPath": "卸载 Apk",
"BtnFindApk": "浏览",
"BtnInstall": "安装",
"BtnShowUengineApp": "打开 UEngine 应用列表",
"BtnUninstallApkBrowser": "浏览",
"BtnUninstall": "卸载",
"Btngeticon": "保存图标",
"BtnSaveApk": "保存Apk",
"BtnApkInformation": "Apk 信息",
"Menu": [
{
"Name": "程序",
"Menu": [
"清空软件历史记录",
"退出程序"
]
},
{
"Name": "adb",
"Menu": [
"Adb 连接 UEngine",
{
"Name": "Adb 服务",
"Menu": [
"打开 Adb 服务",
"停止 Adb 服务",
"杀死 Adb 进程"
]
},
"显示 Adb 连接的设备",
"Adb 修改 UEngine 分辨率",
"Adb 查看 UEngine 应用列表",
"Adb 查看 UEngine 资源使用情况",
"打开 Adb 连接 UEngine 的终端",
"使用 Scrcpy 连接 UEngine只支持使用 Snap 安装的 Scrcpy",
{
"Name": "UEngine 使用 Adb",
"Menu": [
"Adb 连接 Connect UEngine",
"允许此设备使用 Adb 连接本 UEngine需要 Root",
"禁止任何设备使用 Adb 连接本 UEngine需要 Root"
]
}
]
},
{
"Name": "UEngine",
"Menu": [
"UEngine 系统设置",
"UEngine 应用打包",
{
"Name": "UEngine 服务",
"Menu": [
"启动 UEngine 服务(需要 Root",
"关闭 UEngine 服务(需要 Root",
"重启 UEngine 服务(需要 Root"
]
},
{
"Name": "UEngine 网络桥接",
"Menu": [
"启动 UEngine 网络桥接(需要 Root",
"关闭 UEngine 网络桥接(需要 Root",
"重启 UEngine 网络桥接(需要 Root",
"加载 UEngine 网络桥接(需要 Root",
"强制加载 UEngine 网络桥接(需要 Root"
]
},
{
"Name": "UEngine 快捷方式",
"Menu": [
"发送 UEngine 应用列表到桌面",
"发送 UEngine 应用列表到启动器",
"添加/删除指定的 UEngine 快捷方式",
"清空所有 UEngine 快捷方式"
]
},
{
"Name": "UEngine 使用 Adb",
"Menu": null
},
{
"Name": "UEngine 数据",
"Menu": [
"打开 UEngine 根目录",
"打开 UEngine 用户数据目录",
"清空 UEngine 数据(需要 Root"
]
},
"UEngine 键盘映射",
"UEngine 检测 CPU 是否支持运行",
"删除 UEngine 运行检查",
"重新安装 UEngine",
{
"Name": "获取 UEngine 最高权限",
"Menu": [
"安装已经制作好的 UEngine 带最高权限的镜像",
"构建 UEngine 带最高权限的镜像到用户主目录",
"安装默认的 UEngine 镜像"
]
}
]
},
{
"Name": "关于",
"Menu": [
"程序官网",
"关于",
"反馈程序问题和建议"
]
}
]
}
},
"Uengine Apk Builder": {
"Title": "UEngine APK 应用打包器",
"label1": "要打包的 apk 路径:",
"button2": "浏览",
"button3": " 打包",
"check": "使用前缀“uengine-dc”",
"Menu": [
{
"Name": "程序",
"Menu": [
"退出程序"
]
}
]
}
},
"en_US.UTF-8": {
"Main": {
"MainWindow": {
"Title": "UEngine Runner",
"LabApkPath": "Install Or Uninstall Apk:",
"BtnFindApk": "Find",
"BtnInstall": "Install",
"BtnShowUengineApp": "Open UEngine App List",
"BtnUninstallApkBrowser": "Find",
"BtnUninstall": "Uninstall",
"Btngeticon": "Save Apk Icon",
"BtnSaveApk": "Saving Installed App Apk",
"BtnApkInformation": "Apk Information",
"Menu": [
{
"Name": "Program",
"Menu": [
"Clean Program History",
"Exit The Program"
]
},
{
"Name": "adb",
"Menu": [
"Use Adb To Connect UEngine",
{
"Name": "Adb Services",
"Menu": [
"Open Adb Service",
"Close Adb Service",
"Kill Adb Program"
]
},
"Show Adb To Connect Devices",
"Use Adb To Change UEngine Display Size",
"Use Adb To Show UEngine Installing Program List",
"Use Adb To Show UEngine Using System Resources",
"Open Adb Console With UEngine",
"Use Scrcpy Connect UEngine (Only Support Using Scrcpy With Installing the Scrcpy)",
{
"Name": "UEngine Use Adb",
"Menu": [
"Use Adb To Connect UEngine",
"Allow This Devices Using Adb To Connect The UEngine (Allow Need Using For Root)",
"Unallow Any Devices Using Adb To Connect The UEngine (Unallow Need Using For Root)"
]
}
]
},
{
"Name": "UEngine",
"Menu": [
"UEngine System Control Panel",
"UEngine Android App Builder",
{
"Name": "UEngine Service",
"Menu": [
"Open UEngine Service (It Need Run With Root)",
"Close UEngine Service (It Need Run With Root)",
"Restart UEngine Service (It Need Run With Root)"
]
},
{
"Name": "UEngine Internet Connecting",
"Menu": [
"Open UEngine Internet Bridge (It Need Run With Root)",
"Close UEngine Internet Bridge (It Need Run With Root)",
"Restart UEngine Internet Bridge (It Need Run With Root)",
"Load UEngine Internet Bridge (It Need Run With Root)",
"Force Loading UEngine Internet Bridge (It Need Run With Root)"
]
},
{
"Name": "UEngine App Link",
"Menu": [
"Send UEngine Program List To Desktop",
"Send UEngine Program List To Launcher",
"Add Or Delete UEngine App Link",
"Delete All UEngine App Link"
]
},
{
"Name": "UEngine Use Adb",
"Menu": null
},
{
"Name": "UEngine Data",
"Menu": [
"Open UEngine Root Folder",
"Open UEngine User Folder",
"Delete All UEngine Data (It Need Run With Root)"
]
},
"UEngine Keyboard",
"UEngine Check CPU Can Or Can't Run",
"Delete UEngine Runing Checking",
"Reinstall UEngine",
{
"Name": "Get UEngine Root User",
"Menu": [
"Install UEngine Image With Root User",
"Build An UEngine Image With Root User In Your Home Path",
"Install Defult UEngine Image"
]
}
]
},
{
"Name": "About",
"Menu": [
"Program WebSize",
"Program Help",
"Upload Problem And Advice"
]
}
]
}
},
"Uengine Apk Builder": {
"Title": "UEngine APK Builder",
"label1": "Will Build APK Path",
"button2": "Find",
"button3": " Build",
"check": "Use Prefix With \"uengine-dc\"",
"Menu": [
{
"Name": "Program",
"Menu": [
"Exit The Program"
]
}
]
}
}
}

View File

@@ -1,11 +0,0 @@
[Desktop Entry]
Categories=System;
Comment=UEngine 程序菜单
Encoding=UTF-8
Exec=/usr/bin/uengine launch.sh --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity
Icon=/opt/apps/uengine-runner/icon.png
MimeType=
Name=UEngine 程序菜单
StartupWMClass=UEngine 程序菜单
Terminal=false
Type=Application

Binary file not shown.

Before

Width:  |  Height:  |  Size: 312 KiB

View File

@@ -1,118 +0,0 @@
import PIL.Image as Image
import PIL.ImageDraw as ImageDraw
import zipfile
import subprocess
import re
class getsavexml():
def savexml(self,apkFilePath,xmlpath,iconSavePath):
cmddumpid = "aapt dump xmltree "+ apkFilePath + " " + xmlpath
print(cmddumpid)
xmltree = subprocess.getoutput(cmddumpid)
xmls = xmltree.splitlines()
# find strs ,print next line
def FindStrs(lines,strs):
i=0
while i < len(lines):
if re.search(strs,lines[i]):
tmpstr = lines[i+1]
i += 1
Resultstr = tmpstr.split(":")[-1].split("=")[-1].split("0x")[-1]
return Resultstr
else:
i += 1
#从apk的信息中获取前后景图片的ID号
backimgid = FindStrs(xmls,"background")
foreimgid = FindStrs(xmls,"foreground")
print(backimgid)
print(foreimgid)
# 直接从apk resource文件获取前后两层图片路径及ID字符串
resource = subprocess.getoutput("aapt dump --values resources " + apkFilePath + "| grep -iE -A1 " + "\"" + backimgid + "|" + foreimgid + "\"")
resourcelines = resource.splitlines()
print(resourcelines)
# 从过滤出的字符串中获取所有相同ID的图片路径
def Findpicpath(lines,imgid):
i=0
Resultstr = []
while i < len(lines):
if re.search(imgid,lines[i]) and re.search("string8",lines[i+1]) :
print(lines[i+1])
tmpstr = lines[i+1].replace("\"","")
i += 1
Resultstr.append(tmpstr.split()[-1])
else:
i += 1
return Resultstr
#获取所有带前后图片ID的图片路径相同背景或者前景的图片ID但分辨率不一样
backimgs = Findpicpath(resourcelines,backimgid)
foreimgs = Findpicpath(resourcelines,foreimgid)
print(backimgs)
print(foreimgs)
#获取分辨率最高的图片路径
def getmaxsize(imgs):
j = 0
size=(0,0)
zipapk = zipfile.ZipFile(apkFilePath)
imgpath = ""
while j < len(imgs):
print(imgs[j])
img = Image.open(zipapk.open(imgs[j]))
print(imgs[j])
print(img.size)
if size < img.size:
size = img.size
imgpath = imgs[j]
j += 1
return imgpath
# 获取到文件列表后,进行比较分辨率,选取分辨率最高的张图片
iconbackpath = getmaxsize(backimgs)
iconforepath = getmaxsize(foreimgs)
print(iconbackpath + " " + iconforepath)
#从APK文件获取最终图片
zipapk = zipfile.ZipFile(apkFilePath)
iconback = zipapk.open(iconbackpath)
iconfore = zipapk.open(iconforepath)
# 叠加图片mask 设置前景为蒙版
iconbackimg = Image.open(iconback).convert("RGBA")
iconforeimg = Image.open(iconfore).convert("RGBA")
iconbackimg.paste(iconforeimg,mask=iconforeimg)
# 圆角图片函数,网上拷贝的
def circle_corner(img, radii): #把原图片变成圆角,这个函数是从网上找的,原址 https://www.pyget.cn/p/185266
"""
圆角处理
:param img: 源图象。
:param radii: 半径30。
:return: 返回一个圆角处理后的图象。
"""
# 画圆用于分离4个角
circle = Image.new('L', (radii * 2, radii * 2), 0) # 创建一个黑色背景的画布
draw = ImageDraw.Draw(circle)
draw.ellipse((0, 0, radii * 2, radii * 2), fill=255) # 画白色圆形
# 原图
img = img.convert("RGBA")
w, h = img.size
# 画4个角将整圆分离为4个部分
alpha = Image.new('L', img.size, 255)
alpha.paste(circle.crop((0, 0, radii, radii)), (0, 0)) # 左上角
alpha.paste(circle.crop((radii, 0, radii * 2, radii)), (w - radii, 0)) # 右上角
alpha.paste(circle.crop((radii, radii, radii * 2, radii * 2)), (w - radii, h - radii)) # 右下角
alpha.paste(circle.crop((0, radii, radii, radii * 2)), (0, h - radii)) # 左下角
# alpha.show()
img.putalpha(alpha) # 白色区域透明可见,黑色区域不可见
return img
# 圆角半径1/8边长,保存icon图片
w,h = iconbackimg.size
iconimg = circle_corner(iconbackimg,int(w/8))
iconimg.save(iconSavePath)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -1,137 +0,0 @@
{
"Url": [
"https://gitee.com/gfdgd-xi/uengine-runner",
"https://github.com/gfdgd-xi/uengine-runner"
],
"Version": "1.5.2",
"System": "Linuxdeepin/UOS",
"Tips": [
"更多可见https://gitee.com/gfdgd-xi/uengine-runner/wikis",
"",
"安装APK点浏览按钮选中需要安装的APK然后点安装按钮",
"",
"卸载APK在卸载APK下面的输入框内输入需要卸载的APK包名点卸载按钮如果无法获取包名可以通过浏览APK文件程序自动获取包名进行卸载。",
"",
"保存APK图标在安装APK下面的输入框浏览或输入APK的路径然后点击“保存图标”按钮选择保存位置即可",
"",
"重置删除UEngine数据点击菜单栏的“UEngine”的“清空UEngine数据”输入密码重启即可",
" 注意如果任何安卓一遍打不开多打开几遍应该就可以重新加载UEngine配置了",
"",
"打开UEngine应用列表打开系统已安装的应用列表安卓界面",
"",
"提示:",
"1、需要你有使用 root 权限的能力;",
"2、需要安装 UEngine 才能使用;",
"3、提取 apk 图标的 apk 路径以“安装 apk”那栏为准;",
"4、如果想要使用adb连接UEngine或其他手机请使用 1.2.0 以前的版本。如需连接UEngine请安装adb补丁"
],
"Update": [
"V1.5.2",
"※1、支持安装和构建带 Root 的 UEngine 的镜像",
"2、更新了反馈链接",
"",
"V1.5.1",
"※1、精简用户界面合并安装和卸载输入框和浏览按钮等",
"※2、修复安装以其的程序图标无法点击进入的问题deepin 社区版不存在此问题)",
"※3、支持在程序本体反馈问题",
"4、修复了菜单栏的部分显示问题",
"5、支持显示 apk 的部分信息",
"6、支持删除 UEngine 程序运行检查以及重新安装 UEngine 的功能",
"7、自带有跳过家庭版必须有指定包名才能运行程序限制的脚本",
"8、补回依赖包“adb”",
"",
"V1.5.0",
"※1、部分窗口支持英语",
"2、修复在英语状态下启动器图标名称异常的问题",
"",
"V1.4.3",
"※1、支持打包器打包的包名带前缀“uengine-dc”",
"※2、修复了两种情况可能导致程序卡住/出错无法继续运行的情况(配置文件夹不齐全和获取版本信息卡住两种情况)",
"※3、修改了 UEngine 打包器打包的应用包名可能有大写的情况",
"4、支持一键使用 Scrcpy 连接 UEngine①先安装 adb 破解补丁②请确保是使用snap安装的 Scrcpy【目前只支持 snap 安装的 Scrcpy 进行连接】)",
"5、支持右键打包 apk",
"",
"V1.4.2",
"※1、添加adb破解补丁用于可以让adb连接UEngine并支持adb的部分操作;",
"2、菜单栏的项目添加以及外观优化;",
"3、修复键盘映射无法添加新映射的问题并修改键盘映射启动方式;",
"4、把 uengine 改为 UEngine;",
"5、修改 pkexec 获取密码时显示的图标和文本;",
"6、添加了 UEngine 系统设置的快捷方式;",
"",
"V1.4.1",
"※1、初步支持键盘映射",
"2、修复新版包在发送uengine列表快捷方式时会提示找不到文件",
"",
"V1.4.0",
"※1、添加新版打包方式deepin打包方式;",
"※2、支持测试运行/创建/删除uengine图标;",
"※3、支持提取安装的apk;",
"※4、支持打包deb包;",
"5、修改菜单栏布局;",
"6、支持打开uengine数据目录和用户数据目录;",
"7、程序信息保存到json,非直接写入程序本体;",
"8、更多命令操作;",
"",
"V.1.3.2",
"※1、支持uengine数据重置;",
"※2、支持修改uengine网络桥接的启动状态;",
"※3、支持右键安装/卸载;",
"※4、支持启用或禁用uengine;",
"※5、修复打包问题不会出现“dpkg:警告:卸载spark-uengine-runner时目录/opt/apps/uengine-runner非空因而不会删除该目录”的错误;",
"",
"V1.3.1",
"※1、修复打包问题防止部分用户安装出错的问题;",
"※2、修复了程序无法提取图标时可以提取默认图标使用;",
"",
"V1.3.0",
"※1、修改了界面布局;",
"※2、修复大多数新安装普通用户的路图标及启动菜单文件路径不存在导致安装APK报错的bugs;",
"3、删除少量冗余代码调整代码顺序;",
"4、支持提取apk图标。",
"",
"V1.2.3",
"1、调整部分控件名称",
"2、调整界面布局及界面风格",
"",
"V1.2.2",
"1、对程序错误的显示更加人性化",
"2、对 icon 的获取方式进行了升级;",
"3、增加了注释、删除部分冗余代码。",
"",
"V1.2.1",
"※1、进行了安装方式的修改不使用 adb修复原无法安装和卸载的问题",
"2、进行了部分优化",
"3、进行了功能缩水",
"4、修复 deb 打包错误。",
"",
"V1.2.0",
"1、支持安装自动添加快捷方式、卸载删除快捷方式",
"2、支持使用包名或 APK 文件卸载程序;",
"3、支持查看安装的所有包名",
"4、进行了部分优化",
"",
"V1.1.0",
"暂无数据",
"",
"V1.0.0",
"暂无数据"
],
"Use": [
"1、UEngine相关软件包基于anbox开发",
"2、Python3",
"3、tkintertkinter.tk、ttkthemes、tkinter.messagebox、tkinter.simpledialog、tkinter.filedialog 和 tkinter.ttk",
"4、aapt",
"5、dpkg",
"6、tree",
"7、mkdir",
"8、echo",
"9、chmod",
"10、adb",
"11、deepin 终端",
"……"
],
"Time": "2021年08月30日",
"Contribute": ["gfdgd xi<3025613752@qq.com>",
"actionchen<917981399@qq.com>"]
}

View File

@@ -1,76 +0,0 @@
#!/bin/bash
#sudo apt install squashfs-tools
mkdir -p ~/temp
cd ~/temp
echo "正在下载supersu"
wget -P ~/temp http://supersuroot.org/downloads/SuperSU-v2.82-201705271822.zip
cd ..
mkdir -p ~/temp/work/dabao/extract/DEBIAN
echo "正在解压supersu"
unzip ~/temp/SuperSU-v2.82-201705271822.zip -d ~/temp/work/su
WORKDIR=~/temp/work
cd "$WORKDIR"
echo "正在下载uengine-android-image"
apt download uengine-android-image
echo "正在解压uengine-android-image"
cd dabao
dpkg-deb -x $WORKDIR/uengine-android-image*.deb extract/
dpkg-deb -e $WORKDIR/uengine-android-image*.deb extract/DEBIAN
cd ..
cp dabao/extract/usr/share/uengine/android.img android.img
echo "正在解压android镜像"
sudo unsquashfs android.img
sudo mkdir -p ./squashfs-root/system/app/SuperSU
sudo mkdir -p ./squashfs-root/system/bin/.ext/
echo "正在将supersu安装到android镜像"
sudo cp ./su/common/Superuser.apk ./squashfs-root/system/app/SuperSU/SuperSU.apk
sudo cp ./su/common/install-recovery.sh ./squashfs-root/system/etc/install-recovery.sh
sudo cp ./su/common/install-recovery.sh ./squashfs-root/system/bin/install-recovery.sh
sudo cp ./su/x64/su ./squashfs-root/system/xbin/su
sudo cp ./su/x64/su ./squashfs-root/system/bin/.ext/.su
sudo cp ./su/x64/su ./squashfs-root/system/xbin/daemonsu
sudo cp ./su/x64/supolicy ./squashfs-root/system/xbin/supolicy
sudo cp ./su/x64/libsupol.so ./squashfs-root/system/lib64/libsupol.so
sudo cp ./squashfs-root/system/bin/app_process64 ./squashfs-root/system/bin/app_process_init
sudo cp ./squashfs-root/system/bin/app_process64 ./squashfs-root/system/bin/app_process64_original
sudo cp ./squashfs-root/system/xbin/daemonsu ./squashfs-root/system/bin/app_process
sudo cp ./squashfs-root/system/xbin/daemonsu ./squashfs-root/system/bin/app_process64
sudo chmod +x ./squashfs-root/system/app/SuperSU/SuperSU.apk
sudo chmod +x ./squashfs-root/system/etc/install-recovery.sh
sudo chmod +x ./squashfs-root/system/bin/install-recovery.sh
sudo chmod +x ./squashfs-root/system/xbin/su
sudo chmod +x ./squashfs-root/system/bin/.ext/.su
sudo chmod +x ./squashfs-root/system/xbin/daemonsu
sudo chmod +x ./squashfs-root/system/xbin/supolicy
sudo chmod +x ./squashfs-root/system/lib64/libsupol.so
sudo chmod +x ./squashfs-root/system/bin/app_process_init
sudo chmod +x ./squashfs-root/system/bin/app_process64_original
sudo chmod +x ./squashfs-root/system/bin/app_process
sudo chmod +x ./squashfs-root/system/bin/app_process64
echo "正在打包android镜像"
sudo rm android.img
sudo mksquashfs squashfs-root android.img -b 131072 -comp xz -Xbcj ia64
cp android.img dabao/extract/usr/share/uengine/android.img
echo "正在打包uengine-android-image"
cd dabao/extract
find usr -type f -print0 |xargs -0 md5sum >md5sums
cd ..
mkdir build
dpkg-deb -b extract/ build/
cp build/*.deb ~/
echo "正在清理垃圾"
sudo rm -rf ~/temp
echo "已在用户主目录生成新的安装包,安装后重启即可生效"

View File

@@ -1,6 +0,0 @@
{
"Package": "com.gitee.uengine.runner.spark",
"Update": true,
"Version": "1.5.1",
"Url": "https://gfdgd-xi.github.io/update-program/data/UpdateInformation.json"
}

View File

@@ -1,7 +0,0 @@
{
"Package": "spark-uengine-runner",
"Update": true,
"Version": "1.5.1",
"Url": "https://gfdgd-xi.github.io/update-program/data/UpdateInformation.json"
}

View File

@@ -1,452 +0,0 @@
#!/usr/bin/env python3
# 使用系统默认的 python3 运行
###########################################################################################
# 作者gfdgd xi
# 版本1.5.1
# 更新时间2021年10月06日
# 感谢anbox、deepin 和 统信
# 基于 Python3 的 tkinter 构建
###########################################################################################
#################
# 引入所需的库
#################
import os
import sys
import json
import shutil
import random
import zipfile
import traceback
import threading
import subprocess
import ttkthemes
import tkinter as tk
import tkinter.ttk as ttk
import tkinter.messagebox as messagebox
import tkinter.filedialog as filedialog
from getxmlimg import getsavexml
def FindApk():
path = filedialog.askopenfilename(title="选择 Apk", filetypes=[("APK 文件", "*.apk"), ("所有文件", "*.*")], initialdir=json.loads(readtxt(get_home() + "/.config/uengine-runner/FindApkBuild.json"))["path"])
if path != "" and path != "()":
try:
combobox1.set(path)
write_txt(get_home() + "/.config/uengine-runner/FindApkBuild.json", json.dumps({"path": os.path.dirname(path)})) # 写入配置文件
except:
pass
def BuildDeb():
if combobox1.get() == "":
messagebox.showerror(title="提示", message="信息没有填写完整,无法继续打包 APK")
return
if not os.path.exists(combobox1.get()):
messagebox.showerror(title="提示", message="信息填写错误,无法继续打包 APK")
return
DisabledAndEnbled(True)
threading.Thread(target=BuildApkDeb, args=(combobox1.get(),)).start()
def RunCommandShow(command):
TextboxAddText1("$> {}".format(command))
TextboxAddText1(GetCommandReturn(command))
def BuildApkDeb(apkPath):
tempPath = "/tmp/uengine-apk-builder-{}".format(int(random.randint(0, 1024)))
RunCommandShow("echo '======================================New===================================='")
RunCommandShow("echo '创建目录'")
RunCommandShow("mkdir -pv '{}/DEBIAN'".format(tempPath))
RunCommandShow("mkdir -pv '{}/usr/share/applications'".format(tempPath))
RunCommandShow("mkdir -pv '{}/usr/share/uengine/apk'".format(tempPath))
RunCommandShow("mkdir -pv '{}/usr/share/uengine/icons'".format(tempPath))
RunCommandShow("echo '写入文件,因为写入过程过于复杂,不显示写入命令……'")
apkPackageName = GetApkPackageName(apkPath)
apkPackageVersion = GetApkVersion(apkPath)
apkChineseLabel = GetApkChineseLabel(apkPath)
apkActivityName = GetApkActivityName(apkPath)
iconSavePath = "{}/usr/share/uengine/icons/{}.png".format(tempPath, apkPackageName)
debControl = '''Package: {}
Version: {}
Architecture: all
Maintainer: {}
Depends: deepin-elf-verify (>= 0.0.16.7-1), uengine (>= 1.0.1)
Section: utils
Priority: optional
Description: {}\n'''.format(apkPackageName, apkPackageVersion, apkChineseLabel, apkChineseLabel)
debPostinst = '''#!/bin/sh
APK_DIR="/usr/share/uengine/apk"
APK_NAME="{}.apk"
APK_PATH="$APK_DIR/$APK_NAME"
DESKTOP_FILE="/usr/share/applications/{}.desktop"
ICON_FILE="/usr/share/uengine/icons/{}.png"
if [ -f $APK_PATH ]; then
echo "Installing $APK_NAME"
else
echo "ERROR: $APK_NAME file not found."
exit 1
fi
session_manager=`ps -ef | grep "uengine session-manager" | grep -v grep`
if test -z "$session_manager"; then
echo "ERROR: app install failed(session-manager not start)."
#sudo rm -f $DESKTOP_FILE
#sudo rm -f $ICON_FILE
#sudo rm -f "$APK_PATH"
exit 1
fi
ret=`/usr/bin/uengine-session-launch-helper -- uengine install --apk="$APK_PATH"`
if [ $? -ne 0 ]; then
echo "ERROR: apk install error..."
#sudo rm -f $DESKTOP_FILE
#sudo rm -f $ICON_FILE
#sudo rm -f "$APK_PATH"
exit 1
fi
chkfail=`echo $ret |grep "Failed"`
if test -n "$chkfail" ; then
echo "ERROR: $ret"
#sudo rm -f $DESKTOP_FILE
#sudo rm -f $ICON_FILE
#sudo rm -f "$APK_PATH"
exit 1
fi
sudo rm -f "$APK_PATH"
exit 0'''.format(apkPackageName, apkPackageName, apkPackageName)
debPrerm = '''#!/bin/sh
APP_NAME="{}"
session_manager=`ps -ef | grep "uengine session-manager" | grep -v grep`
if test -z "$session_manager"; then
echo "ERROR: app install failed(session-manager not start)."
exit 1
fi
echo "Uninstalling $APP_NAME"
ret=`/usr/bin/uengine-session-launch-helper -- uengine uninstall --pkg="$APP_NAME"`
if [ $? -ne 0 ]; then
echo "ERROR: app uninstall error..."
exit 1
fi
chkfail=`echo $ret |grep "Failed"`
if test -n "$chkfail" ; then
echo "ERROR: $ret"
exit 1
fi
cat /etc/passwd | awk -F: '$3>=1000' | cut -f 1 -d : | while read line
do
inifile="/home/$line/.config/uengineAppGeometry.ini"
if [ -f $inifile ]; then
sed -i "/$APP_NAME/d" $inifile
fi
done
exit 0'''.format(apkPackageName)
desktopFile = '''[Desktop Entry]
Categories=Other;
Exec=uengine launch --action=android.intent.action.MAIN --package={} --component={}
Icon=/usr/share/uengine/icons/{}.png
Terminal=false
Type=Application
GenericName={}
Name={}
'''
#RunCommandShow("echo '{}' > '{}/DEBIAN/control'".format(debControl, tempPath))
RunCommandShow("echo 正在写入文件:'{}/DEBIAN/control'".format(tempPath))
write_txt("{}/DEBIAN/control".format(tempPath), debControl)
RunCommandShow("echo 正在写入文件:'{}/DEBIAN/postinst'".format(tempPath))
write_txt("{}/DEBIAN/postinst".format(tempPath), debPostinst)
RunCommandShow("echo 正在写入文件:'{}/DEBIAN/prerm'".format(tempPath))
write_txt("{}/DEBIAN/prerm".format(tempPath), debPrerm)
RunCommandShow("echo 正在写入文件:'/usr/share/applications/{}.desktop'".format(apkPackageName))
#write_txt("{}/usr/share/applications/{}.desktop".format(tempPath, apkPackageName), desktopFile)
BuildUengineDesktop(apkPackageName, apkActivityName, apkChineseLabel, iconSavePath,
"{}/usr/share/applications/{}.desktop".format(tempPath, apkPackageName))
RunCommandShow("echo '复制文件'")
RunCommandShow("echo '写入 APK 软件图标'")
SaveApkIcon(apkPath, iconSavePath)
RunCommandShow("echo '复制 APK 文件'")
RunCommandShow("cp -rv '{}' '{}/usr/share/uengine/apk/{}.apk'".format(apkPath, tempPath, apkPackageName))
RunCommandShow("echo '正在设置文件权限……'")
RunCommandShow("chmod 0775 -vR '{}/DEBIAN/postinst'".format(tempPath))
RunCommandShow("chmod 0775 -vR '{}/DEBIAN/prerm'".format(tempPath))
RunCommandShow("echo '打包 deb 到桌面……'")
RunCommandShow("dpkg -b '{}' '{}/{}_{}.deb'".format(tempPath, get_desktop_path(),apkPackageName, apkPackageVersion))
RunCommandShow("echo '完成!'")
findApkHistory.append(apkPath)
combobox1['value'] = findApkHistory
write_txt(get_home() + "/.config/uengine-runner/FindApkBuildHistory.json", str(json.dumps(ListToDictionary(findApkHistory)))) # 将历史记录的数组转换为字典并写入
messagebox.showinfo(title="提示", message="打包完成")
DisabledAndEnbled(False)
def DisabledAndEnbled(choose):
userChoose = {True: tk.DISABLED, False: tk.NORMAL}
a = userChoose[choose]
combobox1.configure(state=a)
check.configure(state=a)
button2.configure(state=a)
button3.configure(state=a)
# 需引入 subprocess
def GetCommandReturn(cmd):
# cmd 是要获取输出的命令
return subprocess.getoutput(cmd)
# 重启本应用程序
def ReStartProgram():
python = sys.executable
os.execl(python, python, * sys.argv)
# 获取用户主目录
def get_home():
return os.path.expanduser('~')
# 获取当前语言
def get_now_lang()->"获取当前语言":
return os.getenv('LANG')
# 获取用户桌面目录
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 ListToDictionary(list):
dictionary = {}
for i in range(len(list)):
dictionary[i] = list[i]
return dictionary
# 读取文本文档
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 GetApkInformation(apkFilePath):
return GetCommandReturn("aapt dump badging '{}'".format(apkFilePath))
def GetApkActivityName(apkFilePath):
info = GetApkInformation(apkFilePath)
for line in info.split('\n'):
if "launchable-activity" in line:
line = line[0: line.index("label='")]
line = line.replace("launchable-activity: ", "")
line = line.replace("'", "")
line = line.replace(" ", "")
line = line.replace("name=", "")
line = line.replace("label=", "")
line = line.replace("icon=", "")
return line
def GetApkPackageName(apkFilePath):
# 提示:此函数有被为此程序适配而调整,如果需要最原始(无调整的)请使用主程序(此为附属组件)里的函数
info = GetApkInformation(apkFilePath)
for line in info.split('\n'):
if "package:" in line:
line = line[0: line.index("versionCode='")]
line = line.replace("package:", "")
line = line.replace("name=", "")
line = line.replace("'", "")
line = line.replace(" ", "")
# 此较为特殊,因为需要判断用户是否要添加前缀
if qianZhui.get() == True:
return "uengine-dc-{}".format(line).lower()
return line.lower()
def GetApkVersion(apkFilePath):
info = GetApkInformation(apkFilePath)
for line in info.split('\n'):
if "package:" in line:
if "compileSdkVersion='" in line:
line = line.replace(line[line.index("compileSdkVersion='"): -1], "")
if "platform" in line:
line = line.replace(line[line.index("platform"): -1], "")
line = line.replace(line[0: line.index("versionName='")], "")
line = line.replace("versionName='", "")
line = line.replace("'", "")
line = line.replace(" ", "")
return line
def BuildUengineDesktop(packageName, activityName, showName, iconPath, savePath):
things = '''
[Desktop Entry]
Categories=app;
Encoding=UTF-8
Exec=/usr/bin/uengine launch.sh --action=android.intent.action.MAIN --package={} --component={}
GenericName={}
Icon={}
MimeType=
Name={}
StartupWMClass={}
Terminal=false
Type=Application
'''.format(packageName, activityName, showName, iconPath, showName, showName)
write_txt(savePath, things)
def GetApkChineseLabel(apkFilePath):
info = GetApkInformation(apkFilePath)
for line in info.split('\n'):
if "application-label:" in line:
line = line.replace("application-label:", "")
line = line.replace("'", "")
return line
#def GetApkIconInApk(apkFilePath):
# info = GetApkInformation(apkFilePath)
# for line in info.split('\n'):
# if "application:" in line:
# line = line[line.index("icon='"): -1]
# line = line.replace("icon='", "")
# if "'" in line:
# line = line[0: line.index("'")]
# return line
# return line
#合并两个函数到一起
def SaveApkIcon(apkFilePath, iconSavePath)->"获取 apk 文件的图标":
try:
info = GetApkInformation(apkFilePath)
for line in info.split('\n'):
if "application:" in line:
xmlpath = line.split(":")[-1].split()[-1].split("=")[-1].replace("'","")
if xmlpath.endswith('.xml'):
xmlsave = getsavexml()
print(xmlpath)
xmlsave.savexml(apkFilePath,xmlpath,iconSavePath)
else:
zip = zipfile.ZipFile(apkFilePath)
iconData = zip.read(xmlpath)
with open(iconSavePath, 'w+b') as saveIconFile:
saveIconFile.write(iconData)
except:
traceback.print_exc()
print("Error, show defult icon")
shutil.copy(programPath + "/defult.png", iconSavePath)
#def SaveApkIcon(apkFilePath, iconSavePath):
# zip = zipfile.ZipFile(apkFilePath)
# iconData = zip.read(GetApkIconInApk(apkFilePath))
# with open(iconSavePath, 'w+b') as saveIconFile:
# saveIconFile.write(iconData)
def TextboxAddText1(message):
global textbox1
textbox1.configure(state=tk.NORMAL)
textbox1.insert(tk.END,message + "\n")
textbox1.configure(state=tk.DISABLED)
# 获取用户桌面目录
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('~')
###########################
# 程序信息
###########################
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
lang = get_now_lang()
langFile = json.loads(readtxt(programPath + "/Language.json"))
if not lang in langFile.keys():
lang = "en_US.UTF-8"
information = json.loads(readtxt(programPath + "/information.json"))
version = information["Version"]
title = "{} {}".format(langFile[lang]["Uengine Apk Builder"]["Title"], version)
iconPath = "{}/icon.png".format(os.path.split(os.path.realpath(__file__))[0])
###########################
# 加载配置
###########################
if not os.path.exists(get_home() + "/.config/uengine-runner"): # 如果没有配置文件夹
os.makedirs(get_home() + "/.config/uengine-runner") # 创建配置文件夹
if not os.path.exists(get_home() + "/.config/uengine-runner/FindApkBuildHistory.json"): # 如果没有配置文件
write_txt(get_home() + "/.config/uengine-runner/FindApkBuildHistory.json", json.dumps({})) # 创建配置文件
if not os.path.exists(get_home() + "/.config/uengine-runner/FindApkBuild.json"): # 如果没有配置文件
write_txt(get_home() + "/.config/uengine-runner/FindApkBuild.json", json.dumps({"path": "~"})) # 创建配置文件
###########################
# 设置变量
###########################
findApkHistory = list(json.loads(readtxt(get_home() + "/.config/uengine-runner/FindApkBuildHistory.json")).values())
###########################
# 窗口创建
###########################
win = tk.Tk()
qianZhui = tk.BooleanVar()
window = ttk.Frame(win)
frame2 = ttk.Frame(window)
label1 = ttk.Label(window, text=langFile[lang]["Uengine Apk Builder"]["label1"])
combobox1 = ttk.Combobox(window, width=100)
button2 = ttk.Button(window, text=langFile[lang]["Uengine Apk Builder"]["button2"], command=FindApk)
button3 = ttk.Button(frame2, text=langFile[lang]["Uengine Apk Builder"]["button3"], command=BuildDeb)
check = ttk.Checkbutton(frame2, variable=qianZhui,text=langFile[lang]["Uengine Apk Builder"]["check"])
textbox1 = tk.Text(window, width=100)
menu = tk.Menu(window, background="white") # 设置菜单栏
programmenu = tk.Menu(menu, tearoff=0, background="white") # 设置“程序”菜单栏
menu.add_cascade(label=langFile[lang]["Uengine Apk Builder"]["Menu"][0]["Name"], menu=programmenu)
programmenu.add_command(label=langFile[lang]["Uengine Apk Builder"]["Menu"][0]["Menu"][0], command=window.quit) # 设置“退出程序”项
# 设置控件
combobox1['value'] = findApkHistory
textbox1.configure(state=tk.DISABLED)
textbox1.config(foreground='white', background='black')
# 如果有参数
if len(sys.argv) > 1:
combobox1.set(sys.argv[1])
# 设置窗口
style = ttkthemes.ThemedStyle(win)
style.set_theme("breeze")
#win.attributes('-alpha', 0.5)
win.title(title)
win.resizable(0, 0)
win.iconphoto(False, tk.PhotoImage(file=iconPath))
#
win.config(menu=menu) # 显示菜单栏
label1.grid(row=2, column=0)
combobox1.grid(row=2, column=1)
button2.grid(row=2, column=2)
button3.grid(row=0, column=1)
check.grid(row=0, column=0)
frame2.grid(row=3, columnspa=3)
textbox1.grid(row=4, columnspa=3)
window.pack()
win.mainloop()

View File

@@ -1,11 +0,0 @@
#!/usr/bin/env python3
import os
import sys
if len(sys.argv) > 1:
if sys.argv[1] == "--help":
print("帮助:")
print("uengine-app-install apk路径")
sys.exit(0)
sys.exit(os.system("sudo /usr/bin/uengine-session-launch-helper -- uengine install --apk='{}'".format(sys.argv[1])))
print("命令参数错误")
sys.exit(1)

View File

@@ -1,11 +0,0 @@
#!/usr/bin/env python3
import os
import sys
if len(sys.argv) > 1:
if sys.argv[1] == "--help":
print("帮助:")
print("uengine-app-uninstall apk包名")
sys.exit(0)
sys.exit(os.system("sudo /usr/bin/uengine-session-launch-helper -- uengine uninstall --pkg='{}'".format(sys.argv[1])))
print("命令参数错误")
sys.exit(1)

View File

@@ -1,11 +0,0 @@
#!/usr/bin/env python3
import os
import sys
if len(sys.argv) > 1:
if sys.argv[1] == "--help":
print("帮助:")
print("输入命令即可清空/重置UEngine")
sys.exit(0)
print("参数错误")
sys.exit(1)
sys.exit(os.system("sudo rm -rf /data/uengine"))

View File

@@ -1,16 +0,0 @@
[Desktop Entry]
Categories=system;Utility;
Encoding=UTF-8
Exec=uengine-runner -ci %F
GenericName=APK Install(UEngine)
GenericName[zh_CN]=APK 安装UEngine
Icon=/opt/apps/uengine-runner/icon.png
MimeType=application/apk;
Name=APK Install(UEngine)
Name[zh_CN]=APK 安装UEngine
NoDisplay=true
OnlyShowIn=Unity;
StartupNotify=false
StartupWMClass=APK 安装UEngine
Terminal=false
Type=Application

View File

@@ -1,227 +0,0 @@
#!/usr/bin/env python3
#########################################
# 版本1.5.1
# 更新时间2021年10月06日
# Need: unix, python3-tk, python3-pip, pymouse, keyboard
#########################################
import os
import sys
import time
import json
import shutil
import keyboard
import traceback
import ttkthemes
import pyautogui
import threading
import tkinter as tk
import tkinter.ttk as ttk
import tkinter.messagebox as messagebox
import tkinter.filedialog as filedialog
import Xlib.threaded as threaded
#import pymouse.unix as pymouse
########################
#
########################
def Inputt(key):
if key.event_type == "up":
global setting
if setting:
Setting(key)
else:
Mouse(key)
#Mouse(key)
def Open():
path = filedialog.askopenfilename(title="打开", filetypes=[["json 文件", "*.json"], ["全部文件", ["*.*"]]])
if not path == "" or path == ():
shutil.copy(path, get_home() + "/.config/uengine-keyboard/key.json")
if messagebox.askyesno(title="提示", message="导入成功!是否现在重启程序以便生效?"):
ReStartProgram()
def Save():
path = filedialog.asksaveasfilename(title="打开", filetypes=[["json 文件", "*.json"], ["全部文件", ["*.*"]]])
if not path == "" or path == ():
shutil.copy(get_home() + "/.config/uengine-keyboard/key.json", path)
messagebox.showinfo(title="提示", message="导出成功!")
# 重启本应用程序
def ReStartProgram()->"重启本应用程序":
python = sys.executable
os.execl(python, python, * sys.argv)
def Mouse(key):
print(keybo)
if keybo.__contains__(key.name):
print(keybo[key.name]["MousePlace"])
pyautogui.FAILSAFE = False
#os.system(programPath + "/mouse.py {} {}".format(keybo[key.name]["MousePlace"][0], keybo[key.name]["MousePlace"][1]))
pyautogui.click(keybo[key.name]["MousePlace"][0], keybo[key.name]["MousePlace"][1])
#pyautogui.click(1500, 800)
#m.click(keybo[key.name]["MousePlace"][0],keybo[key.name]["MousePlace"][1])
def Setting(key):
if key.event_type == 'up':
keybo[key.name] = {"Mouse": "Left", "MousePlace": pyautogui.position()}
write_txt("{}/.config/uengine-keyboard/key.json".format(get_home()), json.dumps(keybo))
global inputs
inputs = True
global setting
setting = False
return False
def ShowTips():
try:
if setting:
settingLabelText.set('''设置方法:把鼠标移动带所需位置然后按下需要设置的按键即可({}x{}
提示:
1、目前不支持同时按两个及以上按键只支持在单一时间内按一个按键;
2、使用映射不能关闭本窗口但可以最小化;
3、本程序需要 root 权限才能使用;
4、映射时会占用鼠标所以在使用时最好不要使用鼠标;'''.format(pyautogui.position()[0], pyautogui.position()[1]))
settingButton.configure(state=tk.DISABLED)
else:
settingLabelText.set('''点击“设置”按钮设置映射({}x{}
提示:
1、目前不支持同时按两个及以上按键只支持在单一时间内按一个按键;
2、使用映射不能关闭本窗口但可以最小化;
3、本程序需要 root 权限才能使用;
4、映射时会占用鼠标所以在使用时最好不要使用鼠标;'''.format(pyautogui.position()[0], pyautogui.position()[1]))
settingButton.configure(state=tk.NORMAL)
time.sleep(0.1)
ShowTips()
except:
traceback.print_exc()
if not close:
ShowTips()
def Closing():
close = True
window.destroy()
def Key():
keyboard.hook(Inputt)
# 获取用户主目录
def get_home()->"获取用户主目录":
return os.path.expanduser('~')
# 写入文本文档
def write_txt(path: "路径", things: "内容")->"写入文本文档":
file = open(path, 'w', encoding='UTF-8') # 设置文件对象
file.write(things) # 写入文本
file.close() # 关闭文本对象
# 读取文本文档
def readtxt(path: "路径")->"读取文本文档":
f = open(path, "r") # 设置文件对象
str = f.read() # 获取内容
f.close() # 关闭文本对象
return str # 返回结果
def Settings():
global setting
setting = True
def Clean():
if messagebox.askokcancel(title="提示", message="你确定要删除吗?"):
shutil.rmtree("{}/.config/uengine-keyboard".format(get_home()))
if messagebox.askyesno(title="提示", message="删除成功!是否现在重启程序以便生效?"):
ReStartProgram()
def About():
threading.Thread(target=os.system, args=["{}/uengine-runner-about".format(programPath)]).start()
###################
#
###################
if not os.path.exists("{}/.config/uengine-keyboard".format(get_home())):
os.mkdir("{}/.config/uengine-keyboard".format(get_home()))
if not os.path.exists("{}/.config/uengine-keyboard/key.json".format(get_home())):
write_txt("{}/.config/uengine-keyboard/key.json".format(get_home()), "{}")
###################
#
###################
setting = False
close = False
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
iconPath = "{}/icon.png".format(os.path.split(os.path.realpath(__file__))[0])
keybo = json.loads(readtxt("{}/.config/uengine-keyboard/key.json".format(get_home())))
version = json.loads(readtxt("{}/information.json".format(programPath)))["Version"]
###################
# 判断是不是 root
###################
if os.geteuid() != 0:
print("不是以 root 权限运行本程序!")
root = tk.Tk()
root.overrideredirect(1)
root.withdraw()
messagebox.showerror(title="错误", message="不是以 root 权限运行本程序!")
sys.exit(1)
###################
#
###################
window = tk.Tk()
win = ttk.Frame(window)
show = ttk.Frame(win)
settingLabelText = tk.StringVar()
# 设置菜单栏
menu = tk.Menu(window, tearoff=0, background="white")
programMenu = tk.Menu(menu, tearoff=0, background="white")
aboutMenu = tk.Menu(menu, tearoff=0, background="white")
settingLabel = ttk.Label(win, textvariable=settingLabelText)
settingMouseToKeyboard = ttk.Button(show, text="启动键盘映射(已启用)")
settingButton = ttk.Button(show, text="添加或覆盖键盘映射设置", command=Settings)
settingMouseToKeyboard.configure(state=tk.DISABLED)
style = ttkthemes.ThemedStyle(window)
style.set_theme("breeze")
window.protocol('WM_DELETE_WINDOW', Closing)
window.resizable(0, 0)
window.iconphoto(False, tk.PhotoImage(file=iconPath))
window.title("UEngine 键盘映射 {}".format(version))
menu.add_cascade(label="程序", menu=programMenu)
menu.add_cascade(label="帮助", menu=aboutMenu)
menu.configure(activebackground="dodgerblue")
programMenu.add_command(label="导入映射设置", command=Open)
programMenu.add_command(label="导出映射设置", command=Save)
programMenu.add_command(label="删除所有映射设置", command=Clean)
programMenu.add_separator()
programMenu.add_command(label="退出程序", command=sys.exit)
programMenu.configure(activebackground="dodgerblue")
aboutMenu.add_command(label="关于", command=About)
window.config(menu=menu) # 显示菜单栏
show.grid(row=1, column=0)
settingLabel.grid(row=0, column=0)
settingMouseToKeyboard.grid(row=0, column=0)
settingButton.grid(row=0, column=1)
win.pack(fill="both", expand="yes")
#threaded.lock.allocate_lock()
threading.Thread(target=Key).start()
threading.Thread(target=ShowTips).start()
pyautogui.FAILSAFE = False
'''def B(key):
if key.event_type == "up":
print(pyautogui.position())
print(key.name)
pyautogui.click(1500, 800)
keyboard.hook(B)
keyboard.wait()'''
window.mainloop()

File diff suppressed because it is too large Load Diff

View File

@@ -1,170 +0,0 @@
#!/usr/bin/env python3
# 使用系统默认的 python3 运行
###########################################################################################
# 作者gfdgd xi
# 版本1.4.3
# 更新时间2021年9月11日
# 感谢anbox、deepin 和 统信
# 基于 Python3 的 tkinter 构建
###########################################################################################
#################
# 引入所需的库
#################
import os
import threading
import time
import json
import ttkthemes
import subprocess
import tkinter as tk
import tkinter.ttk as ttk
# 读取文本文档
def readtxt(path: "路径")->"读取文本文档":
f = open(path, "r") # 设置文件对象
str = f.read() # 获取内容
f.close() # 关闭文本对象
return str # 返回结果
###########################
# 程序信息
###########################
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
information = json.loads(readtxt(programPath + "/information.json"))
programUrl = information["Url"][0]
version = information["Version"]
goodRunSystem = information["System"]
aaptVersion = subprocess.getoutput("aapt version")
about = '''介绍 :一个基于 Python3 的 tkinter 制作的 UEngine 运行器在新版本Deepin/UOS发布后可以在应用商店安装部分官方已适配的安卓应用对爱好者来说不能自己安装APK软件包始终差点意思本程序可以为Deepin/UOS上的UEngine安卓运行环境安装自定义APK软件包并能发送安装的APK包启动菜单到桌面或系统菜单。
版本 {}
适用平台 {}
程序官网 {}
©2021-{}'''.format(version, goodRunSystem, tk.TkVersion, programUrl, time.strftime("%Y"))
tips = "\n".join(information["Tips"])
updateThingsString = "\n".join(information["Update"])
title = "UEngine 运行器 {}".format(version)
updateTime = information["Time"]
updateThings = "{} 更新内容:\n{}\n更新时间{}".format(version, updateThingsString, updateTime, time.strftime("%Y"))
iconPath = "{}/icon.png".format(os.path.split(os.path.realpath(__file__))[0])
desktop = "/opt/apps/uengine-runner/UengineAndroidProgramList.desktop"
desktopName = "UengineAndroidProgramList.desktop"
contribute = "\n".join(information["Contribute"])
useProgram = ""
threading.Thread(target=useProgram).start()
# add sub window
#添加窗口开启关闭开关,防止重复开启
windowflag = "close"
def UseProgram():
global useProgram
useProgram = '''1、UEngine{}
2、python3{}
3、tkinter{}
4、aapt{}
5、dpkg{}
6、mkdir{}
7、echo
8、chmod{}
9、adb{}
10、deepin 终端:{}'''.format(subprocess.getoutput("uengine version"),
subprocess.getoutput("python3 --version"),
tk.TkVersion,
subprocess.getoutput("aapt version"),
subprocess.getoutput("dpkg --version"),
subprocess.getoutput("mkdir --version"),
subprocess.getoutput("chmod --version"),
subprocess.getoutput("adb version"),
subprocess.getoutput("deepin-terminal -v"))
def showhelp():
#define window and frame and button label
#
global windowflag
if windowflag == "close":
helpwindow=tk.Tk()
helpwindow.resizable(0, 0)
helpwindow.title("帮助")
# get screen width and height
screen_width = helpwindow.winfo_screenwidth()
screen_height = helpwindow.winfo_screenheight()
# calculate position x and y coordinates 假设主窗口大小固定 570x236像素 ,设置窗口位置为屏幕中心。
winwith=550
winhigh=700
x = (screen_width/2) - (winwith/2)
y = (screen_height/2) - (winhigh/2)
helpwindow.geometry("550x700"+"+{:.0f}+{:.0f}".format(x, y))
helpwindow.iconphoto(False, tk.PhotoImage(file=iconPath))
style = ttkthemes.ThemedStyle(helpwindow)
style.set_theme("breeze")
Frmroot=ttk.Frame(helpwindow)
FrmMenu = ttk.Frame(Frmroot)
FrmText = ttk.Frame(Frmroot)
LabFrmText=ttk.LabelFrame(FrmText,text="帮助",height=800,borderwidth=3)
HelpStr = tk.StringVar()
HelpStr.set(tips)
LabText = ttk.Label(LabFrmText, textvariable=HelpStr,width=55)
LabText.config(wraplength=350)
def on_closing():
global windowflag
windowflag = "close"
print(windowflag)
helpwindow.destroy()
# define button func
def ChgLog():
HelpStr.set(updateThingsString)
def ChgAbout():
HelpStr.set(about)
def ChgDep():
if useProgram == "":
BtnZujian.configure(state=tk.DISABLED)
return
HelpStr.set(useProgram)
def ChgCon():
HelpStr.set(contribute)
def ChgTips():
HelpStr.set(tips)
LabText.config(wraplength=350)
BtnReadme = ttk.Button(FrmMenu, text="使用说明",width=14,command=ChgTips)
BtnLog = ttk.Button(FrmMenu, text="更新内容",width=14,command=ChgLog)
BtnZujian = ttk.Button(FrmMenu, text="程序依赖的组件",width=14,command=ChgDep)
BtnGongxian = ttk.Button(FrmMenu, text="有贡献的开发者",width=14,command=ChgCon)
BtnAbout = ttk.Button(FrmMenu, text="关于",width=14,command=ChgAbout)
#layout
FrmMenu.grid(row=0,column=0,sticky=tk.NW)
BtnReadme.grid(row=0,column=0,sticky=tk.NW,padx=3)
BtnLog.grid(row=1,column=0,sticky=tk.NW,padx=3)
BtnZujian.grid(row=2,column=0,sticky=tk.NW,padx=3)
BtnGongxian.grid(row=3,column=0,sticky=tk.NW,padx=3)
BtnAbout.grid(row=4,column=0,sticky=tk.NW,padx=3)
FrmText.grid(row=0,column=1,sticky=tk.NW)
LabFrmText.grid(row=0,column=0,sticky=tk.NW,padx=3,pady=3)
LabText.grid(row=0,column=0,sticky=tk.NW)
Frmroot.pack()
windowflag = "open"
print(windowflag)
helpwindow.mainloop()
#helpwindow.protocol("WM_DELETE_WINDOW", on_closing)
showhelp()

View File

@@ -1,24 +0,0 @@
#!/bin/bash
# 忽略社区版检测
pkgRunCnt=`ps -ef |grep "uengine launch" |grep -v grep |grep "$pkg" |wc -l`
if [ $pkgRunCnt -ge 1 ]; then
#防止短时间内多次打开同一应用,如果应用正在启动中,此次忽略
exit 0
fi
#等Session服务启动完全
wscont=0
isReady=`busctl --user get-property org.anbox /org/anbox org.anbox.ApplicationManager Ready`
if [ "$isReady" != "b true" ] ;then
sleep 2
fi
while [ "$isReady" = "b false" -a $wscont -lt 10 ]
do
sleep 1
isReady=`busctl --user get-property org.anbox /org/anbox org.anbox.ApplicationManager Ready`
let wscont++
done
uengine launch $*

View File

@@ -1,113 +0,0 @@
#!/usr/bin/env python3
import os
import json
import base64
import requests
import ttkthemes
import traceback
import webbrowser
import tkinter as tk
import tkinter.ttk as ttk
import tkinter.messagebox as messagebox
import urllib.parse as parse
# 读取文本文档
def readtxt(path: "路径")->"读取文本文档":
f = open(path, "r") # 设置文件对象
str = f.read() # 获取内容
f.close() # 关闭文本对象
return str # 返回结果
def Update(name, stars, contact, things, version):
# post 内容
data = {
"Name": name,
"Starts": stars,
"Contact": contact,
"Things": things,
"Version": version
}
try:
messagebox.showinfo(message=requests.post(parse.unquote(base64.b64decode("aHR0cCUzQS8vMTIwLjI1LjE1My4xNDQvdWVuZ2luZS1ydW5uZXIvYnVnL3VwbG9hZC5waHA=").decode("utf-8")), data=data).text)
except:
traceback.print_exc()
messagebox.showerror(title="错误", message="服务器疑似出现错误,可以进行以下尝试:①多尝试几次;②使用其他反馈途径\n错误信息{}".format(traceback.format_exc()))
def UpdateButtonClick():
#判断是否为空
if nameThings.get() == "" or starValue.get() == "" or contactThings.get() == "" or updateThings.get(1.0, "end").replace(" ", "").replace("\n", "") == "":
messagebox.showerror(title="错误", message="反馈信息未填写完整!")
return
Update(name=nameThings.get(), stars=starValue.get(), contact=contactThings.get(), things=updateThings.get(1.0, "end"), version=version)
def OpenGiteeIssues():
webbrowser.open_new_tab("https://gitee.com/gfdgd-xi/uengine-runner/issues")
def OpenGithubIssues():
webbrowser.open_new_tab("https://github.com/gfdgd-xi/uengine-runner/issues")
###########################
# 程序信息
###########################
iconPath = "{}/icon.png".format(os.path.split(os.path.realpath(__file__))[0])
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
information = json.loads(readtxt(programPath + "/information.json"))
version = information["Version"]
###########################
# 窗口创建
###########################
window = tk.Tk()
win = ttk.Frame()
starValue = tk.StringVar()
starValue.set("5分")
name = ttk.Label(win, text="你的昵称:")
nameThings = ttk.Entry(win, width=25)
contact = ttk.Label(win, text="联系方式:")
contactThings = ttk.Entry(win, width=25)
star = ttk.Label(win, text="评分:")
starMenu = ttk.OptionMenu(win, starValue, "5分", "5分", "4分", "3分", "2分", "1分")
updateThingsTips = ttk.Label(win, text="反馈内容(支持 Markdown 格式):")
updateThings = tk.Text(win)
otherUpload = ttk.Frame(win)
# 所属内容
tips = ttk.Label(otherUpload, text="如果无法正常反馈,可以用其他方式反馈:")
giteeButton = ttk.Button(otherUpload, text="Gitee Issues", command=OpenGiteeIssues)
githubButton = ttk.Button(otherUpload, text="Github Issues", command=OpenGithubIssues)
updateButton = ttk.Button(win, text="提交", command=UpdateButtonClick)
# 设置窗口
style = ttkthemes.ThemedStyle(window)
style.set_theme("breeze")
window.title("UEngine 运行器 {} 问题/建议反馈".format(version))
window.resizable(0, 0)
window.iconphoto(False, tk.PhotoImage(file=iconPath))
tips.grid(row=0, column=0)
giteeButton.grid(row=0, column=1)
githubButton.grid(row=0, column=2)
name.grid(row=0, column=0)
nameThings.grid(row=0, column=1)
contact.grid(row=0, column=2)
contactThings.grid(row=0, column=3)
star.grid(row=0, column=4)
starMenu.grid(row=0, column=5)
updateThingsTips.grid(row=1, column=0, columnspan=2)
updateThings.grid(row=2, column=0, columnspan=6)
otherUpload.grid(row=3, column=0, columnspan=4)
updateButton.grid(row=3, column=5)
win.pack(expand="yes", fill="both")
window.mainloop()

View File

@@ -1,83 +0,0 @@
#!/usr/bin/env python3
#########################################
# 版本1.4.2
# 更新时间2021年08月30日
#########################################
import os
import shutil
import sys
import traceback
import ttkthemes
import tkinter as tk
import tkinter.ttk as ttk
import tkinter.messagebox as messagebox
########################
#
########################
# 写入文本文档
def write_txt(path: "路径", things: "内容")->"写入文本文档":
file = open(path, 'w', encoding='UTF-8') # 设置文件对象
file.write(things) # 写入文本
file.close() # 关闭文本对象
# 读取文本文档
def readtxt(path: "路径")->"读取文本文档":
f = open(path, "r") # 设置文件对象
str = f.read() # 获取内容
f.close() # 关闭文本对象
return str # 返回结果
###################
# 判断是不是 root
###################
if os.geteuid() != 0:
print("不是以 root 权限运行本程序!")
root = tk.Tk()
root.overrideredirect(1)
root.withdraw()
messagebox.showerror(title="错误", message="不是以 root 权限运行本程序!")
sys.exit(1)
###################
#
###################
window = tk.Tk()
style = ttkthemes.ThemedStyle(window)
style.set_theme("breeze")
window.overrideredirect(1)
window.withdraw()
try:
if sys.argv[1] == "1" and messagebox.askokcancel(title="提示", message="你确定要删除吗?"):
os.remove("/data/uengine/data/data/misc/adb/adb_keys")
messagebox.showinfo(title="提示", message="完成")
except:
traceback.print_exc()
messagebox.showerror(title="错误", message=traceback.format_exc())
sys.exit(2)
if sys.argv[1] == "1":
sys.exit(0)
if not messagebox.askyesno(title="提示", message='''请阅读以下提示然后确定是否继续:
1、安装后即可使用 adb 连接 UEngine;
2、重置 UEngine 或 adb 就需要重新设置该支持补丁;
3、需要 root 权限;'''):
sys.exit(0)
# 写入(需要 root
if not os.path.exists("/data/uengine/data/data/misc/adb"):
messagebox.showerror(title="错误", message="无法读取 UEngine 数据!")
sys.exit(1)
try:
things = readtxt(sys.argv[2])
adbKey = []
# 提取内容
for i in things.split('\n'):
adbKey.append(i[0: i.find(" ")])
old = ""
if os.path.exists("/data/uengine/data/data/misc/adb/adb_keys"):
old = readtxt("/data/uengine/data/data/misc/adb/adb_keys") + "\n"
write_txt("/data/uengine/data/data/misc/adb/adb_keys", old + "\n".join(adbKey))
messagebox.showinfo(title="提示", message="完成")
except:
traceback.print_exc()
messagebox.showerror(title="错误", message=traceback.format_exc())
sys.exit(2)

View File

@@ -1,153 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="256px" height="256px" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>APPS_安卓容器_bonund256pt</title>
<defs>
<filter x="-12.5%" y="-12.5%" width="125.0%" height="125.0%" filterUnits="objectBoundingBox" id="filter-1">
<feOffset dx="0" dy="4" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="6" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.197982681 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
<feMerge>
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
<feMergeNode in="SourceGraphic"></feMergeNode>
</feMerge>
</filter>
<linearGradient x1="58.6019309%" y1="88.1513471%" x2="68.1110327%" y2="11.6551043%" id="linearGradient-2">
<stop stop-color="#02DA67" offset="0%"></stop>
<stop stop-color="#8DF6D6" offset="100%"></stop>
</linearGradient>
<path d="M178.25009,95.8175981 C203.764636,95.8175981 224.183124,74.193939 224.183124,47.5198036 C224.183124,20.8456682 203.116891,-0.0263983843 178.25009,0.00161822517 C153.698836,-0.149640967 132.579574,20.8119281 132.579574,47.4860635 C132.579574,74.1601989 152.735544,95.8175981 178.25009,95.8175981 Z" id="path-3"></path>
<filter x="-8.7%" y="-8.3%" width="117.5%" height="116.7%" filterUnits="objectBoundingBox" id="filter-4">
<feGaussianBlur stdDeviation="6" in="SourceAlpha" result="shadowBlurInner1"></feGaussianBlur>
<feOffset dx="0" dy="4" in="shadowBlurInner1" result="shadowOffsetInner1"></feOffset>
<feComposite in="shadowOffsetInner1" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner1"></feComposite>
<feColorMatrix values="0 0 0 0 0.503096532 0 0 0 0 0.974696063 0 0 0 0 0.762013922 0 0 0 1 0" type="matrix" in="shadowInnerInner1"></feColorMatrix>
</filter>
<linearGradient x1="63.5172866%" y1="83.8734541%" x2="28.478366%" y2="6.65286784%" id="linearGradient-5">
<stop stop-color="#4796FE" offset="0%"></stop>
<stop stop-color="#44D9FF" offset="100%"></stop>
</linearGradient>
<ellipse id="path-6" cx="75.4782609" cy="64.0914576" rx="40.4347826" ry="42.2724698"></ellipse>
<filter x="-7.4%" y="-7.1%" width="114.8%" height="114.2%" filterUnits="objectBoundingBox" id="filter-7">
<feGaussianBlur stdDeviation="6" in="SourceAlpha" result="shadowBlurInner1"></feGaussianBlur>
<feOffset dx="0" dy="0" in="shadowBlurInner1" result="shadowOffsetInner1"></feOffset>
<feComposite in="shadowOffsetInner1" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner1"></feComposite>
<feColorMatrix values="0 0 0 0 0.658848459 0 0 0 0 0.76869955 0 0 0 0 0.994393611 0 0 0 1 0" type="matrix" in="shadowInnerInner1"></feColorMatrix>
</filter>
<linearGradient x1="50%" y1="31.0023874%" x2="50%" y2="95.9937487%" id="linearGradient-8">
<stop stop-color="#D0FF52" offset="0%"></stop>
<stop stop-color="#75EF07" offset="100%"></stop>
</linearGradient>
<path d="M173.78741,23.8356193 C174.592173,22.5497756 176.286945,22.1597832 177.572789,22.9645469 C178.97904,23.8446691 179.464805,25.6626835 178.684957,27.1269214 L178.684957,27.1269214 L167.998548,47.191447 C186.416883,60.0725236 198.886549,83.3414384 199.457775,110.056847 L199.478261,111.975079 C172.083327,116.233637 151.498347,118.362915 137.72332,118.362915 C122.744723,118.362915 100.199269,116.233637 70.0869565,111.975079 C70.0869565,84.4580366 82.7086518,60.380247 101.56625,47.1917402 L90.8802608,27.1269214 C90.1004123,25.6626835 90.5861775,23.8446691 91.9924283,22.9645469 C93.278272,22.1597832 94.9730442,22.5497756 95.7778079,23.8356193 C95.8117323,23.8898235 95.8437535,23.9451959 95.873813,24.0016352 L106.548653,44.0451766 C115.080463,39.2096532 124.660045,36.497433 134.782609,36.497433 C144.904955,36.497433 154.484343,39.2095367 163.016015,44.0448652 L173.691404,24.0016352 C173.721464,23.9451959 173.753485,23.8898235 173.78741,23.8356193 Z" id="path-9"></path>
<filter x="-32.5%" y="-31.3%" width="164.9%" height="187.7%" filterUnits="objectBoundingBox" id="filter-10">
<feOffset dx="0" dy="12" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="12" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0.565756196 0 0 0 0 0.617813774 0 0 0 0 0 0 0 0 0.5 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
</filter>
<path d="M108.824477,66.2818224 C104.358174,66.2818224 100.73752,70.0670283 100.73752,74.7363163 C100.73752,79.4056044 104.358174,83.1908103 108.824477,83.1908103 C113.290779,83.1908103 116.911433,79.4056044 116.911433,74.7363163 C116.911433,70.0670283 113.290779,66.2818224 108.824477,66.2818224 Z" id="path-11"></path>
<filter x="-24.7%" y="-23.7%" width="149.5%" height="147.3%" filterUnits="objectBoundingBox" id="filter-12">
<feGaussianBlur stdDeviation="2" in="SourceAlpha" result="shadowBlurInner1"></feGaussianBlur>
<feOffset dx="0" dy="4" in="shadowBlurInner1" result="shadowOffsetInner1"></feOffset>
<feComposite in="shadowOffsetInner1" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner1"></feComposite>
<feColorMatrix values="0 0 0 0 0.311563901 0 0 0 0 0.401805933 0 0 0 0 0.0617868498 0 0 0 1 0" type="matrix" in="shadowInnerInner1"></feColorMatrix>
</filter>
<path d="M162.73752,66.2818224 C158.271217,66.2818224 154.650564,70.0670283 154.650564,74.7363163 C154.650564,79.4056044 158.271217,83.1908103 162.73752,83.1908103 C167.203823,83.1908103 170.824477,79.4056044 170.824477,74.7363163 C170.824477,70.0670283 167.203823,66.2818224 162.73752,66.2818224 Z" id="path-13"></path>
<filter x="-24.7%" y="-23.7%" width="149.5%" height="147.3%" filterUnits="objectBoundingBox" id="filter-14">
<feGaussianBlur stdDeviation="2" in="SourceAlpha" result="shadowBlurInner1"></feGaussianBlur>
<feOffset dx="0" dy="4" in="shadowBlurInner1" result="shadowOffsetInner1"></feOffset>
<feComposite in="shadowOffsetInner1" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner1"></feComposite>
<feColorMatrix values="0 0 0 0 0.311563901 0 0 0 0 0.401805933 0 0 0 0 0.0617868498 0 0 0 1 0" type="matrix" in="shadowInnerInner1"></feColorMatrix>
</filter>
<linearGradient x1="50%" y1="15.1929094%" x2="43.5077077%" y2="91.2786664%" id="linearGradient-15">
<stop stop-color="#F59A36" offset="0%"></stop>
<stop stop-color="#FCCB6D" offset="100%"></stop>
</linearGradient>
<linearGradient x1="49.9821781%" y1="101.237754%" x2="49.9425633%" y2="5.03998902%" id="linearGradient-16">
<stop stop-color="#FFC87C" offset="0%"></stop>
<stop stop-color="#FD7A49" offset="100%"></stop>
</linearGradient>
<linearGradient x1="42.3143683%" y1="18.131572%" x2="69.2971087%" y2="74.6901955%" id="linearGradient-17">
<stop stop-color="#FFE066" offset="0%"></stop>
<stop stop-color="#FED862" offset="67.0339918%"></stop>
<stop stop-color="#FFC565" offset="100%"></stop>
</linearGradient>
<linearGradient x1="37.3123913%" y1="70.4187755%" x2="57.7534931%" y2="25.1271391%" id="linearGradient-18">
<stop stop-color="#FBC758" offset="0%"></stop>
<stop stop-color="#FCE188" offset="100%"></stop>
</linearGradient>
<polygon id="path-19" points="22.4854175 71.1352831 124 111.895386 108.52496 183.11999 -1.44464996e-12 131.484995"></polygon>
<filter x="-3.2%" y="-3.6%" width="112.9%" height="114.3%" filterUnits="objectBoundingBox" id="filter-20">
<feOffset dx="4" dy="4" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0.925490196 0 0 0 0 0.556862745 0 0 0 0 0.0980392157 0 0 0 1 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
</filter>
<linearGradient x1="38.069149%" y1="33.5367903%" x2="38.069149%" y2="98.1621294%" id="linearGradient-21">
<stop stop-color="#FE606D" offset="0%"></stop>
<stop stop-color="#FFA2A5" offset="100%"></stop>
</linearGradient>
<linearGradient x1="60.0817844%" y1="28.2456942%" x2="38.943371%" y2="75.9265148%" id="linearGradient-22">
<stop stop-color="#FEDB63" offset="0%"></stop>
<stop stop-color="#FEDD73" offset="100%"></stop>
</linearGradient>
<polygon id="path-23" points="139.297941 70.1779313 248 120.532936 229.699968 185.722682 124 144.005227"></polygon>
<filter x="-9.7%" y="-10.4%" width="112.9%" height="113.8%" filterUnits="objectBoundingBox" id="filter-24">
<feOffset dx="-4" dy="-4" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0.99518353 0 0 0 0 0.657959601 0 0 0 0 0.222035984 0 0 0 0.663358248 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
</filter>
<linearGradient x1="1.3884147%" y1="42.2427784%" x2="97.6287521%" y2="58.3575504%" id="linearGradient-25">
<stop stop-color="#FBDF84" offset="0%"></stop>
<stop stop-color="#FEF6DF" offset="20.1427895%"></stop>
<stop stop-color="#FFF8E2" offset="75.0762962%"></stop>
<stop stop-color="#FBDF84" offset="100%"></stop>
</linearGradient>
<linearGradient x1="0%" y1="57.7627211%" x2="100%" y2="42.7948807%" id="linearGradient-26">
<stop stop-color="#FDDD72" offset="0%"></stop>
<stop stop-color="#FEF6DF" offset="20.1427895%"></stop>
<stop stop-color="#FFF8E2" offset="75.0762962%"></stop>
<stop stop-color="#FEDD71" offset="100%"></stop>
</linearGradient>
</defs>
<g id="APPS_安卓容器_bonund256pt" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="编组-3备份-3" filter="url(#filter-1)" transform="translate(4.000000, 4.000000)">
<polygon id="路径-4" fill="#9F6B00" points="22.4854175 71.1352831 124 39.1781202 124 127.971838 42.4959276 162.72722"></polygon>
<polygon id="路径-4" fill="#A16B00" transform="translate(176.849984, 103.805249) scale(-1, 1) translate(-176.849984, -103.805249) " points="124 70.2467832 229.699968 39.246972 229.699968 126.857126 143.556296 168.36355"></polygon>
<g id="椭圆形">
<use fill="url(#linearGradient-2)" fill-rule="evenodd" xlink:href="#path-3"></use>
<use fill="black" fill-opacity="1" filter="url(#filter-4)" xlink:href="#path-3"></use>
</g>
<g id="椭圆形备份">
<use fill="url(#linearGradient-5)" fill-rule="evenodd" xlink:href="#path-6"></use>
<use fill="black" fill-opacity="1" filter="url(#filter-7)" xlink:href="#path-6"></use>
</g>
<g id="编组-2" transform="translate(125.653236, 69.872713) rotate(-9.000000) translate(-125.653236, -69.872713) translate(72.939312, 36.054737)"></g>
<g id="形状结合备份-3">
<use fill="black" fill-opacity="1" filter="url(#filter-10)" xlink:href="#path-9"></use>
<use fill="url(#linearGradient-8)" fill-rule="evenodd" xlink:href="#path-9"></use>
</g>
<g id="路径">
<use fill="#5B8C06" fill-rule="evenodd" xlink:href="#path-11"></use>
<use fill="black" fill-opacity="1" filter="url(#filter-12)" xlink:href="#path-11"></use>
</g>
<g id="路径备份">
<use fill="#5B8C06" fill-rule="evenodd" xlink:href="#path-13"></use>
<use fill="black" fill-opacity="1" filter="url(#filter-14)" xlink:href="#path-13"></use>
</g>
<polygon id="路径-4备份" fill="url(#linearGradient-15)" transform="translate(71.995299, 162.885973) scale(-1, 1) translate(-71.995299, -162.885973) " points="20.4301769 118.218419 124 77.7719458 124 192.941695 19.9905981 248"></polygon>
<line x1="123.560421" y1="245.912586" x2="124" y2="114.029217" id="路径-7备份" stroke="url(#linearGradient-16)" stroke-width="2.6125" stroke-linecap="round"></line>
<polygon id="路径-4备份" fill="url(#linearGradient-17)" points="124 114.029217 231.198465 75.4450395 231.198465 193.553624 124 248"></polygon>
<g id="路径-11">
<use fill="black" fill-opacity="1" filter="url(#filter-20)" xlink:href="#path-19"></use>
<use fill="url(#linearGradient-18)" fill-rule="evenodd" xlink:href="#path-19"></use>
</g>
<polygon id="路径-3" fill="url(#linearGradient-21)" points="177.791264 92.5327965 178.598476 220.244869 195.622586 211.671682 196.169593 85.4467628"></polygon>
<g id="路径-11备份" transform="translate(186.000000, 127.950307) scale(1, -1) translate(-186.000000, -127.950307) ">
<use fill="black" fill-opacity="1" filter="url(#filter-24)" xlink:href="#path-23"></use>
<use fill="url(#linearGradient-22)" fill-rule="evenodd" xlink:href="#path-23"></use>
</g>
<path d="M34.8824439,168.349874 L62.2463189,168.831259 C63.6537673,168.856018 64.7885425,169.99145 64.8124889,171.398912 L64.8191082,171.787962 C64.843653,173.230597 63.6940637,174.419981 62.2514286,174.444526 C62.2212993,174.445039 62.1911633,174.44503 62.1610343,174.4445 L34.7971594,173.963116 C33.389711,173.938356 32.2549357,172.802925 32.2309893,171.395463 L32.2243701,171.006413 C32.1998253,169.563778 33.3494146,168.374393 34.7920497,168.349848 C34.822179,168.349336 34.8523149,168.349344 34.8824439,168.349874 Z" id="矩形" fill="#F4E5C3" transform="translate(48.521739, 171.397187) rotate(23.000000) translate(-48.521739, -171.397187) "></path>
<path d="M35.6935587,176.218338 L46.7821941,176.425811 C48.1873409,176.452102 49.3199011,177.585307 49.3453919,178.990469 L49.3523188,179.372312 C49.3784889,180.814919 48.2302402,182.005597 46.7876337,182.031767 C46.7555504,182.032349 46.7234591,182.03234 46.6913762,182.03174 L35.6027408,181.824267 C34.197594,181.797976 33.0650338,180.664771 33.039543,179.259609 L33.0326161,178.877766 C33.006446,177.435159 34.1546947,176.24448 35.5973013,176.21831 C35.6293845,176.217728 35.6614758,176.217738 35.6935587,176.218338 Z" id="矩形备份" fill="#F3DA7B" transform="translate(41.192467, 179.125039) rotate(25.000000) translate(-41.192467, -179.125039) "></path>
<path d="M22.4854175,71.9306494 L123.120842,113.074543 L22.4854175,71.9306494 Z" id="路径-7" stroke="url(#linearGradient-25)" stroke-width="2.6125" stroke-linecap="round"></path>
<line x1="125.563916" y1="112.565642" x2="228.738156" y2="71.9125793" id="路径-7备份-2" stroke="url(#linearGradient-26)" stroke-width="2.6125" stroke-linecap="round"></line>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -1,59 +0,0 @@
#!/usr/bin/env python3
import os
import sys
import json
import shutil
import requests
import traceback
# 读取文本文档
def read_txt(path):
f = open(path,"r") # 设置文件对象
str = f.read() # 获取内容
f.close() # 关闭文本对象
return str # 返回结果
def GetPackageUpdateInformation():
global setting
global package
for i in allJson['Program']:
if i['Package'] == package:
return i
try:
setting = json.loads(read_txt("{}/setting.json".format(os.path.split(os.path.realpath(__file__))[0])))
except:
traceback.print_exc()
print("配置文件无法访问!")
package = setting['Package']
nowVersion = setting['Version']
try:
jsons = requests.get(setting["Url"])
except:
traceback.print_exc()
print("服务器出现错误!")
sys.exit(1)
allJson = json.loads(jsons.text)
updateInformation = GetPackageUpdateInformation()
name = updateInformation['Name']
newVersion = updateInformation['Version']
print("更新程序:{}".format(name))
print("最新版本:{}".format(newVersion))
print("目前版本:{}".format(nowVersion))
if nowVersion == newVersion:
print("目前是最新版本,无需更新!")
quit()
print("更新内容:")
print(updateInformation['New Things'])
choose = input("更新?[Y/N]")
if choose.upper() == "N":
quit()
if os.path.exists("/tmp/update-console-{}".format(package)):
shutil.rmtree("/tmp/update-console-{}".format(package))
os.mkdir("/tmp/update-console-{}".format(package))
if updateInformation["Linux App Url"][0] == None:
print("没有可用包源")
quit()
os.system("wget '{}' -P '/tmp/update-console-{}'".format(updateInformation["Linux App Url"][0], package))
os.system("sudo dpkg -i /tmp/update-console-{}/*".format(package))
os.system("sudo apt install -f -y")

View File

@@ -1 +0,0 @@
/opt/apps/uengine-runner/uengine-apk-builder

View File

@@ -1 +0,0 @@
/opt/apps/uengine-runner/uengine-app-install

View File

@@ -1 +0,0 @@
/opt/apps/uengine-runner/uengine-app-uninstall

View File

@@ -1 +0,0 @@
/opt/apps/uengine-runner/uengine-clean

View File

@@ -1 +0,0 @@
/opt/apps/uengine-runner/uengine-keyboard

View File

@@ -1 +0,0 @@
/opt/apps/uengine-runner/root-uengine.sh

View File

@@ -1 +0,0 @@
/opt/apps/uengine-runner/uengine-runner

View File

@@ -1 +0,0 @@
/opt/apps/uengine-runner/uengine-runner-about

View File

@@ -1 +0,0 @@
/opt/apps/uengine-runner/uengine-runner-launch.sh

View File

@@ -1 +0,0 @@
/opt/apps/uengine-runner/uengine-runner-update-bug

View File

@@ -1 +0,0 @@
/opt/apps/uengine-runner/uengine-useadb

View File

@@ -1,13 +0,0 @@
[Desktop Entry]
Categories=System;
Comment=UEngine App List
Comment[zh]=UEngine 程序菜单
Encoding=UTF-8
Exec=/usr/bin/uengine launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity
Icon=/opt/apps/uengine-runner/icon.png
MimeType=
Name=UEngine App List
Name[zh]=UEngine 程序菜单
StartupWMClass=UEngine 程序菜单
Terminal=false
Type=Application

View File

@@ -1,15 +0,0 @@
[Desktop Entry]
Type=Application
Encoding=UTF-8
Categories=System;
Terminal=false
Exec=/usr/bin/uengine-apk-builder %F
Icon=/opt/apps/uengine-runner/icon.png
Name=Build Apk To Deb(UEngine Runner)
Comment=Build Apk To Deb(UEngine Runner)
Comment[zh]=打包 debUEngine 运行器)
Name[zh]=打包 debUEngine 运行器)
StartupNotify=true
Hidden=false
NoDisplay=true
MimeType=application/vnd.android.package-archive

View File

@@ -1,15 +0,0 @@
[Desktop Entry]
Type=Application
Encoding=UTF-8
Categories=System;
Terminal=false
Exec=/usr/bin/uengine-runner -i %F
Icon=/opt/apps/uengine-runner/icon.png
Name=Install Or Uninstall APK(UEngine runner)
Comment=Install Or Uninstall APK(UEngine runner)
Comment[zh]=安装/卸载 APKUEngine 运行器)
Name[zh]=安装/卸载 APKUEngine 运行器)
StartupNotify=true
Hidden=false
NoDisplay=true
MimeType=application/vnd.android.package-archive

View File

@@ -1,12 +0,0 @@
[Desktop Entry]
Type=Application
Encoding=UTF-8
Categories=System;
Terminal=false
Exec=/usr/bin/uengine-apk-builder %F
Icon=/opt/apps/uengine-runner/icon.png
Name=uengine Apk Builder
Comment=UEngine Apk Builder
Comment[zh]=UEngine 应用打包器
Name[zh]=UEngine 应用打包器
StartupNotify=true

View File

@@ -1,13 +0,0 @@
[Desktop Entry]
Type=Application
Encoding=UTF-8
Categories=System;
Terminal=false
Exec=/usr/bin/uengine-runner
Icon=/opt/apps/uengine-runner/icon.png
Name=UEngine Runner
Comment=UEngine Runner
Comment[zh]=UEngine 运行器
Name[zh]=UEngine 运行器
StartupNotify=true
MimeType=

View File

@@ -1,153 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="256px" height="256px" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>APPS_安卓容器_bonund256pt</title>
<defs>
<filter x="-12.5%" y="-12.5%" width="125.0%" height="125.0%" filterUnits="objectBoundingBox" id="filter-1">
<feOffset dx="0" dy="4" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="6" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.197982681 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
<feMerge>
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
<feMergeNode in="SourceGraphic"></feMergeNode>
</feMerge>
</filter>
<linearGradient x1="58.6019309%" y1="88.1513471%" x2="68.1110327%" y2="11.6551043%" id="linearGradient-2">
<stop stop-color="#02DA67" offset="0%"></stop>
<stop stop-color="#8DF6D6" offset="100%"></stop>
</linearGradient>
<path d="M178.25009,95.8175981 C203.764636,95.8175981 224.183124,74.193939 224.183124,47.5198036 C224.183124,20.8456682 203.116891,-0.0263983843 178.25009,0.00161822517 C153.698836,-0.149640967 132.579574,20.8119281 132.579574,47.4860635 C132.579574,74.1601989 152.735544,95.8175981 178.25009,95.8175981 Z" id="path-3"></path>
<filter x="-8.7%" y="-8.3%" width="117.5%" height="116.7%" filterUnits="objectBoundingBox" id="filter-4">
<feGaussianBlur stdDeviation="6" in="SourceAlpha" result="shadowBlurInner1"></feGaussianBlur>
<feOffset dx="0" dy="4" in="shadowBlurInner1" result="shadowOffsetInner1"></feOffset>
<feComposite in="shadowOffsetInner1" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner1"></feComposite>
<feColorMatrix values="0 0 0 0 0.503096532 0 0 0 0 0.974696063 0 0 0 0 0.762013922 0 0 0 1 0" type="matrix" in="shadowInnerInner1"></feColorMatrix>
</filter>
<linearGradient x1="63.5172866%" y1="83.8734541%" x2="28.478366%" y2="6.65286784%" id="linearGradient-5">
<stop stop-color="#4796FE" offset="0%"></stop>
<stop stop-color="#44D9FF" offset="100%"></stop>
</linearGradient>
<ellipse id="path-6" cx="75.4782609" cy="64.0914576" rx="40.4347826" ry="42.2724698"></ellipse>
<filter x="-7.4%" y="-7.1%" width="114.8%" height="114.2%" filterUnits="objectBoundingBox" id="filter-7">
<feGaussianBlur stdDeviation="6" in="SourceAlpha" result="shadowBlurInner1"></feGaussianBlur>
<feOffset dx="0" dy="0" in="shadowBlurInner1" result="shadowOffsetInner1"></feOffset>
<feComposite in="shadowOffsetInner1" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner1"></feComposite>
<feColorMatrix values="0 0 0 0 0.658848459 0 0 0 0 0.76869955 0 0 0 0 0.994393611 0 0 0 1 0" type="matrix" in="shadowInnerInner1"></feColorMatrix>
</filter>
<linearGradient x1="50%" y1="31.0023874%" x2="50%" y2="95.9937487%" id="linearGradient-8">
<stop stop-color="#D0FF52" offset="0%"></stop>
<stop stop-color="#75EF07" offset="100%"></stop>
</linearGradient>
<path d="M173.78741,23.8356193 C174.592173,22.5497756 176.286945,22.1597832 177.572789,22.9645469 C178.97904,23.8446691 179.464805,25.6626835 178.684957,27.1269214 L178.684957,27.1269214 L167.998548,47.191447 C186.416883,60.0725236 198.886549,83.3414384 199.457775,110.056847 L199.478261,111.975079 C172.083327,116.233637 151.498347,118.362915 137.72332,118.362915 C122.744723,118.362915 100.199269,116.233637 70.0869565,111.975079 C70.0869565,84.4580366 82.7086518,60.380247 101.56625,47.1917402 L90.8802608,27.1269214 C90.1004123,25.6626835 90.5861775,23.8446691 91.9924283,22.9645469 C93.278272,22.1597832 94.9730442,22.5497756 95.7778079,23.8356193 C95.8117323,23.8898235 95.8437535,23.9451959 95.873813,24.0016352 L106.548653,44.0451766 C115.080463,39.2096532 124.660045,36.497433 134.782609,36.497433 C144.904955,36.497433 154.484343,39.2095367 163.016015,44.0448652 L173.691404,24.0016352 C173.721464,23.9451959 173.753485,23.8898235 173.78741,23.8356193 Z" id="path-9"></path>
<filter x="-32.5%" y="-31.3%" width="164.9%" height="187.7%" filterUnits="objectBoundingBox" id="filter-10">
<feOffset dx="0" dy="12" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="12" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0.565756196 0 0 0 0 0.617813774 0 0 0 0 0 0 0 0 0.5 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
</filter>
<path d="M108.824477,66.2818224 C104.358174,66.2818224 100.73752,70.0670283 100.73752,74.7363163 C100.73752,79.4056044 104.358174,83.1908103 108.824477,83.1908103 C113.290779,83.1908103 116.911433,79.4056044 116.911433,74.7363163 C116.911433,70.0670283 113.290779,66.2818224 108.824477,66.2818224 Z" id="path-11"></path>
<filter x="-24.7%" y="-23.7%" width="149.5%" height="147.3%" filterUnits="objectBoundingBox" id="filter-12">
<feGaussianBlur stdDeviation="2" in="SourceAlpha" result="shadowBlurInner1"></feGaussianBlur>
<feOffset dx="0" dy="4" in="shadowBlurInner1" result="shadowOffsetInner1"></feOffset>
<feComposite in="shadowOffsetInner1" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner1"></feComposite>
<feColorMatrix values="0 0 0 0 0.311563901 0 0 0 0 0.401805933 0 0 0 0 0.0617868498 0 0 0 1 0" type="matrix" in="shadowInnerInner1"></feColorMatrix>
</filter>
<path d="M162.73752,66.2818224 C158.271217,66.2818224 154.650564,70.0670283 154.650564,74.7363163 C154.650564,79.4056044 158.271217,83.1908103 162.73752,83.1908103 C167.203823,83.1908103 170.824477,79.4056044 170.824477,74.7363163 C170.824477,70.0670283 167.203823,66.2818224 162.73752,66.2818224 Z" id="path-13"></path>
<filter x="-24.7%" y="-23.7%" width="149.5%" height="147.3%" filterUnits="objectBoundingBox" id="filter-14">
<feGaussianBlur stdDeviation="2" in="SourceAlpha" result="shadowBlurInner1"></feGaussianBlur>
<feOffset dx="0" dy="4" in="shadowBlurInner1" result="shadowOffsetInner1"></feOffset>
<feComposite in="shadowOffsetInner1" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner1"></feComposite>
<feColorMatrix values="0 0 0 0 0.311563901 0 0 0 0 0.401805933 0 0 0 0 0.0617868498 0 0 0 1 0" type="matrix" in="shadowInnerInner1"></feColorMatrix>
</filter>
<linearGradient x1="50%" y1="15.1929094%" x2="43.5077077%" y2="91.2786664%" id="linearGradient-15">
<stop stop-color="#F59A36" offset="0%"></stop>
<stop stop-color="#FCCB6D" offset="100%"></stop>
</linearGradient>
<linearGradient x1="49.9821781%" y1="101.237754%" x2="49.9425633%" y2="5.03998902%" id="linearGradient-16">
<stop stop-color="#FFC87C" offset="0%"></stop>
<stop stop-color="#FD7A49" offset="100%"></stop>
</linearGradient>
<linearGradient x1="42.3143683%" y1="18.131572%" x2="69.2971087%" y2="74.6901955%" id="linearGradient-17">
<stop stop-color="#FFE066" offset="0%"></stop>
<stop stop-color="#FED862" offset="67.0339918%"></stop>
<stop stop-color="#FFC565" offset="100%"></stop>
</linearGradient>
<linearGradient x1="37.3123913%" y1="70.4187755%" x2="57.7534931%" y2="25.1271391%" id="linearGradient-18">
<stop stop-color="#FBC758" offset="0%"></stop>
<stop stop-color="#FCE188" offset="100%"></stop>
</linearGradient>
<polygon id="path-19" points="22.4854175 71.1352831 124 111.895386 108.52496 183.11999 -1.44464996e-12 131.484995"></polygon>
<filter x="-3.2%" y="-3.6%" width="112.9%" height="114.3%" filterUnits="objectBoundingBox" id="filter-20">
<feOffset dx="4" dy="4" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0.925490196 0 0 0 0 0.556862745 0 0 0 0 0.0980392157 0 0 0 1 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
</filter>
<linearGradient x1="38.069149%" y1="33.5367903%" x2="38.069149%" y2="98.1621294%" id="linearGradient-21">
<stop stop-color="#FE606D" offset="0%"></stop>
<stop stop-color="#FFA2A5" offset="100%"></stop>
</linearGradient>
<linearGradient x1="60.0817844%" y1="28.2456942%" x2="38.943371%" y2="75.9265148%" id="linearGradient-22">
<stop stop-color="#FEDB63" offset="0%"></stop>
<stop stop-color="#FEDD73" offset="100%"></stop>
</linearGradient>
<polygon id="path-23" points="139.297941 70.1779313 248 120.532936 229.699968 185.722682 124 144.005227"></polygon>
<filter x="-9.7%" y="-10.4%" width="112.9%" height="113.8%" filterUnits="objectBoundingBox" id="filter-24">
<feOffset dx="-4" dy="-4" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0.99518353 0 0 0 0 0.657959601 0 0 0 0 0.222035984 0 0 0 0.663358248 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
</filter>
<linearGradient x1="1.3884147%" y1="42.2427784%" x2="97.6287521%" y2="58.3575504%" id="linearGradient-25">
<stop stop-color="#FBDF84" offset="0%"></stop>
<stop stop-color="#FEF6DF" offset="20.1427895%"></stop>
<stop stop-color="#FFF8E2" offset="75.0762962%"></stop>
<stop stop-color="#FBDF84" offset="100%"></stop>
</linearGradient>
<linearGradient x1="0%" y1="57.7627211%" x2="100%" y2="42.7948807%" id="linearGradient-26">
<stop stop-color="#FDDD72" offset="0%"></stop>
<stop stop-color="#FEF6DF" offset="20.1427895%"></stop>
<stop stop-color="#FFF8E2" offset="75.0762962%"></stop>
<stop stop-color="#FEDD71" offset="100%"></stop>
</linearGradient>
</defs>
<g id="APPS_安卓容器_bonund256pt" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="编组-3备份-3" filter="url(#filter-1)" transform="translate(4.000000, 4.000000)">
<polygon id="路径-4" fill="#9F6B00" points="22.4854175 71.1352831 124 39.1781202 124 127.971838 42.4959276 162.72722"></polygon>
<polygon id="路径-4" fill="#A16B00" transform="translate(176.849984, 103.805249) scale(-1, 1) translate(-176.849984, -103.805249) " points="124 70.2467832 229.699968 39.246972 229.699968 126.857126 143.556296 168.36355"></polygon>
<g id="椭圆形">
<use fill="url(#linearGradient-2)" fill-rule="evenodd" xlink:href="#path-3"></use>
<use fill="black" fill-opacity="1" filter="url(#filter-4)" xlink:href="#path-3"></use>
</g>
<g id="椭圆形备份">
<use fill="url(#linearGradient-5)" fill-rule="evenodd" xlink:href="#path-6"></use>
<use fill="black" fill-opacity="1" filter="url(#filter-7)" xlink:href="#path-6"></use>
</g>
<g id="编组-2" transform="translate(125.653236, 69.872713) rotate(-9.000000) translate(-125.653236, -69.872713) translate(72.939312, 36.054737)"></g>
<g id="形状结合备份-3">
<use fill="black" fill-opacity="1" filter="url(#filter-10)" xlink:href="#path-9"></use>
<use fill="url(#linearGradient-8)" fill-rule="evenodd" xlink:href="#path-9"></use>
</g>
<g id="路径">
<use fill="#5B8C06" fill-rule="evenodd" xlink:href="#path-11"></use>
<use fill="black" fill-opacity="1" filter="url(#filter-12)" xlink:href="#path-11"></use>
</g>
<g id="路径备份">
<use fill="#5B8C06" fill-rule="evenodd" xlink:href="#path-13"></use>
<use fill="black" fill-opacity="1" filter="url(#filter-14)" xlink:href="#path-13"></use>
</g>
<polygon id="路径-4备份" fill="url(#linearGradient-15)" transform="translate(71.995299, 162.885973) scale(-1, 1) translate(-71.995299, -162.885973) " points="20.4301769 118.218419 124 77.7719458 124 192.941695 19.9905981 248"></polygon>
<line x1="123.560421" y1="245.912586" x2="124" y2="114.029217" id="路径-7备份" stroke="url(#linearGradient-16)" stroke-width="2.6125" stroke-linecap="round"></line>
<polygon id="路径-4备份" fill="url(#linearGradient-17)" points="124 114.029217 231.198465 75.4450395 231.198465 193.553624 124 248"></polygon>
<g id="路径-11">
<use fill="black" fill-opacity="1" filter="url(#filter-20)" xlink:href="#path-19"></use>
<use fill="url(#linearGradient-18)" fill-rule="evenodd" xlink:href="#path-19"></use>
</g>
<polygon id="路径-3" fill="url(#linearGradient-21)" points="177.791264 92.5327965 178.598476 220.244869 195.622586 211.671682 196.169593 85.4467628"></polygon>
<g id="路径-11备份" transform="translate(186.000000, 127.950307) scale(1, -1) translate(-186.000000, -127.950307) ">
<use fill="black" fill-opacity="1" filter="url(#filter-24)" xlink:href="#path-23"></use>
<use fill="url(#linearGradient-22)" fill-rule="evenodd" xlink:href="#path-23"></use>
</g>
<path d="M34.8824439,168.349874 L62.2463189,168.831259 C63.6537673,168.856018 64.7885425,169.99145 64.8124889,171.398912 L64.8191082,171.787962 C64.843653,173.230597 63.6940637,174.419981 62.2514286,174.444526 C62.2212993,174.445039 62.1911633,174.44503 62.1610343,174.4445 L34.7971594,173.963116 C33.389711,173.938356 32.2549357,172.802925 32.2309893,171.395463 L32.2243701,171.006413 C32.1998253,169.563778 33.3494146,168.374393 34.7920497,168.349848 C34.822179,168.349336 34.8523149,168.349344 34.8824439,168.349874 Z" id="矩形" fill="#F4E5C3" transform="translate(48.521739, 171.397187) rotate(23.000000) translate(-48.521739, -171.397187) "></path>
<path d="M35.6935587,176.218338 L46.7821941,176.425811 C48.1873409,176.452102 49.3199011,177.585307 49.3453919,178.990469 L49.3523188,179.372312 C49.3784889,180.814919 48.2302402,182.005597 46.7876337,182.031767 C46.7555504,182.032349 46.7234591,182.03234 46.6913762,182.03174 L35.6027408,181.824267 C34.197594,181.797976 33.0650338,180.664771 33.039543,179.259609 L33.0326161,178.877766 C33.006446,177.435159 34.1546947,176.24448 35.5973013,176.21831 C35.6293845,176.217728 35.6614758,176.217738 35.6935587,176.218338 Z" id="矩形备份" fill="#F3DA7B" transform="translate(41.192467, 179.125039) rotate(25.000000) translate(-41.192467, -179.125039) "></path>
<path d="M22.4854175,71.9306494 L123.120842,113.074543 L22.4854175,71.9306494 Z" id="路径-7" stroke="url(#linearGradient-25)" stroke-width="2.6125" stroke-linecap="round"></path>
<line x1="125.563916" y1="112.565642" x2="228.738156" y2="71.9125793" id="路径-7备份-2" stroke="url(#linearGradient-26)" stroke-width="2.6125" stroke-linecap="round"></line>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -1,153 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg width="256px" height="256px" viewBox="0 0 256 256" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>APPS_安卓容器_bonund256pt</title>
<defs>
<filter x="-12.5%" y="-12.5%" width="125.0%" height="125.0%" filterUnits="objectBoundingBox" id="filter-1">
<feOffset dx="0" dy="4" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="6" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.197982681 0" type="matrix" in="shadowBlurOuter1" result="shadowMatrixOuter1"></feColorMatrix>
<feMerge>
<feMergeNode in="shadowMatrixOuter1"></feMergeNode>
<feMergeNode in="SourceGraphic"></feMergeNode>
</feMerge>
</filter>
<linearGradient x1="58.6019309%" y1="88.1513471%" x2="68.1110327%" y2="11.6551043%" id="linearGradient-2">
<stop stop-color="#02DA67" offset="0%"></stop>
<stop stop-color="#8DF6D6" offset="100%"></stop>
</linearGradient>
<path d="M178.25009,95.8175981 C203.764636,95.8175981 224.183124,74.193939 224.183124,47.5198036 C224.183124,20.8456682 203.116891,-0.0263983843 178.25009,0.00161822517 C153.698836,-0.149640967 132.579574,20.8119281 132.579574,47.4860635 C132.579574,74.1601989 152.735544,95.8175981 178.25009,95.8175981 Z" id="path-3"></path>
<filter x="-8.7%" y="-8.3%" width="117.5%" height="116.7%" filterUnits="objectBoundingBox" id="filter-4">
<feGaussianBlur stdDeviation="6" in="SourceAlpha" result="shadowBlurInner1"></feGaussianBlur>
<feOffset dx="0" dy="4" in="shadowBlurInner1" result="shadowOffsetInner1"></feOffset>
<feComposite in="shadowOffsetInner1" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner1"></feComposite>
<feColorMatrix values="0 0 0 0 0.503096532 0 0 0 0 0.974696063 0 0 0 0 0.762013922 0 0 0 1 0" type="matrix" in="shadowInnerInner1"></feColorMatrix>
</filter>
<linearGradient x1="63.5172866%" y1="83.8734541%" x2="28.478366%" y2="6.65286784%" id="linearGradient-5">
<stop stop-color="#4796FE" offset="0%"></stop>
<stop stop-color="#44D9FF" offset="100%"></stop>
</linearGradient>
<ellipse id="path-6" cx="75.4782609" cy="64.0914576" rx="40.4347826" ry="42.2724698"></ellipse>
<filter x="-7.4%" y="-7.1%" width="114.8%" height="114.2%" filterUnits="objectBoundingBox" id="filter-7">
<feGaussianBlur stdDeviation="6" in="SourceAlpha" result="shadowBlurInner1"></feGaussianBlur>
<feOffset dx="0" dy="0" in="shadowBlurInner1" result="shadowOffsetInner1"></feOffset>
<feComposite in="shadowOffsetInner1" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner1"></feComposite>
<feColorMatrix values="0 0 0 0 0.658848459 0 0 0 0 0.76869955 0 0 0 0 0.994393611 0 0 0 1 0" type="matrix" in="shadowInnerInner1"></feColorMatrix>
</filter>
<linearGradient x1="50%" y1="31.0023874%" x2="50%" y2="95.9937487%" id="linearGradient-8">
<stop stop-color="#D0FF52" offset="0%"></stop>
<stop stop-color="#75EF07" offset="100%"></stop>
</linearGradient>
<path d="M173.78741,23.8356193 C174.592173,22.5497756 176.286945,22.1597832 177.572789,22.9645469 C178.97904,23.8446691 179.464805,25.6626835 178.684957,27.1269214 L178.684957,27.1269214 L167.998548,47.191447 C186.416883,60.0725236 198.886549,83.3414384 199.457775,110.056847 L199.478261,111.975079 C172.083327,116.233637 151.498347,118.362915 137.72332,118.362915 C122.744723,118.362915 100.199269,116.233637 70.0869565,111.975079 C70.0869565,84.4580366 82.7086518,60.380247 101.56625,47.1917402 L90.8802608,27.1269214 C90.1004123,25.6626835 90.5861775,23.8446691 91.9924283,22.9645469 C93.278272,22.1597832 94.9730442,22.5497756 95.7778079,23.8356193 C95.8117323,23.8898235 95.8437535,23.9451959 95.873813,24.0016352 L106.548653,44.0451766 C115.080463,39.2096532 124.660045,36.497433 134.782609,36.497433 C144.904955,36.497433 154.484343,39.2095367 163.016015,44.0448652 L173.691404,24.0016352 C173.721464,23.9451959 173.753485,23.8898235 173.78741,23.8356193 Z" id="path-9"></path>
<filter x="-32.5%" y="-31.3%" width="164.9%" height="187.7%" filterUnits="objectBoundingBox" id="filter-10">
<feOffset dx="0" dy="12" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="12" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0.565756196 0 0 0 0 0.617813774 0 0 0 0 0 0 0 0 0.5 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
</filter>
<path d="M108.824477,66.2818224 C104.358174,66.2818224 100.73752,70.0670283 100.73752,74.7363163 C100.73752,79.4056044 104.358174,83.1908103 108.824477,83.1908103 C113.290779,83.1908103 116.911433,79.4056044 116.911433,74.7363163 C116.911433,70.0670283 113.290779,66.2818224 108.824477,66.2818224 Z" id="path-11"></path>
<filter x="-24.7%" y="-23.7%" width="149.5%" height="147.3%" filterUnits="objectBoundingBox" id="filter-12">
<feGaussianBlur stdDeviation="2" in="SourceAlpha" result="shadowBlurInner1"></feGaussianBlur>
<feOffset dx="0" dy="4" in="shadowBlurInner1" result="shadowOffsetInner1"></feOffset>
<feComposite in="shadowOffsetInner1" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner1"></feComposite>
<feColorMatrix values="0 0 0 0 0.311563901 0 0 0 0 0.401805933 0 0 0 0 0.0617868498 0 0 0 1 0" type="matrix" in="shadowInnerInner1"></feColorMatrix>
</filter>
<path d="M162.73752,66.2818224 C158.271217,66.2818224 154.650564,70.0670283 154.650564,74.7363163 C154.650564,79.4056044 158.271217,83.1908103 162.73752,83.1908103 C167.203823,83.1908103 170.824477,79.4056044 170.824477,74.7363163 C170.824477,70.0670283 167.203823,66.2818224 162.73752,66.2818224 Z" id="path-13"></path>
<filter x="-24.7%" y="-23.7%" width="149.5%" height="147.3%" filterUnits="objectBoundingBox" id="filter-14">
<feGaussianBlur stdDeviation="2" in="SourceAlpha" result="shadowBlurInner1"></feGaussianBlur>
<feOffset dx="0" dy="4" in="shadowBlurInner1" result="shadowOffsetInner1"></feOffset>
<feComposite in="shadowOffsetInner1" in2="SourceAlpha" operator="arithmetic" k2="-1" k3="1" result="shadowInnerInner1"></feComposite>
<feColorMatrix values="0 0 0 0 0.311563901 0 0 0 0 0.401805933 0 0 0 0 0.0617868498 0 0 0 1 0" type="matrix" in="shadowInnerInner1"></feColorMatrix>
</filter>
<linearGradient x1="50%" y1="15.1929094%" x2="43.5077077%" y2="91.2786664%" id="linearGradient-15">
<stop stop-color="#F59A36" offset="0%"></stop>
<stop stop-color="#FCCB6D" offset="100%"></stop>
</linearGradient>
<linearGradient x1="49.9821781%" y1="101.237754%" x2="49.9425633%" y2="5.03998902%" id="linearGradient-16">
<stop stop-color="#FFC87C" offset="0%"></stop>
<stop stop-color="#FD7A49" offset="100%"></stop>
</linearGradient>
<linearGradient x1="42.3143683%" y1="18.131572%" x2="69.2971087%" y2="74.6901955%" id="linearGradient-17">
<stop stop-color="#FFE066" offset="0%"></stop>
<stop stop-color="#FED862" offset="67.0339918%"></stop>
<stop stop-color="#FFC565" offset="100%"></stop>
</linearGradient>
<linearGradient x1="37.3123913%" y1="70.4187755%" x2="57.7534931%" y2="25.1271391%" id="linearGradient-18">
<stop stop-color="#FBC758" offset="0%"></stop>
<stop stop-color="#FCE188" offset="100%"></stop>
</linearGradient>
<polygon id="path-19" points="22.4854175 71.1352831 124 111.895386 108.52496 183.11999 -1.44464996e-12 131.484995"></polygon>
<filter x="-3.2%" y="-3.6%" width="112.9%" height="114.3%" filterUnits="objectBoundingBox" id="filter-20">
<feOffset dx="4" dy="4" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0.925490196 0 0 0 0 0.556862745 0 0 0 0 0.0980392157 0 0 0 1 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
</filter>
<linearGradient x1="38.069149%" y1="33.5367903%" x2="38.069149%" y2="98.1621294%" id="linearGradient-21">
<stop stop-color="#FE606D" offset="0%"></stop>
<stop stop-color="#FFA2A5" offset="100%"></stop>
</linearGradient>
<linearGradient x1="60.0817844%" y1="28.2456942%" x2="38.943371%" y2="75.9265148%" id="linearGradient-22">
<stop stop-color="#FEDB63" offset="0%"></stop>
<stop stop-color="#FEDD73" offset="100%"></stop>
</linearGradient>
<polygon id="path-23" points="139.297941 70.1779313 248 120.532936 229.699968 185.722682 124 144.005227"></polygon>
<filter x="-9.7%" y="-10.4%" width="112.9%" height="113.8%" filterUnits="objectBoundingBox" id="filter-24">
<feOffset dx="-4" dy="-4" in="SourceAlpha" result="shadowOffsetOuter1"></feOffset>
<feGaussianBlur stdDeviation="2" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
<feColorMatrix values="0 0 0 0 0.99518353 0 0 0 0 0.657959601 0 0 0 0 0.222035984 0 0 0 0.663358248 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
</filter>
<linearGradient x1="1.3884147%" y1="42.2427784%" x2="97.6287521%" y2="58.3575504%" id="linearGradient-25">
<stop stop-color="#FBDF84" offset="0%"></stop>
<stop stop-color="#FEF6DF" offset="20.1427895%"></stop>
<stop stop-color="#FFF8E2" offset="75.0762962%"></stop>
<stop stop-color="#FBDF84" offset="100%"></stop>
</linearGradient>
<linearGradient x1="0%" y1="57.7627211%" x2="100%" y2="42.7948807%" id="linearGradient-26">
<stop stop-color="#FDDD72" offset="0%"></stop>
<stop stop-color="#FEF6DF" offset="20.1427895%"></stop>
<stop stop-color="#FFF8E2" offset="75.0762962%"></stop>
<stop stop-color="#FEDD71" offset="100%"></stop>
</linearGradient>
</defs>
<g id="APPS_安卓容器_bonund256pt" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
<g id="编组-3备份-3" filter="url(#filter-1)" transform="translate(4.000000, 4.000000)">
<polygon id="路径-4" fill="#9F6B00" points="22.4854175 71.1352831 124 39.1781202 124 127.971838 42.4959276 162.72722"></polygon>
<polygon id="路径-4" fill="#A16B00" transform="translate(176.849984, 103.805249) scale(-1, 1) translate(-176.849984, -103.805249) " points="124 70.2467832 229.699968 39.246972 229.699968 126.857126 143.556296 168.36355"></polygon>
<g id="椭圆形">
<use fill="url(#linearGradient-2)" fill-rule="evenodd" xlink:href="#path-3"></use>
<use fill="black" fill-opacity="1" filter="url(#filter-4)" xlink:href="#path-3"></use>
</g>
<g id="椭圆形备份">
<use fill="url(#linearGradient-5)" fill-rule="evenodd" xlink:href="#path-6"></use>
<use fill="black" fill-opacity="1" filter="url(#filter-7)" xlink:href="#path-6"></use>
</g>
<g id="编组-2" transform="translate(125.653236, 69.872713) rotate(-9.000000) translate(-125.653236, -69.872713) translate(72.939312, 36.054737)"></g>
<g id="形状结合备份-3">
<use fill="black" fill-opacity="1" filter="url(#filter-10)" xlink:href="#path-9"></use>
<use fill="url(#linearGradient-8)" fill-rule="evenodd" xlink:href="#path-9"></use>
</g>
<g id="路径">
<use fill="#5B8C06" fill-rule="evenodd" xlink:href="#path-11"></use>
<use fill="black" fill-opacity="1" filter="url(#filter-12)" xlink:href="#path-11"></use>
</g>
<g id="路径备份">
<use fill="#5B8C06" fill-rule="evenodd" xlink:href="#path-13"></use>
<use fill="black" fill-opacity="1" filter="url(#filter-14)" xlink:href="#path-13"></use>
</g>
<polygon id="路径-4备份" fill="url(#linearGradient-15)" transform="translate(71.995299, 162.885973) scale(-1, 1) translate(-71.995299, -162.885973) " points="20.4301769 118.218419 124 77.7719458 124 192.941695 19.9905981 248"></polygon>
<line x1="123.560421" y1="245.912586" x2="124" y2="114.029217" id="路径-7备份" stroke="url(#linearGradient-16)" stroke-width="2.6125" stroke-linecap="round"></line>
<polygon id="路径-4备份" fill="url(#linearGradient-17)" points="124 114.029217 231.198465 75.4450395 231.198465 193.553624 124 248"></polygon>
<g id="路径-11">
<use fill="black" fill-opacity="1" filter="url(#filter-20)" xlink:href="#path-19"></use>
<use fill="url(#linearGradient-18)" fill-rule="evenodd" xlink:href="#path-19"></use>
</g>
<polygon id="路径-3" fill="url(#linearGradient-21)" points="177.791264 92.5327965 178.598476 220.244869 195.622586 211.671682 196.169593 85.4467628"></polygon>
<g id="路径-11备份" transform="translate(186.000000, 127.950307) scale(1, -1) translate(-186.000000, -127.950307) ">
<use fill="black" fill-opacity="1" filter="url(#filter-24)" xlink:href="#path-23"></use>
<use fill="url(#linearGradient-22)" fill-rule="evenodd" xlink:href="#path-23"></use>
</g>
<path d="M34.8824439,168.349874 L62.2463189,168.831259 C63.6537673,168.856018 64.7885425,169.99145 64.8124889,171.398912 L64.8191082,171.787962 C64.843653,173.230597 63.6940637,174.419981 62.2514286,174.444526 C62.2212993,174.445039 62.1911633,174.44503 62.1610343,174.4445 L34.7971594,173.963116 C33.389711,173.938356 32.2549357,172.802925 32.2309893,171.395463 L32.2243701,171.006413 C32.1998253,169.563778 33.3494146,168.374393 34.7920497,168.349848 C34.822179,168.349336 34.8523149,168.349344 34.8824439,168.349874 Z" id="矩形" fill="#F4E5C3" transform="translate(48.521739, 171.397187) rotate(23.000000) translate(-48.521739, -171.397187) "></path>
<path d="M35.6935587,176.218338 L46.7821941,176.425811 C48.1873409,176.452102 49.3199011,177.585307 49.3453919,178.990469 L49.3523188,179.372312 C49.3784889,180.814919 48.2302402,182.005597 46.7876337,182.031767 C46.7555504,182.032349 46.7234591,182.03234 46.6913762,182.03174 L35.6027408,181.824267 C34.197594,181.797976 33.0650338,180.664771 33.039543,179.259609 L33.0326161,178.877766 C33.006446,177.435159 34.1546947,176.24448 35.5973013,176.21831 C35.6293845,176.217728 35.6614758,176.217738 35.6935587,176.218338 Z" id="矩形备份" fill="#F3DA7B" transform="translate(41.192467, 179.125039) rotate(25.000000) translate(-41.192467, -179.125039) "></path>
<path d="M22.4854175,71.9306494 L123.120842,113.074543 L22.4854175,71.9306494 Z" id="路径-7" stroke="url(#linearGradient-25)" stroke-width="2.6125" stroke-linecap="round"></path>
<line x1="125.563916" y1="112.565642" x2="228.738156" y2="71.9125793" id="路径-7备份-2" stroke="url(#linearGradient-26)" stroke-width="2.6125" stroke-linecap="round"></line>
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
<vendor>gfdgd xi</vendor>
<vendor_url>https://gitee.com/gfdgd-xi/uengine-runner/</vendor_url>
<action id="com.deepin.pkexec.apt">
<message>Authentication is required to Install or Reinstall Program</message>
<message xml:lang="zh_CN">安装或卸载软件需要输入密码</message>
<icon_name>preferences-system</icon_name>
<defaults>
<allow_any>no</allow_any>
<allow_inactive>no</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/apt</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>

View File

@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
<vendor>gfdgd xi</vendor>
<vendor_url>https://gitee.com/gfdgd-xi/uengine-runner/</vendor_url>
<action id="com.deepin.pkexec.bash">
<message>Authentication is required to Run Shell</message>
<message xml:lang="zh_CN">运行脚本需要输入密码</message>
<icon_name>preferences-system</icon_name>
<defaults>
<allow_any>no</allow_any>
<allow_inactive>no</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/bash</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>

View File

@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
<vendor>gfdgd xi</vendor>
<vendor_url>https://gitee.com/gfdgd-xi/uengine-runner/</vendor_url>
<action id="com.deepin.pkexec.env">
<message>Authentication is required to Run App</message>
<message xml:lang="zh_CN">使用对应的程序需要输入密码</message>
<icon_name>preferences-system</icon_name>
<defaults>
<allow_any>no</allow_any>
<allow_inactive>no</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/env</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>

View File

@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
<vendor>gfdgd xi</vendor>
<vendor_url>https://gitee.com/gfdgd-xi/uengine-runner/</vendor_url>
<action id="com.deepin.pkexec.installscrcpy">
<message>Authentication is required to Install Scrcpy</message>
<message xml:lang="zh_CN">安装 Scrcpy 需要输入密码</message>
<icon_name>preferences-system</icon_name>
<defaults>
<allow_any>no</allow_any>
<allow_inactive>no</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/tmp/uengine-runner/InstallScrcpy.sh</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>

View File

@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
<vendor>gfdgd xi</vendor>
<vendor_url>https://gitee.com/gfdgd-xi/uengine-runner/</vendor_url>
<action id="com.deepin.pkexec.rm">
<message>Authentication is required to Delete Files</message>
<message xml:lang="zh_CN">删除文件需要输入密码</message>
<icon_name>preferences-system</icon_name>
<defaults>
<allow_any>no</allow_any>
<allow_inactive>no</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/rm</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>

View File

@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
<vendor>gfdgd xi</vendor>
<vendor_url>https://github.com/gfdgd-xi/uengine-runner/</vendor_url>
<action id="com.deepin.pkexec.uengine-bridge">
<message>Authentication is required to Setting UEngine Internet Bridge</message>
<message xml:lang="zh_CN">设置 UEngine 桥接需要输入密码</message>
<icon_name>kbox</icon_name>
<defaults>
<allow_any>no</allow_any>
<allow_inactive>no</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/uengine-bridge.sh</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>

View File

@@ -1,21 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE policyconfig PUBLIC
"-//freedesktop//DTD PolicyKit Policy Configuration 1.0//EN"
"http://www.freedesktop.org/standards/PolicyKit/1/policyconfig.dtd">
<policyconfig>
<vendor>gfdgd xi</vendor>
<vendor_url>https://gitee.com/gfdgd-xi/uengine-runner/</vendor_url>
<action id="com.deepin.pkexec.uengine-session-launch-helper">
<message>Authentication is required to Change UEngine</message>
<message xml:lang="zh_CN">设置 UEngine 需要输入密码</message>
<icon_name>kbox</icon_name>
<defaults>
<allow_any>no</allow_any>
<allow_inactive>no</allow_inactive>
<allow_active>auth_admin_keep</allow_active>
</defaults>
<annotate key="org.freedesktop.policykit.exec.path">/usr/bin/uengine-session-launch-helper</annotate>
<annotate key="org.freedesktop.policykit.exec.allow_gui">true</annotate>
</action>
</policyconfig>

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 312 KiB

View File

@@ -1,118 +0,0 @@
import PIL.Image as Image
import PIL.ImageDraw as ImageDraw
import zipfile
import subprocess
import re
class getsavexml():
def savexml(self,apkFilePath,xmlpath,iconSavePath):
cmddumpid = "aapt dump xmltree "+ apkFilePath + " " + xmlpath
print(cmddumpid)
xmltree = subprocess.getoutput(cmddumpid)
xmls = xmltree.splitlines()
# find strs ,print next line
def FindStrs(lines,strs):
i=0
while i < len(lines):
if re.search(strs,lines[i]):
tmpstr = lines[i+1]
i += 1
Resultstr = tmpstr.split(":")[-1].split("=")[-1].split("0x")[-1]
return Resultstr
else:
i += 1
#从apk的信息中获取前后景图片的ID号
backimgid = FindStrs(xmls,"background")
foreimgid = FindStrs(xmls,"foreground")
print(backimgid)
print(foreimgid)
# 直接从apk resource文件获取前后两层图片路径及ID字符串
resource = subprocess.getoutput("aapt dump --values resources " + apkFilePath + "| grep -iE -A1 " + "\"" + backimgid + "|" + foreimgid + "\"")
resourcelines = resource.splitlines()
print(resourcelines)
# 从过滤出的字符串中获取所有相同ID的图片路径
def Findpicpath(lines,imgid):
i=0
Resultstr = []
while i < len(lines):
if re.search(imgid,lines[i]) and re.search("string8",lines[i+1]) :
print(lines[i+1])
tmpstr = lines[i+1].replace("\"","")
i += 1
Resultstr.append(tmpstr.split()[-1])
else:
i += 1
return Resultstr
#获取所有带前后图片ID的图片路径相同背景或者前景的图片ID但分辨率不一样
backimgs = Findpicpath(resourcelines,backimgid)
foreimgs = Findpicpath(resourcelines,foreimgid)
print(backimgs)
print(foreimgs)
#获取分辨率最高的图片路径
def getmaxsize(imgs):
j = 0
size=(0,0)
zipapk = zipfile.ZipFile(apkFilePath)
imgpath = ""
while j < len(imgs):
print(imgs[j])
img = Image.open(zipapk.open(imgs[j]))
print(imgs[j])
print(img.size)
if size < img.size:
size = img.size
imgpath = imgs[j]
j += 1
return imgpath
# 获取到文件列表后,进行比较分辨率,选取分辨率最高的张图片
iconbackpath = getmaxsize(backimgs)
iconforepath = getmaxsize(foreimgs)
print(iconbackpath + " " + iconforepath)
#从APK文件获取最终图片
zipapk = zipfile.ZipFile(apkFilePath)
iconback = zipapk.open(iconbackpath)
iconfore = zipapk.open(iconforepath)
# 叠加图片mask 设置前景为蒙版
iconbackimg = Image.open(iconback).convert("RGBA")
iconforeimg = Image.open(iconfore).convert("RGBA")
iconbackimg.paste(iconforeimg,mask=iconforeimg)
# 圆角图片函数,网上拷贝的
def circle_corner(img, radii): #把原图片变成圆角,这个函数是从网上找的,原址 https://www.pyget.cn/p/185266
"""
圆角处理
:param img: 源图象。
:param radii: 半径30。
:return: 返回一个圆角处理后的图象。
"""
# 画圆用于分离4个角
circle = Image.new('L', (radii * 2, radii * 2), 0) # 创建一个黑色背景的画布
draw = ImageDraw.Draw(circle)
draw.ellipse((0, 0, radii * 2, radii * 2), fill=255) # 画白色圆形
# 原图
img = img.convert("RGBA")
w, h = img.size
# 画4个角将整圆分离为4个部分
alpha = Image.new('L', img.size, 255)
alpha.paste(circle.crop((0, 0, radii, radii)), (0, 0)) # 左上角
alpha.paste(circle.crop((radii, 0, radii * 2, radii)), (w - radii, 0)) # 右上角
alpha.paste(circle.crop((radii, radii, radii * 2, radii * 2)), (w - radii, h - radii)) # 右下角
alpha.paste(circle.crop((0, radii, radii, radii * 2)), (0, h - radii)) # 左下角
# alpha.show()
img.putalpha(alpha) # 白色区域透明可见,黑色区域不可见
return img
# 圆角半径1/8边长,保存icon图片
w,h = iconbackimg.size
iconimg = circle_corner(iconbackimg,int(w/8))
iconimg.save(iconSavePath)

BIN
icon.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -1,137 +0,0 @@
{
"Url": [
"https://gitee.com/gfdgd-xi/uengine-runner",
"https://github.com/gfdgd-xi/uengine-runner"
],
"Version": "1.5.2",
"System": "Linuxdeepin/UOS",
"Tips": [
"更多可见https://gitee.com/gfdgd-xi/uengine-runner/wikis",
"",
"安装APK点浏览按钮选中需要安装的APK然后点安装按钮",
"",
"卸载APK在卸载APK下面的输入框内输入需要卸载的APK包名点卸载按钮如果无法获取包名可以通过浏览APK文件程序自动获取包名进行卸载。",
"",
"保存APK图标在安装APK下面的输入框浏览或输入APK的路径然后点击“保存图标”按钮选择保存位置即可",
"",
"重置删除UEngine数据点击菜单栏的“UEngine”的“清空UEngine数据”输入密码重启即可",
" 注意如果任何安卓一遍打不开多打开几遍应该就可以重新加载UEngine配置了",
"",
"打开UEngine应用列表打开系统已安装的应用列表安卓界面",
"",
"提示:",
"1、需要你有使用 root 权限的能力;",
"2、需要安装 UEngine 才能使用;",
"3、提取 apk 图标的 apk 路径以“安装 apk”那栏为准;",
"4、如果想要使用adb连接UEngine或其他手机请使用 1.2.0 以前的版本。如需连接UEngine请安装adb补丁"
],
"Update": [
"V1.5.2",
"※1、支持安装和构建带 Root 的 UEngine 的镜像",
"2、更新了反馈链接",
"",
"V1.5.1",
"※1、精简用户界面合并安装和卸载输入框和浏览按钮等",
"※2、修复安装以其的程序图标无法点击进入的问题deepin 社区版不存在此问题)",
"※3、支持在程序本体反馈问题",
"4、修复了菜单栏的部分显示问题",
"5、支持显示 apk 的部分信息",
"6、支持删除 UEngine 程序运行检查以及重新安装 UEngine 的功能",
"7、自带有跳过家庭版必须有指定包名才能运行程序限制的脚本",
"8、补回依赖包“adb”",
"",
"V1.5.0",
"※1、部分窗口支持英语",
"2、修复在英语状态下启动器图标名称异常的问题",
"",
"V1.4.3",
"※1、支持打包器打包的包名带前缀“uengine-dc”",
"※2、修复了两种情况可能导致程序卡住/出错无法继续运行的情况(配置文件夹不齐全和获取版本信息卡住两种情况)",
"※3、修改了 UEngine 打包器打包的应用包名可能有大写的情况",
"4、支持一键使用 Scrcpy 连接 UEngine①先安装 adb 破解补丁②请确保是使用snap安装的 Scrcpy【目前只支持 snap 安装的 Scrcpy 进行连接】)",
"5、支持右键打包 apk",
"",
"V1.4.2",
"※1、添加adb破解补丁用于可以让adb连接UEngine并支持adb的部分操作;",
"2、菜单栏的项目添加以及外观优化;",
"3、修复键盘映射无法添加新映射的问题并修改键盘映射启动方式;",
"4、把 uengine 改为 UEngine;",
"5、修改 pkexec 获取密码时显示的图标和文本;",
"6、添加了 UEngine 系统设置的快捷方式;",
"",
"V1.4.1",
"※1、初步支持键盘映射",
"2、修复新版包在发送uengine列表快捷方式时会提示找不到文件",
"",
"V1.4.0",
"※1、添加新版打包方式deepin打包方式;",
"※2、支持测试运行/创建/删除uengine图标;",
"※3、支持提取安装的apk;",
"※4、支持打包deb包;",
"5、修改菜单栏布局;",
"6、支持打开uengine数据目录和用户数据目录;",
"7、程序信息保存到json,非直接写入程序本体;",
"8、更多命令操作;",
"",
"V.1.3.2",
"※1、支持uengine数据重置;",
"※2、支持修改uengine网络桥接的启动状态;",
"※3、支持右键安装/卸载;",
"※4、支持启用或禁用uengine;",
"※5、修复打包问题不会出现“dpkg:警告:卸载spark-uengine-runner时目录/opt/apps/uengine-runner非空因而不会删除该目录”的错误;",
"",
"V1.3.1",
"※1、修复打包问题防止部分用户安装出错的问题;",
"※2、修复了程序无法提取图标时可以提取默认图标使用;",
"",
"V1.3.0",
"※1、修改了界面布局;",
"※2、修复大多数新安装普通用户的路图标及启动菜单文件路径不存在导致安装APK报错的bugs;",
"3、删除少量冗余代码调整代码顺序;",
"4、支持提取apk图标。",
"",
"V1.2.3",
"1、调整部分控件名称",
"2、调整界面布局及界面风格",
"",
"V1.2.2",
"1、对程序错误的显示更加人性化",
"2、对 icon 的获取方式进行了升级;",
"3、增加了注释、删除部分冗余代码。",
"",
"V1.2.1",
"※1、进行了安装方式的修改不使用 adb修复原无法安装和卸载的问题",
"2、进行了部分优化",
"3、进行了功能缩水",
"4、修复 deb 打包错误。",
"",
"V1.2.0",
"1、支持安装自动添加快捷方式、卸载删除快捷方式",
"2、支持使用包名或 APK 文件卸载程序;",
"3、支持查看安装的所有包名",
"4、进行了部分优化",
"",
"V1.1.0",
"暂无数据",
"",
"V1.0.0",
"暂无数据"
],
"Use": [
"1、UEngine相关软件包基于anbox开发",
"2、Python3",
"3、tkintertkinter.tk、ttkthemes、tkinter.messagebox、tkinter.simpledialog、tkinter.filedialog 和 tkinter.ttk",
"4、aapt",
"5、dpkg",
"6、tree",
"7、mkdir",
"8、echo",
"9、chmod",
"10、adb",
"11、deepin 终端",
"……"
],
"Time": "2021年08月30日",
"Contribute": ["gfdgd xi<3025613752@qq.com>",
"actionchen<917981399@qq.com>"]
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -1,21 +0,0 @@
{
"Url": [
"https://gitee.com/gfdgd-xi/uengine-runner",
"https://github.com/gfdgd-xi/uengine-runner"
],
"Version": "1.0.0 For arm64",
"System": "Linuxdeepin/UOS",
"Tips": [
"提示:",
""
],
"Update": [
""
],
"Use": [
""
],
"Time": "2021年10月17日",
"Contribute": ["gfdgd xi<3025613752@qq.com>",
"actionchen<917981399@qq.com>"]
}

View File

@@ -1,113 +0,0 @@
#!/usr/bin/env python3
import os
import json
import base64
import requests
import ttkthemes
import traceback
import webbrowser
import tkinter as tk
import tkinter.ttk as ttk
import tkinter.messagebox as messagebox
import urllib.parse as parse
# 读取文本文档
def readtxt(path: "路径")->"读取文本文档":
f = open(path, "r") # 设置文件对象
str = f.read() # 获取内容
f.close() # 关闭文本对象
return str # 返回结果
def Update(name, stars, contact, things, version):
# post 内容
data = {
"Name": name,
"Starts": stars,
"Contact": contact,
"Things": things,
"Version": version
}
try:
messagebox.showinfo(message=requests.post(parse.unquote(base64.b64decode("aHR0cCUzQS8vZ2ZkZ2R4aS5xaWNwLnZpcC91ZW5naW5lL2J1Zy91cGxvYWQucGhw").decode("utf-8")), data=data).text)
except:
traceback.print_exc()
messagebox.showerror(title="错误", message="服务器疑似出现错误,可以进行以下尝试:①多尝试几次;②使用其他反馈途径\n错误信息{}".format(traceback.format_exc()))
def UpdateButtonClick():
#判断是否为空
if nameThings.get() == "" or starValue.get() == "" or contactThings.get() == "" or updateThings.get(1.0, "end").replace(" ", "").replace("\n", "") == "":
messagebox.showerror(title="错误", message="反馈信息未填写完整!")
return
Update(name=nameThings.get(), stars=starValue.get(), contact=contactThings.get(), things=updateThings.get(1.0, "end"), version=version)
def OpenGiteeIssues():
webbrowser.open_new_tab("https://gitee.com/gfdgd-xi/uengine-runner/issues")
def OpenGithubIssues():
webbrowser.open_new_tab("https://github.com/gfdgd-xi/uengine-runner/issues")
###########################
# 程序信息
###########################
iconPath = "{}/icon.png".format(os.path.split(os.path.realpath(__file__))[0])
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
information = json.loads(readtxt(programPath + "/information.json"))
version = information["Version"]
###########################
# 窗口创建
###########################
window = tk.Tk()
win = ttk.Frame()
starValue = tk.StringVar()
starValue.set("5分")
name = ttk.Label(win, text="你的昵称:")
nameThings = ttk.Entry(win, width=25)
contact = ttk.Label(win, text="联系方式:")
contactThings = ttk.Entry(win, width=25)
star = ttk.Label(win, text="评分:")
starMenu = ttk.OptionMenu(win, starValue, "5分", "5分", "4分", "3分", "2分", "1分")
updateThingsTips = ttk.Label(win, text="反馈内容(支持 Markdown 格式):")
updateThings = tk.Text(win)
otherUpload = ttk.Frame(win)
# 所属内容
tips = ttk.Label(otherUpload, text="如果无法正常反馈,可以用其他方式反馈:")
giteeButton = ttk.Button(otherUpload, text="Gitee Issues", command=OpenGiteeIssues)
githubButton = ttk.Button(otherUpload, text="Github Issues", command=OpenGithubIssues)
updateButton = ttk.Button(win, text="提交", command=UpdateButtonClick)
# 设置窗口
style = ttkthemes.ThemedStyle(window)
style.set_theme("breeze")
window.title("KBox 运行器 {} 问题/建议反馈".format(version))
window.resizable(0, 0)
window.iconphoto(False, tk.PhotoImage(file=iconPath))
tips.grid(row=0, column=0)
giteeButton.grid(row=0, column=1)
githubButton.grid(row=0, column=2)
name.grid(row=0, column=0)
nameThings.grid(row=0, column=1)
contact.grid(row=0, column=2)
contactThings.grid(row=0, column=3)
star.grid(row=0, column=4)
starMenu.grid(row=0, column=5)
updateThingsTips.grid(row=1, column=0, columnspan=2)
updateThings.grid(row=2, column=0, columnspan=6)
otherUpload.grid(row=3, column=0, columnspan=4)
updateButton.grid(row=3, column=5)
win.pack(expand="yes", fill="both")
window.mainloop()

View File

@@ -1,482 +0,0 @@
#!/usr/bin/env python3
# 使用系统默认的 python3 运行
###########################################################################################
# 作者gfdgd xi<3025613752@qq.com>
# 版本1.5.2
# 更新时间2021年10月16日国庆了
# 感谢kbox 和 UOS
# 基于 Python3 的 tkinter 构建
# 更新gfdgd xi<3025613752@qq.com>、actionchen<917981399@qq.com>
###########################################################################################
#################
# 引入所需的库
#################
import os
import sys
import time
import json
import shutil
import zipfile
import traceback
import threading
import ttkthemes
import webbrowser
import subprocess
import tkinter as tk
import tkinter.ttk as ttk
import tkinter.messagebox as messagebox
import tkinter.filedialog as filedialog
temppath=""
def FindApk()->"浏览窗口":
path = filedialog.askopenfilename(title="选择 Apk", filetypes=[("APK 文件", "*.apk"), ("所有文件", "*.*")], initialdir=json.loads(readtxt(get_home() + "/.config/uengine-runner/FindApk.json"))["path"])
global temppath
temppath = path
print("apk path is find:" + path)
if path != "" and path != "()":
try:
ComboInstallPath.set(path)
write_txt(get_home() + "/.config/kbox-runner/FindApk.json", json.dumps({"path": os.path.dirname(path)})) # 写入配置文件
except:
pass
# 安装应用
def InstallApk(path: "apk 路径", quit: "是否静默安装" = False):
try:
print("start install apk")
global findApkHistory
commandReturn = GetCommandReturn("pkexec android-appmgr.sh install '{}'".format(path))
print(commandReturn)
print("start install apk1")
print("\nprint install complete")
if quit:
print(commandReturn)
return
messagebox.showinfo(title="提示", message="操作完成!")
findApkHistory.append(ComboInstallPath.get())
ComboInstallPath['value'] = findApkHistory
write_txt(get_home() + "/.config/kbox-runner/FindApkHistory.json", str(json.dumps(ListToDictionary(findApkHistory)))) # 将历史记录的数组转换为字典并写入
except:
traceback.print_exc()
messagebox.showerror(title="错误", message=traceback.format_exc())
DisabledAndEnbled(False)
# 安装按钮事件
def Button3Install():
if ComboInstallPath.get() is "" or not os.path.exists(ComboInstallPath.get()):
messagebox.showerror(title="提示", message="信息没有填写完整或错误,无法继续安装 APK")
return
DisabledAndEnbled(True)
threading.Thread(target=InstallApk, args=(ComboInstallPath.get(),)).start()
# 禁用或启动所有控件
def DisabledAndEnbled(choose: "启动或者禁用")->"禁用或启动所有控件":
userChoose = {True: tk.DISABLED, False: tk.NORMAL}
a = userChoose[choose]
ComboInstallPath.configure(state=a)
BtnFindApk.configure(state=a)
BtnInstall.configure(state=a)
BtnShowUengineApp.configure(state=a)
LabApkPath.configure(state=a)
# 需引入 subprocess
# 运行系统命令并获取返回值
def GetCommandReturn(cmd: "命令")->"运行系统命令并获取返回值":
# cmd 是要获取输出的命令
return subprocess.getoutput(cmd)
def GetSystemVersion():
systemInformation = readtxt("/etc/os-release")
for systemInformation in systemInformation.split('\n'):
if "PRETTY_NAME=" in systemInformation:
return systemInformation.replace("PRETTY_NAME=", "").replace('"', '')
# 打开所有窗口事件
def Button5Click():
threading.Thread(target=OpenUengineProgramList).start()
# 打开“uengine 所有程序列表”
def OpenUengineProgramList()->"打开“uengine 所有程序列表”":
os.system("uengine launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity")
# 打开程序官网
def OpenProgramURL()->"打开程序官网":
webbrowser.open_new_tab(programUrl)
# 重启本应用程序
def ReStartProgram()->"重启本应用程序":
python = sys.executable
os.execl(python, python, * sys.argv)
# 清理历史记录
def CleanProgramHistory()->"清理历史记录":
try:
if messagebox.askokcancel(title="警告", message="删除后将无法恢复,你确定吗?\n删除后软件将会自动重启。"):
shutil.rmtree(get_home() + "/.config/kbox-runner")
ReStartProgram()
except:
traceback.print_exc()
messagebox.showerror(title="错误", message=traceback.format_exc())
# 获取用户主目录
def get_home()->"获取用户主目录":
return os.path.expanduser('~')
# 获取用户桌面目录
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 ListToDictionary(list: "需要转换的数组")->"数组转字典":
dictionary = {}
for i in range(len(list)):
dictionary[i] = list[i]
return dictionary
# 读取文本文档
def readtxt(path: "路径")->"读取文本文档":
f = open(path, "r") # 设置文件对象
str = f.read() # 获取内容
f.close() # 关闭文本对象
return str # 返回结果
# 写入文本文档
def write_txt(path: "路径", things: "内容")->"写入文本文档":
TxtDir = os.path.dirname(path)
print(TxtDir)
if not os.path.exists(TxtDir):
os.makedirs(TxtDir,exist_ok=True)
file = open(path, 'w', encoding='UTF-8') # 设置文件对象
file.write(things) # 写入文本
file.close() # 关闭文本对象
# 获取 aapt 的所有信息
def GetApkInformation(apkFilePath: "apk 所在路径")->"获取 aapt 的所有信息":
return GetCommandReturn("aapt dump badging '{}'".format(apkFilePath))
# 获取 apk Activity
def GetApkActivityName(apkFilePath: "apk 所在路径")->"获取 apk Activity":
info = GetApkInformation(apkFilePath)
for line in info.split('\n'):
if "launchable-activity" in line:
line = line[0: line.index("label='")]
line = line.replace("launchable-activity: ", "")
line = line.replace("'", "")
line = line.replace(" ", "")
line = line.replace("name=", "")
line = line.replace("label=", "")
line = line.replace("icon=", "")
return line
# 获取 apk 包名
def GetApkPackageName(apkFilePath: "apk 所在路径")->"获取 apk 包名":
info = GetApkInformation(apkFilePath)
for line in info.split('\n'):
if "package:" in line:
line = line[0: line.index("versionCode='")]
line = line.replace("package:", "")
line = line.replace("name=", "")
line = line.replace("'", "")
line = line.replace(" ", "")
return line
# 获取软件的中文名称
def GetApkChineseLabel(apkFilePath)->"获取软件的中文名称":
info = GetApkInformation(apkFilePath)
for line in info.split('\n'):
if "application-label:" in line:
line = line.replace("application-label:", "")
line = line.replace("'", "")
return line
# 保存apk图标
def SaveApkIcon(apkFilePath, iconSavePath)->"保存 apk 文件的图标":
try:
info = GetApkInformation(apkFilePath)
for line in info.split('\n'):
if "application:" in line:
xmlpath = line.split(":")[-1].split()[-1].split("=")[-1].replace("'","")
if xmlpath.endswith('.xml'):
xmlsave = getsavexml()
print(xmlpath)
xmlsave.savexml(apkFilePath,xmlpath,iconSavePath)
else:
zip = zipfile.ZipFile(apkFilePath)
iconData = zip.read(xmlpath)
with open(iconSavePath, 'w+b') as saveIconFile:
saveIconFile.write(iconData)
except:
traceback.print_exc()
print("Error, show defult icon")
shutil.copy(programPath + "/defult.png", iconSavePath)
# 获取用户主目录
def get_home()->"获取用户主目录":
return os.path.expanduser('~')
def UengineRunnerBugUpload():
threading.Thread(target=os.system, args=[programPath + "/kbox-runner-update-bug"]).start()
def GetApkVersion(apkFilePath):
info = GetApkInformation(apkFilePath)
for line in info.split('\n'):
if "package:" in line:
if "compileSdkVersion='" in line:
line = line.replace(line[line.index("compileSdkVersion='"): -1], "")
if "platform" in line:
line = line.replace(line[line.index("platform"): -1], "")
line = line.replace(line[0: line.index("versionName='")], "")
line = line.replace("versionName='", "")
line = line.replace("'", "")
line = line.replace(" ", "")
return line
###########################
# 程序信息
###########################
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
information = json.loads(readtxt(programPath + "/information.json"))
programUrl = information["Url"][0]
version = information["Version"]
goodRunSystem = information["System"]
aaptVersion = GetCommandReturn("aapt version")
SystemVersion = GetSystemVersion()
about = '''介绍 :一个基于 Python3 的 tkinter 制作的 KBox 运行器在新版本Deepin/UOS发布后可以在应用商店安装部分官方已适配的安卓应用对爱好者来说不能自己安装APK软件包始终差点意思本程序可以为UOS上的KBox安卓运行环境安装自定义APK软件包并能发送安装的APK包启动菜单到桌面或系统菜单。
版本 {}
适用平台 {}
Tk 版本 :{}
程序官网 {}
系统版本 :{}
©2021-{}'''.format(version, goodRunSystem, tk.TkVersion, programUrl, SystemVersion, time.strftime("%Y"))
tips = "\n".join(information["Tips"])
updateThingsString = "\n".join(information["Update"])
title = "KBox 安装器 {}".format(version)
updateTime = information["Time"]
updateThings = "{} 更新内容:\n{}\n更新时间:{}".format(version, updateThingsString, updateTime, time.strftime("%Y"))
iconPath = "{}/icon.png".format(os.path.split(os.path.realpath(__file__))[0])
desktop = programPath + "/UengineAndroidProgramList.desktop"
desktopName = "UengineAndroidProgramList.desktop"
contribute = "\n".join(information["Contribute"])
###########################
# 加载配置
###########################
if not os.path.exists("{}/.local/share/applications/uengine/".format(get_home())):
os.makedirs("{}/.local/share/applications/uengine/".format(get_home()))
if not os.path.exists(get_home() + "/.config/uengine-runner"): # 如果没有配置文件夹
os.makedirs(get_home() + "/.config/uengine-runner") # 创建配置文件夹
if not os.path.exists(get_home() + "/.config/uengine-runner/FindApkHistory.json"): # 如果没有配置文件
write_txt(get_home() + "/.config/uengine-runner/FindApkHistory.json", json.dumps({})) # 创建配置文件
if not os.path.exists(get_home() + "/.config/uengine-runner/FindApkNameHistory.json"): # 如果没有配置文件
write_txt(get_home() + "/.config/uengine-runner/FindApkNameHistory.json", json.dumps({})) # 创建配置文件
if not os.path.exists(get_home() + "/.config/uengine-runner/FindApkActivityHistory.json"): # 如果没有配置文件
write_txt(get_home() + "/.config/uengine-runner/FindApkActivityHistory.json", json.dumps({})) # 创建配置文件
if not os.path.exists(get_home() + "/.config/uengine-runner/FindUninstallApkHistory.json"): # 如果没有配置文件
write_txt(get_home() + "/.config/uengine-runner/FindUninstallApkHistory.json", json.dumps({})) # 创建配置文件
if not os.path.exists(get_home() + "/.config/uengine-runner/FindApkName.json"): # 如果没有配置文件
write_txt(get_home() + "/.config/uengine-runner/FindApkName.json", json.dumps({"path": "~"})) # 写入(创建)一个配置文件
if not os.path.exists(get_home() + "/.config/uengine-runner/FindApk.json"): # 如果没有配置文件
write_txt(get_home() + "/.config/uengine-runner/FindApk.json", json.dumps({"path": "~"})) # 写入(创建)一个配置文件
if not os.path.exists(get_home() + "/.config/uengine-runner/FindUninstallApk.json"): # 如果没有配置文件
write_txt(get_home() + "/.config/uengine-runner/FindUninstallApk.json", json.dumps({"path": "~"})) # 写入(创建)一个配置文件
if not os.path.exists(get_home() + "/.config/uengine-runner/SaveApkIcon.json"): # 如果没有配置文件
write_txt(get_home() + "/.config/uengine-runner/SaveApkIcon.json", json.dumps({"path": "~"})) # 写入(创建)一个配置文件
if not os.path.exists(get_home() + "/.config/uengine-runner/SaveApk.json"): # 如果没有配置文件
write_txt(get_home() + "/.config/uengine-runner/SaveApk.json", json.dumps({"path": "~"})) # 写入(创建)一个配置文件
###########################
# 设置变量
###########################
findApkHistory = list(json.loads(readtxt(get_home() + "/.config/uengine-runner/FindApkHistory.json")).values())
findApkNameHistory = list(json.loads(readtxt(get_home() + "/.config/uengine-runner/FindApkNameHistory.json")).values())
findApkActivityHistory = list(json.loads(readtxt(get_home() + "/.config/uengine-runner/FindApkActivityHistory.json")).values())
# add sub window
#添加窗口开启关闭开关,防止重复开启
windowflag = "close"
def showhelp():
#define window and frame and button label
#
global windowflag
if windowflag == "close":
helpwindow=tk.Toplevel()
helpwindow.resizable(0, 0)
helpwindow.title("帮助")
helpwindow.iconphoto(False, tk.PhotoImage(file=iconPath))
# get screen width and height
screen_width = helpwindow.winfo_screenwidth()
screen_height = helpwindow.winfo_screenheight()
# calculate position x and y coordinates 假设主窗口大小固定 570x236像素 ,设置窗口位置为屏幕中心。
winwith=550
winhigh=700
x = (screen_width/2) - (winwith/2)
y = (screen_height/2) - (winhigh/2)
helpwindow.geometry("550x700"+"+{:.0f}+{:.0f}".format(x, y))
style = ttkthemes.ThemedStyle(helpwindow)
style.set_theme("breeze")
Frmroot=ttk.Frame(helpwindow)
FrmMenu = ttk.Frame(Frmroot)
FrmText = ttk.Frame(Frmroot)
LabFrmText=ttk.LabelFrame(FrmText,text="帮助",height=800,borderwidth=3)
HelpStr = tk.StringVar()
HelpStr.set(tips)
LabText = ttk.Label(LabFrmText, textvariable=HelpStr,width=55)
LabText.config(wraplength=350)
def on_closing():
global windowflag
windowflag = "close"
print(windowflag)
helpwindow.destroy()
# define button func
def ChgLog():
HelpStr.set(updateThingsString)
def ChgAbout():
HelpStr.set(about)
def ChgCon():
HelpStr.set(contribute)
def ChgTips():
HelpStr.set(tips)
LabText.config(wraplength=350)
BtnReadme = ttk.Button(FrmMenu, text="使用说明",width=14,command=ChgTips)
BtnLog = ttk.Button(FrmMenu, text="更新内容",width=14,command=ChgLog)
BtnGongxian = ttk.Button(FrmMenu, text="有贡献的开发者",width=14,command=ChgCon)
BtnAbout = ttk.Button(FrmMenu, text="关于",width=14,command=ChgAbout)
#layout
FrmMenu.grid(row=0,column=0,sticky=tk.NW)
BtnReadme.grid(row=0,column=0,sticky=tk.NW,padx=3)
BtnLog.grid(row=1,column=0,sticky=tk.NW,padx=3)
BtnGongxian.grid(row=3,column=0,sticky=tk.NW,padx=3)
BtnAbout.grid(row=4,column=0,sticky=tk.NW,padx=3)
FrmText.grid(row=0,column=1,sticky=tk.NW)
LabFrmText.grid(row=0,column=0,sticky=tk.NW,padx=3,pady=3)
LabText.grid(row=0,column=0,sticky=tk.NW)
Frmroot.pack()
windowflag = "open"
print(windowflag)
#helpwindow.mainloop()
helpwindow.protocol("WM_DELETE_WINDOW", on_closing)
###########################
# 窗口创建
###########################
win = tk.Tk() # 创建窗口
# 设置窗口
style = ttkthemes.ThemedStyle(win)
style.set_theme("breeze")
window = ttk.Frame(win)
win.title(title)
win.resizable(0, 0)
win.iconphoto(False, tk.PhotoImage(file=iconPath))
# get screen width and height
screen_width = win.winfo_screenwidth()
screen_height = win.winfo_screenheight()
# calculate position x and y coordinates 假设主窗口大小固定 570x236像素 ,设置窗口位置为屏幕中心。
winwith=570
winhigh=236
x = (screen_width/2) - (winwith/2)
y = (screen_height/2) - (winhigh/2)
win.geometry(""+"+{:.0f}+{:.0f}".format(x, y))
# 创建控件
FrmInstall = ttk.Frame(window)
LabApkPath = ttk.Label(window, text="安装 APK")
ComboInstallPath = ttk.Combobox(window, width=50)
BtnFindApk = ttk.Button(FrmInstall, text="浏览", command=FindApk)
BtnInstall = ttk.Button(FrmInstall, text="安装", command=Button3Install)
BtnShowUengineApp = ttk.Button(window, text="打开程序列表", command=Button5Click)
# 设置菜单栏
menu = tk.Menu(window, background="white")
programmenu = tk.Menu(menu, tearoff=0, background="white") # 设置“程序”菜单栏
help = tk.Menu(menu, tearoff=0, background="white") # 设置“帮助”菜单栏
menu.add_cascade(label="程序", menu=programmenu)
menu.add_cascade(label="关于", menu=help)
programmenu.add_command(label="清空软件历史记录", command=CleanProgramHistory)
programmenu.add_separator() # 设置分界线
programmenu.add_command(label="退出程序", command=window.quit) # 设置“退出程序”
help.add_command(label="程序官网", command=OpenProgramURL) # 设置“程序官网”项
help.add_command(label="反馈程序问题和建议", command=UengineRunnerBugUpload) # 设置“程序官网”项
help.add_command(label="关于", command=showhelp) # 设置“关于这个程序”项
menu.configure(activebackground="dodgerblue")
help.configure(activebackground="dodgerblue")
programmenu.configure(activebackground="dodgerblue")
# 设置控件
#ComboUninstallPath['value'] = fineUninstallApkHistory
ComboInstallPath['value'] = findApkHistory
try:
if sys.argv[1] == "-i":
ComboInstallPath.set(sys.argv[2])
print("Install Path: " + sys.argv[2])
elif sys.argv[1] == "-u":
#ComboUninstallPath.set(sys.argv[2])
ComboInstallPath.set(sys.argv[2])
print("Unstall Path: " + sys.argv[2])
else:
print("Command Format Error")
except:
print("Not Command Or Command Format Error")
# 显示控件
win.config(menu=menu) # 显示菜单栏
LabApkPath.grid(row=0, column=0,sticky= tk.W,padx=3)
ComboInstallPath.grid(row=1, column=0,padx=3)
FrmInstall.grid(row=1, column=1,padx=3, rowspan=1)
BtnFindApk.grid(row=0, column=0)
BtnInstall.grid(row=0, column=1)
BtnShowUengineApp.grid(row=2, column=0,sticky= tk.W,padx=3,pady=2)
window.pack()
win.mainloop()

1277
main.py

File diff suppressed because it is too large Load Diff

26
main.sh Normal file
View File

@@ -0,0 +1,26 @@
#!/bin/bash
#########################################################################
# 作者gfdgd xi、为什么您不喜欢熊出没和阿布
# 版本1.8.1
#########################################################################
#################
# 引入所需的库
#################
echo 'mmmmm '
echo '# "# m m m mm m mm mmm m mm '
echo '#mmmm" # # #" # #" # #" # #" "'
echo '# "m # # # # # # #"""" # '
echo '# " "mm"# # # # # "#mm" # '
echo
echo
while [ true ]
do
echo "请输入 APK 路径或将 APK 文件拖入此处"
read path
if [ ! -d $path ]; then
echo APK路径不存在请重新输入
echo
continue
fi
uengine install --apk='$path'
done

View File

@@ -1,11 +0,0 @@
Package: com.gitee.uengine.runner.spark
Source: com.gitee.uengine.runner.spark
Version: 1.5.2
Architecture: all
Maintainer: gfdgd xi <3025613752@qq.com>, actionchen<917981399@qq.com>
Depends: deepin-elf-verify (>= 0.0.16.7-1), python3, python3-tk, python3-pip, aapt, uengine, python3-setuptools, deepin-terminal, curl, python3-pil, python3-pil.imagetk, python3-requests, adb, translate-shell, python3-xlib
Section: utils
Priority: optional
Conflicts: spark-uengine-runner, spark-uengine-apk-builder
Homepage: [https://gitee.com/gfdgd-xi/uengine-runner, https://github.com/gfdgd-xi/uengine-runner]
Description: UEngine Runner for deepin and UOS

View File

@@ -1,22 +0,0 @@
#!/bin/sh
# 使用 pip 安装所需库
python3 -m pip install --upgrade ttkthemes -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
python3 -m pip install --upgrade requests -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
python3 -m pip install --upgrade pyautogui -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
python3 -m pip install --upgrade keyboard -i http://mirrors.aliyun.com/pypi/simple/ --trusted-host mirrors.aliyun.com
# 建立软链接
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner /usr/bin/uengine-runner
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-apk-builder /usr/bin/uengine-apk-builder
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-app-uninstall /usr/bin/uengine-app-uninstall
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-app-install /usr/bin/uengine-app-install
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-clean /usr/bin/uengine-clean
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner-about /usr/bin/uengine-runner-about
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-keyboard /usr/bin/uengine-keyboard
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-useadb /usr/bin/uengine-useadb
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner-launch.sh /usr/bin/uengine-runner-launch.sh
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/uengine-runner-update-bug /usr/bin/uengine-runner-update-bug
ln -s /opt/apps/com.gitee.uengine.runner.spark/files/root-uengine /usr/bin/uengine-root
# 刷新图标缓存
#gtk-update-icon-cache /usr/share/icons/bloom
# 向服务器返回安装数加1不显示内容且忽略错误
curl http://120.25.153.144/uengine-runner/Install.php?Version=1.5.2 -s > /dev/null | true

View File

@@ -1,14 +0,0 @@
#!/bin/sh
# 删除软链接
rm -fv /usr/bin/uengine-runner
rm -fv /usr/bin/uengine-apk-builder
rm -fv /usr/bin/uengine-app-uninstall
rm -fv /usr/bin/uengine-app-install
rm -fv /usr/bin/uengine-clean
rm -fv /usr/bin/uengine-runner-about
rm -fv /usr/bin/uengine-keyboard
rm -fv /usr/bin/uengine-useadb
rm -fv /usr/bin/uengine-runner-launch.sh
rm -fv /usr/bin/uengine-runner-update-bug
# 刷新图标缓存
gtk-update-icon-cache /usr/share/icons/bloom

View File

@@ -1,12 +0,0 @@
[Desktop Entry]
Categories=System;
Comment=UEngine 程序菜单
Encoding=UTF-8
Exec=/usr/bin/uengine launch --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity
Icon=/opt/apps/com.gitee.uengine.runner.spark/files/icon.png
MimeType=
Name=UEngine App List
Name[zh]=UEngine 程序菜单
StartupWMClass=UEngine 程序菜单
Terminal=false
Type=Application

View File

@@ -1,15 +0,0 @@
[Desktop Entry]
Type=Application
Encoding=UTF-8
Categories=System;
Terminal=false
Exec=/usr/bin/uengine-apk-builder %F
Icon=/opt/apps/com.gitee.uengine.runner.spark/files/icon.png
Name=Build Apk To Deb(UEngine Runner)
Comment=Build Apk To Deb(UEngine Runner)
Comment[zh]=打包 debUEngine 运行器)
Name[zh]=打包 debUEngine 运行器)
StartupNotify=true
Hidden=false
NoDisplay=true
MimeType=application/vnd.android.package-archive

View File

@@ -1,15 +0,0 @@
[Desktop Entry]
Type=Application
Encoding=UTF-8
Categories=System;
Terminal=false
Exec=/usr/bin/uengine-runner -i %F
Icon=/opt/apps/com.gitee.uengine.runner.spark/files/icon.png
Name=Install Or Uninstall APK(uengine runner)
Comment=Install Or Uninstall APK(UEngine runner)
Comment[zh]=安装/卸载 APKUEngine 运行器)
Name[zh]=安装/卸载 APKUEngine 运行器)
StartupNotify=true
Hidden=false
NoDisplay=true
MimeType=application/vnd.android.package-archive

View File

@@ -1,12 +0,0 @@
[Desktop Entry]
Type=Application
Encoding=UTF-8
Categories=System;
Terminal=false
Exec=/usr/bin/uengine-apk-builder %F
Icon=/opt/apps/com.gitee.uengine.runner.spark/files/icon.png
Name=uengine Apk Builder
Comment=UEngine Apk Builder
Comment[zh]=UEngine 应用打包器
Name[zh]=UEngine 应用打包器
StartupNotify=true

View File

@@ -1,13 +0,0 @@
[Desktop Entry]
Type=Application
Encoding=UTF-8
Categories=System;
Terminal=false
Exec=/usr/bin/uengine-runner
Icon=/opt/apps/com.gitee.uengine.runner.spark/files/icon.png
Name=uengine Runner
Comment=UEngine Runner
Comment[zh]=UEngine 运行器
Name[zh]=UEngine 运行器
StartupNotify=true
MimeType=

View File

@@ -1,373 +0,0 @@
Mozilla Public License Version 2.0
==================================
1. Definitions
--------------
1.1. "Contributor"
means each individual or legal entity that creates, contributes to
the creation of, or owns Covered Software.
1.2. "Contributor Version"
means the combination of the Contributions of others (if any) used
by a Contributor and that particular Contributor's Contribution.
1.3. "Contribution"
means Covered Software of a particular Contributor.
1.4. "Covered Software"
means Source Code Form to which the initial Contributor has attached
the notice in Exhibit A, the Executable Form of such Source Code
Form, and Modifications of such Source Code Form, in each case
including portions thereof.
1.5. "Incompatible With Secondary Licenses"
means
(a) that the initial Contributor has attached the notice described
in Exhibit B to the Covered Software; or
(b) that the Covered Software was made available under the terms of
version 1.1 or earlier of the License, but not also under the
terms of a Secondary License.
1.6. "Executable Form"
means any form of the work other than Source Code Form.
1.7. "Larger Work"
means a work that combines Covered Software with other material, in
a separate file or files, that is not Covered Software.
1.8. "License"
means this document.
1.9. "Licensable"
means having the right to grant, to the maximum extent possible,
whether at the time of the initial grant or subsequently, any and
all of the rights conveyed by this License.
1.10. "Modifications"
means any of the following:
(a) any file in Source Code Form that results from an addition to,
deletion from, or modification of the contents of Covered
Software; or
(b) any new file in Source Code Form that contains any Covered
Software.
1.11. "Patent Claims" of a Contributor
means any patent claim(s), including without limitation, method,
process, and apparatus claims, in any patent Licensable by such
Contributor that would be infringed, but for the grant of the
License, by the making, using, selling, offering for sale, having
made, import, or transfer of either its Contributions or its
Contributor Version.
1.12. "Secondary License"
means either the GNU General Public License, Version 2.0, the GNU
Lesser General Public License, Version 2.1, the GNU Affero General
Public License, Version 3.0, or any later versions of those
licenses.
1.13. "Source Code Form"
means the form of the work preferred for making modifications.
1.14. "You" (or "Your")
means an individual or a legal entity exercising rights under this
License. For legal entities, "You" includes any entity that
controls, is controlled by, or is under common control with You. For
purposes of this definition, "control" means (a) the power, direct
or indirect, to cause the direction or management of such entity,
whether by contract or otherwise, or (b) ownership of more than
fifty percent (50%) of the outstanding shares or beneficial
ownership of such entity.
2. License Grants and Conditions
--------------------------------
2.1. Grants
Each Contributor hereby grants You a world-wide, royalty-free,
non-exclusive license:
(a) under intellectual property rights (other than patent or trademark)
Licensable by such Contributor to use, reproduce, make available,
modify, display, perform, distribute, and otherwise exploit its
Contributions, either on an unmodified basis, with Modifications, or
as part of a Larger Work; and
(b) under Patent Claims of such Contributor to make, use, sell, offer
for sale, have made, import, and otherwise transfer either its
Contributions or its Contributor Version.
2.2. Effective Date
The licenses granted in Section 2.1 with respect to any Contribution
become effective for each Contribution on the date the Contributor first
distributes such Contribution.
2.3. Limitations on Grant Scope
The licenses granted in this Section 2 are the only rights granted under
this License. No additional rights or licenses will be implied from the
distribution or licensing of Covered Software under this License.
Notwithstanding Section 2.1(b) above, no patent license is granted by a
Contributor:
(a) for any code that a Contributor has removed from Covered Software;
or
(b) for infringements caused by: (i) Your and any other third party's
modifications of Covered Software, or (ii) the combination of its
Contributions with other software (except as part of its Contributor
Version); or
(c) under Patent Claims infringed by Covered Software in the absence of
its Contributions.
This License does not grant any rights in the trademarks, service marks,
or logos of any Contributor (except as may be necessary to comply with
the notice requirements in Section 3.4).
2.4. Subsequent Licenses
No Contributor makes additional grants as a result of Your choice to
distribute the Covered Software under a subsequent version of this
License (see Section 10.2) or under the terms of a Secondary License (if
permitted under the terms of Section 3.3).
2.5. Representation
Each Contributor represents that the Contributor believes its
Contributions are its original creation(s) or it has sufficient rights
to grant the rights to its Contributions conveyed by this License.
2.6. Fair Use
This License is not intended to limit any rights You have under
applicable copyright doctrines of fair use, fair dealing, or other
equivalents.
2.7. Conditions
Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted
in Section 2.1.
3. Responsibilities
-------------------
3.1. Distribution of Source Form
All distribution of Covered Software in Source Code Form, including any
Modifications that You create or to which You contribute, must be under
the terms of this License. You must inform recipients that the Source
Code Form of the Covered Software is governed by the terms of this
License, and how they can obtain a copy of this License. You may not
attempt to alter or restrict the recipients' rights in the Source Code
Form.
3.2. Distribution of Executable Form
If You distribute Covered Software in Executable Form then:
(a) such Covered Software must also be made available in Source Code
Form, as described in Section 3.1, and You must inform recipients of
the Executable Form how they can obtain a copy of such Source Code
Form by reasonable means in a timely manner, at a charge no more
than the cost of distribution to the recipient; and
(b) You may distribute such Executable Form under the terms of this
License, or sublicense it under different terms, provided that the
license for the Executable Form does not attempt to limit or alter
the recipients' rights in the Source Code Form under this License.
3.3. Distribution of a Larger Work
You may create and distribute a Larger Work under terms of Your choice,
provided that You also comply with the requirements of this License for
the Covered Software. If the Larger Work is a combination of Covered
Software with a work governed by one or more Secondary Licenses, and the
Covered Software is not Incompatible With Secondary Licenses, this
License permits You to additionally distribute such Covered Software
under the terms of such Secondary License(s), so that the recipient of
the Larger Work may, at their option, further distribute the Covered
Software under the terms of either this License or such Secondary
License(s).
3.4. Notices
You may not remove or alter the substance of any license notices
(including copyright notices, patent notices, disclaimers of warranty,
or limitations of liability) contained within the Source Code Form of
the Covered Software, except that You may alter any license notices to
the extent required to remedy known factual inaccuracies.
3.5. Application of Additional Terms
You may choose to offer, and to charge a fee for, warranty, support,
indemnity or liability obligations to one or more recipients of Covered
Software. However, You may do so only on Your own behalf, and not on
behalf of any Contributor. You must make it absolutely clear that any
such warranty, support, indemnity, or liability obligation is offered by
You alone, and You hereby agree to indemnify every Contributor for any
liability incurred by such Contributor as a result of warranty, support,
indemnity or liability terms You offer. You may include additional
disclaimers of warranty and limitations of liability specific to any
jurisdiction.
4. Inability to Comply Due to Statute or Regulation
---------------------------------------------------
If it is impossible for You to comply with any of the terms of this
License with respect to some or all of the Covered Software due to
statute, judicial order, or regulation then You must: (a) comply with
the terms of this License to the maximum extent possible; and (b)
describe the limitations and the code they affect. Such description must
be placed in a text file included with all distributions of the Covered
Software under this License. Except to the extent prohibited by statute
or regulation, such description must be sufficiently detailed for a
recipient of ordinary skill to be able to understand it.
5. Termination
--------------
5.1. The rights granted under this License will terminate automatically
if You fail to comply with any of its terms. However, if You become
compliant, then the rights granted under this License from a particular
Contributor are reinstated (a) provisionally, unless and until such
Contributor explicitly and finally terminates Your grants, and (b) on an
ongoing basis, if such Contributor fails to notify You of the
non-compliance by some reasonable means prior to 60 days after You have
come back into compliance. Moreover, Your grants from a particular
Contributor are reinstated on an ongoing basis if such Contributor
notifies You of the non-compliance by some reasonable means, this is the
first time You have received notice of non-compliance with this License
from such Contributor, and You become compliant prior to 30 days after
Your receipt of the notice.
5.2. If You initiate litigation against any entity by asserting a patent
infringement claim (excluding declaratory judgment actions,
counter-claims, and cross-claims) alleging that a Contributor Version
directly or indirectly infringes any patent, then the rights granted to
You by any and all Contributors for the Covered Software under Section
2.1 of this License shall terminate.
5.3. In the event of termination under Sections 5.1 or 5.2 above, all
end user license agreements (excluding distributors and resellers) which
have been validly granted by You or Your distributors under this License
prior to termination shall survive termination.
************************************************************************
* *
* 6. Disclaimer of Warranty *
* ------------------------- *
* *
* Covered Software is provided under this License on an "as is" *
* basis, without warranty of any kind, either expressed, implied, or *
* statutory, including, without limitation, warranties that the *
* Covered Software is free of defects, merchantable, fit for a *
* particular purpose or non-infringing. The entire risk as to the *
* quality and performance of the Covered Software is with You. *
* Should any Covered Software prove defective in any respect, You *
* (not any Contributor) assume the cost of any necessary servicing, *
* repair, or correction. This disclaimer of warranty constitutes an *
* essential part of this License. No use of any Covered Software is *
* authorized under this License except under this disclaimer. *
* *
************************************************************************
************************************************************************
* *
* 7. Limitation of Liability *
* -------------------------- *
* *
* Under no circumstances and under no legal theory, whether tort *
* (including negligence), contract, or otherwise, shall any *
* Contributor, or anyone who distributes Covered Software as *
* permitted above, be liable to You for any direct, indirect, *
* special, incidental, or consequential damages of any character *
* including, without limitation, damages for lost profits, loss of *
* goodwill, work stoppage, computer failure or malfunction, or any *
* and all other commercial damages or losses, even if such party *
* shall have been informed of the possibility of such damages. This *
* limitation of liability shall not apply to liability for death or *
* personal injury resulting from such party's negligence to the *
* extent applicable law prohibits such limitation. Some *
* jurisdictions do not allow the exclusion or limitation of *
* incidental or consequential damages, so this exclusion and *
* limitation may not apply to You. *
* *
************************************************************************
8. Litigation
-------------
Any litigation relating to this License may be brought only in the
courts of a jurisdiction where the defendant maintains its principal
place of business and such litigation shall be governed by laws of that
jurisdiction, without reference to its conflict-of-law provisions.
Nothing in this Section shall prevent a party's ability to bring
cross-claims or counter-claims.
9. Miscellaneous
----------------
This License represents the complete agreement concerning the subject
matter hereof. If any provision of this License is held to be
unenforceable, such provision shall be reformed only to the extent
necessary to make it enforceable. Any law or regulation which provides
that the language of a contract shall be construed against the drafter
shall not be used to construe this License against a Contributor.
10. Versions of the License
---------------------------
10.1. New Versions
Mozilla Foundation is the license steward. Except as provided in Section
10.3, no one other than the license steward has the right to modify or
publish new versions of this License. Each version will be given a
distinguishing version number.
10.2. Effect of New Versions
You may distribute the Covered Software under the terms of the version
of the License under which You originally received the Covered Software,
or under the terms of any subsequent version published by the license
steward.
10.3. Modified Versions
If you create software not governed by this License, and you want to
create a new license for such software, you may create and use a
modified version of this License if you rename the license and remove
any references to the name of the license steward (except to note that
such modified license differs from this License).
10.4. Distributing Source Code Form that is Incompatible With Secondary
Licenses
If You choose to distribute Source Code Form that is Incompatible With
Secondary Licenses under the terms of this version of the License, the
notice described in Exhibit B of this License must be attached.
Exhibit A - Source Code Form License Notice
-------------------------------------------
This Source Code Form is subject to the terms of the Mozilla Public
License, v. 2.0. If a copy of the MPL was not distributed with this
file, You can obtain one at http://mozilla.org/MPL/2.0/.
If it is not possible or desirable to put the notice in a particular
file, then You may include the notice in a location (such as a LICENSE
file in a relevant directory) where a recipient would be likely to look
for such a notice.
You may add additional accurate notices of copyright ownership.
Exhibit B - "Incompatible With Secondary Licenses" Notice
---------------------------------------------------------
This Source Code Form is "Incompatible With Secondary Licenses", as
defined by the Mozilla Public License, v. 2.0.

View File

@@ -1,272 +0,0 @@
{
"zh_CN.UTF-8": {
"Main": {
"MainWindow": {
"Title": "UEngine 运行器",
"LabApkPath": "安装/卸载 APK",
"LabUninstallPath": "卸载 Apk",
"BtnFindApk": "浏览",
"BtnInstall": "安装",
"BtnShowUengineApp": "打开 UEngine 应用列表",
"BtnUninstallApkBrowser": "浏览",
"BtnUninstall": "卸载",
"Btngeticon": "保存图标",
"BtnSaveApk": "保存Apk",
"BtnApkInformation": "Apk 信息",
"Menu": [
{
"Name": "程序",
"Menu": [
"清空软件历史记录",
"退出程序"
]
},
{
"Name": "adb",
"Menu": [
"Adb 连接 UEngine",
{
"Name": "Adb 服务",
"Menu": [
"打开 Adb 服务",
"停止 Adb 服务",
"杀死 Adb 进程"
]
},
"显示 Adb 连接的设备",
"Adb 修改 UEngine 分辨率",
"Adb 查看 UEngine 应用列表",
"Adb 查看 UEngine 资源使用情况",
"打开 Adb 连接 UEngine 的终端",
"使用 Scrcpy 连接 UEngine只支持使用 Snap 安装的 Scrcpy",
{
"Name": "UEngine 使用 Adb",
"Menu": [
"Adb 连接 Connect UEngine",
"允许此设备使用 Adb 连接本 UEngine需要 Root",
"禁止任何设备使用 Adb 连接本 UEngine需要 Root"
]
}
]
},
{
"Name": "UEngine",
"Menu": [
"UEngine 系统设置",
"UEngine 应用打包",
{
"Name": "UEngine 服务",
"Menu": [
"启动 UEngine 服务(需要 Root",
"关闭 UEngine 服务(需要 Root",
"重启 UEngine 服务(需要 Root"
]
},
{
"Name": "UEngine 网络桥接",
"Menu": [
"启动 UEngine 网络桥接(需要 Root",
"关闭 UEngine 网络桥接(需要 Root",
"重启 UEngine 网络桥接(需要 Root",
"加载 UEngine 网络桥接(需要 Root",
"强制加载 UEngine 网络桥接(需要 Root"
]
},
{
"Name": "UEngine 快捷方式",
"Menu": [
"发送 UEngine 应用列表到桌面",
"发送 UEngine 应用列表到启动器",
"添加/删除指定的 UEngine 快捷方式",
"清空所有 UEngine 快捷方式"
]
},
{
"Name": "UEngine 使用 Adb",
"Menu": null
},
{
"Name": "UEngine 数据",
"Menu": [
"打开 UEngine 根目录",
"打开 UEngine 用户数据目录",
"清空 UEngine 数据(需要 Root"
]
},
"UEngine 键盘映射",
"UEngine 检测 CPU 是否支持运行",
"删除 UEngine 运行检查",
"重新安装 UEngine",
{
"Name": "获取 UEngine 最高权限",
"Menu": [
"安装已经制作好的 UEngine 带最高权限的镜像",
"构建 UEngine 带最高权限的镜像到用户主目录",
"安装默认的 UEngine 镜像"
]
}
]
},
{
"Name": "关于",
"Menu": [
"程序官网",
"关于",
"反馈程序问题和建议"
]
}
]
}
},
"Uengine Apk Builder": {
"Title": "UEngine APK 应用打包器",
"label1": "要打包的 apk 路径:",
"button2": "浏览",
"button3": " 打包",
"check": "使用前缀“uengine-dc”",
"Menu": [
{
"Name": "程序",
"Menu": [
"退出程序"
]
}
]
}
},
"en_US.UTF-8": {
"Main": {
"MainWindow": {
"Title": "UEngine Runner",
"LabApkPath": "Install Or Uninstall Apk:",
"BtnFindApk": "Find",
"BtnInstall": "Install",
"BtnShowUengineApp": "Open UEngine App List",
"BtnUninstallApkBrowser": "Find",
"BtnUninstall": "Uninstall",
"Btngeticon": "Save Apk Icon",
"BtnSaveApk": "Saving Installed App Apk",
"BtnApkInformation": "Apk Information",
"Menu": [
{
"Name": "Program",
"Menu": [
"Clean Program History",
"Exit The Program"
]
},
{
"Name": "adb",
"Menu": [
"Use Adb To Connect UEngine",
{
"Name": "Adb Services",
"Menu": [
"Open Adb Service",
"Close Adb Service",
"Kill Adb Program"
]
},
"Show Adb To Connect Devices",
"Use Adb To Change UEngine Display Size",
"Use Adb To Show UEngine Installing Program List",
"Use Adb To Show UEngine Using System Resources",
"Open Adb Console With UEngine",
"Use Scrcpy Connect UEngine (Only Support Using Scrcpy With Installing the Scrcpy)",
{
"Name": "UEngine Use Adb",
"Menu": [
"Use Adb To Connect UEngine",
"Allow This Devices Using Adb To Connect The UEngine (Allow Need Using For Root)",
"Unallow Any Devices Using Adb To Connect The UEngine (Unallow Need Using For Root)"
]
}
]
},
{
"Name": "UEngine",
"Menu": [
"UEngine System Control Panel",
"UEngine Android App Builder",
{
"Name": "UEngine Service",
"Menu": [
"Open UEngine Service (It Need Run With Root)",
"Close UEngine Service (It Need Run With Root)",
"Restart UEngine Service (It Need Run With Root)"
]
},
{
"Name": "UEngine Internet Connecting",
"Menu": [
"Open UEngine Internet Bridge (It Need Run With Root)",
"Close UEngine Internet Bridge (It Need Run With Root)",
"Restart UEngine Internet Bridge (It Need Run With Root)",
"Load UEngine Internet Bridge (It Need Run With Root)",
"Force Loading UEngine Internet Bridge (It Need Run With Root)"
]
},
{
"Name": "UEngine App Link",
"Menu": [
"Send UEngine Program List To Desktop",
"Send UEngine Program List To Launcher",
"Add Or Delete UEngine App Link",
"Delete All UEngine App Link"
]
},
{
"Name": "UEngine Use Adb",
"Menu": null
},
{
"Name": "UEngine Data",
"Menu": [
"Open UEngine Root Folder",
"Open UEngine User Folder",
"Delete All UEngine Data (It Need Run With Root)"
]
},
"UEngine Keyboard",
"UEngine Check CPU Can Or Can't Run",
"Delete UEngine Runing Checking",
"Reinstall UEngine",
{
"Name": "Get UEngine Root User",
"Menu": [
"Install UEngine Image With Root User",
"Build An UEngine Image With Root User In Your Home Path",
"Install Defult UEngine Image"
]
}
]
},
{
"Name": "About",
"Menu": [
"Program WebSize",
"Program Help",
"Upload Problem And Advice"
]
}
]
}
},
"Uengine Apk Builder": {
"Title": "UEngine APK Builder",
"label1": "Will Build APK Path",
"button2": "Find",
"button3": " Build",
"check": "Use Prefix With \"uengine-dc\"",
"Menu": [
{
"Name": "Program",
"Menu": [
"Exit The Program"
]
}
]
}
}
}

View File

@@ -1,11 +0,0 @@
[Desktop Entry]
Categories=System;
Comment=UEngine 程序菜单
Encoding=UTF-8
Exec=/usr/bin/uengine launch.sh --package=org.anbox.appmgr --component=org.anbox.appmgr.AppViewActivity
Icon=/opt/apps/uengine-runner/icon.png
MimeType=
Name=UEngine 程序菜单
StartupWMClass=UEngine 程序菜单
Terminal=false
Type=Application

Binary file not shown.

Before

Width:  |  Height:  |  Size: 312 KiB

View File

@@ -1,118 +0,0 @@
import PIL.Image as Image
import PIL.ImageDraw as ImageDraw
import zipfile
import subprocess
import re
class getsavexml():
def savexml(self,apkFilePath,xmlpath,iconSavePath):
cmddumpid = "aapt dump xmltree "+ apkFilePath + " " + xmlpath
print(cmddumpid)
xmltree = subprocess.getoutput(cmddumpid)
xmls = xmltree.splitlines()
# find strs ,print next line
def FindStrs(lines,strs):
i=0
while i < len(lines):
if re.search(strs,lines[i]):
tmpstr = lines[i+1]
i += 1
Resultstr = tmpstr.split(":")[-1].split("=")[-1].split("0x")[-1]
return Resultstr
else:
i += 1
#从apk的信息中获取前后景图片的ID号
backimgid = FindStrs(xmls,"background")
foreimgid = FindStrs(xmls,"foreground")
print(backimgid)
print(foreimgid)
# 直接从apk resource文件获取前后两层图片路径及ID字符串
resource = subprocess.getoutput("aapt dump --values resources " + apkFilePath + "| grep -iE -A1 " + "\"" + backimgid + "|" + foreimgid + "\"")
resourcelines = resource.splitlines()
print(resourcelines)
# 从过滤出的字符串中获取所有相同ID的图片路径
def Findpicpath(lines,imgid):
i=0
Resultstr = []
while i < len(lines):
if re.search(imgid,lines[i]) and re.search("string8",lines[i+1]) :
print(lines[i+1])
tmpstr = lines[i+1].replace("\"","")
i += 1
Resultstr.append(tmpstr.split()[-1])
else:
i += 1
return Resultstr
#获取所有带前后图片ID的图片路径相同背景或者前景的图片ID但分辨率不一样
backimgs = Findpicpath(resourcelines,backimgid)
foreimgs = Findpicpath(resourcelines,foreimgid)
print(backimgs)
print(foreimgs)
#获取分辨率最高的图片路径
def getmaxsize(imgs):
j = 0
size=(0,0)
zipapk = zipfile.ZipFile(apkFilePath)
imgpath = ""
while j < len(imgs):
print(imgs[j])
img = Image.open(zipapk.open(imgs[j]))
print(imgs[j])
print(img.size)
if size < img.size:
size = img.size
imgpath = imgs[j]
j += 1
return imgpath
# 获取到文件列表后,进行比较分辨率,选取分辨率最高的张图片
iconbackpath = getmaxsize(backimgs)
iconforepath = getmaxsize(foreimgs)
print(iconbackpath + " " + iconforepath)
#从APK文件获取最终图片
zipapk = zipfile.ZipFile(apkFilePath)
iconback = zipapk.open(iconbackpath)
iconfore = zipapk.open(iconforepath)
# 叠加图片mask 设置前景为蒙版
iconbackimg = Image.open(iconback).convert("RGBA")
iconforeimg = Image.open(iconfore).convert("RGBA")
iconbackimg.paste(iconforeimg,mask=iconforeimg)
# 圆角图片函数,网上拷贝的
def circle_corner(img, radii): #把原图片变成圆角,这个函数是从网上找的,原址 https://www.pyget.cn/p/185266
"""
圆角处理
:param img: 源图象。
:param radii: 半径30。
:return: 返回一个圆角处理后的图象。
"""
# 画圆用于分离4个角
circle = Image.new('L', (radii * 2, radii * 2), 0) # 创建一个黑色背景的画布
draw = ImageDraw.Draw(circle)
draw.ellipse((0, 0, radii * 2, radii * 2), fill=255) # 画白色圆形
# 原图
img = img.convert("RGBA")
w, h = img.size
# 画4个角将整圆分离为4个部分
alpha = Image.new('L', img.size, 255)
alpha.paste(circle.crop((0, 0, radii, radii)), (0, 0)) # 左上角
alpha.paste(circle.crop((radii, 0, radii * 2, radii)), (w - radii, 0)) # 右上角
alpha.paste(circle.crop((radii, radii, radii * 2, radii * 2)), (w - radii, h - radii)) # 右下角
alpha.paste(circle.crop((0, radii, radii, radii * 2)), (0, h - radii)) # 左下角
# alpha.show()
img.putalpha(alpha) # 白色区域透明可见,黑色区域不可见
return img
# 圆角半径1/8边长,保存icon图片
w,h = iconbackimg.size
iconimg = circle_corner(iconbackimg,int(w/8))
iconimg.save(iconSavePath)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -1,137 +0,0 @@
{
"Url": [
"https://gitee.com/gfdgd-xi/uengine-runner",
"https://github.com/gfdgd-xi/uengine-runner"
],
"Version": "1.5.2",
"System": "Linuxdeepin/UOS",
"Tips": [
"更多可见https://gitee.com/gfdgd-xi/uengine-runner/wikis",
"",
"安装APK点浏览按钮选中需要安装的APK然后点安装按钮",
"",
"卸载APK在卸载APK下面的输入框内输入需要卸载的APK包名点卸载按钮如果无法获取包名可以通过浏览APK文件程序自动获取包名进行卸载。",
"",
"保存APK图标在安装APK下面的输入框浏览或输入APK的路径然后点击“保存图标”按钮选择保存位置即可",
"",
"重置删除UEngine数据点击菜单栏的“UEngine”的“清空UEngine数据”输入密码重启即可",
" 注意如果任何安卓一遍打不开多打开几遍应该就可以重新加载UEngine配置了",
"",
"打开UEngine应用列表打开系统已安装的应用列表安卓界面",
"",
"提示:",
"1、需要你有使用 root 权限的能力;",
"2、需要安装 UEngine 才能使用;",
"3、提取 apk 图标的 apk 路径以“安装 apk”那栏为准;",
"4、如果想要使用adb连接UEngine或其他手机请使用 1.2.0 以前的版本。如需连接UEngine请安装adb补丁"
],
"Update": [
"V1.5.2",
"※1、支持安装和构建带 Root 的 UEngine 的镜像",
"2、更新了反馈链接",
"",
"V1.5.1",
"※1、精简用户界面合并安装和卸载输入框和浏览按钮等",
"※2、修复安装以其的程序图标无法点击进入的问题deepin 社区版不存在此问题)",
"※3、支持在程序本体反馈问题",
"4、修复了菜单栏的部分显示问题",
"5、支持显示 apk 的部分信息",
"6、支持删除 UEngine 程序运行检查以及重新安装 UEngine 的功能",
"7、自带有跳过家庭版必须有指定包名才能运行程序限制的脚本",
"8、补回依赖包“adb”",
"",
"V1.5.0",
"※1、部分窗口支持英语",
"2、修复在英语状态下启动器图标名称异常的问题",
"",
"V1.4.3",
"※1、支持打包器打包的包名带前缀“uengine-dc”",
"※2、修复了两种情况可能导致程序卡住/出错无法继续运行的情况(配置文件夹不齐全和获取版本信息卡住两种情况)",
"※3、修改了 UEngine 打包器打包的应用包名可能有大写的情况",
"4、支持一键使用 Scrcpy 连接 UEngine①先安装 adb 破解补丁②请确保是使用snap安装的 Scrcpy【目前只支持 snap 安装的 Scrcpy 进行连接】)",
"5、支持右键打包 apk",
"",
"V1.4.2",
"※1、添加adb破解补丁用于可以让adb连接UEngine并支持adb的部分操作;",
"2、菜单栏的项目添加以及外观优化;",
"3、修复键盘映射无法添加新映射的问题并修改键盘映射启动方式;",
"4、把 uengine 改为 UEngine;",
"5、修改 pkexec 获取密码时显示的图标和文本;",
"6、添加了 UEngine 系统设置的快捷方式;",
"",
"V1.4.1",
"※1、初步支持键盘映射",
"2、修复新版包在发送uengine列表快捷方式时会提示找不到文件",
"",
"V1.4.0",
"※1、添加新版打包方式deepin打包方式;",
"※2、支持测试运行/创建/删除uengine图标;",
"※3、支持提取安装的apk;",
"※4、支持打包deb包;",
"5、修改菜单栏布局;",
"6、支持打开uengine数据目录和用户数据目录;",
"7、程序信息保存到json,非直接写入程序本体;",
"8、更多命令操作;",
"",
"V.1.3.2",
"※1、支持uengine数据重置;",
"※2、支持修改uengine网络桥接的启动状态;",
"※3、支持右键安装/卸载;",
"※4、支持启用或禁用uengine;",
"※5、修复打包问题不会出现“dpkg:警告:卸载spark-uengine-runner时目录/opt/apps/uengine-runner非空因而不会删除该目录”的错误;",
"",
"V1.3.1",
"※1、修复打包问题防止部分用户安装出错的问题;",
"※2、修复了程序无法提取图标时可以提取默认图标使用;",
"",
"V1.3.0",
"※1、修改了界面布局;",
"※2、修复大多数新安装普通用户的路图标及启动菜单文件路径不存在导致安装APK报错的bugs;",
"3、删除少量冗余代码调整代码顺序;",
"4、支持提取apk图标。",
"",
"V1.2.3",
"1、调整部分控件名称",
"2、调整界面布局及界面风格",
"",
"V1.2.2",
"1、对程序错误的显示更加人性化",
"2、对 icon 的获取方式进行了升级;",
"3、增加了注释、删除部分冗余代码。",
"",
"V1.2.1",
"※1、进行了安装方式的修改不使用 adb修复原无法安装和卸载的问题",
"2、进行了部分优化",
"3、进行了功能缩水",
"4、修复 deb 打包错误。",
"",
"V1.2.0",
"1、支持安装自动添加快捷方式、卸载删除快捷方式",
"2、支持使用包名或 APK 文件卸载程序;",
"3、支持查看安装的所有包名",
"4、进行了部分优化",
"",
"V1.1.0",
"暂无数据",
"",
"V1.0.0",
"暂无数据"
],
"Use": [
"1、UEngine相关软件包基于anbox开发",
"2、Python3",
"3、tkintertkinter.tk、ttkthemes、tkinter.messagebox、tkinter.simpledialog、tkinter.filedialog 和 tkinter.ttk",
"4、aapt",
"5、dpkg",
"6、tree",
"7、mkdir",
"8、echo",
"9、chmod",
"10、adb",
"11、deepin 终端",
"……"
],
"Time": "2021年08月30日",
"Contribute": ["gfdgd xi<3025613752@qq.com>",
"actionchen<917981399@qq.com>"]
}

View File

@@ -1,76 +0,0 @@
#!/bin/bash
#sudo apt install squashfs-tools
mkdir -p ~/temp
cd ~/temp
echo "正在下载supersu"
wget -P ~/temp http://supersuroot.org/downloads/SuperSU-v2.82-201705271822.zip
cd ..
mkdir -p ~/temp/work/dabao/extract/DEBIAN
echo "正在解压supersu"
unzip ~/temp/SuperSU-v2.82-201705271822.zip -d ~/temp/work/su
WORKDIR=~/temp/work
cd "$WORKDIR"
echo "正在下载uengine-android-image"
apt download uengine-android-image
echo "正在解压uengine-android-image"
cd dabao
dpkg-deb -x $WORKDIR/uengine-android-image*.deb extract/
dpkg-deb -e $WORKDIR/uengine-android-image*.deb extract/DEBIAN
cd ..
cp dabao/extract/usr/share/uengine/android.img android.img
echo "正在解压android镜像"
sudo unsquashfs android.img
sudo mkdir -p ./squashfs-root/system/app/SuperSU
sudo mkdir -p ./squashfs-root/system/bin/.ext/
echo "正在将supersu安装到android镜像"
sudo cp ./su/common/Superuser.apk ./squashfs-root/system/app/SuperSU/SuperSU.apk
sudo cp ./su/common/install-recovery.sh ./squashfs-root/system/etc/install-recovery.sh
sudo cp ./su/common/install-recovery.sh ./squashfs-root/system/bin/install-recovery.sh
sudo cp ./su/x64/su ./squashfs-root/system/xbin/su
sudo cp ./su/x64/su ./squashfs-root/system/bin/.ext/.su
sudo cp ./su/x64/su ./squashfs-root/system/xbin/daemonsu
sudo cp ./su/x64/supolicy ./squashfs-root/system/xbin/supolicy
sudo cp ./su/x64/libsupol.so ./squashfs-root/system/lib64/libsupol.so
sudo cp ./squashfs-root/system/bin/app_process64 ./squashfs-root/system/bin/app_process_init
sudo cp ./squashfs-root/system/bin/app_process64 ./squashfs-root/system/bin/app_process64_original
sudo cp ./squashfs-root/system/xbin/daemonsu ./squashfs-root/system/bin/app_process
sudo cp ./squashfs-root/system/xbin/daemonsu ./squashfs-root/system/bin/app_process64
sudo chmod +x ./squashfs-root/system/app/SuperSU/SuperSU.apk
sudo chmod +x ./squashfs-root/system/etc/install-recovery.sh
sudo chmod +x ./squashfs-root/system/bin/install-recovery.sh
sudo chmod +x ./squashfs-root/system/xbin/su
sudo chmod +x ./squashfs-root/system/bin/.ext/.su
sudo chmod +x ./squashfs-root/system/xbin/daemonsu
sudo chmod +x ./squashfs-root/system/xbin/supolicy
sudo chmod +x ./squashfs-root/system/lib64/libsupol.so
sudo chmod +x ./squashfs-root/system/bin/app_process_init
sudo chmod +x ./squashfs-root/system/bin/app_process64_original
sudo chmod +x ./squashfs-root/system/bin/app_process
sudo chmod +x ./squashfs-root/system/bin/app_process64
echo "正在打包android镜像"
sudo rm android.img
sudo mksquashfs squashfs-root android.img -b 131072 -comp xz -Xbcj ia64
cp android.img dabao/extract/usr/share/uengine/android.img
echo "正在打包uengine-android-image"
cd dabao/extract
find usr -type f -print0 |xargs -0 md5sum >md5sums
cd ..
mkdir build
dpkg-deb -b extract/ build/
cp build/*.deb ~/
echo "正在清理垃圾"
sudo rm -rf ~/temp
echo "已在用户主目录生成新的安装包,安装后重启即可生效"

View File

@@ -1,6 +0,0 @@
{
"Package": "com.gitee.uengine.runner.spark",
"Update": true,
"Version": "1.5.1",
"Url": "https://gfdgd-xi.github.io/update-program/data/UpdateInformation.json"
}

View File

@@ -1,7 +0,0 @@
{
"Package": "spark-uengine-runner",
"Update": true,
"Version": "1.5.1",
"Url": "https://gfdgd-xi.github.io/update-program/data/UpdateInformation.json"
}

View File

@@ -1,452 +0,0 @@
#!/usr/bin/env python3
# 使用系统默认的 python3 运行
###########################################################################################
# 作者gfdgd xi
# 版本1.5.1
# 更新时间2021年10月06日
# 感谢anbox、deepin 和 统信
# 基于 Python3 的 tkinter 构建
###########################################################################################
#################
# 引入所需的库
#################
import os
import sys
import json
import shutil
import random
import zipfile
import traceback
import threading
import subprocess
import ttkthemes
import tkinter as tk
import tkinter.ttk as ttk
import tkinter.messagebox as messagebox
import tkinter.filedialog as filedialog
from getxmlimg import getsavexml
def FindApk():
path = filedialog.askopenfilename(title="选择 Apk", filetypes=[("APK 文件", "*.apk"), ("所有文件", "*.*")], initialdir=json.loads(readtxt(get_home() + "/.config/uengine-runner/FindApkBuild.json"))["path"])
if path != "" and path != "()":
try:
combobox1.set(path)
write_txt(get_home() + "/.config/uengine-runner/FindApkBuild.json", json.dumps({"path": os.path.dirname(path)})) # 写入配置文件
except:
pass
def BuildDeb():
if combobox1.get() == "":
messagebox.showerror(title="提示", message="信息没有填写完整,无法继续打包 APK")
return
if not os.path.exists(combobox1.get()):
messagebox.showerror(title="提示", message="信息填写错误,无法继续打包 APK")
return
DisabledAndEnbled(True)
threading.Thread(target=BuildApkDeb, args=(combobox1.get(),)).start()
def RunCommandShow(command):
TextboxAddText1("$> {}".format(command))
TextboxAddText1(GetCommandReturn(command))
def BuildApkDeb(apkPath):
tempPath = "/tmp/uengine-apk-builder-{}".format(int(random.randint(0, 1024)))
RunCommandShow("echo '======================================New===================================='")
RunCommandShow("echo '创建目录'")
RunCommandShow("mkdir -pv '{}/DEBIAN'".format(tempPath))
RunCommandShow("mkdir -pv '{}/usr/share/applications'".format(tempPath))
RunCommandShow("mkdir -pv '{}/usr/share/uengine/apk'".format(tempPath))
RunCommandShow("mkdir -pv '{}/usr/share/uengine/icons'".format(tempPath))
RunCommandShow("echo '写入文件,因为写入过程过于复杂,不显示写入命令……'")
apkPackageName = GetApkPackageName(apkPath)
apkPackageVersion = GetApkVersion(apkPath)
apkChineseLabel = GetApkChineseLabel(apkPath)
apkActivityName = GetApkActivityName(apkPath)
iconSavePath = "{}/usr/share/uengine/icons/{}.png".format(tempPath, apkPackageName)
debControl = '''Package: {}
Version: {}
Architecture: all
Maintainer: {}
Depends: deepin-elf-verify (>= 0.0.16.7-1), uengine (>= 1.0.1)
Section: utils
Priority: optional
Description: {}\n'''.format(apkPackageName, apkPackageVersion, apkChineseLabel, apkChineseLabel)
debPostinst = '''#!/bin/sh
APK_DIR="/usr/share/uengine/apk"
APK_NAME="{}.apk"
APK_PATH="$APK_DIR/$APK_NAME"
DESKTOP_FILE="/usr/share/applications/{}.desktop"
ICON_FILE="/usr/share/uengine/icons/{}.png"
if [ -f $APK_PATH ]; then
echo "Installing $APK_NAME"
else
echo "ERROR: $APK_NAME file not found."
exit 1
fi
session_manager=`ps -ef | grep "uengine session-manager" | grep -v grep`
if test -z "$session_manager"; then
echo "ERROR: app install failed(session-manager not start)."
#sudo rm -f $DESKTOP_FILE
#sudo rm -f $ICON_FILE
#sudo rm -f "$APK_PATH"
exit 1
fi
ret=`/usr/bin/uengine-session-launch-helper -- uengine install --apk="$APK_PATH"`
if [ $? -ne 0 ]; then
echo "ERROR: apk install error..."
#sudo rm -f $DESKTOP_FILE
#sudo rm -f $ICON_FILE
#sudo rm -f "$APK_PATH"
exit 1
fi
chkfail=`echo $ret |grep "Failed"`
if test -n "$chkfail" ; then
echo "ERROR: $ret"
#sudo rm -f $DESKTOP_FILE
#sudo rm -f $ICON_FILE
#sudo rm -f "$APK_PATH"
exit 1
fi
sudo rm -f "$APK_PATH"
exit 0'''.format(apkPackageName, apkPackageName, apkPackageName)
debPrerm = '''#!/bin/sh
APP_NAME="{}"
session_manager=`ps -ef | grep "uengine session-manager" | grep -v grep`
if test -z "$session_manager"; then
echo "ERROR: app install failed(session-manager not start)."
exit 1
fi
echo "Uninstalling $APP_NAME"
ret=`/usr/bin/uengine-session-launch-helper -- uengine uninstall --pkg="$APP_NAME"`
if [ $? -ne 0 ]; then
echo "ERROR: app uninstall error..."
exit 1
fi
chkfail=`echo $ret |grep "Failed"`
if test -n "$chkfail" ; then
echo "ERROR: $ret"
exit 1
fi
cat /etc/passwd | awk -F: '$3>=1000' | cut -f 1 -d : | while read line
do
inifile="/home/$line/.config/uengineAppGeometry.ini"
if [ -f $inifile ]; then
sed -i "/$APP_NAME/d" $inifile
fi
done
exit 0'''.format(apkPackageName)
desktopFile = '''[Desktop Entry]
Categories=Other;
Exec=uengine launch --action=android.intent.action.MAIN --package={} --component={}
Icon=/usr/share/uengine/icons/{}.png
Terminal=false
Type=Application
GenericName={}
Name={}
'''
#RunCommandShow("echo '{}' > '{}/DEBIAN/control'".format(debControl, tempPath))
RunCommandShow("echo 正在写入文件:'{}/DEBIAN/control'".format(tempPath))
write_txt("{}/DEBIAN/control".format(tempPath), debControl)
RunCommandShow("echo 正在写入文件:'{}/DEBIAN/postinst'".format(tempPath))
write_txt("{}/DEBIAN/postinst".format(tempPath), debPostinst)
RunCommandShow("echo 正在写入文件:'{}/DEBIAN/prerm'".format(tempPath))
write_txt("{}/DEBIAN/prerm".format(tempPath), debPrerm)
RunCommandShow("echo 正在写入文件:'/usr/share/applications/{}.desktop'".format(apkPackageName))
#write_txt("{}/usr/share/applications/{}.desktop".format(tempPath, apkPackageName), desktopFile)
BuildUengineDesktop(apkPackageName, apkActivityName, apkChineseLabel, iconSavePath,
"{}/usr/share/applications/{}.desktop".format(tempPath, apkPackageName))
RunCommandShow("echo '复制文件'")
RunCommandShow("echo '写入 APK 软件图标'")
SaveApkIcon(apkPath, iconSavePath)
RunCommandShow("echo '复制 APK 文件'")
RunCommandShow("cp -rv '{}' '{}/usr/share/uengine/apk/{}.apk'".format(apkPath, tempPath, apkPackageName))
RunCommandShow("echo '正在设置文件权限……'")
RunCommandShow("chmod 0775 -vR '{}/DEBIAN/postinst'".format(tempPath))
RunCommandShow("chmod 0775 -vR '{}/DEBIAN/prerm'".format(tempPath))
RunCommandShow("echo '打包 deb 到桌面……'")
RunCommandShow("dpkg -b '{}' '{}/{}_{}.deb'".format(tempPath, get_desktop_path(),apkPackageName, apkPackageVersion))
RunCommandShow("echo '完成!'")
findApkHistory.append(apkPath)
combobox1['value'] = findApkHistory
write_txt(get_home() + "/.config/uengine-runner/FindApkBuildHistory.json", str(json.dumps(ListToDictionary(findApkHistory)))) # 将历史记录的数组转换为字典并写入
messagebox.showinfo(title="提示", message="打包完成")
DisabledAndEnbled(False)
def DisabledAndEnbled(choose):
userChoose = {True: tk.DISABLED, False: tk.NORMAL}
a = userChoose[choose]
combobox1.configure(state=a)
check.configure(state=a)
button2.configure(state=a)
button3.configure(state=a)
# 需引入 subprocess
def GetCommandReturn(cmd):
# cmd 是要获取输出的命令
return subprocess.getoutput(cmd)
# 重启本应用程序
def ReStartProgram():
python = sys.executable
os.execl(python, python, * sys.argv)
# 获取用户主目录
def get_home():
return os.path.expanduser('~')
# 获取当前语言
def get_now_lang()->"获取当前语言":
return os.getenv('LANG')
# 获取用户桌面目录
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 ListToDictionary(list):
dictionary = {}
for i in range(len(list)):
dictionary[i] = list[i]
return dictionary
# 读取文本文档
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 GetApkInformation(apkFilePath):
return GetCommandReturn("aapt dump badging '{}'".format(apkFilePath))
def GetApkActivityName(apkFilePath):
info = GetApkInformation(apkFilePath)
for line in info.split('\n'):
if "launchable-activity" in line:
line = line[0: line.index("label='")]
line = line.replace("launchable-activity: ", "")
line = line.replace("'", "")
line = line.replace(" ", "")
line = line.replace("name=", "")
line = line.replace("label=", "")
line = line.replace("icon=", "")
return line
def GetApkPackageName(apkFilePath):
# 提示:此函数有被为此程序适配而调整,如果需要最原始(无调整的)请使用主程序(此为附属组件)里的函数
info = GetApkInformation(apkFilePath)
for line in info.split('\n'):
if "package:" in line:
line = line[0: line.index("versionCode='")]
line = line.replace("package:", "")
line = line.replace("name=", "")
line = line.replace("'", "")
line = line.replace(" ", "")
# 此较为特殊,因为需要判断用户是否要添加前缀
if qianZhui.get() == True:
return "uengine-dc-{}".format(line).lower()
return line.lower()
def GetApkVersion(apkFilePath):
info = GetApkInformation(apkFilePath)
for line in info.split('\n'):
if "package:" in line:
if "compileSdkVersion='" in line:
line = line.replace(line[line.index("compileSdkVersion='"): -1], "")
if "platform" in line:
line = line.replace(line[line.index("platform"): -1], "")
line = line.replace(line[0: line.index("versionName='")], "")
line = line.replace("versionName='", "")
line = line.replace("'", "")
line = line.replace(" ", "")
return line
def BuildUengineDesktop(packageName, activityName, showName, iconPath, savePath):
things = '''
[Desktop Entry]
Categories=app;
Encoding=UTF-8
Exec=/usr/bin/uengine launch.sh --action=android.intent.action.MAIN --package={} --component={}
GenericName={}
Icon={}
MimeType=
Name={}
StartupWMClass={}
Terminal=false
Type=Application
'''.format(packageName, activityName, showName, iconPath, showName, showName)
write_txt(savePath, things)
def GetApkChineseLabel(apkFilePath):
info = GetApkInformation(apkFilePath)
for line in info.split('\n'):
if "application-label:" in line:
line = line.replace("application-label:", "")
line = line.replace("'", "")
return line
#def GetApkIconInApk(apkFilePath):
# info = GetApkInformation(apkFilePath)
# for line in info.split('\n'):
# if "application:" in line:
# line = line[line.index("icon='"): -1]
# line = line.replace("icon='", "")
# if "'" in line:
# line = line[0: line.index("'")]
# return line
# return line
#合并两个函数到一起
def SaveApkIcon(apkFilePath, iconSavePath)->"获取 apk 文件的图标":
try:
info = GetApkInformation(apkFilePath)
for line in info.split('\n'):
if "application:" in line:
xmlpath = line.split(":")[-1].split()[-1].split("=")[-1].replace("'","")
if xmlpath.endswith('.xml'):
xmlsave = getsavexml()
print(xmlpath)
xmlsave.savexml(apkFilePath,xmlpath,iconSavePath)
else:
zip = zipfile.ZipFile(apkFilePath)
iconData = zip.read(xmlpath)
with open(iconSavePath, 'w+b') as saveIconFile:
saveIconFile.write(iconData)
except:
traceback.print_exc()
print("Error, show defult icon")
shutil.copy(programPath + "/defult.png", iconSavePath)
#def SaveApkIcon(apkFilePath, iconSavePath):
# zip = zipfile.ZipFile(apkFilePath)
# iconData = zip.read(GetApkIconInApk(apkFilePath))
# with open(iconSavePath, 'w+b') as saveIconFile:
# saveIconFile.write(iconData)
def TextboxAddText1(message):
global textbox1
textbox1.configure(state=tk.NORMAL)
textbox1.insert(tk.END,message + "\n")
textbox1.configure(state=tk.DISABLED)
# 获取用户桌面目录
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('~')
###########################
# 程序信息
###########################
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
lang = get_now_lang()
langFile = json.loads(readtxt(programPath + "/Language.json"))
if not lang in langFile.keys():
lang = "en_US.UTF-8"
information = json.loads(readtxt(programPath + "/information.json"))
version = information["Version"]
title = "{} {}".format(langFile[lang]["Uengine Apk Builder"]["Title"], version)
iconPath = "{}/icon.png".format(os.path.split(os.path.realpath(__file__))[0])
###########################
# 加载配置
###########################
if not os.path.exists(get_home() + "/.config/uengine-runner"): # 如果没有配置文件夹
os.makedirs(get_home() + "/.config/uengine-runner") # 创建配置文件夹
if not os.path.exists(get_home() + "/.config/uengine-runner/FindApkBuildHistory.json"): # 如果没有配置文件
write_txt(get_home() + "/.config/uengine-runner/FindApkBuildHistory.json", json.dumps({})) # 创建配置文件
if not os.path.exists(get_home() + "/.config/uengine-runner/FindApkBuild.json"): # 如果没有配置文件
write_txt(get_home() + "/.config/uengine-runner/FindApkBuild.json", json.dumps({"path": "~"})) # 创建配置文件
###########################
# 设置变量
###########################
findApkHistory = list(json.loads(readtxt(get_home() + "/.config/uengine-runner/FindApkBuildHistory.json")).values())
###########################
# 窗口创建
###########################
win = tk.Tk()
qianZhui = tk.BooleanVar()
window = ttk.Frame(win)
frame2 = ttk.Frame(window)
label1 = ttk.Label(window, text=langFile[lang]["Uengine Apk Builder"]["label1"])
combobox1 = ttk.Combobox(window, width=100)
button2 = ttk.Button(window, text=langFile[lang]["Uengine Apk Builder"]["button2"], command=FindApk)
button3 = ttk.Button(frame2, text=langFile[lang]["Uengine Apk Builder"]["button3"], command=BuildDeb)
check = ttk.Checkbutton(frame2, variable=qianZhui,text=langFile[lang]["Uengine Apk Builder"]["check"])
textbox1 = tk.Text(window, width=100)
menu = tk.Menu(window, background="white") # 设置菜单栏
programmenu = tk.Menu(menu, tearoff=0, background="white") # 设置“程序”菜单栏
menu.add_cascade(label=langFile[lang]["Uengine Apk Builder"]["Menu"][0]["Name"], menu=programmenu)
programmenu.add_command(label=langFile[lang]["Uengine Apk Builder"]["Menu"][0]["Menu"][0], command=window.quit) # 设置“退出程序”项
# 设置控件
combobox1['value'] = findApkHistory
textbox1.configure(state=tk.DISABLED)
textbox1.config(foreground='white', background='black')
# 如果有参数
if len(sys.argv) > 1:
combobox1.set(sys.argv[1])
# 设置窗口
style = ttkthemes.ThemedStyle(win)
style.set_theme("breeze")
#win.attributes('-alpha', 0.5)
win.title(title)
win.resizable(0, 0)
win.iconphoto(False, tk.PhotoImage(file=iconPath))
#
win.config(menu=menu) # 显示菜单栏
label1.grid(row=2, column=0)
combobox1.grid(row=2, column=1)
button2.grid(row=2, column=2)
button3.grid(row=0, column=1)
check.grid(row=0, column=0)
frame2.grid(row=3, columnspa=3)
textbox1.grid(row=4, columnspa=3)
window.pack()
win.mainloop()

View File

@@ -1,11 +0,0 @@
#!/usr/bin/env python3
import os
import sys
if len(sys.argv) > 1:
if sys.argv[1] == "--help":
print("帮助:")
print("uengine-app-install apk路径")
sys.exit(0)
sys.exit(os.system("sudo /usr/bin/uengine-session-launch-helper -- uengine install --apk='{}'".format(sys.argv[1])))
print("命令参数错误")
sys.exit(1)

View File

@@ -1,11 +0,0 @@
#!/usr/bin/env python3
import os
import sys
if len(sys.argv) > 1:
if sys.argv[1] == "--help":
print("帮助:")
print("uengine-app-uninstall apk包名")
sys.exit(0)
sys.exit(os.system("sudo /usr/bin/uengine-session-launch-helper -- uengine uninstall --pkg='{}'".format(sys.argv[1])))
print("命令参数错误")
sys.exit(1)

View File

@@ -1,11 +0,0 @@
#!/usr/bin/env python3
import os
import sys
if len(sys.argv) > 1:
if sys.argv[1] == "--help":
print("帮助:")
print("输入命令即可清空/重置UEngine")
sys.exit(0)
print("参数错误")
sys.exit(1)
sys.exit(os.system("sudo rm -rf /data/uengine"))

View File

@@ -1,16 +0,0 @@
[Desktop Entry]
Categories=system;Utility;
Encoding=UTF-8
Exec=uengine-runner -ci %F
GenericName=APK Install(UEngine)
GenericName[zh_CN]=APK 安装UEngine
Icon=/opt/apps/uengine-runner/icon.png
MimeType=application/apk;
Name=APK Install(UEngine)
Name[zh_CN]=APK 安装UEngine
NoDisplay=true
OnlyShowIn=Unity;
StartupNotify=false
StartupWMClass=APK 安装UEngine
Terminal=false
Type=Application

View File

@@ -1,227 +0,0 @@
#!/usr/bin/env python3
#########################################
# 版本1.5.1
# 更新时间2021年10月06日
# Need: unix, python3-tk, python3-pip, pymouse, keyboard
#########################################
import os
import sys
import time
import json
import shutil
import keyboard
import traceback
import ttkthemes
import pyautogui
import threading
import tkinter as tk
import tkinter.ttk as ttk
import tkinter.messagebox as messagebox
import tkinter.filedialog as filedialog
import Xlib.threaded as threaded
#import pymouse.unix as pymouse
########################
#
########################
def Inputt(key):
if key.event_type == "up":
global setting
if setting:
Setting(key)
else:
Mouse(key)
#Mouse(key)
def Open():
path = filedialog.askopenfilename(title="打开", filetypes=[["json 文件", "*.json"], ["全部文件", ["*.*"]]])
if not path == "" or path == ():
shutil.copy(path, get_home() + "/.config/uengine-keyboard/key.json")
if messagebox.askyesno(title="提示", message="导入成功!是否现在重启程序以便生效?"):
ReStartProgram()
def Save():
path = filedialog.asksaveasfilename(title="打开", filetypes=[["json 文件", "*.json"], ["全部文件", ["*.*"]]])
if not path == "" or path == ():
shutil.copy(get_home() + "/.config/uengine-keyboard/key.json", path)
messagebox.showinfo(title="提示", message="导出成功!")
# 重启本应用程序
def ReStartProgram()->"重启本应用程序":
python = sys.executable
os.execl(python, python, * sys.argv)
def Mouse(key):
print(keybo)
if keybo.__contains__(key.name):
print(keybo[key.name]["MousePlace"])
pyautogui.FAILSAFE = False
#os.system(programPath + "/mouse.py {} {}".format(keybo[key.name]["MousePlace"][0], keybo[key.name]["MousePlace"][1]))
pyautogui.click(keybo[key.name]["MousePlace"][0], keybo[key.name]["MousePlace"][1])
#pyautogui.click(1500, 800)
#m.click(keybo[key.name]["MousePlace"][0],keybo[key.name]["MousePlace"][1])
def Setting(key):
if key.event_type == 'up':
keybo[key.name] = {"Mouse": "Left", "MousePlace": pyautogui.position()}
write_txt("{}/.config/uengine-keyboard/key.json".format(get_home()), json.dumps(keybo))
global inputs
inputs = True
global setting
setting = False
return False
def ShowTips():
try:
if setting:
settingLabelText.set('''设置方法:把鼠标移动带所需位置然后按下需要设置的按键即可({}x{}
提示:
1、目前不支持同时按两个及以上按键只支持在单一时间内按一个按键;
2、使用映射不能关闭本窗口但可以最小化;
3、本程序需要 root 权限才能使用;
4、映射时会占用鼠标所以在使用时最好不要使用鼠标;'''.format(pyautogui.position()[0], pyautogui.position()[1]))
settingButton.configure(state=tk.DISABLED)
else:
settingLabelText.set('''点击“设置”按钮设置映射({}x{}
提示:
1、目前不支持同时按两个及以上按键只支持在单一时间内按一个按键;
2、使用映射不能关闭本窗口但可以最小化;
3、本程序需要 root 权限才能使用;
4、映射时会占用鼠标所以在使用时最好不要使用鼠标;'''.format(pyautogui.position()[0], pyautogui.position()[1]))
settingButton.configure(state=tk.NORMAL)
time.sleep(0.1)
ShowTips()
except:
traceback.print_exc()
if not close:
ShowTips()
def Closing():
close = True
window.destroy()
def Key():
keyboard.hook(Inputt)
# 获取用户主目录
def get_home()->"获取用户主目录":
return os.path.expanduser('~')
# 写入文本文档
def write_txt(path: "路径", things: "内容")->"写入文本文档":
file = open(path, 'w', encoding='UTF-8') # 设置文件对象
file.write(things) # 写入文本
file.close() # 关闭文本对象
# 读取文本文档
def readtxt(path: "路径")->"读取文本文档":
f = open(path, "r") # 设置文件对象
str = f.read() # 获取内容
f.close() # 关闭文本对象
return str # 返回结果
def Settings():
global setting
setting = True
def Clean():
if messagebox.askokcancel(title="提示", message="你确定要删除吗?"):
shutil.rmtree("{}/.config/uengine-keyboard".format(get_home()))
if messagebox.askyesno(title="提示", message="删除成功!是否现在重启程序以便生效?"):
ReStartProgram()
def About():
threading.Thread(target=os.system, args=["{}/uengine-runner-about".format(programPath)]).start()
###################
#
###################
if not os.path.exists("{}/.config/uengine-keyboard".format(get_home())):
os.mkdir("{}/.config/uengine-keyboard".format(get_home()))
if not os.path.exists("{}/.config/uengine-keyboard/key.json".format(get_home())):
write_txt("{}/.config/uengine-keyboard/key.json".format(get_home()), "{}")
###################
#
###################
setting = False
close = False
programPath = os.path.split(os.path.realpath(__file__))[0] # 返回 string
iconPath = "{}/icon.png".format(os.path.split(os.path.realpath(__file__))[0])
keybo = json.loads(readtxt("{}/.config/uengine-keyboard/key.json".format(get_home())))
version = json.loads(readtxt("{}/information.json".format(programPath)))["Version"]
###################
# 判断是不是 root
###################
if os.geteuid() != 0:
print("不是以 root 权限运行本程序!")
root = tk.Tk()
root.overrideredirect(1)
root.withdraw()
messagebox.showerror(title="错误", message="不是以 root 权限运行本程序!")
sys.exit(1)
###################
#
###################
window = tk.Tk()
win = ttk.Frame(window)
show = ttk.Frame(win)
settingLabelText = tk.StringVar()
# 设置菜单栏
menu = tk.Menu(window, tearoff=0, background="white")
programMenu = tk.Menu(menu, tearoff=0, background="white")
aboutMenu = tk.Menu(menu, tearoff=0, background="white")
settingLabel = ttk.Label(win, textvariable=settingLabelText)
settingMouseToKeyboard = ttk.Button(show, text="启动键盘映射(已启用)")
settingButton = ttk.Button(show, text="添加或覆盖键盘映射设置", command=Settings)
settingMouseToKeyboard.configure(state=tk.DISABLED)
style = ttkthemes.ThemedStyle(window)
style.set_theme("breeze")
window.protocol('WM_DELETE_WINDOW', Closing)
window.resizable(0, 0)
window.iconphoto(False, tk.PhotoImage(file=iconPath))
window.title("UEngine 键盘映射 {}".format(version))
menu.add_cascade(label="程序", menu=programMenu)
menu.add_cascade(label="帮助", menu=aboutMenu)
menu.configure(activebackground="dodgerblue")
programMenu.add_command(label="导入映射设置", command=Open)
programMenu.add_command(label="导出映射设置", command=Save)
programMenu.add_command(label="删除所有映射设置", command=Clean)
programMenu.add_separator()
programMenu.add_command(label="退出程序", command=sys.exit)
programMenu.configure(activebackground="dodgerblue")
aboutMenu.add_command(label="关于", command=About)
window.config(menu=menu) # 显示菜单栏
show.grid(row=1, column=0)
settingLabel.grid(row=0, column=0)
settingMouseToKeyboard.grid(row=0, column=0)
settingButton.grid(row=0, column=1)
win.pack(fill="both", expand="yes")
#threaded.lock.allocate_lock()
threading.Thread(target=Key).start()
threading.Thread(target=ShowTips).start()
pyautogui.FAILSAFE = False
'''def B(key):
if key.event_type == "up":
print(pyautogui.position())
print(key.name)
pyautogui.click(1500, 800)
keyboard.hook(B)
keyboard.wait()'''
window.mainloop()

Some files were not shown because too many files have changed in this diff Show More