Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9799b598c3 | ||
|
|
2933fc90df | ||
|
|
4a4a75eacd | ||
|
|
42516f874a | ||
|
|
c4b977c31c | ||
|
|
df6d4ef120 | ||
|
|
8e9489b7f7 | ||
|
|
b6d435def7 | ||
|
|
60c3920f1f | ||
|
|
f9f163b973 | ||
|
|
1b30fd4a6c | ||
|
|
0b27387d08 | ||
|
|
0bcc1dfc18 | ||
|
|
c4a0fcfa6e |
@@ -0,0 +1,73 @@
|
||||
# This file is used to ignore files which are generated
|
||||
# ----------------------------------------------------------------------------
|
||||
|
||||
*~
|
||||
*.autosave
|
||||
*.a
|
||||
*.core
|
||||
*.moc
|
||||
*.o
|
||||
*.obj
|
||||
*.orig
|
||||
*.rej
|
||||
*.so
|
||||
*.so.*
|
||||
*_pch.h.cpp
|
||||
*_resource.rc
|
||||
*.qm
|
||||
.#*
|
||||
*.*#
|
||||
core
|
||||
!core/
|
||||
tags
|
||||
.DS_Store
|
||||
.directory
|
||||
*.debug
|
||||
Makefile*
|
||||
*.prl
|
||||
*.app
|
||||
moc_*.cpp
|
||||
ui_*.h
|
||||
qrc_*.cpp
|
||||
Thumbs.db
|
||||
*.res
|
||||
*.rc
|
||||
/.qmake.cache
|
||||
/.qmake.stash
|
||||
|
||||
# qtcreator generated files
|
||||
*.pro.user*
|
||||
|
||||
# xemacs temporary files
|
||||
*.flc
|
||||
|
||||
# Vim temporary files
|
||||
.*.swp
|
||||
|
||||
# Visual Studio generated files
|
||||
*.ib_pdb_index
|
||||
*.idb
|
||||
*.ilk
|
||||
*.pdb
|
||||
*.sln
|
||||
*.suo
|
||||
*.vcproj
|
||||
*vcproj.*.*.user
|
||||
*.ncb
|
||||
*.sdf
|
||||
*.opensdf
|
||||
*.vcxproj
|
||||
*vcxproj.*
|
||||
|
||||
# MinGW generated files
|
||||
*.Debug
|
||||
*.Release
|
||||
|
||||
# Python byte code
|
||||
*.pyc
|
||||
|
||||
# Binaries
|
||||
# --------
|
||||
*.dll
|
||||
*.exe
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
# Default ignored files
|
||||
/shelf/
|
||||
/workspace.xml
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="PYTHON_MODULE" version="4">
|
||||
<component name="NewModuleRootManager">
|
||||
<content url="file://$MODULE_DIR$" />
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
</component>
|
||||
</module>
|
||||
@@ -1,6 +0,0 @@
|
||||
<component name="InspectionProjectProfileManager">
|
||||
<settings>
|
||||
<option name="USE_PROJECT_PROFILE" value="false" />
|
||||
<version value="1.0" />
|
||||
</settings>
|
||||
</component>
|
||||
@@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7" project-jdk-type="Python SDK" />
|
||||
</project>
|
||||
@@ -1,8 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="ProjectModuleManager">
|
||||
<modules>
|
||||
<module fileurl="file://$PROJECT_DIR$/.idea/deepin-wine-run.iml" filepath="$PROJECT_DIR$/.idea/deepin-wine-run.iml" />
|
||||
</modules>
|
||||
</component>
|
||||
</project>
|
||||
@@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
||||
|
After Width: | Height: | Size: 22 KiB |
|
After Width: | Height: | Size: 62 KiB |
|
After Width: | Height: | Size: 67 KiB |
|
After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 126 KiB |
|
After Width: | Height: | Size: 270 KiB |
|
After Width: | Height: | Size: 66 KiB |
|
After Width: | Height: | Size: 76 KiB |
@@ -0,0 +1,674 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
@@ -1,49 +1,31 @@
|
||||
# deepin-wine 运行器
|
||||
<p width=100px align="center"><img src="https://storage.deepin.org/thread/202208031419283599_deepin-wine-runner.png"></p>
|
||||
<h1 align="center">Wine 运行器 C++ 版</h1>
|
||||
<hr>
|
||||
<a href='https://gitee.com/gfdgd-xi/deep-wine-runner/stargazers'><img src='https://gitee.com/gfdgd-xi/deep-wine-runner/badge/star.svg?theme=dark' alt='star'></img></a>
|
||||
<a href='https://gitee.com/gfdgd-xi/deep-wine-runner/members'><img src='https://gitee.com/gfdgd-xi/deep-wine-runner/badge/fork.svg?theme=dark' alt='fork'></img></a>
|
||||
|
||||
#### 介绍
|
||||
一个图形化了以下命令的程序
|
||||
|
||||
```
|
||||
WINEPREFIX=容器路径 deepin-wine 可执行文件路径
|
||||
```
|
||||
让你的 deepin-wine 打包轻松一点
|
||||
是使用 Python3 的 tkinter 构建的
|
||||
|
||||
(测试平台:deepin 20.1 1030)
|
||||
|
||||
#### 软件架构
|
||||
i386 和 amd64,deepin-wine 和 deepin-wine5 运行在哪就运行在哪
|
||||
|
||||
|
||||
#### 安装教程
|
||||
|
||||
1. 安装所需依赖
|
||||
|
||||
```
|
||||
sudo apt install deepin-wine python3 python3-tk git
|
||||
## 介绍
|
||||
Wine运行器是一个能让Linux用户更加方便地运行Windows应用的程序。原版的 Wine 只能使用命令操作,且安装过程较为繁琐,对小白不友好。于是该运行器为了解决该痛点,内置了对Wine图形化的支持、Wine 安装器、微型应用商店、各种Wine工具、自制的Wine程序打包器、运行库安装工具等。
|
||||
它同时还内置了基于Qemu/VirtualBox制作的、专供小白使用的Windows虚拟机安装工具,可以做到只需下载系统镜像并点击安装即可,无需考虑虚拟机的安装、创建、分区等操作,也能在非 X86 架构安装 X86 架构的 Windows 操作系统(但是效率较低,可以运行些老系统)。
|
||||
而且对于部分 Wine 应用适配者来说,提供了图形化的打包工具,以及提供了一些常用工具以及运行库的安装方式,以及能安装多种不同的 Wine 以测试效果,能极大提升适配效率。
|
||||
且对于 Deepin23 用户做了特别优化,以便能在缺少 i386 运行库的情况下运行 Wine32。同时也为非 X86 架构用户提供了 Box86/64、Qemu User 的安装方式
|
||||
该版本用于解决 Python 版 Wine 运行器依赖过于复杂的问题(简化版 Wine 运行器)
|
||||
|
||||
## 如何编译
|
||||
```bash
|
||||
git clone https://gitee.com/gfdgd-xi/deep-wine-runner-cpp --depth=1
|
||||
cd deep-wine-runner-cpp
|
||||
qmake .
|
||||
make -j4
|
||||
./deep-wine-runner-cpp
|
||||
```
|
||||
|
||||
2. 下载本程序
|
||||
|
||||
```
|
||||
git clone https://gitee.com/gfdgd-xi/deep-wine-runner.git
|
||||
```
|
||||
|
||||
3. 运行本程序
|
||||
|
||||
```
|
||||
cd deep-wine-runner
|
||||
chmod 777 main.py
|
||||
./main.py
|
||||
```
|
||||
## 请作者吃点零食
|
||||
如果你觉得 Wine 运行器对你有帮助,可以请作者吃点零食
|
||||
(本来想说喝一杯咖啡的,但我不喝啊)
|
||||
<img src="Icon/QR/Wechat.png" width="200" />
|
||||
<img src="Icon/QR/Alipay.jpg" width="200" />
|
||||
<img src="Icon/QR/QQ.png" width="200" >
|
||||
|
||||
|
||||
#### 使用说明
|
||||
|
||||
(均在软件的“小提示”里有说明)
|
||||
1. 使用终端运行该程序,可以看到 deepin-wine(deepin-wine5)以及程序本身的提示和报错
|
||||
|
||||
|
||||
#### 特技
|
||||
|
||||
难道是使用 tkinter 进行构建吗?所以没有咯
|
||||
# ©2020-Now gfdgd xi
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
<RCC>
|
||||
<qresource prefix="/">
|
||||
<file>information.json</file>
|
||||
<file>LICENSE</file>
|
||||
</qresource>
|
||||
<qresource prefix="/Icon">
|
||||
<file>deepin-wine-runner_512x512.png</file>
|
||||
<file>deepin-wine-runner.svg</file>
|
||||
<file>Icon/Program/AboutIcon0.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="/Icon/QR">
|
||||
<file>Icon/QR/Alipay.jpg</file>
|
||||
<file>Icon/QR/QQ.png</file>
|
||||
<file>Icon/QR/Wechat.png</file>
|
||||
</qresource>
|
||||
<qresource prefix="/Icon/Function">
|
||||
<file>Icon/Function/CHROOT.png</file>
|
||||
<file>Icon/Function/more-wine.png</file>
|
||||
<file>Icon/Function/wine.png</file>
|
||||
<file>Icon/Function/wine23A.png</file>
|
||||
<file>Icon/Function/wine23P.png</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
@@ -0,0 +1,79 @@
|
||||
#include "about_this_program.h"
|
||||
#include "ui_about_this_program.h"
|
||||
|
||||
#include <QDateTime>
|
||||
|
||||
about_this_program::about_this_program(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::about_this_program)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
QString tips = tr("<h4>提示:</h4>\n"\
|
||||
"1、使用终端运行该程序,可以看到 wine 以及程序本身的提示和报错;\n"\
|
||||
"2、wine 32 位和 64 位的容器互不兼容;\n"\
|
||||
"3、所有的 wine 和 winetricks 均需要自行安装(可以从 菜单栏=>程序 里面进行安装);\n"\
|
||||
"4、本程序支持带参数运行 wine 程序(之前版本也可以),只需要按以下格式即可:\n"\
|
||||
"exe路径\' 参数 \'\n"\
|
||||
"即可(单引号需要输入);\n"\
|
||||
"5、wine 容器如果没有指定,则会默认为 ~/.wine;\n"\
|
||||
"6、如果可执行文件比较大的话,会出现点击“获取该程序运行情况”出现假死的情况,因为正在后台读取 SHA1,只需要等一下即可(读取速度依照您电脑处理速度、读写速度、可执行文件大小等有关);\n"\
|
||||
"7、如果非 X86 的用户的 UOS 专业版用户想要使用的话,只需要在应用商店安装一个 Wine 版本微信即可在本程序选择正确的 Wine 运行程序;");
|
||||
QString aboutProgram = tr("<p>Wine运行器是一个能让Linux用户更加方便地运行Windows应用的程序。原版的 Wine 只能使用命令操作,且安装过程较为繁琐,对小白不友好。于是该运行器为了解决该痛点,内置了对Wine图形化的支持、Wine 安装器、微型应用商店、各种Wine工具、自制的Wine程序打包器、运行库安装工具等。</p>\n"\
|
||||
"<p>它同时还内置了基于Qemu/VirtualBox制作的、专供小白使用的Windows虚拟机安装工具,可以做到只需下载系统镜像并点击安装即可,无需考虑虚拟机的安装、创建、分区等操作,也能在非 X86 架构安装 X86 架构的 Windows 操作系统(但是效率较低,可以运行些老系统)。</p>\n"\
|
||||
"<p>而且对于部分 Wine 应用适配者来说,提供了图形化的打包工具,以及提供了一些常用工具以及运行库的安装方式,以及能安装多种不同的 Wine 以测试效果,能极大提升适配效率。</p>\n"\
|
||||
"<p>且对于 Deepin23 用户做了特别优化,以便能在缺少 i386 运行库的情况下运行 Wine32。同时也为非 X86 架构用户提供了 Box86/64、Qemu User 的安装方式</p>\n"\
|
||||
"<pre>");
|
||||
QString goodRunSystem = tr("常见 Linux 发行版");
|
||||
QString updateThingsString = "";
|
||||
QString updateTime = "2023年12月24日";
|
||||
QString thankText = "";
|
||||
QString version = "";
|
||||
QString programUrl = "https://gitee.com/gfdgd-xi/deep-wine-runner\nhttps://github.com/gfdgd-xi/deep-wine-runner\nhttps://gfdgd-xi.github.io";
|
||||
QString about = "<style>\n"\
|
||||
"a:link, a:active {{\n"\
|
||||
" text-decoration: none;\n"\
|
||||
"}}\n"\
|
||||
"</style>\n"\
|
||||
"<h1>关于</h1>\n"\
|
||||
"" + aboutProgram + "\n"\
|
||||
"\n"\
|
||||
"版本:" + version + "\n"\
|
||||
"适用平台:" + goodRunSystem + "\n"\
|
||||
"安装包构建时间:" + __DATE__ + " " + __TIME__ + "\n"\
|
||||
"Qt 版本:" + qVersion() + "\n"\
|
||||
"程序官网:" + programUrl + "\n"\
|
||||
"<b>Wine 运行器 QQ 交流群:762985460</b>\n"\
|
||||
"<b>Wine运行器 QQ 频道:https://pd.qq.com/s/edqkgeydx</b>\n"\
|
||||
"当前程序占用体积:@programSize@MB</pre>\n"\
|
||||
"<p>本程序依照 GPLV3 协议开源</p>\n"\
|
||||
"<hr>\n"\
|
||||
"<h1>鸣谢名单</h1>\n"\
|
||||
"<pre>" + thankText + "</pre>\n"\
|
||||
"<hr>\n"\
|
||||
"<h1>更新内容</h1>\n"\
|
||||
"<pre>" + updateThingsString + "\n"\
|
||||
"<b>更新时间:" + updateTime + "</b></pre>\n"\
|
||||
"<hr>\n"\
|
||||
"<h1>提示</h1>\n"\
|
||||
"<pre>" + tips + "\n"\
|
||||
"</pre>\n"\
|
||||
"<hr>\n"\
|
||||
"<h1>友谊链接</h1>\n"\
|
||||
"<pre>星火应用商店:<a href='https://spark-app.store/'>https://spark-app.store/</a>\n"\
|
||||
"Deepin 官网:<a href='https://www.deepin.org'>https://www.deepin.org</a>\n"\
|
||||
"Deepin 论坛:<a href='https://bbs.deepin.org'>https://bbs.deepin.org</a>\n"\
|
||||
"gfdgd xi:<a href='https://gfdgd-xi.github.io'>https://gfdgd-xi.github.io</a>\n"\
|
||||
"<hr>\n"\
|
||||
"<h1>©2020~" + QDateTime(QDateTime::currentDateTime()).toString("yyyy") + " By gfdgd xi</h1>";
|
||||
}
|
||||
|
||||
about_this_program::~about_this_program()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
void about_this_program::on_ok_clicked()
|
||||
{
|
||||
this->close();
|
||||
}
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
#ifndef ABOUT_THIS_PROGRAM_H
|
||||
#define ABOUT_THIS_PROGRAM_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class about_this_program;
|
||||
}
|
||||
|
||||
class about_this_program : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit about_this_program(QWidget *parent = nullptr);
|
||||
~about_this_program();
|
||||
|
||||
private slots:
|
||||
void on_ok_clicked();
|
||||
|
||||
private:
|
||||
Ui::about_this_program *ui;
|
||||
};
|
||||
|
||||
#endif // ABOUT_THIS_PROGRAM_H
|
||||
@@ -0,0 +1,78 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>about_this_program</class>
|
||||
<widget class="QDialog" name="about_this_program">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>863</width>
|
||||
<height>498</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>关于 Wine 运行器</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="Resources.qrc">
|
||||
<normaloff>:/Icon/deepin-wine-runner.svg</normaloff>:/Icon/deepin-wine-runner.svg</iconset>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="1">
|
||||
<widget class="QTextBrowser" name="aboutInfo"/>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="ok">
|
||||
<property name="text">
|
||||
<string>确定</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="0" column="0">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="iconShow">
|
||||
<property name="text">
|
||||
<string><a><img src=":/Icon/deepin-wine-runner.svg" width=256 ></a></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="Resources.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -0,0 +1,38 @@
|
||||
QT += core gui
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
CONFIG += c++17
|
||||
|
||||
# You can make your code fail to compile if it uses deprecated APIs.
|
||||
# In order to do so, uncomment the following line.
|
||||
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
|
||||
|
||||
SOURCES += \
|
||||
about_this_program.cpp \
|
||||
main.cpp \
|
||||
mainwindow.cpp \
|
||||
qr.cpp
|
||||
|
||||
HEADERS += \
|
||||
about_this_program.h \
|
||||
mainwindow.h \
|
||||
qr.h
|
||||
|
||||
FORMS += \
|
||||
about_this_program.ui \
|
||||
mainwindow.ui \
|
||||
qr.ui
|
||||
|
||||
TRANSLATIONS += \
|
||||
deep-wine-runner-cpp_zh_CN.ts
|
||||
CONFIG += lrelease
|
||||
CONFIG += embed_translations
|
||||
|
||||
# Default rules for deployment.
|
||||
qnx: target.path = /tmp/$${TARGET}/bin
|
||||
else: unix:!android: target.path = /opt/$${TARGET}/bin
|
||||
!isEmpty(target.path): INSTALLS += target
|
||||
|
||||
RESOURCES += \
|
||||
Resources.qrc
|
||||
@@ -0,0 +1,3 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="zh_CN"></TS>
|
||||
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 34 KiB |
@@ -0,0 +1,61 @@
|
||||
{
|
||||
"Version": "3.6.1",
|
||||
"Time": "未知",
|
||||
"Thank": [
|
||||
"感谢 @ёжезийлёзйз 进行 Loongarch 架构的测试(旧世界,远程)",
|
||||
"感谢 @run@3a4k 提供 3a4000 测试机器(远程)",
|
||||
"感谢 RacoonGX 的付出与贡献",
|
||||
"感谢 @Amber 编写的《使用wine运行器打包无安装包的软件》:https://bbs.deepin.org/post/247720",
|
||||
"感谢 @豪 提供程序图标",
|
||||
"感谢 @鹤舞白沙 对程序文案进行优化以及编写《Wine运行器和Wine打包器傻瓜式使用教程(小白专用) 》:https://bbs.deepin.org/post/246837",
|
||||
"感谢 @璀璨星空 提供的彩蛋图标",
|
||||
"感谢 @Bail 反馈的更新策略问题",
|
||||
"感谢 @白水 反馈的安装 exagear 后无法识别和调用 box86 的问题",
|
||||
"感谢 @汐光. 提供的翻译接口",
|
||||
"感谢 @鹤舞白沙 专门为小白用户编写的使用 Wine 运行器非基于生态适配脚本的程序打包教程",
|
||||
"感谢 @牦牛儿苗 进行了龙芯 3a5000 平台的测试与移植",
|
||||
"感谢 @鹤舞白沙 优化了程序文案",
|
||||
"感谢 @豪 的程序测试和制作的论坛 https://gfdgdxi.flarum.cloud/",
|
||||
"感谢 @185******67 反馈的 2.4.0 无法打开 Visual Basic 组件安装工具的问题",
|
||||
"感谢 @shenmo 提供的 在打包器的 postrm 脚本添加 kill.sh、追加参数改为 --uri xxxxxxx、独立生成容器 7z 文件的功能",
|
||||
"感谢 @a2035274 @虚幻的早晨 https://bbs.deepin.org/post/238301",
|
||||
"感谢 @zhangs https://bbs.deepin.org/post/227948",
|
||||
"感谢 @gtjmaster https://bbs.deepin.org/post/225509",
|
||||
"感谢 @统信UCARE服务 https://mp.weixin.qq.com/s/iOdfNv6phc8F4inackFFTw",
|
||||
"感谢 @星火应用商店 提供部分安装包的源以及本程序的下载地址",
|
||||
"感谢 @delsin 和 @神末shenmo 在 deepin 论坛提供打包器打包的 deb 包自动删除容器的建议",
|
||||
"感谢 @shenmo 反馈的 2.1.0 打包器问题和 2.1.0-1 终端调用问题",
|
||||
"感谢 @GershonWang 在 https://github.com/gfdgd-xi/deep-wine-runner/issues/1 提供窗口居中的建议",
|
||||
"感谢 @134******28 和 @sgb76 提供的新程序 GUI 布局和实现代码",
|
||||
"感谢 @sgb76 为 Wine 打包器(非生态适配脚本)打包的 i386 deb 提供建议",
|
||||
"感谢 @PossibleVing 提供的新版应用图标",
|
||||
"感谢 @zhengjl 反馈的 1.7.0 中 .net framrwork 3.5 非离线版安装包的问题以及 1.8.0 重复路径一直自动重复增加的问题",
|
||||
"感谢 @国川 @刘岐 提供的非 i386、amd64 运行 wine 使用 i386/amd64 可执行文件的教程和脚本",
|
||||
"感谢 @王俊文 @189******09 @tfhyl 提供在非 X86 平台的国产 PC 进行测试",
|
||||
"感谢 @cuisirwork 提供的提供视频教程的建议",
|
||||
"感谢 @办公助手 提供的非 X86 平台 Wine 运行自定义 exe 应用教程和 deb 包",
|
||||
"感谢 @季星火 反馈的无法使用该程序删除生成的 .desktop 的问题",
|
||||
"感谢 @ZYH 提供的敏感词列表",
|
||||
"感谢 @五行缺钱 反馈的 2.0.0 在 Deepin 23 缺失依赖 toilet 的问题",
|
||||
"感谢 @云的眼泪 @zhengjl 反馈的 2.0.0 发布忘记把安装包传蓝奏云的问题",
|
||||
"感谢 @虚幻的早晨 提出的添加 DXVK、VKD3D 的功能(VKD3D 暂未实现)",
|
||||
"感谢 @以勒 修改 Dll 提取工具提示文本的建议",
|
||||
"感谢 @历山居士 反馈的获取自动配置容器脚本工具无法正常加载数据的问题",
|
||||
"感谢 @Nick @奋斗ing 反馈的 2.1.0-2 的快捷方式故障",
|
||||
"感谢 @俊生鹏程 反馈的 2.1.0-2 及以前版本在鲲鹏运行 wine 错误的问题并积极测试,以及组件安装工具在 arm 架构的异常",
|
||||
"感谢 @云的眼泪 反馈的 2.1.0-2 更新死循环的问题,可见:https://bbs.deepin.org/post/243241,以及感谢 @神末shenmo @忘记、过去 和 @历山居士 的讨论",
|
||||
"感谢 @186******75 反馈的 2.2.0 基于生态适配脚本打包器对话框异常的问题",
|
||||
"感谢微信用户 @华为 @办公助手 @白水 @北冥没有鱼 @俊生鹏程 @^♀莫離♪^ @姚洪安 @гυи @杨飞 在 arm(飞腾/鲲鹏)架构上提供提供测试与帮助",
|
||||
"感谢 @办公助手 提供的 2.4.0 打包器支持生成的 arm 架构 deb 包同时支持 UOS box86+exagear 的建议",
|
||||
"",
|
||||
"感谢统信在 Wine 生态适配活动中提供的打包脚本",
|
||||
"也感谢 Deepin Wine 团体制作的 Deepin Wine 和对应的 Deepin Wine Tools,对本程序有很大的帮助",
|
||||
"也感谢 DXVK 的开发者开发了 DXVK 这个程序,项目链接:https://github.com/doitsujin/dxvk",
|
||||
"也感谢 WineHQ 开发团队开发的 WineHQ,项目网址:https://dl.winehq.org/",
|
||||
"也感谢来自 Vek 的灵感和 Vek 开发者的支持,项目链接:https://jihulab.com/vk",
|
||||
"最后也感谢支持本程序的用户和上传相关软件运行情况数据的用户,有你们的支持和使用,使这个程序变得更好",
|
||||
"",
|
||||
"可以从上面的各种解决方案更好的学习 Wine 生态适配,也可以看 deepin 论坛板块 https://bbs.deepin.org/module/detail/116 进行学习,最后也向各位有进行 Wine 生态适配的大佬进行由衷的感谢!",
|
||||
"如果上面有遗漏,请向我反馈补充"
|
||||
]
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
#include "mainwindow.h"
|
||||
|
||||
#include <QApplication>
|
||||
#include <QLocale>
|
||||
#include <QTranslator>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
QApplication a(argc, argv);
|
||||
|
||||
QTranslator translator;
|
||||
const QStringList uiLanguages = QLocale::system().uiLanguages();
|
||||
for (const QString &locale : uiLanguages) {
|
||||
const QString baseName = "deep-wine-runner-cpp_" + QLocale(locale).name();
|
||||
if (translator.load(":/i18n/" + baseName)) {
|
||||
a.installTranslator(&translator);
|
||||
break;
|
||||
}
|
||||
}
|
||||
MainWindow w;
|
||||
return a.exec();
|
||||
}
|
||||
@@ -1,145 +0,0 @@
|
||||
#!/usr/bin/env python3
|
||||
#########################################################################
|
||||
# 作者:gfdgd xi
|
||||
# 版本:1.1
|
||||
# 感谢:感谢 deepin-wine 团队,提供了 deepin-wine 给大家使用,让我能做这个程序
|
||||
# 基于 Python3 的 tkinter 构建
|
||||
#########################################################################
|
||||
#################
|
||||
# 引入所需的库
|
||||
#################
|
||||
import tkinter as tk
|
||||
import tkinter.filedialog
|
||||
import tkinter.messagebox
|
||||
import os
|
||||
|
||||
###################
|
||||
# 程序所需事件
|
||||
###################
|
||||
# 读取文本文档
|
||||
def readtxt(path):
|
||||
f = open(path, "r") # 设置文件对象
|
||||
str = f.read() # 获取内容
|
||||
f.close() # 关闭文本对象
|
||||
return str # 返回结果
|
||||
|
||||
# 写入文本文档
|
||||
def write_txt(path, things):
|
||||
file = open(path, 'a+', encoding='UTF-8') # 设置文件对象
|
||||
file.write(things) # 写入文本
|
||||
file.close() # 关闭文本对象
|
||||
|
||||
# 获取用户桌面目录
|
||||
def get_desktop_path():
|
||||
for line in open(get_home() + "/.config/user-dirs.dirs"): # 以行来读取配置文件
|
||||
desktop_index = line.find("XDG_DESKTOP_DIR=\"") # 寻找是否有对应项,有返回 0,没有返回 -1
|
||||
if desktop_index != -1: # 如果有对应项
|
||||
break # 结束循环
|
||||
if desktop_index == -1: # 如果是提前结束,值一定≠-1,如果是没有提前结束,值一定=-1
|
||||
return -1
|
||||
else:
|
||||
get = line[17:-2] # 截取桌面目录路径
|
||||
get_index = get.find("$HOME") # 寻找是否有对应的项,需要替换内容
|
||||
if get != -1: # 如果有
|
||||
get = get.replace("$HOME", get_home()) # 则把其替换为用户目录(~)
|
||||
return get # 返回目录
|
||||
|
||||
# 获取用户主目录
|
||||
def get_home():
|
||||
return os.path.expanduser('~')
|
||||
|
||||
# 第一个浏览按钮事件
|
||||
def liulanbutton():
|
||||
path = tkinter.filedialog.askdirectory(title="选择 deepin-wine 容器", initialdir="~/.deepinwine/")
|
||||
if path != "":
|
||||
e1_text.set(path)
|
||||
|
||||
# 第二个浏览按钮事件
|
||||
def liulanexebutton():
|
||||
path = tkinter.filedialog.askopenfilename(title="选择 exe 可执行文件", filetypes=[("exe 可执行文件", "*.exe"), ("所有文件", "*.*")], initialdir="~/")
|
||||
if path != "":
|
||||
e2_text.set(path)
|
||||
|
||||
# 运行可执行文件的事件
|
||||
# (第三个按钮的事件)
|
||||
def runexebutton():
|
||||
if e1_text.get() == "" or e2_text.get() == "": # 判断文本框是否有内容
|
||||
tkinter.messagebox.showinfo(title="提示",message="没有填写需要使用的 deepin-wine 容器或需要运行的 exe 应用")
|
||||
else: # 如果都有
|
||||
print("###############################")
|
||||
os.system("WINEPREFIX='" + e1_text.get() + "' " + o1_text.get() + " '" + e2_text.get() + "'") # 运行
|
||||
|
||||
# 显示“关于这个程序”窗口
|
||||
def about_this_program():
|
||||
tkinter.messagebox.showinfo(title="关于这个程序",message="一个基于 Python3 的 tkinter 制作的 deepin-wine(deepin-wine5) 运行器\n版本:1.1\n适用平台:Linux")
|
||||
|
||||
# 显示“提示”窗口
|
||||
def helps():
|
||||
tkinter.messagebox.showinfo(title="提示", message="提示:\n1、使用终端运行该程序,可以看到 deepin-wine(deepin-wine5) 以及程序本身的提示和报错")
|
||||
|
||||
# 生成 shell 文件在桌面
|
||||
# (第四个按钮的事件)
|
||||
def make_desktop_on_desktop():
|
||||
if e3_text.get() == "" or e2_text.get() == "" or e1_text.get() == "": # 判断文本框是否有内容
|
||||
tkinter.messagebox.showinfo(title="提示",message="没有填写需要使用的 deepin-wine 容器或需要运行的 exe 应用或保存的文件名")
|
||||
else: # 如果都有
|
||||
if os.path.exists(get_desktop_path() + "/" + e3_text.get() + ".sh"): # 判断目录是否有该文件,如果有
|
||||
choose = tkinter.messagebox.askokcancel(title="提示",message="文件已经存在,是否覆盖?") # 询问用户是否覆盖
|
||||
if choose: # 如要覆盖
|
||||
os.remove(get_desktop_path() + "/" + e3_text.get() + ".sh") # 删除该文件
|
||||
else: # 如不覆盖
|
||||
return # 结束
|
||||
os.mknod(get_desktop_path() + "/" + e3_text.get() + ".sh") # 创建文本文档
|
||||
write_txt(get_desktop_path() + "/" + e3_text.get() + ".sh", "#!/bin/bash\n" + "WINEPREFIX='" + e1_text.get() + "' " + o1_text.get() + " '" + e2_text.get() + "'") # 写入文本文档
|
||||
os.system("chmod 777 '" + get_desktop_path() + "/" + e3_text.get() + ".sh" + "'") # 赋予可执行权限
|
||||
tkinter.messagebox.showinfo(title="提示", message="生成完成!") # 显示完成对话框
|
||||
|
||||
###########################
|
||||
# 窗口创建
|
||||
###########################
|
||||
window = tk.Tk() # 创建窗口
|
||||
window.title("deepin-wine 运行器") # 设置标题
|
||||
# 设置变量以修改和获取值项
|
||||
e1_text = tk.StringVar()
|
||||
e2_text = tk.StringVar()
|
||||
o1_text = tk.StringVar()
|
||||
e3_text = tk.StringVar()
|
||||
o1_text.set("deepin-wine")
|
||||
# 创建控件
|
||||
label1 = tk.Label(window, text="选择你想要使用的 deepin-wine 容器:") # 创建标签控件
|
||||
e1 = tk.Entry(window, textvariable=e1_text, width=100) # 创建文本框控件
|
||||
button1 = tk.Button(window, text="浏览", command=liulanbutton) # 创建按钮控件
|
||||
label2 = tk.Label(window, text="选择要启动的 Windows 应用") # 创建标签控件
|
||||
e2 = tk.Entry(window, textvariable=e2_text, width=100) # 创建文本框控件
|
||||
button2 = tk.Button(window, text="浏览", command=liulanexebutton) # 创建按钮控件
|
||||
label3 = tk.Label(window, text="选择要使用的 deepin-wine 版本") # 创建标签控件
|
||||
o1 = tk.OptionMenu(window, o1_text, "deepin-wine", "deepin-wine5") # 创建选择框控件
|
||||
button3 = tk.Button(window, text="启动", command=runexebutton) # 创建按钮控件
|
||||
label4 = tk.Label(window, text="设置文件名,以便把上方填写的信息写入到 shell 文件里") # 创建标签控件
|
||||
e3 = tk.Entry(window, textvariable=e3_text, width=100) # 创建文本框控件
|
||||
button5 = tk.Button(window, text="创建用于运行的 shell 文件到桌面", command=make_desktop_on_desktop) # 创建按钮控件
|
||||
menu = tk.Menu(window) # 设置菜单栏
|
||||
programmenu = tk.Menu(menu,tearoff=0) # 设置“程序”菜单栏
|
||||
menu.add_cascade(label="程序",menu=programmenu)
|
||||
programmenu.add_command(label="退出程序",command=window.quit) # 设置“退出程序”项
|
||||
help = tk.Menu(menu,tearoff=0) # 设置“帮助”菜单栏
|
||||
menu.add_cascade(label="帮助",menu=help)
|
||||
help.add_command(label="小提示",command=helps) # 设置“小提示”项
|
||||
help.add_separator() # 设置分界线
|
||||
help.add_command(label="关于这个程序",command=about_this_program) # 设置“关于这个程序”项
|
||||
# 添加控件
|
||||
window.config(menu=menu) # 显示菜单栏
|
||||
label1.pack()
|
||||
e1.pack()
|
||||
button1.pack()
|
||||
label2.pack()
|
||||
e2.pack()
|
||||
button2.pack()
|
||||
label3.pack()
|
||||
o1.pack()
|
||||
button3.pack()
|
||||
label4.pack()
|
||||
e3.pack()
|
||||
button5.pack()
|
||||
# 启动窗口
|
||||
window.mainloop()
|
||||
@@ -0,0 +1,584 @@
|
||||
#include "mainwindow.h"
|
||||
#include <QGridLayout>
|
||||
#include <QLabel>
|
||||
#include <QComboBox>
|
||||
#include <QPushButton>
|
||||
#include <QMainWindow>
|
||||
#include <QObject>
|
||||
#include <QSizePolicy>
|
||||
#include <QSpacerItem>
|
||||
#include <QTextBrowser>
|
||||
#include <QCoreApplication>
|
||||
#include <iostream>
|
||||
#include <QDebug>
|
||||
#include <QIODevice>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QFile>
|
||||
#include <QProcess>
|
||||
#include <QMessageBox>
|
||||
#include <QObject>
|
||||
using namespace std;
|
||||
QComboBox *MainWindow::e1;
|
||||
QComboBox *MainWindow::e2;
|
||||
QComboBox *MainWindow::o1;
|
||||
QMap<QString, QString> MainWindow::setting;
|
||||
QMap<QString, QString> MainWindow::wine;
|
||||
QString MainWindow::lastRunCommand = "";
|
||||
MainWindow::MainWindow(){
|
||||
/*********
|
||||
* 设置变量
|
||||
*********/
|
||||
|
||||
// 如果要添加其他 wine,请使用安装更多 Wine 功能
|
||||
|
||||
|
||||
QMainWindow *window = new QMainWindow();
|
||||
QWidget *widget = new QWidget();
|
||||
window->setCentralWidget(widget);
|
||||
QGridLayout *mainLayout = new QGridLayout();
|
||||
QSizePolicy size;
|
||||
//size->setVerticalPolicy(0);
|
||||
QWidget *leftUp = new QWidget();
|
||||
mainLayout->addWidget(leftUp, 0, 0, 1, 1);
|
||||
QGridLayout *leftUpLayout = new QGridLayout();
|
||||
leftUp->setLayout(leftUpLayout);
|
||||
QLabel *fastLabel = new QLabel(QObject::tr("快速启动"));
|
||||
fastLabel->setStyleSheet("font: 30px;");
|
||||
leftUpLayout->addWidget(fastLabel, 0, 0, 1, 2);
|
||||
leftUpLayout->addWidget(new QLabel("<hr>"), 1, 0, 1, 2);
|
||||
leftUpLayout->addWidget(new QLabel(QObject::tr("请选择容器路径:")), 2, 0, 1, 1);
|
||||
e1 = new QComboBox();
|
||||
e1->setEditable(1);
|
||||
leftUpLayout->addWidget(e1, 3, 0, 1, 1);
|
||||
button1 = new QPushButton("浏览");
|
||||
//button1.clicked.connect(liulanbutton);
|
||||
leftUpLayout->addWidget(button1, 3, 1, 1, 1);
|
||||
leftUpLayout->addWidget(new QLabel(QObject::tr("请选择要执行的程序(EXE、MSI或者命令):")), 4, 0, 1, 1);
|
||||
e2 = new QComboBox();
|
||||
e2->setEditable(1);
|
||||
leftUpLayout->addWidget(e2, 5, 0, 1, 1);
|
||||
button2 = new QPushButton(QObject::tr("浏览"));
|
||||
//button2.clicked.connect(liulanexebutton);
|
||||
leftUpLayout->addWidget(button2, 5, 1, 1, 1);
|
||||
leftUpLayout->addWidget(new QLabel(QObject::tr("请选择WINE版本:")), 6, 0, 1, 1);
|
||||
o1 = new QComboBox();
|
||||
leftUpLayout->addWidget(o1, 7, 0, 1, 1);
|
||||
// 设置空间权重
|
||||
button1->setSizePolicy(size);
|
||||
button2->setSizePolicy(size);
|
||||
|
||||
// UI 创建
|
||||
QWidget *leftDown = new QWidget();
|
||||
mainLayout->addWidget(leftDown, 1, 0, 1, 1);
|
||||
QVBoxLayout *leftDownLayout = new QVBoxLayout();
|
||||
leftDown->setLayout(leftDownLayout);
|
||||
QLabel *highLabel = new QLabel(QObject::tr("高级功能"));
|
||||
highLabel->setStyleSheet("font: 30px;");
|
||||
leftDownLayout->addWidget(highLabel);
|
||||
leftDownLayout->addWidget(new QLabel("<hr>"));
|
||||
leftDownLayout->addWidget(new QLabel(QObject::tr("创建快捷方式(Desktop文件):")));
|
||||
QHBoxLayout *createDesktopLink = new QHBoxLayout();
|
||||
QLabel *label_r_2 = new QLabel(QObject::tr("名称:"));
|
||||
createDesktopLink->addWidget(label_r_2);
|
||||
QComboBox *combobox1 = new QComboBox();
|
||||
combobox1->setEditable(1);
|
||||
createDesktopLink->addWidget(combobox1);
|
||||
QPushButton *button5 = new QPushButton(QObject::tr("创建到桌面"));
|
||||
//button5.clicked.connect(make_desktop_on_desktop);
|
||||
createDesktopLink->addWidget(button5);
|
||||
QPushButton *saveDesktopFileOnLauncher = new QPushButton(QObject::tr("创建到开始菜单"));
|
||||
//saveDesktopFileOnLauncher.clicked.connect(make_desktop_on_launcher);
|
||||
createDesktopLink->addWidget(saveDesktopFileOnLauncher);
|
||||
leftDownLayout->addLayout(createDesktopLink);
|
||||
QGridLayout *programManager = new QGridLayout();
|
||||
leftDownLayout->addLayout(programManager);
|
||||
programManager->addWidget(new QLabel(QObject::tr("程序管理:")), 0, 0, 1, 1);
|
||||
getProgramIcon = new QPushButton(QObject::tr("提取图标"));
|
||||
//getProgramIcon.clicked.connect(lambda: RunWineProgram(f"{programPath}/BeCyIconGrabber.exe' '{e2.currentText()}" if e2.currentText()[:2].upper() == "C:" else f"{programPath}/BeCyIconGrabber.exe' 'z:/{e2.currentText()}"));
|
||||
programManager->addWidget(getProgramIcon, 1, 0, 1, 1);
|
||||
programManager->addWidget(new QLabel(" "), 1, 1, 1, 1);
|
||||
trasButton = new QPushButton(QObject::tr("窗口透明工具"));
|
||||
//trasButton.clicked.connect(lambda: RunWineProgram(f"{programPath}/窗体透明度设置工具.exe"));
|
||||
programManager->addWidget(trasButton, 1, 2, 1, 1);
|
||||
uninstallProgram = new QPushButton(QObject::tr("卸载程序"));
|
||||
//uninstallProgram.clicked.connect(lambda: RunWineProgram(f"{programPath}/geek.exe"));
|
||||
programManager->addWidget(new QLabel(" "), 1, 3, 1, 1);
|
||||
programManager->addWidget(uninstallProgram, 1, 4, 1, 1);
|
||||
miniAppStore = new QPushButton(QObject::tr("微型应用商店"));
|
||||
//miniAppStore.clicked.connect(lambda: threading.Thread(target=MiniAppStore).start());
|
||||
programManager->addWidget(new QLabel(" "), 1, 5, 1, 1);
|
||||
programManager->addWidget(miniAppStore, 1, 6, 1, 1);
|
||||
programManager->addWidget(new QLabel(" "), 1, 7, 1, 1);
|
||||
QPushButton *getProgramStatus = new QPushButton(QObject::tr("获取该程序运行情况"));
|
||||
//getProgramStatus.clicked.connect(ProgramRunStatusShow.ShowWindow);
|
||||
programManager->addWidget(getProgramStatus, 1, 8, 1, 1);
|
||||
QPushButton *getLoseDll = new QPushButton(QObject::tr("检测静态下程序缺少DLL"));
|
||||
//getLoseDll.clicked.connect(GetLoseDll);
|
||||
programManager->addWidget(new QLabel(" "), 1, 9, 1, 1);
|
||||
programManager->addWidget(getLoseDll, 1, 10, 1, 1);
|
||||
programManager->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum), 1, 11, 1, 1);
|
||||
programManager->addWidget(new QLabel(QObject::tr("WINE配置:")), 2, 0, 1, 1);
|
||||
wineConfig = new QPushButton(QObject::tr("配置容器"));
|
||||
//wineConfig.clicked.connect(lambda: RunWineProgram("winecfg"));
|
||||
programManager->addWidget(wineConfig, 3, 0, 1, 1);
|
||||
QPushButton *fontAppStore = new QPushButton(QObject::tr("字体商店"));
|
||||
//fontAppStore.clicked.connect(FontAppStore);
|
||||
programManager->addWidget(fontAppStore, 3, 2, 1, 1);
|
||||
button_r_6 = new QPushButton(QObject::tr("RegShot"));
|
||||
//button_r_6.clicked.connect(lambda: RunWineProgram(f"{programPath}/RegShot/regshot.exe"));
|
||||
programManager->addWidget(button_r_6, 3, 4, 1, 1);
|
||||
QPushButton *sparkWineSetting = new QPushButton(QObject::tr("星火wine配置"));
|
||||
//sparkWineSetting.clicked.connect(lambda: threading.Thread(target=os.system, args=["bash /opt/durapps/spark-dwine-helper/spark-dwine-helper-settings/settings.sh"]).start());
|
||||
programManager->addWidget(sparkWineSetting, 3, 6, 1, 1);
|
||||
QPushButton *wineAutoConfig = new QPushButton(QObject::tr("自动/手动配置 Wine 容器"));
|
||||
//wineAutoConfig.clicked.connect(WineBottonAutoConfig);
|
||||
programManager->addWidget(wineAutoConfig, 3, 8, 1, 1);
|
||||
QPushButton *wineBottleReboot = new QPushButton(QObject::tr("重启指定Wine容器"));
|
||||
//wineBottleReboot.clicked.connect(lambda: RunWineProgram(f"wineboot' '-k"));
|
||||
programManager->addWidget(wineBottleReboot, 3, 10, 1, 1);
|
||||
|
||||
// 权重
|
||||
button5->setSizePolicy(size);
|
||||
saveDesktopFileOnLauncher->setSizePolicy(size);
|
||||
label_r_2->setSizePolicy(size);
|
||||
getProgramIcon->setSizePolicy(size);
|
||||
//trasButton.setSizePolicy(size);
|
||||
button_r_6->setSizePolicy(size);
|
||||
wineConfig->setSizePolicy(size);
|
||||
|
||||
QTextBrowser *returnText = new QTextBrowser();
|
||||
returnText->setStyleSheet("background-color: black;"\
|
||||
"color: white;");
|
||||
returnText->setText(QObject::tr("在此可以看到wine安装应用时的终端输出内容\n"\
|
||||
"=============================================\n"\
|
||||
"如果解决了你的问题,请不要吝啬你的star哟!\n"\
|
||||
"地址:\n"\
|
||||
"https://gitee.com/gfdgd-xi/deep-wine-runner\n"\
|
||||
"https://github.com/gfdgd-xi/deep-wine-runner\n"\
|
||||
"https://sourceforge.net/projects/deep-wine-runner"));
|
||||
mainLayout->setRowStretch(0, 2);
|
||||
mainLayout->setRowStretch(1, 1);
|
||||
mainLayout->setColumnStretch(0, 2);
|
||||
mainLayout->setColumnStretch(1, 1);
|
||||
mainLayout->addWidget(returnText, 0, 1, 2, 1);
|
||||
|
||||
// 版权
|
||||
QLabel *copy = new QLabel("程序版本:{version},<b>提示:Wine 无法保证可以运行所有的 Windows 程序,如果想要运行更多 Windows 程序,可以考虑虚拟机和双系统</b><br/>"\
|
||||
"<b>注:部分二进制兼容层会自动注册 binfmt(如原版的 Box86/64、Qemu User Static),则意味着无需在 Wine 版本那里特别指定兼容层,直接指定 Wine 即可</b><br/>"\
|
||||
"©2020~" + QDateTime(QDateTime::currentDateTime()).toString("yyyy") + " gfdgd xi");
|
||||
mainLayout->addWidget(copy, 2, 0, 1, 1);
|
||||
|
||||
// 程序运行
|
||||
QWidget *programRun = new QWidget();
|
||||
QHBoxLayout *programRunLayout = new QHBoxLayout();
|
||||
programRun->setLayout(programRunLayout);
|
||||
programRunLayout->addItem(new QSpacerItem(20, 20, QSizePolicy::Expanding, QSizePolicy::Minimum));
|
||||
QPushButton *button3 = new QPushButton(QObject::tr("运行程序"));
|
||||
//button3.clicked.connect(runexebutton);
|
||||
programRunLayout->addWidget(button3);
|
||||
QPushButton *killProgram = new QPushButton(QObject::tr("终止程序"));
|
||||
//killProgram.clicked.connect(KillProgram);
|
||||
programRunLayout->addWidget(killProgram);
|
||||
QPushButton *killBottonProgram = new QPushButton(QObject::tr("终止指定容器的程序"));
|
||||
//killBottonProgram.clicked.connect(lambda: threading.Thread(target=os.system, args=[f"'{programPath}/kill.sh' '{os.path.basename(e1.currentText())}'"]).start());
|
||||
programRunLayout->addWidget(killBottonProgram);
|
||||
mainLayout->addWidget(programRun, 2, 1, 1, 1);
|
||||
|
||||
// 窗口设置
|
||||
window->resize(widget->frameGeometry().width() * 2, widget->frameGeometry().height());
|
||||
window->setWindowIcon(QIcon(":/Icon/deepin-wine-runner.svg"));
|
||||
widget->setLayout(mainLayout);
|
||||
window->show();
|
||||
|
||||
CheckWine();
|
||||
|
||||
// 控件设置
|
||||
e1->addItems(findExeHistory);
|
||||
e2->addItems(wineBottonHistory);
|
||||
combobox1->addItems(shellHistory);
|
||||
o1->addItems(canUseWine);
|
||||
|
||||
|
||||
// 一个 Wine 都没有却用 Wine 的功能
|
||||
// 还是要处理的,至少不会闪退
|
||||
if(o1->currentText() == ""){
|
||||
o1->addItem("没有识别到任何Wine,请在菜单栏“程序”安装Wine或安装任意Wine应用");
|
||||
}
|
||||
QObject::connect(button3, &QPushButton::clicked, [&](){
|
||||
Runexebutton_threading *thread = new Runexebutton_threading();
|
||||
//QObject::connect(thread, &Runexebutton_threading::signal, this, [this](){});
|
||||
thread->start();
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
void MainWindow::Runexebutton_threading::run(){
|
||||
QString programPath = QCoreApplication::applicationDirPath();
|
||||
QString wineBottlePath = "";
|
||||
if(e1->currentText() == ""){
|
||||
wineBottlePath = setting.value("DefultBotton");
|
||||
}
|
||||
else{
|
||||
wineBottlePath = e1->currentText();
|
||||
}
|
||||
QString option = "";
|
||||
if(setting.value("Architecture") != "Auto"){
|
||||
option += "WINEARCH=" + setting.value("Architecture") + " ";
|
||||
}
|
||||
if(setting.value("MonoGeckoInstaller") == "1"){
|
||||
option += "WINEDLLOVERRIDES=\"mscoree,mshtml=\" ";
|
||||
}
|
||||
if(setting.value("") != "1"){
|
||||
option += "WINEDEBUG=-all ";
|
||||
}
|
||||
else{
|
||||
option += "WINEDEBUG=FIXME,ERR,WARN,TRACE,Message ";
|
||||
}
|
||||
QString wineUsingOption = "";
|
||||
QString exePath = e2->currentText();
|
||||
QStringList fileName = {".exe"};
|
||||
bool changePath = false;
|
||||
for(QString i: fileName){
|
||||
if(exePath.contains(i)){
|
||||
qDebug() << i;
|
||||
qDebug() << exePath;
|
||||
int l = exePath.indexOf(i);
|
||||
exePath = exePath.mid(0, l + 4) + "' " + exePath.mid(l + 4) + " '";
|
||||
qDebug() << l;
|
||||
qDebug() << exePath;
|
||||
changePath = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!changePath && QFile::exists(exePath)){
|
||||
// 删除前后无用空格以防止出现问题
|
||||
qDebug() << exePath;
|
||||
exePath = exePath.trimmed();
|
||||
// 有空格再说
|
||||
if(exePath.contains(" ")){
|
||||
int l = exePath.indexOf(" ");
|
||||
exePath = exePath.mid(0, l) + "' " + exePath.mid(l) + " '";
|
||||
qDebug() << l;
|
||||
}
|
||||
qDebug() << exePath;
|
||||
}
|
||||
if(o1->currentText() == "基于 UOS exagear 的 deepin-wine6-stable" ||
|
||||
o1->currentText() == "基于 UOS box86 的 deepin-wine6-stable"){
|
||||
wineUsingOption = "";
|
||||
}
|
||||
if(o1->currentText() == "基于 UOS box86 的 deepin-wine6-stable" ||
|
||||
o1->currentText() == "基于 UOS exagear 的 deepin-wine6-stable"){
|
||||
if(!QDir(programPath + "/dlls-arm").exists()){
|
||||
if(system(("7z x -y \"" + programPath + "/dlls-arm.7z\" -o\"" + programPath + "\"").toUtf8())){
|
||||
QMessageBox::critical(NULL, "错误", "无法解压资源");
|
||||
return;
|
||||
}
|
||||
QFile::remove(programPath + "/dlls-arm.7z");
|
||||
}
|
||||
}
|
||||
//QString runCommand = "";
|
||||
QString runCommand = "";
|
||||
QProcess *process = new QProcess();
|
||||
//if(setting.value("TerminalOpen") == "True"){
|
||||
if(0){
|
||||
if(e2->currentText().mid(-4) == ".msi" && QFile::exists(e2->currentText())){
|
||||
runCommand = "env WINEPREFIX='" + wineBottlePath + "' " + option + wine[o1->currentText()] + " msiexec /i '" + e2->currentText() + "' " + setting.value("WineOption");
|
||||
// OpenTerminal(runCommand)
|
||||
}
|
||||
// ……
|
||||
}
|
||||
else{
|
||||
if(e2->currentText().mid(-4) == ".msi" && QFile::exists(e2->currentText())){
|
||||
runCommand = "env WINEPREFIX='" + wineBottlePath + "' " + option + wine[o1->currentText()] + " msiexec /i '" + e2->currentText() + "' " + setting.value("WineOption");
|
||||
}
|
||||
else if(e2->currentText().mid(-4) == ".bat" && QFile::exists(e2->currentText())){
|
||||
runCommand = "WINEPREFIX='" + wineBottlePath + "' " + option + wine[o1->currentText()] + " wineconsole '" + e2->currentText() + "' " + setting["WineOption"];
|
||||
}
|
||||
else{
|
||||
runCommand = "WINEPREFIX='" + wineBottlePath + "' " + option + wine[o1->currentText()] + " '" + exePath + "' " + setting["WineOption"];
|
||||
}
|
||||
|
||||
}
|
||||
// 实时读取程序返回
|
||||
qDebug() << runCommand;
|
||||
lastRunCommand = runCommand;
|
||||
// 连接槽
|
||||
connect(process, &QProcess::readyReadStandardOutput, this, [this, process](){
|
||||
//emit this->signal(QString::fromUtf8(process.readAll()));
|
||||
});
|
||||
//if(setting.value("TerminalOpen") != "True"){
|
||||
if(1){
|
||||
process->setReadChannel(QProcess::StandardOutput);
|
||||
process->start(runCommand);
|
||||
process->waitForStarted();
|
||||
process->waitForFinished();
|
||||
process->close();
|
||||
}
|
||||
// ……
|
||||
}
|
||||
|
||||
void MainWindow::DisableButton(bool things){
|
||||
button_r_6->setDisabled(things);
|
||||
button1->setDisabled(things);
|
||||
button2->setDisabled(things);
|
||||
button3->setDisabled(things);
|
||||
wineConfig->setDisabled(things);
|
||||
e1->setDisabled(things);
|
||||
e2->setDisabled(things);
|
||||
o1->setDisabled(things);
|
||||
miniAppStore->setDisabled(things);
|
||||
//winetricksOpen->configure(state=a[things])
|
||||
getProgramIcon->setDisabled(things);
|
||||
uninstallProgram->setDisabled(things);
|
||||
trasButton->setDisabled(things);
|
||||
}
|
||||
|
||||
void MainWindow::runexebutton(){
|
||||
DisableButton(1);
|
||||
|
||||
}
|
||||
|
||||
MainWindow::~MainWindow()
|
||||
{
|
||||
//delete ui;
|
||||
}
|
||||
|
||||
QString MainWindow::get_home(){
|
||||
return QDir::homePath();
|
||||
}
|
||||
|
||||
QString MainWindow::readtxt(QString path){
|
||||
QFile file(path);
|
||||
file.open(QIODevice::ReadOnly);
|
||||
QString things = file.readAll();
|
||||
file.close();
|
||||
return things;
|
||||
}
|
||||
|
||||
QByteArray MainWindow::readtxtByte(QString path){
|
||||
QFile file(path);
|
||||
file.open(QIODevice::ReadOnly);
|
||||
QByteArray things = file.readAll();
|
||||
file.close();
|
||||
return things;
|
||||
}
|
||||
|
||||
void MainWindow::write_txt(QString path, QByteArray things){
|
||||
QFile file(path);
|
||||
file.open(QIODevice::WriteOnly);
|
||||
file.write(things);
|
||||
file.close();
|
||||
}
|
||||
|
||||
QString MainWindow::GetCommandResult(QString command){
|
||||
QProcess process;
|
||||
process.start(command);
|
||||
process.waitForStarted();
|
||||
process.waitForFinished();
|
||||
QString result = process.readAll();
|
||||
process.close();
|
||||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
* 检测 Wine
|
||||
*/
|
||||
void MainWindow::CheckWine(){
|
||||
QStringList wine7zUse = {"wine", "wine64", "wine-i386", "wine-aarch64", "wine-x86_64"};
|
||||
wine.clear();
|
||||
wine.insert("基于 UOS box86 的 deepin-wine6-stable",
|
||||
"WINEPREDLL='" + programPath + "/dlls-arm' "\
|
||||
"WINEDLLPATH=/opt/deepin-wine6-stable/lib BOX86_NOSIGSEGV=1 "\
|
||||
"/opt/deepin-box86/box86 /opt/deepin-wine6-stable/bin/wine ");
|
||||
wine.insert("基于 UOS exagear 的 deepin-wine6-stable",
|
||||
"WINEPREDLL='" + programPath + "/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib"\
|
||||
" /opt/exagear/bin/ubt_x64a64_al --path-prefix " + get_home() + "/.deepinwine/debian-buster --utmp-paths-list " + get_home() + ""\
|
||||
"/.deepinwine/debian-buster/.exagear/utmp-list --vpaths-list " + get_home() + "/.deepinwine/debian-buster/.exagear/vpaths-list"\
|
||||
" --opaths-list " + get_home() + "/.deepinwine/debian-buster/.exagear/opaths-list --smo-mode fbase --smo-severity smart "\
|
||||
"--fd-limit 8192 --foreign-ubt-binary /opt/exagear/bin/ubt_x32a64_al -- /opt/deepin-wine6-stable/bin/wine ");
|
||||
wine.insert("使用 Flatpak 安装的 Wine", "flatpak run org.winehq.Wine");
|
||||
wine.insert("deepin-wine8-stable", "deepin-wine8-stable");
|
||||
wine.insert("deepin-wine6 stable", "deepin-wine6-stable");
|
||||
wine.insert("deepin-wine6-vannila", "deepin-wine6-vannila");
|
||||
wine.insert("deepin-wine5 stable", "deepin-wine5-stable");
|
||||
wine.insert("spark-wine", "spark-wine");
|
||||
wine.insert("spark-wine7-devel", "spark-wine7-devel");
|
||||
wine.insert("spark-wine8", "spark-wine8");
|
||||
wine.insert("spark-wine8-wow", "spark-wine8-wow");
|
||||
wine.insert("deepin-wine", "deepin-wine");
|
||||
wine.insert("deepin-wine5", "deepin-wine5");
|
||||
wine.insert("wine", "wine");
|
||||
wine.insert("wine64", "wine64");
|
||||
wine.insert("ukylin-wine", "ukylin-wine");
|
||||
wine.insert("okylin-wine", "okylin-wine");
|
||||
wine.insert("mono(这不是 wine,但可以实现初步调用运行 .net 应用)", "mono");
|
||||
wine.insert("基于 linglong 的 deepin-wine6-stable(不推荐)", "ll-cli run '' --exec '/bin/deepin-wine6-stable'");
|
||||
if(QFile::exists("/opt/deepin-box86/box86") && QFile::exists("/opt/deepin-wine6-stable/bin/wine")){
|
||||
canUseWine.append("基于 UOS box86 的 deepin-wine6-stable");
|
||||
}
|
||||
if(QFile::exists("/opt/exagear/bin/ubt_x64a64_al") && QFile::exists("/opt/deepin-wine6-stable/bin/wine")){
|
||||
canUseWine.append("基于 UOS exagear 的 deepin-wine6-stable");
|
||||
}
|
||||
for(QString i : wine.keys()){
|
||||
if(!system(("which '" + wine.key(i) + "'").toUtf8())){
|
||||
canUseWine.append(i);
|
||||
}
|
||||
}
|
||||
if(!system("which flatpak") && QDir("/var/lib/flatpak/app/org.winehq.Wine").exists()){
|
||||
canUseWine.append("使用 Flatpak 安装的 Wine");
|
||||
}
|
||||
if(QDir("/persistent/linglong/layers/").exists()){ // 判断是否使用 linglong
|
||||
for(QString i : QDir("/persistent/linglong/layers/").entryList()){
|
||||
try{
|
||||
break; // bug
|
||||
QString dire = QDir("/persistent/linglong/layers/" + i).entryList()[-1];
|
||||
QString arch = QDir("/persistent/linglong/layers/" + i + "/" + dire)[-1];
|
||||
if(QFile::exists("/persistent/linglong/layers/" + i + "/" + dire + "/" + arch + "/runtime/bin/deepin-wine6-stable")){
|
||||
wine.insert("基于 linglong 的 deepin-wine6-stable(不推荐)", "ll-cli run " + i + " --exec '/bin/deepin-wine6-stable'");
|
||||
canUseWine.append("基于 linglong 的 deepin-wine6-stable(不推荐)");
|
||||
break;
|
||||
}
|
||||
}
|
||||
catch(QString msg){
|
||||
qDebug() << msg;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 读取自定义安装的 Wine(需要解包的才能使用)
|
||||
if(!system("which qemu-i386-static")){
|
||||
if(QDir(qemuPath).exists()){
|
||||
for(QString g: QDir(qemuPath).entryList()){
|
||||
QString archPath = qemuPath + "/" + g;
|
||||
QString arch = g;
|
||||
if(QFileInfo(archPath).isDir()){
|
||||
for(QString d: QDir(archPath).entryList()){
|
||||
QString bottlePath = archPath + "/" + g;
|
||||
if(QFileInfo(bottlePath).isDir()){
|
||||
qemuBottleList.append(QStringList() << arch << d << bottlePath);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
QJsonParseError jsonError;
|
||||
QJsonDocument jsonDocument;
|
||||
QJsonObject jsonObject;
|
||||
QStringList historyList[] = {shellHistory, findExeHistory, wineBottonHistory, isoPath, isoPathFound};
|
||||
QStringList historyListPath = {homePath + "/.config/deepin-wine-runner/ShellHistory.json",
|
||||
homePath + "/.config/deepin-wine-runner/FindExeHistory.json",
|
||||
homePath + "/.config/deepin-wine-runner/WineBottonHistory.json",
|
||||
homePath + "/.config/deepin-wine-runner/ISOPath.json",
|
||||
homePath + "/.config/deepin-wine-runner/ISOPathFound.json"};
|
||||
for(int i = 0; i <= historyList->size(); i++){
|
||||
QStringList *list = &historyList[i];
|
||||
jsonDocument = QJsonDocument(QJsonDocument::fromJson(readtxtByte(historyListPath[i])));
|
||||
jsonObject = jsonDocument.object();
|
||||
list->clear();
|
||||
for(QString i: jsonObject.keys()){
|
||||
list->append(jsonObject.value(i).toString());
|
||||
}
|
||||
}
|
||||
qDebug() << jsonError.errorString();
|
||||
jsonDocument = QJsonDocument(QJsonDocument::fromJson(readtxtByte(homePath + "/.config/deepin-wine-runner/WineSetting.json")));
|
||||
jsonObject = jsonDocument.object();
|
||||
setting.clear();
|
||||
for(QString i: jsonObject.keys()){
|
||||
setting.insert(i, jsonObject.value(i).toString());
|
||||
}
|
||||
for(QString i: QDir(programPath + "/wine/").entryList()){
|
||||
if(QDir(programPath + "/wine/" + i).exists() && QFileInfo(programPath + "/wine/" + i).isDir()){
|
||||
QStringList nameValue = {{"", ""}};
|
||||
try{
|
||||
if(QFile::exists("/opt/deepin-box86/box86")){
|
||||
nameValue.append(QStringList() << "基于 UOS box86 的 " <<
|
||||
"WINEPREDLL='" + programPath + "/dlls-arm' WINEDLLPATH=/opt/deepin-wine6-stable/lib BOX86_NOSIGSEGV=1"\
|
||||
" /opt/deepin-box86/box86 ");
|
||||
}
|
||||
if(!system("which box86")){
|
||||
nameValue.append(QStringList() << "基于 box86 的 " << "box86 ");
|
||||
}
|
||||
if(!system("which box64")){
|
||||
nameValue.append(QStringList() << "基于 box64 的 " << "box64 ");
|
||||
}
|
||||
if(!system("which qemu-i386") &&
|
||||
GetCommandResult("arch").replace(" ", "").replace("\n", "") != "x86_64" &&
|
||||
GetCommandResult("arch").replace(" ", "").replace("\n", "") != "i686"){
|
||||
nameValue.append(QStringList() << "基于 qemu-i386 的 " << "qemu-i386 ");
|
||||
}
|
||||
if(!system("which qemu-x86_64") &&
|
||||
GetCommandResult("arch").replace(" ", "").replace("\n", "") != "x86_64" &&
|
||||
GetCommandResult("arch").replace(" ", "").replace("\n", "") != "i686"){
|
||||
nameValue.append(QStringList() << "基于 qemu-x86_64 的 " << "qemu-x86_64 ");
|
||||
}
|
||||
if(QFile::exists("/opt/exagear/bin/ubt_x64a64_al") && QFile::exists(homePath + "/.deepinwine/debian-buster")){
|
||||
nameValue.append(QStringList() << "基于 UOS exagear 的 " << "WINEPREDLL='" + programPath + "/dlls-arm' "\
|
||||
"WINEDLLPATH=/opt/deepin-wine6-stable/lib /opt/exagear/bin/ubt_x64a64_al --path-prefix " + get_home() + "/.deepinwine/debian-buster "\
|
||||
"--utmp-paths-list " + homePath + "/.deepinwine/debian-buster/.exagear/utmp-list --vpaths-list " + homePath + "/.deepinwine/debian-buster/.exagear/vpaths-list "\
|
||||
"--opaths-list " + homePath + "/.deepinwine/debian-buster/.exagear/opaths-list --smo-mode fbase --smo-severity smart --fd-limit 8192 --foreign-ubt-binary /opt/exagear/bin/ubt_x32a64_al -- ");
|
||||
}
|
||||
if(!system("which exagear")){
|
||||
nameValue.append(QStringList() << "运行 exagear 容器内的 " << "exagear -- ");
|
||||
}
|
||||
if(QFile::exists("/opt/exagear/bin/ubt_x64a64_al")){
|
||||
nameValue.append(QStringList() << "使用 ubt_x64a64_al 运行" << "/opt/exagear/bin/ubt_x64a64_al -- ");
|
||||
}
|
||||
if(QFile::exists("/opt/exagear/bin/ubt_x32a64_al")){
|
||||
nameValue.append(QStringList() << "使用 ubt_x32a64_al 运行" << "/opt/exagear/bin/ubt_x32a64_al -- ");
|
||||
}
|
||||
/*for(QString g: qemuBottleList){
|
||||
nameValue.append(QStringList() << "使用qemu-" + g[0] + "-static 调用容器" + g[1] + "运行 " << "python3 '" + programPath + "/QemuRun.py' '" + g[0] + "/" + g[1] + "' " + setting.value("QemuUnMountHome").toInt());
|
||||
}*/
|
||||
}
|
||||
catch(QString msg){
|
||||
qDebug() << msg;
|
||||
}
|
||||
/*for(QString k: nameValue){
|
||||
qDebug() << k;
|
||||
if(k.contains("qemu")){
|
||||
|
||||
}
|
||||
}*/
|
||||
try{
|
||||
for(QString i: QDir(homePath + "/.deepinwine/").entryList()){
|
||||
for(QString j: wine7zUse){
|
||||
if(QFile::exists(homePath + "/.deepinwine/" + i + "/bin/" + j)){
|
||||
wine.insert(homePath + "/.deepinwine/" + i + "/bin/" + j, homePath + "/.deepinwine/" + i + "/bin/" + j);
|
||||
canUseWine.append(homePath + "/.deepinwine/" + i + "/bin/" + j);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(QString msg){
|
||||
qDebug() << msg;
|
||||
}
|
||||
try{
|
||||
QStringList canUseWineOld = canUseWine;
|
||||
for(QString i: canUseWineOld){
|
||||
if(QDir(programPath + "/WineLib/usr").exists()){
|
||||
wine.insert("使用运行器的运行库运行 " + i, "bash '" + programPath + "/WineLib/run.sh' " + wine.value(i));
|
||||
canUseWine.append("使用运行器的运行库运行 " + i);
|
||||
untipsWine.append("使用运行器的运行库运行 " + i);
|
||||
}
|
||||
}
|
||||
if(QDir("/opt/exagear/images").exists()){
|
||||
for(QString k: QDir("/opt/exagear/images").entryList()){
|
||||
if(QFileInfo("/opt/exagear/images/" + k).isDir()){
|
||||
continue;
|
||||
}
|
||||
for(QString i: canUseWineOld){
|
||||
wine.insert("使用Exagear容器运行库运行 " + i, "bash '" + programPath + "/WineLib/run-more.sh' '/opt/exagear/images/" + k + "' " + wine.value(i));
|
||||
canUseWine.append("使用Exagear容器运行库运行 " + i);
|
||||
untipsWine.append("使用Exagear容器运行库运行 " + i);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch(QString msg){
|
||||
qDebug() << msg;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
#ifndef MAINWINDOW_H
|
||||
#define MAINWINDOW_H
|
||||
|
||||
#include <QMap>
|
||||
#include <QDir>
|
||||
#include <QCoreApplication>
|
||||
#include <QPushButton>
|
||||
#include <QComboBox>
|
||||
#include <QThread>
|
||||
|
||||
class MainWindow
|
||||
{
|
||||
|
||||
public:
|
||||
MainWindow();
|
||||
~MainWindow();
|
||||
void CheckWine();
|
||||
QString get_home();
|
||||
QString readtxt(QString path);
|
||||
void write_txt(QString path, QByteArray things);
|
||||
QByteArray readtxtByte(QString path);
|
||||
QString GetCommandResult(QString command);
|
||||
|
||||
private:
|
||||
class Runexebutton_threading: public QThread{
|
||||
signals:
|
||||
void signal(QString str);
|
||||
void showHistory(QString str);
|
||||
public:
|
||||
void run();
|
||||
|
||||
};
|
||||
void runexebutton();
|
||||
void DisableButton(bool things);
|
||||
static QString lastRunCommand;
|
||||
QString homePath = QDir::homePath();
|
||||
QString programPath = QCoreApplication::applicationDirPath();
|
||||
static QMap<QString, QString> wine;
|
||||
QStringList untipsWine = {"使用 Flatpak 安装的 Wine", "基于 exagear 的 deepin-wine6-stable", "基于 UOS box86 的 deepin-wine6-stable", "基于 UOS exagear 的 deepin-wine6-stable", "基于 linglong 的 deepin-wine6-stable(不推荐)"};
|
||||
QStringList canUseWine = {};
|
||||
QStringList qemuBottleList = {};
|
||||
QString qemuPath = homePath + "/.deepin-wine-runner-ubuntu-images";
|
||||
QStringList shellHistory;
|
||||
QStringList findExeHistory;
|
||||
QStringList wineBottonHistory;
|
||||
QStringList isoPath;
|
||||
QStringList isoPathFound;
|
||||
static QMap<QString, QString> setting;
|
||||
// 控件
|
||||
QPushButton *button_r_6;
|
||||
QPushButton *button1;
|
||||
QPushButton *button2;
|
||||
QPushButton *button3;
|
||||
QPushButton *wineConfig;
|
||||
QPushButton *miniAppStore;
|
||||
QPushButton *getProgramIcon;
|
||||
QPushButton *uninstallProgram;
|
||||
QPushButton *trasButton;
|
||||
static QComboBox *e1;
|
||||
static QComboBox *e2;
|
||||
static QComboBox *o1;
|
||||
|
||||
|
||||
};
|
||||
#endif // MAINWINDOW_H
|
||||
@@ -0,0 +1,72 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>MainWindow</class>
|
||||
<widget class="QMainWindow" name="MainWindow">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>600</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>MainWindow</string>
|
||||
</property>
|
||||
<widget class="QWidget" name="window">
|
||||
<layout class="QGridLayout" name="gridLayout" rowstretch="2,0" columnstretch="2,0">
|
||||
<item row="0" column="0">
|
||||
<widget class="QWidget" name="leftUp" native="true"/>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QTextBrowser" name="returnText">
|
||||
<property name="styleSheet">
|
||||
<string notr="true">background-color: black;
|
||||
color: white;</string>
|
||||
</property>
|
||||
<property name="html">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Noto Sans CJK SC'; font-size:10.5pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:12px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono'; font-size:11pt;">在此可以看到wine安装应用时的终端输出内容</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono'; font-size:11pt;">=============================================</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono'; font-size:11pt;">如果解决了你的问题,请不要吝啬你的star哟!</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono'; font-size:11pt;">地址:</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono'; font-size:11pt;">https://gitee.com/gfdgd-xi/deep-wine-runner</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono'; font-size:11pt;">https://github.com/gfdgd-xi/deep-wine-runner</span></p>
|
||||
<p style=" margin-top:0px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-family:'Noto Mono'; font-size:11pt;">https://sourceforge.net/projects/deep-wine-runner</span></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="1" column="0">
|
||||
<widget class="QWidget" name="leftDown" native="true"/>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QMenuBar" name="menubar">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>800</width>
|
||||
<height>36</height>
|
||||
</rect>
|
||||
</property>
|
||||
<widget class="QMenu" name="menu">
|
||||
<property name="title">
|
||||
<string>程序</string>
|
||||
</property>
|
||||
<addaction name="action"/>
|
||||
</widget>
|
||||
<addaction name="menu"/>
|
||||
</widget>
|
||||
<action name="action">
|
||||
<property name="text">
|
||||
<string>退出程序</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
@@ -0,0 +1,14 @@
|
||||
#include "qr.h"
|
||||
#include "ui_qr.h"
|
||||
|
||||
QR::QR(QWidget *parent) :
|
||||
QDialog(parent),
|
||||
ui(new Ui::QR)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
}
|
||||
|
||||
QR::~QR()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
@@ -0,0 +1,22 @@
|
||||
#ifndef QR_H
|
||||
#define QR_H
|
||||
|
||||
#include <QDialog>
|
||||
|
||||
namespace Ui {
|
||||
class QR;
|
||||
}
|
||||
|
||||
class QR : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
explicit QR(QWidget *parent = nullptr);
|
||||
~QR();
|
||||
|
||||
private:
|
||||
Ui::QR *ui;
|
||||
};
|
||||
|
||||
#endif // QR_H
|
||||
@@ -0,0 +1,69 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>QR</class>
|
||||
<widget class="QDialog" name="QR">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>656</width>
|
||||
<height>410</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<property name="windowIcon">
|
||||
<iconset resource="Resources.qrc">
|
||||
<normaloff>:/Icon/deepin-wine-runner.svg</normaloff>:/Icon/deepin-wine-runner.svg</iconset>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<widget class="QTextBrowser" name="qRShow">
|
||||
<property name="html">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
||||
p, li { white-space: pre-wrap; }
|
||||
</style></head><body style=" font-family:'Noto Sans CJK SC'; font-size:10.5pt; font-weight:400; font-style:normal;">
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-size:11pt;">如果您觉得 Wine 运行器对你有帮助,可以请作者喝杯茶</span></p>
|
||||
<hr />
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">微信:</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src=":/Icon/QR/Icon/QR/Wechat.png" width="256" /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">支付宝:</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src=":/Icon/QR/Icon/QR/Alipay.jpg" width="256" /></p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">QQ:</p>
|
||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src=":/Icon/QR/Icon/QR/QQ.png" width="256" /></p></body></html></string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="ok">
|
||||
<property name="text">
|
||||
<string>确定</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="Resources.qrc"/>
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
||||