├── .github
├── FUNDING.yml
└── ISSUE_TEMPLATE
│ ├── bug_report.md
│ └── feature_request.md
├── LICENSE
├── LibreGaming
├── LibreGaming.py
├── LibreGamingQt.py
├── __init__.py
├── __main__.py
├── distro_pkgs
│ ├── Arch.py
│ ├── Common_Pkgs.py
│ ├── Fedora.py
│ ├── OpenSUSE.py
│ ├── Ubuntu.py
│ └── __pycache__
│ │ └── Fedora.cpython-310.pyc
├── pics
│ ├── LibreGamingQt.png
│ └── execute-privileges.png
└── requirement.txt
├── MANIFEST.in
├── README.md
├── packages_list.txt
├── pyproject.toml
├── requirement.txt
├── setup.cfg
├── setup.py
└── test
├── __init__.py
└── tests_libregaming.py
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | # These are supported funding model platforms
2 | patreon: user?u=42792180
3 |
4 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/bug_report.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Bug report
3 | about: Create a report to help us improve
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Describe the bug**
11 | A clear and concise description of what the bug is.
12 |
13 | **To Reproduce**
14 | Steps to reproduce the behavior:
15 | 1. Go to '...'
16 | 2. Click on '....'
17 | 3. Scroll down to '....'
18 | 4. See error
19 |
20 | **Expected behavior**
21 | A clear and concise description of what you expected to happen.
22 |
23 | **Screenshots**
24 | If applicable, add screenshots to help explain your problem.
25 |
26 | **Desktop (please complete the following information):**
27 | - OS: [e.g. iOS]
28 | - Browser [e.g. chrome, safari]
29 | - Version [e.g. 22]
30 |
31 | **Smartphone (please complete the following information):**
32 | - Device: [e.g. iPhone6]
33 | - OS: [e.g. iOS8.1]
34 | - Browser [e.g. stock browser, safari]
35 | - Version [e.g. 22]
36 |
37 | **Additional context**
38 | Add any other context about the problem here.
39 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE/feature_request.md:
--------------------------------------------------------------------------------
1 | ---
2 | name: Feature request
3 | about: Suggest an idea for this project
4 | title: ''
5 | labels: ''
6 | assignees: ''
7 |
8 | ---
9 |
10 | **Is your feature request related to a problem? Please describe.**
11 | A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12 |
13 | **Describe the solution you'd like**
14 | A clear and concise description of what you want to happen.
15 |
16 | **Describe alternatives you've considered**
17 | A clear and concise description of any alternative solutions or features you've considered.
18 |
19 | **Additional context**
20 | Add any other context or screenshots about the feature request here.
21 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 3, 29 June 2007
3 |
4 | Copyright (C) 2007 Free Software Foundation, Inc.
5 | Everyone is permitted to copy and distribute verbatim copies
6 | of this license document, but changing it is not allowed.
7 |
8 | Preamble
9 |
10 | The GNU General Public License is a free, copyleft license for
11 | software and other kinds of works.
12 |
13 | The licenses for most software and other practical works are designed
14 | to take away your freedom to share and change the works. By contrast,
15 | the GNU General Public License is intended to guarantee your freedom to
16 | share and change all versions of a program--to make sure it remains free
17 | software for all its users. We, the Free Software Foundation, use the
18 | GNU General Public License for most of our software; it applies also to
19 | any other work released this way by its authors. You can apply it to
20 | your programs, too.
21 |
22 | When we speak of free software, we are referring to freedom, not
23 | price. Our General Public Licenses are designed to make sure that you
24 | have the freedom to distribute copies of free software (and charge for
25 | them if you wish), that you receive source code or can get it if you
26 | want it, that you can change the software or use pieces of it in new
27 | free programs, and that you know you can do these things.
28 |
29 | To protect your rights, we need to prevent others from denying you
30 | these rights or asking you to surrender the rights. Therefore, you have
31 | certain responsibilities if you distribute copies of the software, or if
32 | you modify it: responsibilities to respect the freedom of others.
33 |
34 | For example, if you distribute copies of such a program, whether
35 | gratis or for a fee, you must pass on to the recipients the same
36 | freedoms that you received. You must make sure that they, too, receive
37 | or can get the source code. And you must show them these terms so they
38 | know their rights.
39 |
40 | Developers that use the GNU GPL protect your rights with two steps:
41 | (1) assert copyright on the software, and (2) offer you this License
42 | giving you legal permission to copy, distribute and/or modify it.
43 |
44 | For the developers' and authors' protection, the GPL clearly explains
45 | that there is no warranty for this free software. For both users' and
46 | authors' sake, the GPL requires that modified versions be marked as
47 | changed, so that their problems will not be attributed erroneously to
48 | authors of previous versions.
49 |
50 | Some devices are designed to deny users access to install or run
51 | modified versions of the software inside them, although the manufacturer
52 | can do so. This is fundamentally incompatible with the aim of
53 | protecting users' freedom to change the software. The systematic
54 | pattern of such abuse occurs in the area of products for individuals to
55 | use, which is precisely where it is most unacceptable. Therefore, we
56 | have designed this version of the GPL to prohibit the practice for those
57 | products. If such problems arise substantially in other domains, we
58 | stand ready to extend this provision to those domains in future versions
59 | of the GPL, as needed to protect the freedom of users.
60 |
61 | Finally, every program is threatened constantly by software patents.
62 | States should not allow patents to restrict development and use of
63 | software on general-purpose computers, but in those that do, we wish to
64 | avoid the special danger that patents applied to a free program could
65 | make it effectively proprietary. To prevent this, the GPL assures that
66 | patents cannot be used to render the program non-free.
67 |
68 | The precise terms and conditions for copying, distribution and
69 | modification follow.
70 |
71 | TERMS AND CONDITIONS
72 |
73 | 0. Definitions.
74 |
75 | "This License" refers to version 3 of the GNU General Public License.
76 |
77 | "Copyright" also means copyright-like laws that apply to other kinds of
78 | works, such as semiconductor masks.
79 |
80 | "The Program" refers to any copyrightable work licensed under this
81 | License. Each licensee is addressed as "you". "Licensees" and
82 | "recipients" may be individuals or organizations.
83 |
84 | To "modify" a work means to copy from or adapt all or part of the work
85 | in a fashion requiring copyright permission, other than the making of an
86 | exact copy. The resulting work is called a "modified version" of the
87 | earlier work or a work "based on" the earlier work.
88 |
89 | A "covered work" means either the unmodified Program or a work based
90 | on the Program.
91 |
92 | To "propagate" a work means to do anything with it that, without
93 | permission, would make you directly or secondarily liable for
94 | infringement under applicable copyright law, except executing it on a
95 | computer or modifying a private copy. Propagation includes copying,
96 | distribution (with or without modification), making available to the
97 | public, and in some countries other activities as well.
98 |
99 | To "convey" a work means any kind of propagation that enables other
100 | parties to make or receive copies. Mere interaction with a user through
101 | a computer network, with no transfer of a copy, is not conveying.
102 |
103 | An interactive user interface displays "Appropriate Legal Notices"
104 | to the extent that it includes a convenient and prominently visible
105 | feature that (1) displays an appropriate copyright notice, and (2)
106 | tells the user that there is no warranty for the work (except to the
107 | extent that warranties are provided), that licensees may convey the
108 | work under this License, and how to view a copy of this License. If
109 | the interface presents a list of user commands or options, such as a
110 | menu, a prominent item in the list meets this criterion.
111 |
112 | 1. Source Code.
113 |
114 | The "source code" for a work means the preferred form of the work
115 | for making modifications to it. "Object code" means any non-source
116 | form of a work.
117 |
118 | A "Standard Interface" means an interface that either is an official
119 | standard defined by a recognized standards body, or, in the case of
120 | interfaces specified for a particular programming language, one that
121 | is widely used among developers working in that language.
122 |
123 | The "System Libraries" of an executable work include anything, other
124 | than the work as a whole, that (a) is included in the normal form of
125 | packaging a Major Component, but which is not part of that Major
126 | Component, and (b) serves only to enable use of the work with that
127 | Major Component, or to implement a Standard Interface for which an
128 | implementation is available to the public in source code form. A
129 | "Major Component", in this context, means a major essential component
130 | (kernel, window system, and so on) of the specific operating system
131 | (if any) on which the executable work runs, or a compiler used to
132 | produce the work, or an object code interpreter used to run it.
133 |
134 | The "Corresponding Source" for a work in object code form means all
135 | the source code needed to generate, install, and (for an executable
136 | work) run the object code and to modify the work, including scripts to
137 | control those activities. However, it does not include the work's
138 | System Libraries, or general-purpose tools or generally available free
139 | programs which are used unmodified in performing those activities but
140 | which are not part of the work. For example, Corresponding Source
141 | includes interface definition files associated with source files for
142 | the work, and the source code for shared libraries and dynamically
143 | linked subprograms that the work is specifically designed to require,
144 | such as by intimate data communication or control flow between those
145 | subprograms and other parts of the work.
146 |
147 | The Corresponding Source need not include anything that users
148 | can regenerate automatically from other parts of the Corresponding
149 | Source.
150 |
151 | The Corresponding Source for a work in source code form is that
152 | same work.
153 |
154 | 2. Basic Permissions.
155 |
156 | All rights granted under this License are granted for the term of
157 | copyright on the Program, and are irrevocable provided the stated
158 | conditions are met. This License explicitly affirms your unlimited
159 | permission to run the unmodified Program. The output from running a
160 | covered work is covered by this License only if the output, given its
161 | content, constitutes a covered work. This License acknowledges your
162 | rights of fair use or other equivalent, as provided by copyright law.
163 |
164 | You may make, run and propagate covered works that you do not
165 | convey, without conditions so long as your license otherwise remains
166 | in force. You may convey covered works to others for the sole purpose
167 | of having them make modifications exclusively for you, or provide you
168 | with facilities for running those works, provided that you comply with
169 | the terms of this License in conveying all material for which you do
170 | not control copyright. Those thus making or running the covered works
171 | for you must do so exclusively on your behalf, under your direction
172 | and control, on terms that prohibit them from making any copies of
173 | your copyrighted material outside their relationship with you.
174 |
175 | Conveying under any other circumstances is permitted solely under
176 | the conditions stated below. Sublicensing is not allowed; section 10
177 | makes it unnecessary.
178 |
179 | 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
180 |
181 | No covered work shall be deemed part of an effective technological
182 | measure under any applicable law fulfilling obligations under article
183 | 11 of the WIPO copyright treaty adopted on 20 December 1996, or
184 | similar laws prohibiting or restricting circumvention of such
185 | measures.
186 |
187 | When you convey a covered work, you waive any legal power to forbid
188 | circumvention of technological measures to the extent such circumvention
189 | is effected by exercising rights under this License with respect to
190 | the covered work, and you disclaim any intention to limit operation or
191 | modification of the work as a means of enforcing, against the work's
192 | users, your or third parties' legal rights to forbid circumvention of
193 | technological measures.
194 |
195 | 4. Conveying Verbatim Copies.
196 |
197 | You may convey verbatim copies of the Program's source code as you
198 | receive it, in any medium, provided that you conspicuously and
199 | appropriately publish on each copy an appropriate copyright notice;
200 | keep intact all notices stating that this License and any
201 | non-permissive terms added in accord with section 7 apply to the code;
202 | keep intact all notices of the absence of any warranty; and give all
203 | recipients a copy of this License along with the Program.
204 |
205 | You may charge any price or no price for each copy that you convey,
206 | and you may offer support or warranty protection for a fee.
207 |
208 | 5. Conveying Modified Source Versions.
209 |
210 | You may convey a work based on the Program, or the modifications to
211 | produce it from the Program, in the form of source code under the
212 | terms of section 4, provided that you also meet all of these conditions:
213 |
214 | a) The work must carry prominent notices stating that you modified
215 | it, and giving a relevant date.
216 |
217 | b) The work must carry prominent notices stating that it is
218 | released under this License and any conditions added under section
219 | 7. This requirement modifies the requirement in section 4 to
220 | "keep intact all notices".
221 |
222 | c) You must license the entire work, as a whole, under this
223 | License to anyone who comes into possession of a copy. This
224 | License will therefore apply, along with any applicable section 7
225 | additional terms, to the whole of the work, and all its parts,
226 | regardless of how they are packaged. This License gives no
227 | permission to license the work in any other way, but it does not
228 | invalidate such permission if you have separately received it.
229 |
230 | d) If the work has interactive user interfaces, each must display
231 | Appropriate Legal Notices; however, if the Program has interactive
232 | interfaces that do not display Appropriate Legal Notices, your
233 | work need not make them do so.
234 |
235 | A compilation of a covered work with other separate and independent
236 | works, which are not by their nature extensions of the covered work,
237 | and which are not combined with it such as to form a larger program,
238 | in or on a volume of a storage or distribution medium, is called an
239 | "aggregate" if the compilation and its resulting copyright are not
240 | used to limit the access or legal rights of the compilation's users
241 | beyond what the individual works permit. Inclusion of a covered work
242 | in an aggregate does not cause this License to apply to the other
243 | parts of the aggregate.
244 |
245 | 6. Conveying Non-Source Forms.
246 |
247 | You may convey a covered work in object code form under the terms
248 | of sections 4 and 5, provided that you also convey the
249 | machine-readable Corresponding Source under the terms of this License,
250 | in one of these ways:
251 |
252 | a) Convey the object code in, or embodied in, a physical product
253 | (including a physical distribution medium), accompanied by the
254 | Corresponding Source fixed on a durable physical medium
255 | customarily used for software interchange.
256 |
257 | b) Convey the object code in, or embodied in, a physical product
258 | (including a physical distribution medium), accompanied by a
259 | written offer, valid for at least three years and valid for as
260 | long as you offer spare parts or customer support for that product
261 | model, to give anyone who possesses the object code either (1) a
262 | copy of the Corresponding Source for all the software in the
263 | product that is covered by this License, on a durable physical
264 | medium customarily used for software interchange, for a price no
265 | more than your reasonable cost of physically performing this
266 | conveying of source, or (2) access to copy the
267 | Corresponding Source from a network server at no charge.
268 |
269 | c) Convey individual copies of the object code with a copy of the
270 | written offer to provide the Corresponding Source. This
271 | alternative is allowed only occasionally and noncommercially, and
272 | only if you received the object code with such an offer, in accord
273 | with subsection 6b.
274 |
275 | d) Convey the object code by offering access from a designated
276 | place (gratis or for a charge), and offer equivalent access to the
277 | Corresponding Source in the same way through the same place at no
278 | further charge. You need not require recipients to copy the
279 | Corresponding Source along with the object code. If the place to
280 | copy the object code is a network server, the Corresponding Source
281 | may be on a different server (operated by you or a third party)
282 | that supports equivalent copying facilities, provided you maintain
283 | clear directions next to the object code saying where to find the
284 | Corresponding Source. Regardless of what server hosts the
285 | Corresponding Source, you remain obligated to ensure that it is
286 | available for as long as needed to satisfy these requirements.
287 |
288 | e) Convey the object code using peer-to-peer transmission, provided
289 | you inform other peers where the object code and Corresponding
290 | Source of the work are being offered to the general public at no
291 | charge under subsection 6d.
292 |
293 | A separable portion of the object code, whose source code is excluded
294 | from the Corresponding Source as a System Library, need not be
295 | included in conveying the object code work.
296 |
297 | A "User Product" is either (1) a "consumer product", which means any
298 | tangible personal property which is normally used for personal, family,
299 | or household purposes, or (2) anything designed or sold for incorporation
300 | into a dwelling. In determining whether a product is a consumer product,
301 | doubtful cases shall be resolved in favor of coverage. For a particular
302 | product received by a particular user, "normally used" refers to a
303 | typical or common use of that class of product, regardless of the status
304 | of the particular user or of the way in which the particular user
305 | actually uses, or expects or is expected to use, the product. A product
306 | is a consumer product regardless of whether the product has substantial
307 | commercial, industrial or non-consumer uses, unless such uses represent
308 | the only significant mode of use of the product.
309 |
310 | "Installation Information" for a User Product means any methods,
311 | procedures, authorization keys, or other information required to install
312 | and execute modified versions of a covered work in that User Product from
313 | a modified version of its Corresponding Source. The information must
314 | suffice to ensure that the continued functioning of the modified object
315 | code is in no case prevented or interfered with solely because
316 | modification has been made.
317 |
318 | If you convey an object code work under this section in, or with, or
319 | specifically for use in, a User Product, and the conveying occurs as
320 | part of a transaction in which the right of possession and use of the
321 | User Product is transferred to the recipient in perpetuity or for a
322 | fixed term (regardless of how the transaction is characterized), the
323 | Corresponding Source conveyed under this section must be accompanied
324 | by the Installation Information. But this requirement does not apply
325 | if neither you nor any third party retains the ability to install
326 | modified object code on the User Product (for example, the work has
327 | been installed in ROM).
328 |
329 | The requirement to provide Installation Information does not include a
330 | requirement to continue to provide support service, warranty, or updates
331 | for a work that has been modified or installed by the recipient, or for
332 | the User Product in which it has been modified or installed. Access to a
333 | network may be denied when the modification itself materially and
334 | adversely affects the operation of the network or violates the rules and
335 | protocols for communication across the network.
336 |
337 | Corresponding Source conveyed, and Installation Information provided,
338 | in accord with this section must be in a format that is publicly
339 | documented (and with an implementation available to the public in
340 | source code form), and must require no special password or key for
341 | unpacking, reading or copying.
342 |
343 | 7. Additional Terms.
344 |
345 | "Additional permissions" are terms that supplement the terms of this
346 | License by making exceptions from one or more of its conditions.
347 | Additional permissions that are applicable to the entire Program shall
348 | be treated as though they were included in this License, to the extent
349 | that they are valid under applicable law. If additional permissions
350 | apply only to part of the Program, that part may be used separately
351 | under those permissions, but the entire Program remains governed by
352 | this License without regard to the additional permissions.
353 |
354 | When you convey a copy of a covered work, you may at your option
355 | remove any additional permissions from that copy, or from any part of
356 | it. (Additional permissions may be written to require their own
357 | removal in certain cases when you modify the work.) You may place
358 | additional permissions on material, added by you to a covered work,
359 | for which you have or can give appropriate copyright permission.
360 |
361 | Notwithstanding any other provision of this License, for material you
362 | add to a covered work, you may (if authorized by the copyright holders of
363 | that material) supplement the terms of this License with terms:
364 |
365 | a) Disclaiming warranty or limiting liability differently from the
366 | terms of sections 15 and 16 of this License; or
367 |
368 | b) Requiring preservation of specified reasonable legal notices or
369 | author attributions in that material or in the Appropriate Legal
370 | Notices displayed by works containing it; or
371 |
372 | c) Prohibiting misrepresentation of the origin of that material, or
373 | requiring that modified versions of such material be marked in
374 | reasonable ways as different from the original version; or
375 |
376 | d) Limiting the use for publicity purposes of names of licensors or
377 | authors of the material; or
378 |
379 | e) Declining to grant rights under trademark law for use of some
380 | trade names, trademarks, or service marks; or
381 |
382 | f) Requiring indemnification of licensors and authors of that
383 | material by anyone who conveys the material (or modified versions of
384 | it) with contractual assumptions of liability to the recipient, for
385 | any liability that these contractual assumptions directly impose on
386 | those licensors and authors.
387 |
388 | All other non-permissive additional terms are considered "further
389 | restrictions" within the meaning of section 10. If the Program as you
390 | received it, or any part of it, contains a notice stating that it is
391 | governed by this License along with a term that is a further
392 | restriction, you may remove that term. If a license document contains
393 | a further restriction but permits relicensing or conveying under this
394 | License, you may add to a covered work material governed by the terms
395 | of that license document, provided that the further restriction does
396 | not survive such relicensing or conveying.
397 |
398 | If you add terms to a covered work in accord with this section, you
399 | must place, in the relevant source files, a statement of the
400 | additional terms that apply to those files, or a notice indicating
401 | where to find the applicable terms.
402 |
403 | Additional terms, permissive or non-permissive, may be stated in the
404 | form of a separately written license, or stated as exceptions;
405 | the above requirements apply either way.
406 |
407 | 8. Termination.
408 |
409 | You may not propagate or modify a covered work except as expressly
410 | provided under this License. Any attempt otherwise to propagate or
411 | modify it is void, and will automatically terminate your rights under
412 | this License (including any patent licenses granted under the third
413 | paragraph of section 11).
414 |
415 | However, if you cease all violation of this License, then your
416 | license from a particular copyright holder is reinstated (a)
417 | provisionally, unless and until the copyright holder explicitly and
418 | finally terminates your license, and (b) permanently, if the copyright
419 | holder fails to notify you of the violation by some reasonable means
420 | prior to 60 days after the cessation.
421 |
422 | Moreover, your license from a particular copyright holder is
423 | reinstated permanently if the copyright holder notifies you of the
424 | violation by some reasonable means, this is the first time you have
425 | received notice of violation of this License (for any work) from that
426 | copyright holder, and you cure the violation prior to 30 days after
427 | your receipt of the notice.
428 |
429 | Termination of your rights under this section does not terminate the
430 | licenses of parties who have received copies or rights from you under
431 | this License. If your rights have been terminated and not permanently
432 | reinstated, you do not qualify to receive new licenses for the same
433 | material under section 10.
434 |
435 | 9. Acceptance Not Required for Having Copies.
436 |
437 | You are not required to accept this License in order to receive or
438 | run a copy of the Program. Ancillary propagation of a covered work
439 | occurring solely as a consequence of using peer-to-peer transmission
440 | to receive a copy likewise does not require acceptance. However,
441 | nothing other than this License grants you permission to propagate or
442 | modify any covered work. These actions infringe copyright if you do
443 | not accept this License. Therefore, by modifying or propagating a
444 | covered work, you indicate your acceptance of this License to do so.
445 |
446 | 10. Automatic Licensing of Downstream Recipients.
447 |
448 | Each time you convey a covered work, the recipient automatically
449 | receives a license from the original licensors, to run, modify and
450 | propagate that work, subject to this License. You are not responsible
451 | for enforcing compliance by third parties with this License.
452 |
453 | An "entity transaction" is a transaction transferring control of an
454 | organization, or substantially all assets of one, or subdividing an
455 | organization, or merging organizations. If propagation of a covered
456 | work results from an entity transaction, each party to that
457 | transaction who receives a copy of the work also receives whatever
458 | licenses to the work the party's predecessor in interest had or could
459 | give under the previous paragraph, plus a right to possession of the
460 | Corresponding Source of the work from the predecessor in interest, if
461 | the predecessor has it or can get it with reasonable efforts.
462 |
463 | You may not impose any further restrictions on the exercise of the
464 | rights granted or affirmed under this License. For example, you may
465 | not impose a license fee, royalty, or other charge for exercise of
466 | rights granted under this License, and you may not initiate litigation
467 | (including a cross-claim or counterclaim in a lawsuit) alleging that
468 | any patent claim is infringed by making, using, selling, offering for
469 | sale, or importing the Program or any portion of it.
470 |
471 | 11. Patents.
472 |
473 | A "contributor" is a copyright holder who authorizes use under this
474 | License of the Program or a work on which the Program is based. The
475 | work thus licensed is called the contributor's "contributor version".
476 |
477 | A contributor's "essential patent claims" are all patent claims
478 | owned or controlled by the contributor, whether already acquired or
479 | hereafter acquired, that would be infringed by some manner, permitted
480 | by this License, of making, using, or selling its contributor version,
481 | but do not include claims that would be infringed only as a
482 | consequence of further modification of the contributor version. For
483 | purposes of this definition, "control" includes the right to grant
484 | patent sublicenses in a manner consistent with the requirements of
485 | this License.
486 |
487 | Each contributor grants you a non-exclusive, worldwide, royalty-free
488 | patent license under the contributor's essential patent claims, to
489 | make, use, sell, offer for sale, import and otherwise run, modify and
490 | propagate the contents of its contributor version.
491 |
492 | In the following three paragraphs, a "patent license" is any express
493 | agreement or commitment, however denominated, not to enforce a patent
494 | (such as an express permission to practice a patent or covenant not to
495 | sue for patent infringement). To "grant" such a patent license to a
496 | party means to make such an agreement or commitment not to enforce a
497 | patent against the party.
498 |
499 | If you convey a covered work, knowingly relying on a patent license,
500 | and the Corresponding Source of the work is not available for anyone
501 | to copy, free of charge and under the terms of this License, through a
502 | publicly available network server or other readily accessible means,
503 | then you must either (1) cause the Corresponding Source to be so
504 | available, or (2) arrange to deprive yourself of the benefit of the
505 | patent license for this particular work, or (3) arrange, in a manner
506 | consistent with the requirements of this License, to extend the patent
507 | license to downstream recipients. "Knowingly relying" means you have
508 | actual knowledge that, but for the patent license, your conveying the
509 | covered work in a country, or your recipient's use of the covered work
510 | in a country, would infringe one or more identifiable patents in that
511 | country that you have reason to believe are valid.
512 |
513 | If, pursuant to or in connection with a single transaction or
514 | arrangement, you convey, or propagate by procuring conveyance of, a
515 | covered work, and grant a patent license to some of the parties
516 | receiving the covered work authorizing them to use, propagate, modify
517 | or convey a specific copy of the covered work, then the patent license
518 | you grant is automatically extended to all recipients of the covered
519 | work and works based on it.
520 |
521 | A patent license is "discriminatory" if it does not include within
522 | the scope of its coverage, prohibits the exercise of, or is
523 | conditioned on the non-exercise of one or more of the rights that are
524 | specifically granted under this License. You may not convey a covered
525 | work if you are a party to an arrangement with a third party that is
526 | in the business of distributing software, under which you make payment
527 | to the third party based on the extent of your activity of conveying
528 | the work, and under which the third party grants, to any of the
529 | parties who would receive the covered work from you, a discriminatory
530 | patent license (a) in connection with copies of the covered work
531 | conveyed by you (or copies made from those copies), or (b) primarily
532 | for and in connection with specific products or compilations that
533 | contain the covered work, unless you entered into that arrangement,
534 | or that patent license was granted, prior to 28 March 2007.
535 |
536 | Nothing in this License shall be construed as excluding or limiting
537 | any implied license or other defenses to infringement that may
538 | otherwise be available to you under applicable patent law.
539 |
540 | 12. No Surrender of Others' Freedom.
541 |
542 | If conditions are imposed on you (whether by court order, agreement or
543 | otherwise) that contradict the conditions of this License, they do not
544 | excuse you from the conditions of this License. If you cannot convey a
545 | covered work so as to satisfy simultaneously your obligations under this
546 | License and any other pertinent obligations, then as a consequence you may
547 | not convey it at all. For example, if you agree to terms that obligate you
548 | to collect a royalty for further conveying from those to whom you convey
549 | the Program, the only way you could satisfy both those terms and this
550 | License would be to refrain entirely from conveying the Program.
551 |
552 | 13. Use with the GNU Affero General Public License.
553 |
554 | Notwithstanding any other provision of this License, you have
555 | permission to link or combine any covered work with a work licensed
556 | under version 3 of the GNU Affero General Public License into a single
557 | combined work, and to convey the resulting work. The terms of this
558 | License will continue to apply to the part which is the covered work,
559 | but the special requirements of the GNU Affero General Public License,
560 | section 13, concerning interaction through a network will apply to the
561 | combination as such.
562 |
563 | 14. Revised Versions of this License.
564 |
565 | The Free Software Foundation may publish revised and/or new versions of
566 | the GNU General Public License from time to time. Such new versions will
567 | be similar in spirit to the present version, but may differ in detail to
568 | address new problems or concerns.
569 |
570 | Each version is given a distinguishing version number. If the
571 | Program specifies that a certain numbered version of the GNU General
572 | Public License "or any later version" applies to it, you have the
573 | option of following the terms and conditions either of that numbered
574 | version or of any later version published by the Free Software
575 | Foundation. If the Program does not specify a version number of the
576 | GNU General Public License, you may choose any version ever published
577 | by the Free Software Foundation.
578 |
579 | If the Program specifies that a proxy can decide which future
580 | versions of the GNU General Public License can be used, that proxy's
581 | public statement of acceptance of a version permanently authorizes you
582 | to choose that version for the Program.
583 |
584 | Later license versions may give you additional or different
585 | permissions. However, no additional obligations are imposed on any
586 | author or copyright holder as a result of your choosing to follow a
587 | later version.
588 |
589 | 15. Disclaimer of Warranty.
590 |
591 | THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
592 | APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
593 | HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
594 | OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
595 | THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
596 | PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
597 | IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
598 | ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
599 |
600 | 16. Limitation of Liability.
601 |
602 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
603 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
604 | THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
605 | GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
606 | USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
607 | DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
608 | PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
609 | EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
610 | SUCH DAMAGES.
611 |
612 | 17. Interpretation of Sections 15 and 16.
613 |
614 | If the disclaimer of warranty and limitation of liability provided
615 | above cannot be given local legal effect according to their terms,
616 | reviewing courts shall apply local law that most closely approximates
617 | an absolute waiver of all civil liability in connection with the
618 | Program, unless a warranty or assumption of liability accompanies a
619 | copy of the Program in return for a fee.
620 |
621 | END OF TERMS AND CONDITIONS
622 |
623 | How to Apply These Terms to Your New Programs
624 |
625 | If you develop a new program, and you want it to be of the greatest
626 | possible use to the public, the best way to achieve this is to make it
627 | free software which everyone can redistribute and change under these terms.
628 |
629 | To do so, attach the following notices to the program. It is safest
630 | to attach them to the start of each source file to most effectively
631 | state the exclusion of warranty; and each file should have at least
632 | the "copyright" line and a pointer to where the full notice is found.
633 |
634 |
635 | Copyright (C)
636 |
637 | This program is free software: you can redistribute it and/or modify
638 | it under the terms of the GNU General Public License as published by
639 | the Free Software Foundation, either version 3 of the License, or
640 | (at your option) any later version.
641 |
642 | This program is distributed in the hope that it will be useful,
643 | but WITHOUT ANY WARRANTY; without even the implied warranty of
644 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
645 | GNU General Public License for more details.
646 |
647 | You should have received a copy of the GNU General Public License
648 | along with this program. If not, see .
649 |
650 | Also add information on how to contact you by electronic and paper mail.
651 |
652 | If the program does terminal interaction, make it output a short
653 | notice like this when it starts in an interactive mode:
654 |
655 | Copyright (C)
656 | This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
657 | This is free software, and you are welcome to redistribute it
658 | under certain conditions; type `show c' for details.
659 |
660 | The hypothetical commands `show w' and `show c' should show the appropriate
661 | parts of the General Public License. Of course, your program's commands
662 | might be different; for a GUI interface, you would use an "about box".
663 |
664 | You should also get your employer (if you work as a programmer) or school,
665 | if any, to sign a "copyright disclaimer" for the program, if necessary.
666 | For more information on this, and how to apply and follow the GNU GPL, see
667 | .
668 |
669 | The GNU General Public License does not permit incorporating your program
670 | into proprietary programs. If your program is a subroutine library, you
671 | may consider it more useful to permit linking proprietary applications with
672 | the library. If this is what you want to do, use the GNU Lesser General
673 | Public License instead of this License. But first, please read
674 | .
675 |
--------------------------------------------------------------------------------
/LibreGaming/LibreGaming.py:
--------------------------------------------------------------------------------
1 | import subprocess
2 | from LibreGaming.distro_pkgs.Arch import Arch
3 | from LibreGaming.distro_pkgs.Fedora import Fedora
4 | from LibreGaming.distro_pkgs.OpenSUSE import OpenSUSE
5 | from LibreGaming.distro_pkgs.Ubuntu import Ubuntu
6 | from LibreGaming.distro_pkgs.Common_Pkgs import Common_Pkgs
7 |
8 | class LibreGaming:
9 | """
10 | Here is where all the magic gets done.
11 | """
12 |
13 | PackageManager = ""
14 | distro = ["apt","yay", "paru", "pacman", "dnf", "zypper"]
15 |
16 | # Initialize the Program
17 | def __init__(self):
18 | self.PackageManager = self.getPackageManager()
19 |
20 | # Initialize distro objects
21 | self.Arch_Object = Arch(self.PackageManager)
22 | self.Fedora_Object = Fedora()
23 | self.OpenSUSE_Object = OpenSUSE()
24 | self.Ubuntu_Object = Ubuntu()
25 | self.Common_Pkgs_Object = Common_Pkgs()
26 |
27 | # Gets the package manager by running $(command -v dnf)
28 | def getPackageManager(self):
29 | if subprocess.getoutput("command -v dnf"):
30 | self.PackageManager = "dnf"
31 | subprocess.run(["dnf", "install", "redhat-lsb-core", "-y"]) # tool used to get the release version of Fedora using "lsb_release -rs"
32 | elif subprocess.getoutput("command -v yay"):
33 | self.PackageManager = "yay"
34 | elif subprocess.getoutput("command -v paru"):
35 | self.PackageManager = "paru"
36 | elif subprocess.getoutput("command -v pacman"):
37 | self.PackageManager = "pacman"
38 | elif subprocess.getoutput("command -v apt"):
39 | self.PackageManager = "apt"
40 | elif subprocess.getoutput("command -v zypper"):
41 | self.PackageManager = "zypper"
42 | else:
43 | print("Could not know your distro based on your Package Manager!")
44 | return "Unknown distro"
45 | return self.PackageManager
46 |
47 | # To check if LibreGaming is executed with root or not
48 | def whoami(self, authorize):
49 | whoami = str(subprocess.getoutput("whoami"))
50 | if whoami == "root" and authorize == False:
51 | print("\nPlease run LibreGaming without sudo or doas command for this flag")
52 | exit(0)
53 | elif whoami != "root" and authorize == True:
54 | print("\nPlease run LibreGaming with sudo or doas command for this flag")
55 | exit(0)
56 |
57 | # Used to install all packages
58 | def installAllPkgs(self):
59 | self.BasicPkgs()
60 | self.Lutris()
61 | self.Overlays()
62 | return 'success'
63 |
64 | #Used to install Steam, Wine-Staging, Gamemode
65 | def BasicPkgs(self):
66 | if self.PackageManager == self.distro[0]: #packages for Ubuntu and Ubuntu based distros
67 | self.whoami(True)
68 | print("\n\tNow Installing Ubuntu Gaming Packages")
69 | for i in self.Ubuntu_Object.Ubuntu_Basics():
70 | subprocess.run(i) #running each element in Ubuntu array
71 | elif self.PackageManager == self.distro[1] or self.PackageManager == self.distro[2]: #packages for Arch and Arch based distros
72 | self.whoami(False)
73 | print("\n\tNow Installing Arch Gaming Packages") #for those who have AUR(yay or paru) enabled
74 | subprocess.run(self.Arch_Object.Arch_AUR_Basics())
75 | elif self.PackageManager == self.distro[3]:
76 | self.whoami(True)
77 | print("\n\tNow Installing Arch Gaming Packages")
78 | subprocess.run(self.Arch_Object.Arch_Basics)
79 | elif self.PackageManager == self.distro[4]: #packages for Fedora
80 | self.whoami(True)
81 | ReleaseNumber = subprocess.getoutput("lsb_release -rs")
82 | print("\n\tNow Installing Fedora " + ReleaseNumber +" Gaming Packages")
83 | if ReleaseNumber >= '40':
84 | for i in self.Fedora_Object.Fedora_40_Basics:
85 | subprocess.run(i) #running each element in Fedora array from distro_pkgs/Fedora
86 | elif ReleaseNumber >= '33' and ReleaseNumber < '40':
87 | for i in self.Fedora_Object.Fedora_33_Basics:
88 | subprocess.run(i) #running each element in Fedora array from distro_pkgs/Fedora
89 | if ReleaseNumber < '33':
90 | print("can't install wine-staging because your fedora version is less than 33. installing wine from fedora repo")
91 | for i in self.Fedora_Object.Fedora_32_Basics:
92 | subprocess.run(i) #running each element in Fedora array from distro_pkgs/Fedora
93 | elif self.PackageManager == self.distro[5]: #packages for OpenSUSE
94 | self.whoami(True)
95 | print("\n\nNow Installing OpenSUSE Gaming Packages")
96 | for i in self.OpenSUSE_Object.OpenSUSE_Basics:
97 | subprocess.run(i) #running each element in OpenSUSE array
98 | else:
99 | print("\n\tYour distro is not supported or was not found :(")
100 | return "Installaion failed"
101 | return 'success'
102 |
103 | #Used to install Lutris
104 | def Lutris(self):
105 | if self.PackageManager == self.distro[0]: #packages for Ubuntu and Ubuntu based distros
106 | #self.whoami(True)
107 | print("\n\tInstalling Lutris for Ubuntu")
108 | for i in self.Ubuntu_Object.Ubuntu_Lutris:
109 | subprocess.run(i) #running each element in Ubuntu array
110 | elif self.PackageManager == self.distro[1] or self.PackageManager == self.distro[2]:
111 | #self.whoami(False)
112 | print("\n\tInstalling Lutris for Arch using an AUR helper")
113 | subprocess.run(self.Arch_Object.Arch_Lutris())
114 | elif self.PackageManager == self.distro[3]:
115 | #self.whoami(True)
116 | print("\n\tInstalling Lutris for Arch")
117 | subprocess.run(self.Arch_Object.Arch_Lutris())
118 | elif self.PackageManager == self.distro[4]: #packages for Fedora
119 | #self.whoami(True)
120 | print("\n\tInstalling Lutris for Fedora")
121 | subprocess.run(self.Fedora_Object.Fedora_Lutris)
122 | elif self.PackageManager == self.distro[5]: #packages for OpenSUSE
123 | #self.whoami(True)
124 | print("\n\tInstalling Lutris for OpenSUSE")
125 | subprocess.run(self.OpenSUSE_Object.OpenSUSE_Lutris)
126 | else:
127 | print("\n\tYour distro is not supported or was not found :(")
128 | return "Installaion failed"
129 | return 'success'
130 |
131 | #Used to install MangoHud and Goverlay
132 | def Overlays(self):
133 | if self.PackageManager == self.distro[0]: #packages for Ubuntu and Ubuntu based distros
134 | self.whoami(True)
135 | print("\n\tinstalling Mangohud and Goverlay for Ubuntu")
136 | for i in self.Ubuntu_Object.Ubuntu_Overlay:
137 | subprocess.run(i) #running each element in Ubuntu array
138 | elif self.PackageManager == self.distro[1] or self.PackageManager == self.distro[2]: #packages for Arch and Arch based distros
139 | self.whoami(False)
140 | print("\n\tinstalling Mangohud and Goverlay for Arch")
141 | subprocess.run(self.Arch_Object.Arch_AUR_Overlays())
142 | elif self.PackageManager == self.distro[3]:
143 | self.whoami(True)
144 | print("\n\tYou need to have AUR helpers like yay,paru to install Mangohud and Goverlay")
145 | elif self.PackageManager == self.distro[4]: #packages for Fedora
146 | self.whoami(True)
147 | print("\n\tinstalling Mangohud and Goverlay for Fedora")
148 | subprocess.run(self.Fedora_Object.Fedora_Overlays) #running each element in Fedora array
149 | elif self.PackageManager == self.distro[5]: #packages for OpenSUSE
150 | self.whoami(True)
151 | print("\n\tinstalling Mangohud and Goverlay for OpenSUSE")
152 | subprocess.run(self.OpenSUSE_Object.OpenSUSE_Overlays)
153 | else:
154 | print("\n\tYour distro is not supported or was not found :(")
155 | return "Installaion failed"
156 | return 'success'
157 |
158 | #Used to install Steam Tinker Lanuch for Arch Linux(AUR)
159 | def STL(self):
160 | self.whoami(False)
161 | if self.PackageManager == self.distro[1] or self.PackageManager == self.distro[2]: #packages for Arch and Arch based distros
162 | print("\n\tinstalling Steam Tinker Lanuch for Arch")
163 | subprocess.run(self.Arch_Object.Arch_AUR_STL())
164 | elif self.PackageManager == self.distro[3]:
165 | print("\n\tYou need to have AUR helpers like yay,paru to install Heroic")
166 |
--------------------------------------------------------------------------------
/LibreGaming/LibreGamingQt.py:
--------------------------------------------------------------------------------
1 | import sys, os, subprocess
2 | from PyQt5.QtWidgets import *
3 | from PyQt5.QtGui import *
4 | from PyQt5 import QtGui
5 | from PyQt5.QtCore import QProcess
6 |
7 | class MainWindow(QMainWindow):
8 |
9 | def __init__(self):
10 | super().__init__()
11 |
12 | self.PackageManager = self.getPackageManager()
13 |
14 | self.p = None
15 | self.setWindowTitle("LibreGamingQt (Do not use if you are on Arch Linux)")
16 | self.setWindowIcon(QtGui.QIcon('joystick.png'))
17 |
18 | self.libregaming_Btn = QPushButton("Install LibreGaming(Select this option before installing anything)")
19 | self.all_Btn = QPushButton("Install all the Gaming Packages(Steam,Wine-Staging,Gamemode,Lutris,Heroic,MangoHud & Goverlay)")
20 | self.basic_Btn = QPushButton("Install Basic Gaming Packages(Steam,Wine-Staging,Gamemode)")
21 | self.overlays_Btn = QPushButton("Install Mangohud & Goverlay")
22 | self.heroic_Btn = QPushButton("Install Heroic Launcher")
23 | self.lutris_Btn = QPushButton("Install Lutris Launcher")
24 | self.minigalaxy_Btn = QPushButton("Install Minigalaxy Launcher")
25 | self.itch_Btn = QPushButton("Install itch.io Launcher")
26 | self.ath_Btn = QPushButton("Install Athenaeum")
27 |
28 | self.libregaming_Btn.setMinimumSize(0,50)
29 | self.all_Btn.setMinimumSize(0,50)
30 | self.basic_Btn.setMinimumSize(0,50)
31 | self.overlays_Btn.setMinimumSize(0,50)
32 | self.heroic_Btn.setMinimumSize(0,50)
33 | self.lutris_Btn.setMinimumSize(0,50)
34 | self.minigalaxy_Btn.setMinimumSize(0,50)
35 | self.itch_Btn.setMinimumSize(0,50)
36 | self.ath_Btn.setMinimumSize(0,50)
37 |
38 | self.libregaming_Btn.pressed.connect(self.installLibreGaming)
39 | self.all_Btn.pressed.connect(self.installAllPkgs)
40 | self.basic_Btn.pressed.connect(self.BasicPkgs)
41 | self.overlays_Btn.pressed.connect(self.Overlays)
42 | self.heroic_Btn.pressed.connect(self.Heroic)
43 | self.lutris_Btn.pressed.connect(self.Lutris)
44 | self.minigalaxy_Btn.pressed.connect(self.Minigalaxy)
45 | self.itch_Btn.pressed.connect(self.Itch)
46 | self.ath_Btn.pressed.connect(self.Athenaeum)
47 | self.text = QPlainTextEdit()
48 | self.text.setReadOnly(True)
49 |
50 | l = QGridLayout()
51 |
52 | #newAction = QAction(QIcon('new.png'), '&New', self)
53 |
54 | menubar = QMenuBar()
55 | l.addWidget(menubar, 0, 0)
56 | menubar.addAction("About")
57 | menubar.triggered.connect(self.About)
58 |
59 | # setting font and size
60 | self.setFont(QFont('Ubuntu', 10))
61 |
62 | l.addWidget(self.libregaming_Btn)
63 | l.addWidget(self.all_Btn)
64 | l.addWidget(self.basic_Btn)
65 | l.addWidget(self.overlays_Btn)
66 | l.addWidget(self.heroic_Btn)
67 | l.addWidget(self.lutris_Btn)
68 | l.addWidget(self.minigalaxy_Btn)
69 | l.addWidget(self.itch_Btn)
70 | l.addWidget(self.ath_Btn)
71 | l.addWidget(self.text)
72 | w = QWidget()
73 | w.setLayout(l)
74 |
75 | self.setup()
76 | self.setCentralWidget(w)
77 |
78 | # Gets the package manager by running $(command -v dnf)
79 | def getPackageManager(self):
80 | if subprocess.getoutput("command -v dnf"):
81 | self.PackageManager = "dnf"
82 | elif subprocess.getoutput("command -v yay"):
83 | self.PackageManager = "yay"
84 | elif subprocess.getoutput("command -v paru"):
85 | self.PackageManager = "paru"
86 | elif subprocess.getoutput("command -v pacman"):
87 | self.PackageManager = "pacman"
88 | elif subprocess.getoutput("command -v apt"):
89 | self.PackageManager = "apt"
90 | elif subprocess.getoutput("command -v zypper"):
91 | self.PackageManager = "zypper"
92 | else:
93 | print("Could not know your distro based on your Package Manager!")
94 | return self.PackageManager
95 |
96 | def min(self, event):
97 | self.setWindowState(self.windowState() | QWindow.Minimized)
98 | event.accept()
99 |
100 | def close(self, event):
101 | self.setWindowState(self.windowState() | QWindow.Close)
102 | event.accept()
103 |
104 | def About(self):
105 | msgBox = QMessageBox()
106 | msgBox.about(self, "About", "Thank You for Using LibreGamingQt\n\n Author: Ahmed Al Balochi\n License: GPLv3 \n Email: a7mad98.work@gmail.com\n Github Page Link: https://github.com/Ahmed-Al-Balochi/LibreGaming")
107 |
108 | def message(self, s):
109 | self.text.appendPlainText(s)
110 |
111 | def handle_stderr(self):
112 | data = self.p.readAllStandardError()
113 | stderr = bytes(data).decode("utf8")
114 | self.message(stderr)
115 |
116 | def handle_stdout(self):
117 | data = self.p.readAllStandardOutput()
118 | stdout = bytes(data).decode("utf8")
119 | self.message(stdout)
120 |
121 | def handle_state(self, state):
122 | states = {
123 | QProcess.NotRunning: 'Finished Installing',
124 | QProcess.Starting: 'Installation Starting',
125 | QProcess.Running: 'Installation Running',
126 | }
127 | state_name = states[state]
128 | self.message(f"State changed: {state_name}")
129 |
130 | def process_finished(self):
131 | w.raise_()
132 | self.p = None
133 |
134 | def setup(self):
135 | if self.p is None: # No process running.
136 | self.p = QProcess() # Keep a reference to the QProcess (e.g. on self) while it's running.
137 | self.p.readyReadStandardOutput.connect(self.handle_stdout)
138 | self.p.readyReadStandardError.connect(self.handle_stderr)
139 | self.p.stateChanged.connect(self.handle_state)
140 | self.p.finished.connect(self.process_finished) # Clean up once complete.
141 | if self.PackageManager == "dnf" or self.PackageManager == "apt":
142 | self.p.start("pkexec pacman -S python3-pip")
143 | else:
144 | self.p.start("pkexec "+ self.PackageManager +" install python-pipx")
145 |
146 | def installLibreGaming(self):
147 | if self.p is None: # No process running.
148 | self.p = QProcess() # Keep a reference to the QProcess (e.g. on self) while it's running.
149 | self.p.readyReadStandardOutput.connect(self.handle_stdout)
150 | self.p.readyReadStandardError.connect(self.handle_stderr)
151 | self.p.stateChanged.connect(self.handle_state)
152 | self.p.finished.connect(self.process_finished) # Clean up once complete.
153 | self.p.start("pkexec sudo pipx upgrade libregaming --global")
154 |
155 | def installAllPkgs(self):
156 | if self.p is None: # No process running.
157 | self.p = QProcess() # Keep a reference to the QProcess (e.g. on self) while it's running.
158 | self.p.readyReadStandardOutput.connect(self.handle_stdout)
159 | self.p.readyReadStandardError.connect(self.handle_stderr)
160 | self.p.stateChanged.connect(self.handle_state)
161 | self.p.finished.connect(self.process_finished) # Clean up once complete.
162 | self.p.start("pkexec LibreGaming -g")
163 |
164 | def BasicPkgs(self):
165 | if self.p is None: # No process running.
166 | self.p = QProcess() # Keep a reference to the QProcess (e.g. on self) while it's running.
167 | self.p.readyReadStandardOutput.connect(self.handle_stdout)
168 | self.p.readyReadStandardError.connect(self.handle_stderr)
169 | self.p.stateChanged.connect(self.handle_state)
170 | self.p.finished.connect(self.process_finished) # Clean up once complete.
171 | self.p.start("pkexec LibreGaming -b")
172 |
173 | def Lutris(self):
174 | if self.p is None: # No process running.
175 | self.p = QProcess() # Keep a reference to the QProcess (e.g. on self) while it's running.
176 | self.p.readyReadStandardOutput.connect(self.handle_stdout)
177 | self.p.readyReadStandardError.connect(self.handle_stderr)
178 | self.p.stateChanged.connect(self.handle_state)
179 | self.p.finished.connect(self.process_finished) # Clean up once complete.
180 | self.p.start("pkexec LibreGaming --lutris")
181 |
182 | def Heroic(self):
183 | if self.p is None: # No process running.
184 | self.p = QProcess() # Keep a reference to the QProcess (e.g. on self) while it's running.
185 | self.p.readyReadStandardOutput.connect(self.handle_stdout)
186 | self.p.readyReadStandardError.connect(self.handle_stderr)
187 | self.p.stateChanged.connect(self.handle_state)
188 | self.p.finished.connect(self.process_finished) # Clean up once complete.
189 | if self.PackageManager == "zypper":
190 | self.p.start("LibreGaming --heroic")
191 | else:
192 | self.p.start("pkexec LibreGaming --lutris")
193 |
194 | def Overlays(self):
195 | if self.p is None: # No process running.
196 | self.p = QProcess() # Keep a reference to the QProcess (e.g. on self) while it's running.
197 | self.p.readyReadStandardOutput.connect(self.handle_stdout)
198 | self.p.readyReadStandardError.connect(self.handle_stderr)
199 | self.p.stateChanged.connect(self.handle_state)
200 | self.p.finished.connect(self.process_finished) # Clean up once complete.
201 | self.p.start("pkexec LibreGaming -o")
202 |
203 | def Minigalaxy(self):
204 | if self.p is None: # No process running.
205 | self.p = QProcess() # Keep a reference to the QProcess (e.g. on self) while it's running.
206 | self.p.readyReadStandardOutput.connect(self.handle_stdout)
207 | self.p.readyReadStandardError.connect(self.handle_stderr)
208 | self.p.stateChanged.connect(self.handle_state)
209 | self.p.finished.connect(self.process_finished) # Clean up once complete.
210 | self.p.start("LibreGaming --minigalaxy")
211 |
212 | def Itch(self):
213 | if self.p is None: # No process running.
214 | self.p = QProcess() # Keep a reference to the QProcess (e.g. on self) while it's running.
215 | self.p.readyReadStandardOutput.connect(self.handle_stdout)
216 | self.p.readyReadStandardError.connect(self.handle_stderr)
217 | self.p.stateChanged.connect(self.handle_state)
218 | self.p.finished.connect(self.process_finished) # Clean up once complete.
219 | self.p.start("LibreGaming --itch")
220 |
221 | def Athenaeum(self):
222 | if self.p is None: # No process running.
223 | self.p = QProcess() # Keep a reference to the QProcess (e.g. on self) while it's running.
224 | self.p.readyReadStandardOutput.connect(self.handle_stdout)
225 | self.p.readyReadStandardError.connect(self.handle_stderr)
226 | self.p.stateChanged.connect(self.handle_state)
227 | self.p.finished.connect(self.process_finished) # Clean up once complete.
228 | self.p.start("LibreGaming -ath")
229 |
230 | app = QApplication(sys.argv)
231 |
232 | w = MainWindow()
233 | w.resize(900,800)
234 | w.show()
235 |
236 | app.exec_()
237 |
--------------------------------------------------------------------------------
/LibreGaming/__init__.py:
--------------------------------------------------------------------------------
1 | def main():
2 | from .__main__ import main
3 | return main()
--------------------------------------------------------------------------------
/LibreGaming/__main__.py:
--------------------------------------------------------------------------------
1 | from .LibreGaming import LibreGaming
2 | import argparse, subprocess
3 |
4 | #Parse commandline arguments
5 | def parse_arguments():
6 | parser = argparse.ArgumentParser(usage="%(prog)s ", description="Install Gaming Packages with ease",
7 | epilog="GPLv3 - Repo : https://github.com/Ahmed-Al-Balochi/LibreGaming.git")
8 | parser.add_argument('-g', '--gaming', action='store_true', help='Install all the Gaming Packages(Steam,Wine-Staging,Gamemode,Lutris,Heroic,MangoHud & Goverlay)')
9 | parser.add_argument('-b', '--basic', action='store_true', help='Install Basic Gaming Packages(Steam,Wine-Staging,Gamemode)')
10 | parser.add_argument('-ath', '--athenaeum', action='store_true', help='Install Athenaeum Launcher')
11 | parser.add_argument('-o', '--overlays', action='store_true', help='Install Mangohud & Goverlay')
12 | parser.add_argument('--heroic', action='store_true', help='Install Heroic Launcher')
13 | parser.add_argument('--lutris', action='store_true', help='Install Lutris Launcher')
14 | parser.add_argument('--minigalaxy', action='store_true', help='Install Minigalaxy Launcher')
15 | parser.add_argument('--itch', action='store_true', help='Install itch.io Launcher')
16 | parser.add_argument('--stl', action='store_true', help='Install Steam Tinker Launch(For Arch Linux only)')
17 | parser.add_argument('-v','--version', action='version', version='0.3')
18 | return parser.parse_args()
19 |
20 | # Main execution
21 | def main():
22 | try:
23 | print("""\n
24 | ██╗ ██╗██████╗ ██████╗ ███████╗ ██████╗ █████╗ ███╗ ███╗██╗███╗ ██╗ ██████╗
25 | ██║ ██║██╔══██╗██╔══██╗██╔════╝██╔════╝ ██╔══██╗████╗ ████║██║████╗ ██║██╔════╝
26 | ██║ ██║██████╔╝██████╔╝█████╗ ██║ ███╗███████║██╔████╔██║██║██╔██╗ ██║██║ ███╗
27 | ██║ ██║██╔══██╗██╔══██╗██╔══╝ ██║ ██║██╔══██║██║╚██╔╝██║██║██║╚██╗██║██║ ██║
28 | ███████╗██║██████╔╝██║ ██║███████╗╚██████╔╝██║ ██║██║ ╚═╝ ██║██║██║ ╚████║╚██████╔╝
29 | ╚══════╝╚═╝╚═════╝ ╚═╝ ╚═╝╚══════╝ ╚═════╝ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝ ╚═════╝
30 | \n""")
31 | LibreGaming_Object = LibreGaming()
32 | args = parse_arguments()
33 | if args.gaming:
34 | LibreGaming_Object.installAllPkgs()
35 | if args.basic:
36 | LibreGaming_Object.BasicPkgs()
37 | if args.overlays:
38 | LibreGaming_Object.Overlays()
39 | if args.lutris:
40 | LibreGaming_Object.Lutris()
41 | if args.heroic:
42 | LibreGaming_Object.Common_Pkgs_Object.Heroic()
43 | if args.stl:
44 | LibreGaming_Object.STL()
45 | if args.minigalaxy:
46 | LibreGaming_Object.Common_Pkgs_Object.Minigalaxy()
47 | if args.itch:
48 | LibreGaming_Object.Common_Pkgs_Object.itch()
49 | if args.athenaeum:
50 | LibreGaming_Object.Common_Pkgs_Object.Athenaeum()
51 | except KeyboardInterrupt:
52 | print("\nInterrupt signal received exiting...\n")
53 | exit(0)
54 |
55 | if __name__ == "__main__":
56 | main()
57 |
--------------------------------------------------------------------------------
/LibreGaming/distro_pkgs/Arch.py:
--------------------------------------------------------------------------------
1 | import subprocess
2 |
3 | class Arch:
4 | """
5 | Here are all the pkgs that LibreGaming installs for Arch Linux
6 | """
7 |
8 | # Saves the Arch package manager or AUR helpers. For example: pacman, yay
9 | PackageManager = ""
10 |
11 | # For installing Basic Packages like Steam, Wine, Gamemode. For those not using an AUR Helper
12 | Arch_Basics = ["pacman", "-Syu", "python-pip", "wine-staging", "winetricks", "steam", "gamemode", "giflib", "lib32-giflib", "libpng", "lib32-libpng", "libldap", "lib32-libldap", "gnutls", "lib32-gnutls", "mpg123", "lib32-mpg123", "openal", "lib32-openal", "v4l-utils", "lib32-v4l-utils", "libpulse", "lib32-libpulse", "libgpg-error", "lib32-libgpg-error", "alsa-plugins", "lib32-alsa-plugins", "alsa-lib", "lib32-alsa-lib", "libjpeg-turbo", "lib32-libjpeg-turbo", "sqlite", "lib32-sqlite", "libxcomposite", "lib32-libxcomposite", "libxinerama", "lib32-libgcrypt", "libgcrypt", "lib32-libxinerama", "ncurses", "lib32-ncurses", "opencl-icd-loader", "lib32-opencl-icd-loader", "libxslt", "lib32-libxslt", "libva", "lib32-libva", "gtk3", "lib32-gtk3", "gst-plugins-base-libs", "lib32-gst-plugins-base-libs", "vulkan-icd-loader", "lib32-vulkan-icd-loader", "-y", "--needed", "--noconfirm"]
13 |
14 | # For installing Lutris
15 | def Arch_Lutris(self):
16 | Install_Lutris = [self.PackageManager, "-S", "python-evdev", "lutris", "-y", "--needed", "--noconfirm"]
17 | return Install_Lutris
18 |
19 | # The PackageManager variable uses the updated PackageManager only in functions. otherwise its values will be blank
20 | def Arch_AUR_Basics(self):
21 | AUR_Basics = [self.PackageManager, "-Syu", "python-pip", "wine-staging", "winetricks", "steam", "gamemode", "giflib", "lib32-giflib", "libpng", "lib32-libpng", "libldap", "lib32-libldap", "gnutls", "lib32-gnutls", "mpg123", "lib32-mpg123", "openal", "lib32-openal", "v4l-utils", "lib32-v4l-utils", "libpulse", "lib32-libpulse", "libgpg-error", "lib32-libgpg-error", "alsa-plugins", "lib32-alsa-plugins", "alsa-lib", "lib32-alsa-lib", "libjpeg-turbo", "lib32-libjpeg-turbo", "sqlite", "lib32-sqlite", "libxcomposite", "lib32-libxcomposite", "libxinerama", "lib32-libgcrypt", "libgcrypt", "lib32-libxinerama", "ncurses", "lib32-ncurses", "opencl-icd-loader", "lib32-opencl-icd-loader", "libxslt", "lib32-libxslt", "libva", "lib32-libva", "gtk3", "lib32-gtk3", "gst-plugins-base-libs", "lib32-gst-plugins-base-libs", "vulkan-icd-loader", "lib32-vulkan-icd-loader", "-y", "--needed", "--noconfirm"]
22 | return AUR_Basics
23 |
24 | # For installing The FPS programs and overlays
25 | def Arch_AUR_Overlays(self):
26 | AUR_Overlays = [self.PackageManager, "-S", "pkg-config", "cmake", "goverlay", "-y", "--needed", "--noconfirm"]
27 | return AUR_Overlays
28 |
29 | # For installing Steam Tinker Lanuch
30 | def Arch_AUR_STL(self):
31 | AUR_STL = [self.PackageManager, "-S", "steamtinkerlaunch", "-y", "--needed", "--noconfirm"]
32 | return AUR_STL
33 |
34 | def __init__(self, PackageManager):
35 | if PackageManager == "yay" or PackageManager == "paru":
36 | whoami = str(subprocess.getoutput("whoami"))
37 | if whoami == "root":
38 | print("\nPlease run LibreGaming without the sudo or doas command if you use an AUR Helper\n")
39 | exit(0)
40 | else:
41 | self.PackageManager = PackageManager
42 | else:
43 | self.PackageManager = PackageManager
--------------------------------------------------------------------------------
/LibreGaming/distro_pkgs/Common_Pkgs.py:
--------------------------------------------------------------------------------
1 | import os, subprocess
2 |
3 | class Common_Pkgs:
4 | """
5 | Here are all the pkgs that are distro agnostic
6 | """
7 |
8 | # TO check if LibreGaming is executed with root or not
9 | def whoami(self, authorize):
10 | whoami = str(subprocess.getoutput("whoami"))
11 | if whoami == "root" and authorize == False:
12 | print("\n\tPlease run LibreGaming without sudo or doas command for this flag\t")
13 | exit(0)
14 | elif whoami != "root" and authorize == True:
15 | print("\n\tPlease run LibreGaming with sudo or doas command for this flag\n")
16 | exit(0)
17 |
18 | # installation for Itch.io store
19 | def itch(self):
20 | self.whoami(False)
21 | print("Downloading itch.io")
22 | subprocess.run(["wget", "https://itch.io/app/download?platform=linux", "-O", "itch-setup"])
23 | subprocess.run(["chmod", "+x", "itch-setup"])
24 | os.system("./itch-setup")
25 |
26 | # installation for Athenaeum store For FOSS games
27 | def Athenaeum(self):
28 | self.whoami(False)
29 | subprocess.run(["flatpak", "install", "flathub", "com.gitlab.librebob.Athenaeum", "-y"])
30 |
31 | # installation for Minigalaxy store For GOG games
32 | def Minigalaxy(self):
33 | self.whoami(False)
34 | subprocess.run(["flatpak", "install", "flathub", "io.github.sharkwouter.Minigalaxy"])
35 |
36 | # installation for Heroic store For EPIC and GOG games
37 | def Heroic(self):
38 | self.whoami(False)
39 | subprocess.run(["flatpak", "install", "flathub", "com.heroicgameslauncher.hgl", "-y"])
--------------------------------------------------------------------------------
/LibreGaming/distro_pkgs/Fedora.py:
--------------------------------------------------------------------------------
1 | import subprocess
2 |
3 | class Fedora:
4 | """
5 | Here are all the pkgs that LibreGaming installs for Fedora
6 | """
7 |
8 |
9 | # For fedora 40 and above
10 | # For installing Basic Packages like Steam, Wine, Gamemode
11 | # ReleaseNumber Saves the Fedora release number. For example: Fedora 40
12 | Fedora_40_Basics = [
13 | ["wget", "https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks"], #installing winetricks here
14 | ["chmod", "-744", "winetricks"],
15 | ["mv", "winetricks", "/usr/local/bin/"],
16 | ["dnf", "config-manager", "--add-repo", "https://dl.winehq.org/wine-builds/fedora/"+ str(subprocess.getoutput("lsb_release -rs")) +"/winehq.repo"],
17 | ["dnf", "update", "-y"],
18 | ["dnf", "install", "python3-pip", "wine-staging", "gamemode", "steam", "wine-alsa", "wine-pulseaudio", "wine-fonts", "wine-openal", "wine-opencl", "wine-filesystem", "wine-core", "wine-common", "wine-desktop", "alsa-plugins-pulseaudio.i686", "glibc-devel", "libgcc.i686", "libX11-devel.i686", "freetype-devel.i686", "libXcursor-devel.i686", "libXi-devel.i686", "libXext-devel.i686", "libXxf86vm-devel.i686", "libXrandr-devel.i686", "libXinerama-devel.i686", "mesa-libGLU-devel.i686", "mesa-libOSMesa-devel.i686", "libXrender-devel.i686", "libpcap-devel.i686", "ncurses-devel.i686", "libzip-devel.i686", "lcms2-devel.i686", "zlib-ng-devel.i686", "libv4l-devel.i686", "libgphoto2-devel.i686", "cups-devel.i686", "libxml2-devel.i686", "openldap-devel.i686", "libxslt-devel.i686", "gnutls-devel.i686", "libpng-devel.i686", "flac-libs.i686", "json-c.i686", "libICE.i686", "libSM.i686", "libXtst.i686", "libasyncns.i686", "liberation-narrow-fonts.noarch", "libieee1284.i686", "libogg.i686", "libsndfile.i686", "libuuid.i686", "libva.i686", "libvorbis.i686", "libwayland-client.i686", "libwayland-server.i686", "llvm-libs.i686", "mesa-dri-drivers.i686", "mesa-filesystem.i686", "mesa-libEGL.i686", "mesa-libgbm.i686", "nss-mdns.i686", "ocl-icd.i686", "pulseaudio-libs.i686", "sane-backends-libs.i686", "tcp_wrappers-libs.i686", "unixODBC.i686", "samba-common-tools.x86_64", "samba-libs.x86_64", "samba-winbind.x86_64", "samba-winbind-clients.x86_64", "samba-winbind-modules.x86_64", "mesa-libGL-devel.i686", "fontconfig-devel.i686", "libXcomposite-devel.i686", "libtiff-devel.i686", "openal-soft-devel.i686", "mesa-libOpenCL-devel.i686", "alsa-lib-devel.i686", "gsm-devel.i686", "libjpeg-turbo-devel.i686", "pulseaudio-libs-devel.i686", "pulseaudio-libs-devel", "gtk3-devel.i686", "libattr-devel.i686", "libva-devel.i686", "libexif-devel.i686", "libexif.i686", "glib2-devel", "mpg123-devel.x86_64", "libcom_err-devel.i686", "libcom_err-devel.x86_64", "libFAudio-devel", "-y"]
19 | ]
20 |
21 |
22 | # For fedora 33 and above
23 | # For installing Basic Packages like Steam, Wine, Gamemode
24 | # ReleaseNumber Saves the Fedora release number. For example: Fedora 35
25 | Fedora_33_Basics = [
26 | ["wget", "https://raw.githubusercontent.com/Winetricks/winetricks/master/src/winetricks"], #installing winetricks here
27 | ["chmod", "-744", "winetricks"],
28 | ["mv", "winetricks", "/usr/local/bin/"],
29 | ["dnf", "config-manager", "--add-repo", "https://dl.winehq.org/wine-builds/fedora/"+ str(subprocess.getoutput("lsb_release -rs")) +"/winehq.repo"],
30 | ["dnf", "update", "-y"],
31 | ["dnf", "install", "python3-pip", "wine-staging", "gamemode", "steam", "wine-alsa", "wine-fonts", "wine-openal", "wine-opencl", "wine-filesystem", "wine-core", "wine-common", "wine-desktop", "alsa-plugins-pulseaudio.i686", "glibc-devel.i686", "glibc-devel", "libgcc.i686", "libX11-devel.i686", "freetype-devel.i686", "libXcursor-devel.i686", "libXi-devel.i686", "libXext-devel.i686", "libXxf86vm-devel.i686", "libXrandr-devel.i686", "libXinerama-devel.i686", "mesa-libGLU-devel.i686", "mesa-libOSMesa-devel.i686", "libXrender-devel.i686", "libpcap-devel.i686", "ncurses-devel.i686", "libzip-devel.i686", "lcms2-devel.i686", "zlib-devel.i686", "libv4l-devel.i686", "libgphoto2-devel.i686", "cups-devel.i686", "libxml2-devel.i686", "openldap-devel.i686", "libxslt-devel.i686", "gnutls-devel.i686", "libpng-devel.i686", "flac-libs.i686", "json-c.i686", "libICE.i686", "libSM.i686", "libXtst.i686", "libasyncns.i686", "liberation-narrow-fonts.noarch", "libieee1284.i686", "libogg.i686", "libsndfile.i686", "libuuid.i686", "libva.i686", "libvorbis.i686", "libwayland-client.i686", "libwayland-server.i686", "llvm-libs.i686", "mesa-dri-drivers.i686", "mesa-filesystem.i686", "mesa-libEGL.i686", "mesa-libgbm.i686", "nss-mdns.i686", "ocl-icd.i686", "pulseaudio-libs.i686", "sane-backends-libs.i686", "tcp_wrappers-libs.i686", "unixODBC.i686", "samba-common-tools.x86_64", "samba-libs.x86_64", "samba-winbind.x86_64", "samba-winbind-clients.x86_64", "samba-winbind-modules.x86_64", "mesa-libGL-devel.i686", "fontconfig-devel.i686", "libXcomposite-devel.i686", "libtiff-devel.i686", "openal-soft-devel.i686", "mesa-libOpenCL-devel.i686", "opencl-utils-devel.i686", "alsa-lib-devel.i686", "gsm-devel.i686", "libjpeg-turbo-devel.i686", "pulseaudio-libs-devel.i686", "pulseaudio-libs-devel", "gtk3-devel.i686", "libattr-devel.i686", "libva-devel.i686", "libexif-devel.i686", "libexif.i686", "glib2-devel.i686", "mpg123-devel.i686", "mpg123-devel.x86_64", "libcom_err-devel.i686", "libcom_err-devel.x86_64", "libFAudio-devel", "-y"]
32 | ]
33 |
34 | # For fedora 32 and less
35 | # For installing Basic Packages like Steam, Wine, Gamemode
36 | Fedora_32_Basics = [
37 | ["wget", "https://raw.githubusercontent.com/winetricks/winetricks/master/src/winetricks"], #installing winetricks here
38 | ["chmod", "-744", "winetricks"],
39 | ["mv", "winetricks", "/usr/local/bin/"],
40 | ["dnf", "update", "-y"],
41 | ["dnf", "install", "python3-pip", "wine", "gamemode", "steam", "alsa-plugins-pulseaudio.i686", "glibc-devel.i686", "glibc-devel", "libgcc.i686", "libx11-devel.i686", "freetype-devel.i686", "libxcursor-devel.i686", "libxi-devel.i686", "libxext-devel.i686", "libxxf86vm-devel.i686", "libxrandr-devel.i686", "libxinerama-devel.i686", "mesa-libglu-devel.i686", "mesa-libosmesa-devel.i686", "libxrender-devel.i686", "libpcap-devel.i686", "ncurses-devel.i686", "libzip-devel.i686", "lcms2-devel.i686", "zlib-devel.i686", "libv4l-devel.i686", "libgphoto2-devel.i686", "cups-devel.i686", "libxml2-devel.i686", "openldap-devel.i686", "libxslt-devel.i686", "gnutls-devel.i686", "libpng-devel.i686", "flac-libs.i686", "json-c.i686", "libice.i686", "libsm.i686", "libxtst.i686", "libasyncns.i686", "liberation-narrow-fonts.noarch", "libieee1284.i686", "libogg.i686", "libsndfile.i686", "libuuid.i686", "libva.i686", "libvorbis.i686", "libwayland-client.i686", "libwayland-server.i686", "llvm-libs.i686", "mesa-dri-drivers.i686", "mesa-filesystem.i686", "mesa-libegl.i686", "mesa-libgbm.i686", "nss-mdns.i686", "ocl-icd.i686", "pulseaudio-libs.i686", "sane-backends-libs.i686", "tcp_wrappers-libs.i686", "unixodbc.i686", "samba-common-tools.x86_64", "samba-libs.x86_64", "samba-winbind.x86_64", "samba-winbind-clients.x86_64", "samba-winbind-modules.x86_64", "mesa-libgl-devel.i686", "fontconfig-devel.i686", "libxcomposite-devel.i686", "libtiff-devel.i686", "openal-soft-devel.i686", "mesa-libopencl-devel.i686", "opencl-utils-devel.i686", "alsa-lib-devel.i686", "gsm-devel.i686", "libjpeg-turbo-devel.i686", "pulseaudio-libs-devel.i686", "pulseaudio-libs-devel", "gtk3-devel.i686", "libattr-devel.i686", "libva-devel.i686", "libexif-devel.i686", "libexif.i686", "glib2-devel.i686", "mpg123-devel.i686", "mpg123-devel.x86_64", "libcom_err-devel.i686", "libcom_err-devel.x86_64", "libFAudio-devel", "-y"]
42 | ]
43 |
44 | # For installing Lutris
45 | Fedora_Lutris = ["dnf", "install", "lutris", "-y"]
46 |
47 | # For installing The FPS programs and overlays
48 | Fedora_Overlays = ["dnf","install", "goverlay", "-y"]
49 |
--------------------------------------------------------------------------------
/LibreGaming/distro_pkgs/OpenSUSE.py:
--------------------------------------------------------------------------------
1 | import subprocess, wget, requests, os
2 |
3 | class OpenSUSE:
4 | """
5 | Here are all the pkgs that LibreGaming installs for OpenSUSE
6 | """
7 |
8 | # For installing Basic Packages like Steam, Wine, Gamemode
9 | OpenSUSE_Basics = [
10 | ["zypper", "install", "-y", "steam", "wine-staging", "gamemoded", "libgamemode0", "libgamemode0-32bit"],
11 | ["zypper", "update", "-y"]
12 | ]
13 |
14 | # For installing Lutris
15 | OpenSUSE_Lutris = ["zypper", "install", "-y", "lutris"]
16 |
17 | # For installing The FPS programs and overlays
18 | OpenSUSE_Overlays = ["zypper", "install", "-y", "goverlay"]
19 |
20 |
--------------------------------------------------------------------------------
/LibreGaming/distro_pkgs/Ubuntu.py:
--------------------------------------------------------------------------------
1 | import subprocess, wget, requests
2 |
3 | class Ubuntu:
4 | """
5 | Here are all the pkgs that LibreGaming installs for Ubuntu
6 | """
7 |
8 | # Saves the Ubuntu release codename. For example: focal fossa
9 | ReleaseCodename = ""
10 |
11 | # For installing Lutris
12 | Ubuntu_Lutris = [
13 | ["dpkg", "--add-architecture", "i386"],
14 | ["add-apt-repository", "ppa:lutris-team/lutris", "-y"],
15 | ["apt", "update"],
16 | ["apt", "install", "lutris", "-y"]
17 | ]
18 |
19 | # For installing The FPS programs and overlays
20 | Ubuntu_Overlay = [
21 | ["dpkg", "--add-architecture", "i386"],
22 | ["add-apt-repository", "ppa:flexiondotorg/mangohud", "-y"],
23 | ["apt", "update"],
24 | ["apt", "install", "goverlay", "-y"]
25 | ]
26 |
27 | # For installing Basic Packages like Steam, Wine, Gamemode
28 | def Ubuntu_Basics(self):
29 | basic_pkgs = [
30 | ["dpkg", "--add-architecture", "i386"],
31 | ["wget", "-nc", "https://dl.winehq.org/wine-builds/winehq.key"],
32 | ["apt-key", "add", "winehq.key"],
33 | ["add-apt-repository", "deb https://dl.winehq.org/wine-builds/ubuntu/ "+ self.ReleaseCodename +" main", "-y"],
34 | ["add-apt-repository", "multiverse", "-y"],
35 | ["apt", "update"],
36 | ["apt", "install", "--install-recommends", "winehq-staging", "-y"],
37 | ["apt", "install", "steam", "winetricks", "python3-pip", "gawk", "curl", "meson", "libsystemd-dev", "zstd", "pkg-config", "ninja-build", "git", "libdbus-1-dev", "libinih-dev", "dbus-user-session", "libgnutls30:i386", "libgpg-error0:i386", "libxml2:i386", "libasound2-plugins:i386", "libsdl2-2.0-0:i386", "libfreetype6:i386", "libdbus-1-3:i386", "libsqlite3-0:i386", "-y"]
38 | ]
39 | return basic_pkgs
40 |
41 | def __init__(self):
42 | distroName = subprocess.getoutput("lsb_release -is")
43 | if distroName == "Ubuntu":
44 | self.ReleaseCodename = str(subprocess.getoutput("lsb_release -cs"))
45 | elif distroName == "Pop":
46 | self.ReleaseCodename = str(subprocess.getoutput("lsb_release -cs"))
47 | elif distroName == "Linuxmint":
48 | self.ReleaseCodename = str(subprocess.getoutput("grep -oP '(?<=DISTRIB_CODENAME=)\w+' /etc/upstream-release/lsb-release"))
--------------------------------------------------------------------------------
/LibreGaming/distro_pkgs/__pycache__/Fedora.cpython-310.pyc:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ahmed-al-balochi/LibreGaming/2f5b200fb97e37f4dbbf139f048f37004acb12cf/LibreGaming/distro_pkgs/__pycache__/Fedora.cpython-310.pyc
--------------------------------------------------------------------------------
/LibreGaming/pics/LibreGamingQt.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ahmed-al-balochi/LibreGaming/2f5b200fb97e37f4dbbf139f048f37004acb12cf/LibreGaming/pics/LibreGamingQt.png
--------------------------------------------------------------------------------
/LibreGaming/pics/execute-privileges.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ahmed-al-balochi/LibreGaming/2f5b200fb97e37f4dbbf139f048f37004acb12cf/LibreGaming/pics/execute-privileges.png
--------------------------------------------------------------------------------
/LibreGaming/requirement.txt:
--------------------------------------------------------------------------------
1 | argparse
2 | requests
3 | wget
4 | protonup-ng
--------------------------------------------------------------------------------
/MANIFEST.in:
--------------------------------------------------------------------------------
1 | include LibreGaming/TUI.py
2 | include LibreGaming/distro_pkgs/*.py
3 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # LibreGaming
2 | Python Program that downloads gaming required packages based on your Linux Distribution.
3 |
4 | 
5 |
6 | [](https://pepy.tech/project/libregaming)  [](https://patreon.com/user?u=42792180)
7 |
8 | Table of contents
9 | =================
10 | - [Distributions](#Distributions)
11 | - [Prerequisites](#Prerequisites)
12 | - [Dependencies](#Dependencies)
13 | - [Packages](#Packages)
14 | - [Optional Packages](#Optional_Packages)
15 | - [Other Packages](#Other_Packages)
16 | - [Installation](#Installation)
17 | - [Usage](#Usage)
18 | - [VideoDemo](#VideoDemo)
19 | - [Feedback](#Feedback)
20 | - [Credits](#Credits)
21 | - [للعربية](#للعربية)
22 |
23 | # للعربية
24 | بسبب مشكلة إستخدام العربية في قيت_هوب قمت بعمل مقال يشرح كل تفاصيل البرنامج على [مدونتي](https://tech-ahmed.com/LibreGaming/).
25 |
26 | # Distributions:
27 | * I tested this script on these distributions. but it should also work on their derivatives too.
28 | 1. Ubuntu(Tested also on Linux Mint, Pop_OS!).
29 | 2. Arch Linux.
30 | 3. Fedora.
31 | 4. OpenSUSE Tumbleweed.
32 |
33 | # Prerequisites:
34 | * You need your drivers installed beforehand for maximum performance under Linux. you can install them by going to this [page](https://github.com/lutris/docs/blob/master/InstallingDrivers.md)
35 |
36 | * To run this LibreGaming script you need python3 installed if not already. to install python3 click [Here](https://github.com/Ahmed-Al-Balochi/LibreGaming#dependencies).
37 | * Also you need to enable free and nonfree packages if you are using Fedora to install steam. You can find the commands to enable free and nonfree packages for Fedora [here](https://docs.fedoraproject.org/en-US/quick-docs/setup_rpmfusion/#proc_enabling-the-rpmfusion-repositories-using-command-line-utilities_enabling-the-rpmfusion-repositories):
38 |
39 | * For OpenSUSE Tumbleweed you need to enable packman repos to install Steam and other packages. You can find that [here](https://en.opensuse.org/Additional_package_repositories)
40 |
41 | * If you are using Arch Linux or an Arch based system you need to enable 32bit packages found in multilib repo you can enable it by going to this [Arch wiki page](https://wiki.archlinux.org/title/official_repositories#multilib).
42 |
43 | ## Dependencies:
44 | * git
45 | 1. Install git For Ubuntu:
46 | ```
47 | sudo apt install git
48 | ```
49 | 2. Install git For Arch Linux:
50 | ```
51 | sudo pacman -S git
52 | ```
53 | 3. Install git For Fedora:
54 | ```
55 | sudo dnf install git
56 | ```
57 | 4. Install git For OpenSUSE Tumbleweed:
58 | ```
59 | sudo zypper install git
60 | ```
61 |
62 | * python3
63 | 1. Install Python3 For Ubuntu:
64 | ```
65 | sudo apt install python3
66 | ```
67 | 3. Install Python3 For Arch Linux:
68 | ```
69 | sudo pacman -S python
70 | ```
71 | 3. Install Python3 For Fedora:
72 | ```
73 | sudo dnf install python3
74 | ```
75 | 4. Install Python3 For OpenSUSE Tumbleweed:
76 | ```
77 | sudo zypper install python3
78 | ```
79 |
80 | * python3-pip.
81 | 1. Install python3-pipx For Ubuntu:
82 | ```
83 | sudo apt install pipx
84 | ```
85 | if you're getting an error/issues with installing libregaming using pipx. Use pip
86 | ```
87 | sudo apt install pip
88 |
89 | ```
90 | 2. Install python3-pip For Arch Linux:
91 | ```
92 | sudo pacman -S python-pipx
93 | ```
94 | 3. Install python3-pip For Fedora:
95 | ```
96 | sudo dnf install pipx
97 | ```
98 | 4. Install python3-pip For OpenSUSE Tumbleweed (Replace the "xxx" with the available pipx version):
99 | ```
100 | sudo zypper install pythonxxx-pipx
101 | ```
102 |
103 | * [Flatpak](https://flatpak.org/setup/) is needed for installing Athenaeum.
104 |
105 | # Packages:
106 | * These Packages are installed using ```libregaming -b ```
107 | 1. [Steam](https://store.steampowered.com/).
108 | 2. [Wine-Staging](https://www.winehq.org/).
109 | 3. [Gamemode](https://github.com/FeralInteractive/gamemode).
110 | ## Optional_Packages
111 | * These Packages + the ones above can be installed using ```libregaming -g ```
112 | 1. [Lutris](https://github.com/lutris/lutris.git).
113 | 2. [mangohud](https://github.com/flightlessmango/MangoHud.git) and [goverlay](https://github.com/benjamimgois/goverlay.git)(Needs AUR enabled on Arch Linux).
114 | ### Other_Packages
115 | * These Packages have their own install option and they are not included in the above packages. They need to be installed seperatly, to know more click [here](https://github.com/Ahmed-Al-Balochi/LibreGaming#usage)
116 | 2. [Athenaeum](https://gitlab.com/librebob/athenaeum.git) Launcher for FOSS games.
117 | 3. [itch.io](https://itch.io/app) a Launcher for indie games.
118 | 4. [Steam Tinker Launch](https://github.com/frostworx/steamtinkerlaunch)(Only for Arch Linux).
119 | 5. [Heroic](https://github.com/Heroic-Games-Launcher/HeroicGamesLauncher.git) (Needs AUR enabled on Arch Linux)
120 |
121 | # Installation:
122 | ## GUI
123 | * To use the GUI interface you need to download the ```LibreGamingQt-x86_64.AppImage``` from the [releases page](https://github.com/Ahmed-Al-Balochi/LibreGaming/releases) and give it execute privileges and run it!
124 |
125 | 
126 |
127 | ## CLI
128 | * You can install LibreGaming using pip if you have it installed. click [Here](https://github.com/Ahmed-Al-Balochi/LibreGaming#dependencies) to install pip3:
129 | ```
130 | sudo pipx install LibreGaming
131 | ```
132 | * Or you can install LibreGaming script by entering these commands:
133 | ```
134 | git clone https://github.com/Ahmed-Al-Balochi/LibreGaming.git LibreGaming/
135 | cd LibreGaming/
136 | sudo pipx install . --global
137 | ```
138 | * To update LibreGaming when there is a new release enter this command:
139 | ```
140 | sudo pipx install libregaming --global -U
141 | ```
142 |
143 | * LibreGaming: command not found.
144 |
145 | This error can be solved by setting up the PATH in your shell.
146 |
147 | # Usage:
148 | * Note: you can also run this script using ```libregaming``` command if you don't like ```LibreGaming```. Both can be used, so choose what you prefer.
149 | * To install all the Gaming packages mentioned in the packages section enter this command:
150 | ```
151 | sudo libregaming -g
152 | ```
153 | * To install Basic Packages(Wine, Steam, Gamemode):
154 | ```
155 | sudo libregaming -b
156 | ```
157 | * To install Lutris Launcher enter this command:
158 | ```
159 | sudo libregaming --lutris
160 | ```
161 | * To install Heroic Launcher enter this command (Don't use sudo if you are using OpenSUSE):
162 | ```
163 | sudo libregaming --heroic
164 | ```
165 | * To install MangoHud & Goverlay enter this command:
166 | ```
167 | sudo libregaming -o
168 | ```
169 | * To install Athenaeum Launcher enter this command:
170 | ```
171 | libregaming -ath
172 | ```
173 | * To install itch.io Launcher enter this command:
174 | ```
175 | libregaming --itch
176 | ```
177 | * To install Minigalaxy Launcher enter this command:
178 | ```
179 | libregaming --minigalaxy
180 | ```
181 | * To install Steam Tinker Launch(For Arch Linux only) enter this command:
182 | ```
183 | libregaming --stl
184 | ```
185 |
186 | # VideoDemo:
187 | * This a my video demonstrating LibreGaming in [English](https://www.youtube.com/watch?v=F9GP5Et12qo). And click here for [Arabic](https://www.youtube.com/watch?v=QI8Ai8BTMwo)
188 | * This is a video demonstrating LibreGaming made by TechHut:
189 | https://www.youtube.com/watch?v=2f2zdViFDYg
190 | * This is a video demonstrating LibreGaming made by @BrodieRobertson:
191 | https://www.youtube.com/watch?v=sOch-qZMLq0&t=309s
192 |
193 | # Feedback:
194 | * Tell me what distro to add if yours is not available. And what features you'd like to see.
195 | * Also please report if there are any bugs in the script.
196 | * Your feedback is always welcome.
197 |
198 | # Credits:
199 | * Thanks to [flightlessmango](https://github.com/flightlessmango/) for mangohud.
200 | * Thanks to [benjamimgois](https://github.com/benjamimgois/) for goverlay.
201 | * Thanks to anyone who downloads this script, and to everyone who gives me feedback.
202 |
--------------------------------------------------------------------------------
/packages_list.txt:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/ahmed-al-balochi/LibreGaming/2f5b200fb97e37f4dbbf139f048f37004acb12cf/packages_list.txt
--------------------------------------------------------------------------------
/pyproject.toml:
--------------------------------------------------------------------------------
1 | [build-system]
2 | requires = ["setuptools", "wheel"]
3 | build-backend = "setuptools.build_meta"
--------------------------------------------------------------------------------
/requirement.txt:
--------------------------------------------------------------------------------
1 | argparse
2 | requests
3 | wget
--------------------------------------------------------------------------------
/setup.cfg:
--------------------------------------------------------------------------------
1 | [metadata]
2 | name = LibreGaming
3 | version = 0.3
4 | description = Install Gaming Packages with ease
5 | long_description = file: README.md
6 | long_description_content_type = text/markdown
7 | url = https://github.com/Ahmed-Al-Balochi/LibreGaming.git
8 | author = Ahmed Al Balochi
9 | license = GPL-3.0
10 | license_files =
11 | LICENSE
12 |
13 | [options]
14 | include_package_data = True
15 | packages = find:
16 | install_requires =
17 | argparse
18 | requests
19 | wget
20 | python_requires = >3.7
21 |
22 | [options.entry_points]
23 | console_scripts =
24 | libregaming = LibreGaming:main
25 | LibreGaming = LibreGaming:main
26 |
--------------------------------------------------------------------------------
/setup.py:
--------------------------------------------------------------------------------
1 | import setuptools
2 | setuptools.setup()
3 |
--------------------------------------------------------------------------------
/test/__init__.py:
--------------------------------------------------------------------------------
1 | def main():
2 | from .__main__ import main
3 | return main()
--------------------------------------------------------------------------------
/test/tests_libregaming.py:
--------------------------------------------------------------------------------
1 | import pytest
2 | from LibreGaming.LibreGaming import *
3 |
4 | def test_getPackageManager():
5 | LibreGaming_Object = LibreGaming()
6 | assert LibreGaming_Object.getPackageManager() != 'Unknown distro'
7 |
8 | def test_installAllPkgs():
9 | LibreGaming_Object = LibreGaming()
10 | assert LibreGaming_Object.installAllPkgs() == 'success'
11 |
12 | def test_BasicPkgs():
13 | LibreGaming_Object = LibreGaming()
14 | assert LibreGaming_Object.BasicPkgs() == 'success'
15 |
16 | def test_Lutris():
17 | LibreGaming_Object = LibreGaming()
18 | assert LibreGaming_Object.Lutris() == 'success'
19 |
20 | def test_Heroic():
21 | LibreGaming_Object = LibreGaming()
22 | assert LibreGaming_Object.Heroic() == 'success'
23 |
24 | def test_Overlays():
25 | LibreGaming_Object = LibreGaming()
26 | assert LibreGaming_Object.Overlays() == 'success'
--------------------------------------------------------------------------------