Compare commits

..

No commits in common. "master" and "1.0.0" have entirely different histories.

60 changed files with 804 additions and 2920 deletions

View File

@ -1,40 +0,0 @@
kind: pipeline
type: docker
name: default
steps:
- name: build
image: maven:3-amazoncorretto-8
commands:
- mvn install
- name: gitea_release
image: plugins/gitea-release
settings:
api_key:
from_secret: gitea_token
base_url: https://git.jeddunk.xyz
files:
- auto-cream-api-*.zip
checksum:
- md5
- sha1
- sha256
- sha512
- adler32
- crc32
when:
event:
- tag
- name: discord_webhook
image: appleboy/drone-discord
settings:
webhook_id:
from_secret: discord_webhook_id
webhook_token:
from_secret: discord_webhook_token
message: >
{{#success build.status}}
build {{build.number}} succeeded.
{{else}}
build {{build.number}} failed.
{{/success}}

3
.gitignore vendored
View File

@ -159,6 +159,3 @@ $RECYCLE.BIN/
/steamapps.json /steamapps.json
/test.json /test.json
/steam_api.md5 /steam_api.md5
/src/main/java/xyz/jeddunk/autocreamapi/util/env/Default.java
/src/main/java/xyz/jeddunk/autocreamapi/GetListOfDlc.java
dist/

View File

@ -1,6 +0,0 @@
This folder contains libraries copied from the "auto-cream-api" project.
It is managed by the CheckStyle-IDEA IDE plugin.
Do not modify this folder while the IDE is running.
When the IDE is stopped, you may delete this folder at any time. It will be recreated as needed.
In order to prevent the CheckStyle-IDEA IDE plugin from creating this folder,
uncheck the "Copy libraries from project directory" option in the CheckStyle-IDEA settings dialog.

View File

@ -1,6 +0,0 @@
<component name="CopyrightManager">
<copyright>
<option name="notice" value="Auto-CreamAPI&#10;Copyright (C) &amp;#36;today.year Jeddunk&#10;&#10;This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public&#10;License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later&#10;version.&#10;&#10;This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied&#10;warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.&#10;&#10;You should have received a copy of the GNU General Public License along with this program. If not, see&#10;&lt;https://www.gnu.org/licenses/&gt;." />
<option name="myName" value="GPLv3" />
</copyright>
</component>

View File

@ -1,7 +0,0 @@
<component name="CopyrightManager">
<settings default="GPLv3">
<module2copyright>
<element module="Project Files" copyright="GPLv3" />
</module2copyright>
</settings>
</component>

View File

@ -2,8 +2,6 @@
<project version="4"> <project version="4">
<component name="Encoding"> <component name="Encoding">
<file url="file://$PROJECT_DIR$" charset="UTF-8" /> <file url="file://$PROJECT_DIR$" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/java" charset="UTF-8" />
<file url="file://$PROJECT_DIR$/src/main/resources" charset="UTF-8" />
<file url="PROJECT" charset="UTF-8" /> <file url="PROJECT" charset="UTF-8" />
</component> </component>
</project> </project>

View File

@ -1,8 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="EntryPointsManager">
<pattern value="util.env.Default" method="Default" />
</component>
<component name="MavenProjectsManager"> <component name="MavenProjectsManager">
<option name="originalFiles"> <option name="originalFiles">
<list> <list>
@ -13,7 +10,7 @@
<component name="ProjectKey"> <component name="ProjectKey">
<option name="state" value="project://e79810c8-c5c8-43b1-b19c-90c1f4095425" /> <option name="state" value="project://e79810c8-c5c8-43b1-b19c-90c1f4095425" />
</component> </component>
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8 (amazon)" project-jdk-type="JavaSDK"> <component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" default="true" project-jdk-name="1.8" project-jdk-type="JavaSDK">
<output url="file://$PROJECT_DIR$/out" /> <output url="file://$PROJECT_DIR$/out" />
</component> </component>
</project> </project>

674
COPYING
View File

@ -1,674 +0,0 @@
GNU GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <https://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 <https://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
<https://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
<https://www.gnu.org/licenses/why-not-lgpl.html>.

View File

@ -1,73 +0,0 @@
# Auto-CreamAPI
## Development is continuing [here](https://git.jeddunk.xyz/jeddunk/auto-creamapi-2)! However you're still welcome to use this version.
[![ko-fi](https://www.ko-fi.com/img/githubbutton_sm.svg)](https://ko-fi.com/H2H4330U3)
[![Build Status](https://ci.jeddunk.xyz/api/badges/jeddunk/auto-cream-api/status.svg)](https://ci.jeddunk.xyz/jeddunk/auto-cream-api)
Set your game automatically up for use with CreamAPI.
![](https://jeddunk.xyz/javaw_nLB130vOCY.png)
[![](https://jeddunk.xyz/jetbrains-small.png)](https://www.jetbrains.com/?from=Auto-CreamAPI)
[Made with software provided by JetBrains s.r.o.](https://www.jetbrains.com/?from=Auto-CreamAPI)
## Features
* Setup CreamAPIs DLLs and configuration file automatically.
* Find the AppID by providing the games name without having to look it up manually.
* Fetch a list of DLCs for an AppID from both the Steam Store and SteamDB.
* Set flags like "offline mode" and "extra protection".
* Select a language from a list which can be manually expanded if needed.
## Installation
**Make sure you have Java 8 installed.**
Download the latest release and extract it into any folder (e.g. `%USERPROFILE%\Desktop\auto-cream-api`).
*The included CreamAPI version may be outdated, get the most recent version and
**extract the DLL files from the nonlog_build folder to the Auto-CreamAPI folder!***
## Usage
* Double-click `auto-cream-api.jar` to open the application. (When starting it for the first time, it might take a few
seconds since it needs to cache a list of games available on the Steam Store.)
* Alternatively, open a CMD window in the location of the application, and run it by entering the following:
```shell script
java -jar auto-cream-api.jar
```
* Click on the *Folder* (📂) button on the top right and select the *steam_api.dll* or *steam_api64.dll*
**in the game folder**.
* Enter the name of the game and click on the *Search* (🔍) button.
* If it did not find the right game, either try again, or copy the app ID from the Steam Store to field to the right
of the *Search* (🔍) button.
* Click the lower left *"Get DLCs for AppID"* button to fetch all available DLCs for the game.
* Select a language and tick the options if needed.
* Click on *"Save"*.
### Java 11/Java 14
*WIP*
## License
Auto-CreamAPI itself is licensed under the GNU General Public License v3.0
CreamAPI © 2016-2019, deadmau5. All Rights Reserved.
The following dependencies are licensed under the Apache License 2.0:
* JFoenix
* fontawesomefx
* gson
* Apache Commons BeanUtils
* Apache Commons Configuration
* The Roboto font family
The following dependencies are licensed under the MIT License:
* jsoup
* Unirest-Java
* slf4j
* Copy Rename Maven Plugin
The following dependencies are licensed under the GPL2 License:
* fuzzywuzzy
Logback is dual-licensed under the EPL v1.0 and the LGPL 2.1.

View File

@ -1,10 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4"> <module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
<component name="CheckStyle-IDEA-Module">
<option name="configuration">
<map />
</option>
</component>
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8"> <component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
<output url="file://$MODULE_DIR$/target/classes" /> <output url="file://$MODULE_DIR$/target/classes" />
<output-test url="file://$MODULE_DIR$/target/test-classes" /> <output-test url="file://$MODULE_DIR$/target/test-classes" />
@ -12,7 +7,6 @@
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" /> <sourceFolder url="file://$MODULE_DIR$/src/main/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" /> <sourceFolder url="file://$MODULE_DIR$/src/test/java" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/dist" />
<excludeFolder url="file://$MODULE_DIR$/target" /> <excludeFolder url="file://$MODULE_DIR$/target" />
</content> </content>
<orderEntry type="inheritedJdk" /> <orderEntry type="inheritedJdk" />
@ -35,68 +29,5 @@
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.5.9" level="project" /> <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpmime:4.5.9" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpasyncclient:4.1.4" level="project" /> <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpasyncclient:4.1.4" level="project" />
<orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore-nio:4.4.10" level="project" /> <orderEntry type="library" name="Maven: org.apache.httpcomponents:httpcore-nio:4.4.10" level="project" />
<orderEntry type="library" name="Maven: me.xdrop:fuzzywuzzy:1.3.1" level="project" />
<orderEntry type="library" name="Maven: com.coderplus.maven.plugins:copy-rename-maven-plugin:1.0.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.maven:maven-model:2.0.9" level="project" />
<orderEntry type="library" name="Maven: org.apache.maven:maven-project:2.0.9" level="project" />
<orderEntry type="library" name="Maven: org.apache.maven:maven-settings:2.0.9" level="project" />
<orderEntry type="library" name="Maven: org.apache.maven:maven-profile:2.0.9" level="project" />
<orderEntry type="library" name="Maven: org.apache.maven:maven-artifact-manager:2.0.9" level="project" />
<orderEntry type="library" name="Maven: org.apache.maven:maven-plugin-registry:2.0.9" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.plexus:plexus-container-default:1.0-alpha-9-stable-1" level="project" />
<orderEntry type="library" name="Maven: junit:junit:3.8.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.maven:maven-core:2.0.9" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.maven.wagon:wagon-file:1.0-beta-2" level="project" />
<orderEntry type="library" name="Maven: org.apache.maven:maven-plugin-parameter-documenter:2.0.9" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.maven.wagon:wagon-webdav:1.0-beta-2" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: slide:slide-webdavlib:2.1" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: commons-httpclient:commons-httpclient:2.0.2" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: jdom:jdom:1.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: de.zeigermann.xml:xml-im-exporter:1.1" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.maven.wagon:wagon-http-lightweight:1.0-beta-2" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.maven.wagon:wagon-http-shared:1.0-beta-2" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: jtidy:jtidy:4aug2000r7-dev" level="project" />
<orderEntry type="library" name="Maven: xml-apis:xml-apis:1.0.b2" level="project" />
<orderEntry type="library" name="Maven: org.apache.maven.reporting:maven-reporting-api:2.0.9" level="project" />
<orderEntry type="library" name="Maven: org.apache.maven.doxia:doxia-sink-api:1.0-alpha-10" level="project" />
<orderEntry type="library" name="Maven: org.apache.maven.wagon:wagon-provider-api:1.0-beta-2" level="project" />
<orderEntry type="library" name="Maven: org.apache.maven:maven-repository-metadata:2.0.9" level="project" />
<orderEntry type="library" name="Maven: org.apache.maven:maven-error-diagnostics:2.0.9" level="project" />
<orderEntry type="library" name="Maven: commons-cli:commons-cli:1.0" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.maven.wagon:wagon-ssh-external:1.0-beta-2" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.maven.wagon:wagon-ssh-common:1.0-beta-2" level="project" />
<orderEntry type="library" name="Maven: org.apache.maven:maven-plugin-descriptor:2.0.9" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.plexus:plexus-interactivity-api:1.0-alpha-4" level="project" />
<orderEntry type="library" name="Maven: org.apache.maven:maven-monitor:2.0.9" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: org.apache.maven.wagon:wagon-ssh:1.0-beta-2" level="project" />
<orderEntry type="library" scope="RUNTIME" name="Maven: com.jcraft:jsch:0.1.27" level="project" />
<orderEntry type="library" name="Maven: classworlds:classworlds:1.1" level="project" />
<orderEntry type="library" name="Maven: org.apache.maven:maven-plugin-api:2.0.9" level="project" />
<orderEntry type="library" name="Maven: org.apache.maven:maven-artifact:2.0.9" level="project" />
<orderEntry type="library" name="Maven: org.codehaus.plexus:plexus-utils:1.5.8" level="project" />
<orderEntry type="library" name="Maven: org.sonatype.plexus:plexus-build-api:0.0.7" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.3" level="project" />
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.3" level="project" />
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.25" level="project" />
<orderEntry type="library" name="Maven: org.fusesource.jansi:jansi:1.18" level="project" />
<orderEntry type="library" name="Maven: net.sourceforge.htmlunit:htmlunit:2.44.0" level="project" />
<orderEntry type="library" name="Maven: xalan:xalan:2.7.2" level="project" />
<orderEntry type="library" name="Maven: xalan:serializer:2.7.2" level="project" />
<orderEntry type="library" name="Maven: net.sourceforge.htmlunit:htmlunit-core-js:2.44.0" level="project" />
<orderEntry type="library" name="Maven: net.sourceforge.htmlunit:neko-htmlunit:2.44.0" level="project" />
<orderEntry type="library" name="Maven: xerces:xercesImpl:2.12.0" level="project" />
<orderEntry type="library" name="Maven: net.sourceforge.htmlunit:htmlunit-cssparser:1.6.0" level="project" />
<orderEntry type="library" name="Maven: commons-io:commons-io:2.8.0" level="project" />
<orderEntry type="library" name="Maven: commons-net:commons-net:3.7.1" level="project" />
<orderEntry type="library" name="Maven: org.brotli:dec:0.1.2" level="project" />
<orderEntry type="library" name="Maven: com.shapesecurity:salvation2:3.0.0" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-client:9.4.32.v20200930" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-client:9.4.32.v20200930" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-http:9.4.32.v20200930" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-xml:9.4.32.v20200930" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-util:9.4.32.v20200930" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty:jetty-io:9.4.32.v20200930" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-common:9.4.32.v20200930" level="project" />
<orderEntry type="library" name="Maven: org.eclipse.jetty.websocket:websocket-api:9.4.32.v20200930" level="project" />
</component> </component>
</module> </module>

16
languages.txt Normal file
View File

@ -0,0 +1,16 @@
# List of languages
# https://partner.steamgames.com/doc/store/localization#supported_languages
english
latam
brazilian
german
french
italian
portuguese
spanish
russian
schinese
tchinese
japanese
koreana

128
pom.xml
View File

@ -1,19 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<!--
~ Auto-CreamAPI
~ Copyright (C) 2020 Jeddunk
~
~ 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
~ <https://www.gnu.org/licenses/>.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
@ -21,28 +6,16 @@
<groupId>xyz.jeddunk</groupId> <groupId>xyz.jeddunk</groupId>
<artifactId>auto-cream-api</artifactId> <artifactId>auto-cream-api</artifactId>
<version>1.2.2</version> <version>1.0-SNAPSHOT</version>
<properties> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target> <maven.compiler.target>1.8</maven.compiler.target>
<dist>${project.basedir}/dist</dist>
</properties> </properties>
<build> <build>
<plugins> <plugins>
<plugin>
<artifactId>maven-clean-plugin</artifactId>
<version>2.5</version>
<configuration>
<filesets>
<fileset>
<directory>dist</directory>
</fileset>
</filesets>
</configuration>
</plugin>
<plugin> <plugin>
<artifactId>maven-jar-plugin</artifactId> <artifactId>maven-jar-plugin</artifactId>
<version>2.4</version> <version>2.4</version>
@ -54,11 +27,11 @@
</plugin> </plugin>
<plugin> <plugin>
<artifactId>maven-assembly-plugin</artifactId> <artifactId>maven-assembly-plugin</artifactId>
<version>2.2.2</version> <version>2.2-beta-5</version>
<configuration> <configuration>
<archive> <archive>
<manifest> <manifest>
<mainClass>xyz.jeddunk.autocreamapi.Main</mainClass> <mainClass>Main</mainClass>
</manifest> </manifest>
</archive> </archive>
<descriptorRefs> <descriptorRefs>
@ -75,72 +48,6 @@
</execution> </execution>
</executions> </executions>
</plugin> </plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>2.4</version>
<configuration>
<skip>true</skip>
</configuration>
</plugin>
<plugin>
<groupId>com.coderplus.maven.plugins</groupId>
<artifactId>copy-rename-maven-plugin</artifactId>
<version>1.0.1</version>
<executions>
<execution>
<id>install-copy</id>
<phase>install</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<overWrite>true</overWrite>
<fileSets>
<fileSet>
<sourceFile>${project.build.directory}/${project.artifactId}-${project.version}-jar-with-dependencies.jar</sourceFile>
<destinationFile>${dist}/${project.artifactId}.jar</destinationFile>
</fileSet>
<fileSet>
<sourceFile>${project.basedir}/README.md</sourceFile>
<destinationFile>${dist}/README.md</destinationFile>
</fileSet>
<fileSet>
<sourceFile>${project.basedir}/steam_api.dll</sourceFile>
<destinationFile>${dist}/steam_api.dll</destinationFile>
</fileSet>
<fileSet>
<sourceFile>${project.basedir}/steam_api64.dll</sourceFile>
<destinationFile>${dist}/steam_api64.dll</destinationFile>
</fileSet>
<fileSet>
<sourceFile>${project.basedir}/version.txt</sourceFile>
<destinationFile>${dist}/version.txt</destinationFile>
</fileSet>
</fileSets>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<id>install-zip</id>
<phase>install</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<zip destfile="${project.basedir}/${project.artifactId}-${project.version}.zip" basedir="${dist}"/>
</target>
</configuration>
</execution>
</executions>
</plugin>
</plugins> </plugins>
</build> </build>
@ -150,7 +57,7 @@
<enabled>false</enabled> <enabled>false</enabled>
</snapshots> </snapshots>
<id>bintray-jerady-maven</id> <id>bintray-jerady-maven</id>
<name>bintray-jerady</name> <name>bintray</name>
<url>https://dl.bintray.com/jerady/maven</url> <url>https://dl.bintray.com/jerady/maven</url>
</repository> </repository>
</repositories> </repositories>
@ -160,7 +67,7 @@
<enabled>false</enabled> <enabled>false</enabled>
</snapshots> </snapshots>
<id>bintray-jerady-maven</id> <id>bintray-jerady-maven</id>
<name>bintray-jerady-plugins</name> <name>bintray-plugins</name>
<url>https://dl.bintray.com/jerady/maven</url> <url>https://dl.bintray.com/jerady/maven</url>
</pluginRepository> </pluginRepository>
</pluginRepositories> </pluginRepositories>
@ -209,30 +116,5 @@
<artifactId>unirest-java</artifactId> <artifactId>unirest-java</artifactId>
<version>3.1.02</version> <version>3.1.02</version>
</dependency> </dependency>
<dependency>
<groupId>me.xdrop</groupId>
<artifactId>fuzzywuzzy</artifactId>
<version>1.3.1</version>
</dependency>
<dependency>
<groupId>com.coderplus.maven.plugins</groupId>
<artifactId>copy-rename-maven-plugin</artifactId>
<version>1.0.1</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.3</version>
</dependency>
<dependency>
<groupId>org.fusesource.jansi</groupId>
<artifactId>jansi</artifactId>
<version>1.18</version>
</dependency>
<dependency>
<groupId>net.sourceforge.htmlunit</groupId>
<artifactId>htmlunit</artifactId>
<version>2.44.0</version>
</dependency>
</dependencies> </dependencies>
</project> </project>

25
readme.md Normal file
View File

@ -0,0 +1,25 @@
# Auto-Cream-API
Set your game automatically up for use with CreamAPI.
## Installation
**Make sure you have Java 8 installed.**
Download the latest release and extract it into any folder (e.g. `%USERPROFILE%\Desktop\auto-cream-api`).
## Usage
* Double-click `auto-cream-api.jar` to open the application. (When starting it for the first time, it might take a few
seconds since it needs to cache a list of games available on the Steam Store.)
* Alternatively, open a CMD window in the location of the application, and run it by entering the following:
```shell script
java -jar auto-cream-api.jar
```
* Click on the *Folder* (📂) button on the top right and select the *steam_api.dll* or *steam_api64.dll*
**in the game folder**.
* Enter the name of the game and click on the *Search* (🔍) button.
* If it did not find the right game, either try again, or copy the app ID from the Steam Store to field to the right
of the *Search* (🔍) button.
* Click the lower left *"Get DLCs for AppID"* button to fetch all available DLCs for the game.
* Select a language and tick the options if needed.
* Click on *"Save"*.

View File

@ -0,0 +1,264 @@
import com.jfoenix.controls.*;
import javafx.beans.value.ChangeListener;
import javafx.collections.FXCollections;
import javafx.fxml.FXML;
import javafx.scene.control.Tooltip;
import javafx.stage.FileChooser;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.configuration2.ex.ConfigurationException;
import org.jsoup.HttpStatusException;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import pojo.App;
import util.CreamApiConfig;
import util.CreamApiDllHandler;
import util.SteamAppsListCache;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.HashMap;
import java.util.LinkedHashMap;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
public class Controller {
private static final String REGEX = "(?<steamApiDll>steam_api(?:64)?.dll)$";
private CreamApiDllHandler handler = CreamApiDllHandler.getInstance();
private CreamApiConfig config = CreamApiConfig.getInstance();
private SteamAppsListCache cache = new SteamAppsListCache();
@FXML
public JFXTextField path_textfield;
@FXML
public JFXTextField appId_textfield;
@FXML
public JFXTextField game_name_textfield;
@FXML
public JFXComboBox<String> language_combobox;
@FXML
public JFXTextArea dlc_textarea;
@FXML
public JFXCheckBox extra_protection_checkbox;
@FXML
public JFXCheckBox offline_checkbox;
@FXML
public JFXCheckBox unlock_all_checkbox;
@FXML
public JFXButton reset_button;
@FXML
public JFXButton save_button;
@FXML
public JFXButton getAppId_button;
@FXML
public JFXButton path_button;
@FXML
public JFXButton retrieveDlcList_button;
private String steamApiPathString;
public Controller() {
}
@FXML
public void initialize() {
appId_textfield.textProperty().addListener(appIdChangesGameName());
//retrieveDlcList_button.setDisable(true); // WIP
generate_tooltips();
fix_dlc_textarea_prompt_text();
try {
read();
} catch (NullPointerException e) {
System.err.println("Can't fill out fields, no configuration file set!");
}
}
private void read() {
language_combobox.setItems(FXCollections.observableArrayList(config.getLanguages()));
language_combobox.getSelectionModel().select(config.getLanguage());
appId_textfield.setText(config.getAppId().toString());
dlc_textarea.setText(config.getDlcListAsString());
game_name_textfield.setText(cache.getGame(config.getAppId()).getName());
extra_protection_checkbox.setSelected(config.getExtraProtection());
offline_checkbox.setSelected(config.getForceOffline());
unlock_all_checkbox.setSelected(config.getUnlockAll());
unlockAll_disableDlcTextArea();
}
private void fix_dlc_textarea_prompt_text() {
dlc_textarea.setPromptText("List of DLC...\r0000 = DLC Name");
}
private void generate_tooltips() {
Tooltip extra_protection_tooltip = new Tooltip("\"extra protection\"");
extra_protection_checkbox.setTooltip(extra_protection_tooltip);
Tooltip.install(extra_protection_checkbox, extra_protection_tooltip);
}
private ChangeListener<String> appIdChangesGameName() {
return (observable, oldValue, newValue) -> {
int appId;
try {
appId = Integer.parseInt(newValue);
final App game = cache.getGame(appId);
if (game != null) {
game_name_textfield.setText(game.getName());
} else {
game_name_textfield.setText("");
}
} catch (NumberFormatException e) {
game_name_textfield.setText("");
}
};
}
public void reset() {
try {
config.read();
read();
} catch (NullPointerException e) {
System.err.println("Can't fill out fields, no configuration file set!");
}
}
public void save() {
try {
setUpCreamApi();
config.setDlcListFromString(dlc_textarea.getText());
config.setAppId(Integer.parseInt(appId_textfield.getText()));
config.setExtraProtection(extra_protection_checkbox.isSelected());
config.setForceOffline(offline_checkbox.isSelected());
config.setUnlockAll(unlock_all_checkbox.isSelected());
config.setLanguage(language_combobox.getValue());
config.sync();
} catch (IOException | ConfigurationException e) {
e.printStackTrace();
} catch (NullPointerException e) {
System.err.println("No configuration file set!");
}
}
public void getAppId() {
final App game = cache.findGame(game_name_textfield.getText());
if (game == null) {
appId_textfield.setText("-1");
} else {
appId_textfield.setText(String.valueOf(game.getAppId()));
}
}
public void unlockAll_disableDlcTextArea() {
dlc_textarea.setDisable(unlock_all_checkbox.isSelected());
retrieveDlcList_button.setDisable(unlock_all_checkbox.isSelected());
}
/**
* Gets DLC from both the Steam Store and SteamDB, since the latter has a (weird) limit of 64(?) DLCs. SteamDB
* also lists DLC not available for purchase.
*/
public void getDlcList() {
Map<Integer, String> steamStoreDLCs = new HashMap<>();
Map<Integer, String> steamDbDLCs = new HashMap<>();
//StringBuilder sb = new StringBuilder();
try {
// Steam Store
Document steamDoc = Jsoup
.connect("https://store.steampowered.com/app/" + appId_textfield.getText() + "/")
.get();
Elements steamDLCs = steamDoc.getElementsByClass("game_area_dlc_row");
for (Element dlc : steamDLCs) {
String dlc_id = dlc.attr("data-ds-appid");
String dlc_name = dlc
.getElementsByClass("game_area_dlc_name")
.text().replace("\n", "").trim();
steamStoreDLCs.put(Integer.parseInt(dlc_id), dlc_name);
}
// SteamDB
Document steamDbDoc = Jsoup
.connect("https://steamdb.info/app/" + appId_textfield.getText() + "/dlc/")
.get();
Element steamDbDlcSection = steamDbDoc.getElementById("dlc");
Elements steamDbDLCElements = steamDbDlcSection.getElementsByClass("app");
for (Element dlc : steamDbDLCElements) {
String dlc_id = dlc.attr("data-appid");
String dlc_name = "Unknown DLC " + dlc_id;
Elements td = dlc.getElementsByTag("td");
if (!td.isEmpty()) {
dlc_name = td.get(1).text().replace("\n", "").trim();
}
steamDbDLCs.put(Integer.parseInt(dlc_id), dlc_name);
}
} catch (HttpStatusException e) {
if (e.getStatusCode() == 404) {
System.err.println("App ID empty or not found! (HTTP Status Code: 404)");
}
} catch (IOException e) {
e.printStackTrace();
} catch (NullPointerException e) {
// ignore
}
Map<Integer, String> allDLCs = new HashMap<>(steamStoreDLCs);
steamDbDLCs.forEach(allDLCs::putIfAbsent);
StringBuilder sb = new StringBuilder();
LinkedHashMap<Number, String> collect = allDLCs.entrySet().stream()
.sorted(Map.Entry.comparingByKey())
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue,
(oldValue, newValue) -> oldValue, LinkedHashMap::new));
collect.forEach((k, v) -> sb.append(k).append("=").append(v).append("\n"));
dlc_textarea.setText(sb.toString());
}
public void openFileChooser() {
FileChooser chooser = new FileChooser();
chooser.setTitle("Choose steam_api(64).dll...");
FileChooser.ExtensionFilter filter =
new FileChooser.ExtensionFilter("steam_api(64).dll",
"steam_api.dll", "steam_api64.dll");
chooser.getExtensionFilters().add(filter);
final File file = chooser.showOpenDialog(path_button.getScene().getWindow());
try {
config.setConfig(file.getParent() + "\\cream_api.ini");
path_textfield.setText(file.getParent());
steamApiPathString = file.getAbsolutePath();
} catch (ConfigurationException | IOException e) {
e.printStackTrace();
}
}
/**
* check if creamapi version of dll is there, if not, rename original to steam_api(64)_o.dll and copy
* creamapi one to the path.
*
* @throws IOException If file is missing or not accessible/modifiable.
*/
private void setUpCreamApi() throws IOException {
boolean is64Bit = false;
if (!steamApiPathString.isEmpty()) {
Path path = Paths.get(steamApiPathString);
if (path.endsWith("steam_api64.dll")) {
is64Bit = true;
}
InputStream is = Files.newInputStream(path);
String md5 = DigestUtils.md5Hex(is);
boolean isSameFile = Objects.equals(md5, handler.getDllMd5(is64Bit));
if (!isSameFile) {
String pathOrigString = steamApiPathString;
pathOrigString =
pathOrigString
.replaceFirst(REGEX, is64Bit ? "steam_api64_o.dll" : "steam_api_o.dll");
Path pathOrig = Paths.get(pathOrigString);
if (!Files.exists(pathOrig)) {
Files.move(path, pathOrig);
}
Files.deleteIfExists(path);
Files.copy(handler.getDllPath(is64Bit), path);
}
}
}
}

22
src/main/java/Main.java Normal file
View File

@ -0,0 +1,22 @@
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class Main extends Application {
@Override
public void start(Stage primaryStage) throws Exception{
Parent root = FXMLLoader.load(ClassLoader.getSystemResource("mainWindow.fxml"));//getClass().getResource("/mainWindow.fxml")
primaryStage.setTitle("Auto CreamAPI");
primaryStage.setMinWidth(655 + 25);
primaryStage.setMinHeight(360 + 50);
primaryStage.setScene(new Scene(root, 1200, 600));
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}

110
src/main/java/pojo/App.java Normal file
View File

@ -0,0 +1,110 @@
package pojo;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import java.util.Objects;
@SuppressWarnings("unused")
public class App {
@SerializedName("appid")
@Expose
private Integer appId;
@SerializedName("name")
@Expose
private String name;
@SerializedName("last_modified")
@Expose
private Integer lastModified;
@SerializedName("price_change_number")
@Expose
private Integer priceChangeNumber;
public Integer getAppId() {
return appId;
}
public void setAppId(Integer appId) {
this.appId = appId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getLastModified() {
return lastModified;
}
public void setLastModified(Integer lastModified) {
this.lastModified = lastModified;
}
public Integer getPriceChangeNumber() {
return priceChangeNumber;
}
public void setPriceChangeNumber(Integer priceChangeNumber) {
this.priceChangeNumber = priceChangeNumber;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(App.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("appid");
sb.append('=');
sb.append(((this.appId == null)?"<null>":this.appId));
sb.append(',');
sb.append("name");
sb.append('=');
sb.append(((this.name == null)?"<null>":this.name));
sb.append(',');
sb.append("lastModified");
sb.append('=');
sb.append(((this.lastModified == null)?"<null>":this.lastModified));
sb.append(',');
sb.append("priceChangeNumber");
sb.append('=');
sb.append(((this.priceChangeNumber == null)?"<null>":this.priceChangeNumber));
sb.append(',');
if (sb.charAt((sb.length()- 1)) == ',') {
sb.setCharAt((sb.length()- 1), ']');
} else {
sb.append(']');
}
return sb.toString();
}
@Override
public int hashCode() {
int result = 1;
result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode()));
result = ((result* 31)+((this.lastModified == null)? 0 :this.lastModified.hashCode()));
result = ((result* 31)+((this.priceChangeNumber == null)? 0 :this.priceChangeNumber.hashCode()));
result = ((result* 31)+((this.appId == null)? 0 :this.appId.hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if (!(other instanceof App)) {
return false;
}
App rhs = ((App) other);
boolean b1 = Objects.equals(this.name, rhs.name);
boolean b2 = Objects.equals(this.lastModified, rhs.lastModified);
boolean b3 = Objects.equals(this.priceChangeNumber, rhs.priceChangeNumber);
boolean b4 = Objects.equals(this.appId, rhs.appId);
return b1 && b2 && b3 && b4;
}
}

View File

@ -0,0 +1,58 @@
package pojo;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import java.util.Objects;
public class Download {
@SerializedName("response")
@Expose
private Rezponze response;
public Rezponze getResponse() {
return response;
}
public void setResponse(Rezponze response) {
this.response = response;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(Download.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("response");
sb.append('=');
sb.append(((this.response == null)?"<null>":this.response));
sb.append(',');
if (sb.charAt((sb.length()- 1)) == ',') {
sb.setCharAt((sb.length()- 1), ']');
} else {
sb.append(']');
}
return sb.toString();
}
@Override
public int hashCode() {
int result = 1;
result = ((result* 31)+((this.response == null)? 0 :this.response.hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if (!(other instanceof Download)) {
return false;
}
Download rhs = ((Download) other);
return Objects.equals(this.response, rhs.response);
//return ((this.response == rhs.response)||((this.response!= null)&&this.response.equals(rhs.response)));
}
}

View File

@ -0,0 +1,60 @@
package pojo;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
public class Rezponze {
@SerializedName("apps")
@Expose
private List<App> apps = new ArrayList<>();
public List<App> getApps() {
return apps;
}
public void setApps(List<App> apps) {
this.apps = apps;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(Rezponze.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("apps");
sb.append('=');
sb.append(((this.apps == null)?"<null>":this.apps));
sb.append(',');
if (sb.charAt((sb.length()- 1)) == ',') {
sb.setCharAt((sb.length()- 1), ']');
} else {
sb.append(']');
}
return sb.toString();
}
@Override
public int hashCode() {
int result = 1;
result = ((result* 31)+((this.apps == null)? 0 :this.apps.hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if (!(other instanceof Rezponze)) {
return false;
}
Rezponze rhs = ((Rezponze) other);
return Objects.equals(this.apps, rhs.apps);
//return ((this.apps == rhs.apps)||((this.apps!= null)&&this.apps.equals(rhs.apps)));
}
}

View File

@ -0,0 +1,25 @@
package pojo;
import java.time.Instant;
import java.util.List;
public class SteamAppsList {
private Instant timestamp;
private List<App> steamAppsList;
public Instant getTimestamp() {
return timestamp;
}
public void setTimestamp(Instant timestamp) {
this.timestamp = timestamp;
}
public List<App> getSteamAppsList() {
return steamAppsList;
}
public void setSteamAppsList(List<App> steamAppsList) {
this.steamAppsList = steamAppsList;
}
}

View File

@ -1,103 +1,49 @@
/* package util;
* Auto-CreamAPI
* Copyright (C) 2020 Jeddunk
*
* 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
* <https://www.gnu.org/licenses/>.
*/
package xyz.jeddunk.autocreamapi.util;
import org.apache.commons.configuration2.*; import org.apache.commons.configuration2.*;
import org.apache.commons.configuration2.builder.FileBasedConfigurationBuilder; import org.apache.commons.configuration2.builder.FileBasedConfigurationBuilder;
import org.apache.commons.configuration2.builder.fluent.Configurations; import org.apache.commons.configuration2.builder.fluent.Configurations;
import org.apache.commons.configuration2.ex.ConfigurationException; import org.apache.commons.configuration2.ex.ConfigurationException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.io.*; import java.io.*;
import java.text.MessageFormat;
import java.util.*; import java.util.*;
import static java.text.MessageFormat.format;
public class CreamApiConfig { public class CreamApiConfig {
final Logger logger = LoggerFactory.getLogger(CreamApiConfig.class);
private static CreamApiConfig configInstance; private static CreamApiConfig configInstance;
private static final Configurations CONFIGS = new Configurations(); private static final Configurations CONFIGS = new Configurations();
private INIConfiguration config; private INIConfiguration config;
public String getPath() {
return path;
}
private String path = "cream_api.ini"; private String path = "cream_api.ini";
private Integer appId; private Integer appId;
private String language; private String language;
private Boolean unlockAll; private Boolean unlockAll;
private Boolean extraProtection; private Boolean extraProtection;
private Boolean forceOffline; private Boolean forceOffline;
private final Map<Integer, String> dlc = new HashMap<>(); private Map<Integer, String> dlc = new HashMap<>();
private final List<String> languages = new ArrayList<>(); private List<String> languages = new ArrayList<>();
private CreamApiConfig() { private CreamApiConfig() {
try { try {
config = CONFIGS.ini(path); config = CONFIGS.ini(path);
config.setCommentLeadingCharsUsedInInput(";"); config.setCommentLeadingCharsUsedInInput(";");
} catch (ConfigurationException e) { } catch (ConfigurationException e) {
logger.warn("No config file found!"); System.err.println("No config file found in default location!");
//e.printStackTrace(); //e.printStackTrace();
} }
// https://partner.steamgames.com/doc/store/localization#supported_languages File langFile = new File("languages.txt");
languages.addAll(Arrays.asList( try {
"english", BufferedReader fIn = new BufferedReader(new FileReader(langFile));
"latam", fIn.lines().filter(line -> !line.isEmpty() && !line.startsWith("#")).forEach(line -> languages.add(line));
"brazilian", } catch (IOException e) {
"german", e.printStackTrace();
"french", }
"italian",
"portuguese",
"spanish",
"russian",
"schinese",
"tchinese",
"japanese",
"koreana",
"arabic",
"bulgarian",
"czech",
"danish",
"dutch",
"finnish",
"greek",
"hungarian",
"norwegian",
"polish",
"romanian",
"swedish",
"thai",
"turkish",
"ukrainian",
"vietnamese"
));
try { try {
read(); read();
} catch (NoSuchElementException e) {
logger.warn("Error reading cream_api.ini! " +
"This can be ignored if setting up CreamAPI for the first time.");
} catch (NullPointerException e) { } catch (NullPointerException e) {
logger.warn("Can't fill out fields, no configuration file set!"); System.err.println("Can't fill out fields, no configuration file set!");
} }
} }
@ -108,8 +54,7 @@ public class CreamApiConfig {
return configInstance; return configInstance;
} }
public void read() throws NullPointerException, NoSuchElementException { public void read() throws NullPointerException {
logger.info("Reading config file...");
appId = config.getInt("steam.appid"); appId = config.getInt("steam.appid");
language = config.getString("steam.language"); language = config.getString("steam.language");
if (language == null) { if (language == null) {
@ -120,11 +65,9 @@ public class CreamApiConfig {
forceOffline = config.getBoolean("steam.forceoffline"); forceOffline = config.getBoolean("steam.forceoffline");
final SubnodeConfiguration dlc_section = config.getSection("dlc"); final SubnodeConfiguration dlc_section = config.getSection("dlc");
dlc_section.getKeys().forEachRemaining(k -> dlc.put(Integer.parseInt(k), dlc_section.getString(k))); dlc_section.getKeys().forEachRemaining(k -> dlc.put(Integer.parseInt(k), dlc_section.getString(k)));
logger.info("Successfully read config file!");
} }
public void sync() throws ConfigurationException { public void sync() throws ConfigurationException {
logger.info("Saving config file...");
FileBasedConfigurationBuilder<INIConfiguration> builder = CONFIGS.iniBuilder(path); FileBasedConfigurationBuilder<INIConfiguration> builder = CONFIGS.iniBuilder(path);
config = builder.getConfiguration(); config = builder.getConfiguration();
config.setCommentLeadingCharsUsedInInput(";"); config.setCommentLeadingCharsUsedInInput(";");
@ -145,7 +88,6 @@ public class CreamApiConfig {
config.setProperty("steam_misc.disableuserinterface", false); config.setProperty("steam_misc.disableuserinterface", false);
builder.save(); builder.save();
logger.info("Saved successfully!");
} }
// DLC list parsing // DLC list parsing
@ -161,7 +103,7 @@ public class CreamApiConfig {
Arrays.stream(str.split("\\R+")).forEach(line -> { Arrays.stream(str.split("\\R+")).forEach(line -> {
final String[] split = line.split("\\s*=\\s*", 2); final String[] split = line.split("\\s*=\\s*", 2);
if (split.length == 2) dlc.put(Integer.parseInt(split[0]), split[1]); if (split.length == 2) dlc.put(Integer.parseInt(split[0]), split[1]);
else logger.error(format("Error while splitting line: \"{0}\"", line)); else System.err.println(MessageFormat.format("Error while splitting line: \"{0}\"", line));
}); });
} }
@ -213,11 +155,7 @@ public class CreamApiConfig {
public void setConfig(String path) throws ConfigurationException, IOException { public void setConfig(String path) throws ConfigurationException, IOException {
File file = new File(path); File file = new File(path);
if (file.createNewFile()) { boolean fileCreated = file.createNewFile();
logger.info("New config file created!");
} else {
logger.info("Using existing config file!");
}
this.config = CONFIGS.ini(path); this.config = CONFIGS.ini(path);
this.config.setCommentLeadingCharsUsedInInput(";"); this.config.setCommentLeadingCharsUsedInInput(";");
this.path = path; this.path = path;

View File

@ -0,0 +1,49 @@
package util;
import org.apache.commons.codec.digest.DigestUtils;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
public class CreamApiDllHandler {
private static CreamApiDllHandler creamApiDllHandlerInstance;
private final Path steamApiDllPath = Paths.get("steam_api.dll");
private final Path steamApi64DllPath = Paths.get("steam_api64.dll");
private final String steamApiDllMd5;
private final String steamApi64DllMd5;
private CreamApiDllHandler() {
String steamApiDllMd5 = "";
String steamApi64DllMd5 = "";
try {
steamApiDllMd5 = DigestUtils.md5Hex(Files.newInputStream(steamApiDllPath));
} catch (IOException e) {
System.err.println("File missing: " + steamApiDllPath.toAbsolutePath().toString());
}
try {
steamApi64DllMd5 = DigestUtils.md5Hex(Files.newInputStream(steamApi64DllPath));
} catch (IOException e) {
System.err.println("File missing: " + steamApi64DllPath.toAbsolutePath().toString());
}
this.steamApiDllMd5 = steamApiDllMd5;
this.steamApi64DllMd5 = steamApi64DllMd5;
}
public static synchronized CreamApiDllHandler getInstance() {
if (creamApiDllHandlerInstance == null) {
creamApiDllHandlerInstance = new CreamApiDllHandler();
}
return creamApiDllHandlerInstance;
}
public Path getDllPath(boolean is64Bit) {
return is64Bit ? steamApi64DllPath : steamApiDllPath;
}
public String getDllMd5(boolean is64Bit) {
return is64Bit ? steamApi64DllMd5 : steamApiDllMd5;
}
}

View File

@ -0,0 +1,98 @@
package util;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import kong.unirest.HttpResponse;
import kong.unirest.Unirest;
import pojo.App;
import pojo.Download;
import pojo.SteamAppsList;
import java.io.*;
import java.lang.reflect.Type;
import java.time.Duration;
import java.time.Instant;
import java.util.List;
import java.util.stream.Collectors;
public class SteamAppsListCache {
private SteamAppsList list = new SteamAppsList();
private File cacheFile = new File("steamapps.json");
public SteamAppsListCache() {
boolean fileFound = true;
try {
getListFromFile();
} catch (FileNotFoundException e) {
System.err.println("File does not exist, trying to create steamapps.json for the first time...");
fileFound = false;
}
if (!fileFound || Instant.now().isAfter(list.getTimestamp().plus(Duration.ofDays(3)))) {
sync();
}
}
private void sync() {
getListFromApi();
try {
saveListToFile();
} catch (IOException ex) {
ex.printStackTrace();
}
}
public App getGame(int appId) {
return list.getSteamAppsList().stream().filter(app -> app.getAppId() == appId).findFirst().orElse(null);
}
@SuppressWarnings("unused")
public App getGame(String name) {
return list.getSteamAppsList().stream()
.filter(app -> app.getName().equalsIgnoreCase(name)).findFirst().orElse(null);
}
public App findGame(String name) {
for (App app : list.getSteamAppsList()) {
if (app.getName().toLowerCase().replaceAll("[^a-zA-Z0-9\\s+]", "")
.startsWith(name.toLowerCase().replaceAll("[^a-zA-Z0-9\\s+]", ""))) {
return app;
}
}
for (App app : list.getSteamAppsList()) {
if (app.getName().toLowerCase().replaceAll("[^a-zA-Z0-9\\s+]", "")
.contains(name.toLowerCase().replaceAll("[^a-zA-Z0-9\\s+]", ""))) {
return app;
}
}
return null;
}
private void getListFromApi() {
HttpResponse<String> httpResponse =
Unirest.get("https://api.steampowered.com/IStoreService/GetAppList/v1/" +
"?key=E427256C579D3CDF1D504810E8F5B948&include_games=1&max_results=50000").asString();
List<App> apps = new Gson()
.fromJson(httpResponse.getBody(), Download.class)
.getResponse().getApps();
list.setTimestamp(Instant.now());
list.setSteamAppsList(apps);
}
private void saveListToFile() throws IOException {
Gson gson = new Gson();
String jsonString = gson.toJson(list);
BufferedWriter fOut = new BufferedWriter(new FileWriter(cacheFile));
fOut.write(jsonString);
fOut.close();
}
private void getListFromFile() throws FileNotFoundException {
BufferedReader fIn = new BufferedReader(new FileReader(cacheFile));
String json = fIn.lines().collect(Collectors.joining());
final Type type = new TypeToken<SteamAppsList>() {
}.getType();
Gson gson = new Gson();
list = gson.fromJson(json, type);
}
}

View File

@ -1,536 +0,0 @@
/*
* Auto-CreamAPI
* Copyright (C) 2020 Jeddunk
*
* 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
* <https://www.gnu.org/licenses/>.
*/
package xyz.jeddunk.autocreamapi;
import de.jensd.fx.glyphs.fontawesome.FontAwesomeIconView;
import javafx.beans.value.ChangeListener;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.concurrent.Service;
import javafx.concurrent.Task;
import javafx.event.Event;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import javafx.scene.paint.Color;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.scene.control.*;
import javafx.stage.*;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.configuration2.ex.ConfigurationException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import xyz.jeddunk.autocreamapi.pojo.App;
import xyz.jeddunk.autocreamapi.util.CreamApiConfig;
import xyz.jeddunk.autocreamapi.util.CreamApiDllHandler;
import xyz.jeddunk.autocreamapi.util.SteamAppsListCache;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import java.util.*;
import java.util.stream.Stream;
public class Controller implements Initializable {
final Logger logger = LoggerFactory.getLogger(Controller.class);
private static final String GLYPH_FAILURE = "TIMES";
private static final String GLYPH_SUCCESS = "CHECK";
private static final Color COLOR_FAILURE = Color.web("#E53935");
private static final Color COLOR_SUCCESS = Color.web("#43A047");
private static final String REGEX = "(?<steamApiDll>steam_api(?:64)?.dll)$";
private CreamApiDllHandler handler = null;
private final CreamApiConfig config = CreamApiConfig.getInstance();
private final SteamAppsListCache cache = new SteamAppsListCache();
private boolean is64Bit;
private boolean isSameFile;
@FXML
public Label creamApiDllApplied;
@FXML
public Label creamApiConfigExists;
@FXML
public FontAwesomeIconView creamApiDllAppliedIcon;
@FXML
public FontAwesomeIconView creamApiConfigExistsIcon;
@FXML
public Label state_label;
@FXML
public TextField path_textfield;
@FXML
public TextField appId_textfield;
@FXML
public TextField game_name_textfield;
@FXML
public ComboBox<String> language_combobox;
@FXML
public TextArea dlc_textarea;
@FXML
public CheckBox extra_protection_checkbox;
@FXML
public CheckBox offline_checkbox;
@FXML
public CheckBox unlock_all_checkbox;
@FXML
public CheckBox steamdb_dlc_checkbox;
@FXML
public Button reset_button;
@FXML
public Button save_button;
@FXML
public Button getAppId_button;
@FXML
public Button path_button;
@FXML
public Button getDlcList_button;
private String steamApiPathString;
{
try {
handler = CreamApiDllHandler.getInstance();
} catch (FileNotFoundException e) {
Alert alert = new Alert(Alert.AlertType.ERROR);
alert.setTitle("CreamAPI DLLs missing!");
alert.setHeaderText("CreamAPI DLL files can't be found!");
alert.setContentText("Please download CreamAPI and extract the non-log " +
"version in the same folder as Auto-CreamAPI!\nThe program will now close.");
alert.showAndWait();
System.exit(2);
} catch (IOException e) {
e.printStackTrace();
}
}
public Controller() {
}
@FXML
@Override
public void initialize(URL location, ResourceBundle resources) {
steamdb_dlc_checkbox.setSelected(true);
appId_textfield.textProperty().addListener(appIdChangesGameName());
game_name_textfield.setOnKeyReleased(event -> {
KeyCode code = event.getCode();
if (code.equals(KeyCode.ENTER)) {
getAppId();
}
});
language_combobox.setItems(FXCollections.observableArrayList(config.getLanguages()));
language_combobox.setTooltip(new Tooltip());
language_combobox.setEditable(false);
new ComboBoxAutoComplete<>(language_combobox);
dlc_textarea.setPromptText("List of DLC...\r0000 = DLC Name");
generate_tooltips();
reset(true);
state_label.setText("Ready.");
}
private void generate_tooltips() {
Tooltip extra_protection_tooltip = new Tooltip("\"extra protection\"");
extra_protection_checkbox.setTooltip(extra_protection_tooltip);
Tooltip.install(extra_protection_checkbox, extra_protection_tooltip);
Tooltip steamdb_dlc_tooltip = new Tooltip("Additionally get DLC data from SteamDB.\n" +
"Especially useful for DLC that is not listed on the Steam Store.\n" +
"This sometimes doesn't work because SteamDB may block access for scrapers.");
steamdb_dlc_checkbox.setTooltip(steamdb_dlc_tooltip);
Tooltip.install(steamdb_dlc_checkbox, steamdb_dlc_tooltip);
}
private void read() {
language_combobox.getSelectionModel().select(config.getLanguage());
appId_textfield.setText(config.getAppId().toString());
dlc_textarea.setText(config.getDlcListAsString());
game_name_textfield.setText(cache.getGame(config.getAppId()).getName());
extra_protection_checkbox.setSelected(config.getExtraProtection());
offline_checkbox.setSelected(config.getForceOffline());
unlock_all_checkbox.setSelected(config.getUnlockAll());
unlockAll_disableDlcTextArea();
}
private void emptyFields() {
/*setIndicator(creamApiDllApplied, creamApiDllAppliedIcon, COLOR_FAILURE, GLYPH_FAILURE);
setIndicator(creamApiConfigExists, creamApiConfigExistsIcon, COLOR_FAILURE, GLYPH_FAILURE);*/
appId_textfield.setText("");
dlc_textarea.setText("");
game_name_textfield.setText("");
extra_protection_checkbox.setSelected(false);
offline_checkbox.setSelected(false);
unlock_all_checkbox.setSelected(false);
unlockAll_disableDlcTextArea();
}
private ChangeListener<String> appIdChangesGameName() {
return (observable, oldValue, newValue) -> {
int appId;
try {
appId = Integer.parseInt(newValue);
final App game = cache.getGame(appId);
if (game != null) {
game_name_textfield.setText(game.getName());
} else {
game_name_textfield.setText("");
}
} catch (NumberFormatException e) {
game_name_textfield.setText("");
}
};
}
private void reset(boolean silent) {
if (silent) {
state_label.setText("");
} else {
state_label.setText("Resetting fields...");
}
try {
config.read();
read();
if (!silent) {
state_label.setText("Successfully reset all fields!");
}
} catch (NoSuchElementException e) {
logger.warn("Error reading cream_api.ini! " +
"This can be ignored if setting up CreamAPI for the first time.");
} catch (NullPointerException e) {
logger.warn("Can't fill out fields, no configuration file set!");
if (!silent) {
state_label.setText("Could not reset fields, no configuration file set!");
}
}
updateIndicators();
}
private void updateIndicators() {
try {
is64Bit = false;
if (!steamApiPathString.isEmpty()) {
Path dllPath = Paths.get(steamApiPathString);
if (dllPath.endsWith("steam_api64.dll")) {
is64Bit = true;
}
InputStream is = Files.newInputStream(dllPath);
String md5 = DigestUtils.md5Hex(is);
isSameFile = Objects.equals(md5, handler.getDllMd5(is64Bit));
if (isSameFile) {
setIndicator(creamApiDllApplied, creamApiDllAppliedIcon, COLOR_SUCCESS, GLYPH_SUCCESS);
} else {
setIndicator(creamApiDllApplied, creamApiDllAppliedIcon, COLOR_FAILURE, GLYPH_FAILURE);
}
Path configPath = Paths.get(config.getPath());
if (Files.exists(configPath) && Files.size(configPath) > 0L) {
setIndicator(creamApiConfigExists, creamApiConfigExistsIcon, COLOR_SUCCESS, GLYPH_SUCCESS);
} else {
setIndicator(creamApiConfigExists, creamApiConfigExistsIcon, COLOR_FAILURE, GLYPH_FAILURE);
}
}
} catch (Exception e) {
logger.warn("Resetting visual indicators!");
setIndicator(creamApiDllApplied, creamApiDllAppliedIcon, COLOR_FAILURE, GLYPH_FAILURE);
setIndicator(creamApiConfigExists, creamApiConfigExistsIcon, COLOR_FAILURE, GLYPH_FAILURE);
}
}
private void setIndicator(Label label, FontAwesomeIconView icon, Color color, String glyphName) {
label.setTextFill(color);
icon.setFill(color);
icon.setGlyphName(glyphName);
}
public void save() {
saveService().start();
}
public void getAppId() {
final List<App> games = cache.findListOfGames(game_name_textfield.getText());
if (games.isEmpty()) {
logger.info("No game name was given, setting AppID to \"-1\"!");
appId_textfield.setText("-1");
} else if (games.size() == 1) {
App game = games.get(0);
game_name_textfield.setText(game.getName());
appId_textfield.setText(String.valueOf(game.getAppId()));
} else {
logger.info("Multiple results found, opening search result window!");
try {
URL resource = ClassLoader.getSystemResource("xyz/jeddunk/autocreamapi/searchResultWindow.fxml");
FXMLLoader fxmlLoader = new FXMLLoader(resource);
Parent root1 = fxmlLoader.load();
SearchResultWindowController c = fxmlLoader.getController();
c.initMe(games);
c.setParentController(this);
Stage stage = new Stage();
stage.initModality(Modality.APPLICATION_MODAL);
stage.setResizable(false);
stage.setTitle("Choose game...");
stage.setScene(new Scene(root1));
stage.show();
} catch (IOException e) {
e.printStackTrace();
}
}
}
public void unlockAll_disableDlcTextArea() {
dlc_textarea.setDisable(unlock_all_checkbox.isSelected());
getDlcList_button.setDisable(unlock_all_checkbox.isSelected());
}
/**
* Gets DLC from both the Steam Store and SteamDB, since the latter has a (weird) limit of 64(?) DLCs. SteamDB
* also lists DLC not available for purchase.
*/
public void getDlcList() {
getDlcListService().start();
}
public void openFileChooser() {
FileChooser chooser = new FileChooser();
chooser.setTitle("Choose steam_api(64).dll...");
FileChooser.ExtensionFilter filter =
new FileChooser.ExtensionFilter("Steam API DLL",
"steam_api.dll", "steam_api64.dll");
chooser.getExtensionFilters().add(filter);
File file = chooser.showOpenDialog(path_button.getScene().getWindow());
try {
config.setConfig(file.getParent() + "\\cream_api.ini");
path_textfield.setText(file.getParent());
steamApiPathString = file.getAbsolutePath();
} catch (ConfigurationException | IOException e) {
e.printStackTrace();
} catch (NullPointerException e) {
logger.warn("Could not set config file location! Did you cancel the file chooser?");
}
emptyFields();
reset(true);
logger.info("File chosen: " + steamApiPathString);
logger.info("Ready.");
state_label.setText("Ready.");
}
/**
* Check if CreamAPI version of DLL is there, if not, rename original to steam_api(64)_o.dll and copy
* CreamAPI DLL to the path. Also looks for alternative Steam DLL (which means it patches both 64 and 32 bit
* DLLs at once if found)
*
* @throws IOException If file is missing or not accessible/modifiable.
*/
private void setUpCreamApi() throws IOException {
logger.info("Setting up DLL...");
Path path = Paths.get(steamApiPathString);
copyDllFile(path, isSameFile);
findAdditionalDll(path);
logger.info("Set up DLL successfully!");
}
private void findAdditionalDll(Path path) throws IOException {
String aDllString = is64Bit ? "\\steam_api.dll" : "\\steam_api64.dll";
Path dir = path.getParent();
Path aDll = Paths.get(dir.toString() + aDllString);
if (Files.exists(aDll)) {
logger.info("Additional DLL found: (" + aDll.toString() + ")!");
InputStream is = Files.newInputStream(aDll);
String md5 = DigestUtils.md5Hex(is);
boolean aIsSameFile = Objects.equals(md5, handler.getDllMd5(!is64Bit));
copyDllFile(aDll, aIsSameFile);
}
}
private void copyDllFile(Path path, boolean isSameFile) throws IOException {
if (!isSameFile) {
String pathOrigString = steamApiPathString;
String replacement = is64Bit ? "steam_api64_o.dll" : "steam_api_o.dll";
pathOrigString =
pathOrigString
.replaceFirst(REGEX, replacement);
Path pathOrig = Paths.get(pathOrigString);
if (!Files.exists(pathOrig)) {
logger.info("Renaming " + path.toString() + " to " + replacement + "...");
Files.move(path, pathOrig);
} else {
logger.info(pathOrigString + " already exists!");
String pathBakString = steamApiPathString;
pathBakString =
pathBakString
.replaceFirst(REGEX, is64Bit ? "steam_api64.dll.backup" : "steam_api.dll.backup");
Path pathBak = Paths.get(pathBakString);
Files.move(path, pathBak, StandardCopyOption.REPLACE_EXISTING);
}
logger.info("Copying CreamAPI DLL to " + path.toString() + " ...");
Files.copy(handler.getDllPath(is64Bit), path);
}
}
private void setDisableAllButtons(boolean b) {
reset_button.setDisable(b);
save_button.setDisable(b);
getAppId_button.setDisable(b);
path_button.setDisable(b);
getDlcList_button.setDisable(b);
}
public void resetFromButton() {
reset(false);
}
private Service<Void> saveService() {
Service<Void> s = new Service<Void>() {
@Override
protected Task<Void> createTask() {
return new Task<Void>() {
@Override
protected Void call() {
try {
setUpCreamApi();
config.setDlcListFromString(dlc_textarea.getText());
config.setAppId(Integer.parseInt(appId_textfield.getText()));
config.setExtraProtection(extra_protection_checkbox.isSelected());
config.setForceOffline(offline_checkbox.isSelected());
config.setUnlockAll(unlock_all_checkbox.isSelected());
config.setLanguage(language_combobox.getValue());
config.sync();
} catch (IOException | ConfigurationException e) {
e.printStackTrace();
cancel();
} catch (NullPointerException e) {
logger.warn("No configuration file set!");
cancel();
}
updateIndicators();
return null;
}
};
}
};
s.setOnRunning(event -> {
setDisableAllButtons(true);
state_label.setText("Saving...");
});
s.setOnSucceeded(event -> {
setDisableAllButtons(false);
state_label.setText("Saved successfully!");
});
s.setOnCancelled(event -> {
setDisableAllButtons(false);
state_label.setText("Could not save configuration file!");
});
return s;
}
private Service<Void> getDlcListService() {
Service<Void> s = new Service<Void>() {
@Override
protected Task<Void> createTask() {
return new Task<Void>() {
@Override
protected Void call() {
Map<Integer, String> collect =
cache.getDlcMap(appId_textfield.getText(), steamdb_dlc_checkbox.isSelected());
StringBuilder sb = new StringBuilder();
collect.forEach((k, v) -> sb.append(k).append("=").append(v).append("\n"));
dlc_textarea.setText(sb.toString());
return null;
}
};
}
};
s.setOnRunning(event -> {
setDisableAllButtons(true);
state_label.setText("Getting list of DLCs...");
});
s.setOnSucceeded(event -> {
setDisableAllButtons(false);
state_label.setText("Got list of DLCs successfully!");
});
s.setOnCancelled(event -> {
setDisableAllButtons(false);
state_label.setText("Could not get list of DLCs!");
});
return s;
}
static class ComboBoxAutoComplete<T> {
private ComboBox<T> cmb;
String filter = "";
private ObservableList<T> originalItems;
public ComboBoxAutoComplete(ComboBox<T> cmb) {
this.cmb = cmb;
originalItems = FXCollections.observableArrayList(cmb.getItems());
cmb.setTooltip(new Tooltip());
cmb.setOnKeyPressed(this::handleOnKeyPressed);
cmb.setOnHidden(this::handleOnHiding);
}
public void handleOnKeyPressed(KeyEvent e) {
SingleSelectionModel<T> sm = this.cmb.getSelectionModel();
ObservableList<T> filteredList = FXCollections.observableArrayList();
KeyCode code = e.getCode();
if (code.isLetterKey()) {
filter += e.getText();
}
if (code == KeyCode.BACK_SPACE && filter.length() > 0) {
filter = filter.substring(0, filter.length() - 1);
cmb.getItems().setAll(originalItems);
}
if (code == KeyCode.ESCAPE) {
filter = "";
}
if (filter.length() == 0) {
filteredList = originalItems;
cmb.getTooltip().hide();
} else {
Stream<T> items = cmb.getItems().stream();
String txtUsr = filter.toLowerCase();
items.filter(el -> el.toString().toLowerCase().contains(txtUsr)).forEach(filteredList::add);
cmb.getTooltip().setText(txtUsr);
Window stage = cmb.getScene().getWindow();
double posX = stage.getX() + cmb.getBoundsInParent().getMinX();
double posY = stage.getY() + cmb.getBoundsInParent().getMinY();
cmb.getTooltip().show(stage, posX, posY);
cmb.show();
}
cmb.getItems().setAll(filteredList);
sm.selectFirst();
}
public void handleOnHiding(Event e) {
filter = "";
cmb.getTooltip().hide();
T s = cmb.getSelectionModel().getSelectedItem();
cmb.getItems().setAll(originalItems);
cmb.getSelectionModel().select(s);
}
}
}

View File

@ -1,44 +0,0 @@
/*
* Auto-CreamAPI
* Copyright (C) 2020 Jeddunk
*
* 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
* <https://www.gnu.org/licenses/>.
*/
package xyz.jeddunk.autocreamapi;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class Main extends Application {
private static final int MIN_WIDTH = 905;
private static final int MIN_HEIGHT = 450;
private static final int PREF_WIDTH = 1200;
private static final int PREF_HEIGHT = 600;
@Override
public void start(Stage primaryStage) throws Exception {
Parent root = FXMLLoader.load(ClassLoader.getSystemResource("xyz/jeddunk/autocreamapi/mainWindow.fxml"));
primaryStage.setTitle("Auto CreamAPI");
primaryStage.setMinWidth(MIN_WIDTH + 25);
primaryStage.setMinHeight(MIN_HEIGHT + 50);
primaryStage.setScene(new Scene(root, PREF_WIDTH, PREF_HEIGHT));
primaryStage.show();
}
public static void main(String[] args) {
launch(args);
}
}

View File

@ -1,109 +0,0 @@
/*
* Auto-CreamAPI
* Copyright (C) 2020 Jeddunk
*
* 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
* <https://www.gnu.org/licenses/>.
*/
package xyz.jeddunk.autocreamapi;import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.*;
import javafx.scene.control.cell.TreeItemPropertyValueFactory;
import javafx.scene.input.MouseButton;
import javafx.scene.input.MouseEvent;
import javafx.stage.Stage;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import xyz.jeddunk.autocreamapi.pojo.App;
import java.net.URL;
import java.util.List;
import java.util.ResourceBundle;
import static java.text.MessageFormat.format;
public class SearchResultWindowController implements Initializable {
final Logger logger = LoggerFactory.getLogger(SearchResultWindowController.class);
@FXML
public Button okButton;
@FXML
public Button cancelButton;
@FXML
public TreeTableView<App> gameTable;
@FXML
public TreeTableColumn<App, Integer> appIdCol;
@FXML
public TreeTableColumn<App, String> nameCol;
public Controller parent;
private long lastTime;
private boolean isDblClicked;
public SearchResultWindowController() {
}
@FXML
@Override
public void initialize(URL location, ResourceBundle resources) {
}
public void initMe(List<App> games) {
TreeItem<App> root = new TreeItem<>();
appIdCol.setCellValueFactory(new TreeItemPropertyValueFactory<>("appId"));
nameCol.setCellValueFactory(new TreeItemPropertyValueFactory<>("name"));
games.forEach(game -> root.getChildren().add(new TreeItem<>(game)));
gameTable.setRoot(root);
}
public void confirm() {
App app = gameTable.getSelectionModel().getSelectedItem().getValue();
logger.info(format("Game selected: {0} ({1})!", app.getName(), app.getAppId()));
parent.game_name_textfield.setText(app.getName());
parent.appId_textfield.setText(String.valueOf(app.getAppId()));
Stage current = (Stage) okButton.getScene().getWindow();
current.close();
}
public void cancel() {
logger.info("Closing window without setting game!");
/*parent.game_name_textfield.setText("");
parent.appId_textfield.setText("-1");*/
Stage current = (Stage) cancelButton.getScene().getWindow();
current.close();
}
public void setParentController(Controller controller) {
parent = controller;
}
public void doubleclickConfirm(MouseEvent mouseEvent) {
if (mouseEvent.getButton() == MouseButton.PRIMARY) {
long diff;
long currentTime = System.currentTimeMillis();
if (lastTime != 0 && currentTime != 0) {
diff = currentTime - lastTime;
isDblClicked = (diff <= 215);
}
lastTime = currentTime;
if (isDblClicked) {
/*App app = gameTable.getSelectionModel().getSelectedItem().getValue();
parent.game_name_textfield.setText(app.getName());
parent.appId_textfield.setText(String.valueOf(app.getAppId()));
Stage current = (Stage) gameTable.getScene().getWindow();
current.close();*/
confirm();
}
}
}
}

View File

@ -1,229 +0,0 @@
/*
* Auto-CreamAPI
* Copyright (C) 2020 Jeddunk
*
* 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
* <https://www.gnu.org/licenses/>.
*/
package xyz.jeddunk.autocreamapi.pojo;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;
@SuppressWarnings("unused")
public class App {
@SerializedName("appid")
@Expose
private Integer appId;
@SerializedName("name")
@Expose
private String name;
@SerializedName("last_modified")
@Expose
private Integer lastModified;
@SerializedName("price_change_number")
@Expose
private Integer priceChangeNumber;
public Integer getAppId() {
return appId;
}
public void setAppId(Integer appId) {
this.appId = appId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Integer getLastModified() {
return lastModified;
}
public void setLastModified(Integer lastModified) {
this.lastModified = lastModified;
}
public Integer getPriceChangeNumber() {
return priceChangeNumber;
}
public void setPriceChangeNumber(Integer priceChangeNumber) {
this.priceChangeNumber = priceChangeNumber;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(App.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("appid");
sb.append('=');
sb.append(((this.appId == null)?"<null>":this.appId));
sb.append(',');
sb.append("name");
sb.append('=');
sb.append(((this.name == null)?"<null>":this.name));
sb.append(',');
sb.append("lastModified");
sb.append('=');
sb.append(((this.lastModified == null)?"<null>":this.lastModified));
sb.append(',');
sb.append("priceChangeNumber");
sb.append('=');
sb.append(((this.priceChangeNumber == null)?"<null>":this.priceChangeNumber));
sb.append(',');
if (sb.charAt((sb.length()- 1)) == ',') {
sb.setCharAt((sb.length()- 1), ']');
} else {
sb.append(']');
}
return sb.toString();
}
@Override
public int hashCode() {
int result = 1;
result = ((result* 31)+((this.name == null)? 0 :this.name.hashCode()));
result = ((result* 31)+((this.lastModified == null)? 0 :this.lastModified.hashCode()));
result = ((result* 31)+((this.priceChangeNumber == null)? 0 :this.priceChangeNumber.hashCode()));
result = ((result* 31)+((this.appId == null)? 0 :this.appId.hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if (!(other instanceof App)) {
return false;
}
App rhs = ((App) other);
boolean b1 = Objects.equals(this.name, rhs.name);
boolean b2 = Objects.equals(this.lastModified, rhs.lastModified);
boolean b3 = Objects.equals(this.priceChangeNumber, rhs.priceChangeNumber);
boolean b4 = Objects.equals(this.appId, rhs.appId);
return b1 && b2 && b3 && b4;
}
public static class Rezponze {
@SerializedName("apps")
@Expose
private List<App> apps = new ArrayList<>();
public List<App> getApps() {
return apps;
}
public void setApps(List<App> apps) {
this.apps = apps;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(Rezponze.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("apps");
sb.append('=');
sb.append(((this.apps == null)?"<null>":this.apps));
sb.append(',');
if (sb.charAt((sb.length()- 1)) == ',') {
sb.setCharAt((sb.length()- 1), ']');
} else {
sb.append(']');
}
return sb.toString();
}
@Override
public int hashCode() {
int result = 1;
result = ((result* 31)+((this.apps == null)? 0 :this.apps.hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if (!(other instanceof Rezponze)) {
return false;
}
Rezponze rhs = ((Rezponze) other);
return Objects.equals(this.apps, rhs.apps);
//return ((this.apps == rhs.apps)||((this.apps!= null)&&this.apps.equals(rhs.apps)));
}
public static class Download {
@SerializedName("response")
@Expose
private Rezponze response;
public Rezponze getResponse() {
return response;
}
public void setResponse(Rezponze response) {
this.response = response;
}
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append(Download.class.getName()).append('@').append(Integer.toHexString(System.identityHashCode(this))).append('[');
sb.append("response");
sb.append('=');
sb.append(((this.response == null)?"<null>":this.response));
sb.append(',');
if (sb.charAt((sb.length()- 1)) == ',') {
sb.setCharAt((sb.length()- 1), ']');
} else {
sb.append(']');
}
return sb.toString();
}
@Override
public int hashCode() {
int result = 1;
result = ((result* 31)+((this.response == null)? 0 :this.response.hashCode()));
return result;
}
@Override
public boolean equals(Object other) {
if (other == this) {
return true;
}
if (!(other instanceof Download)) {
return false;
}
Download rhs = ((Download) other);
return Objects.equals(this.response, rhs.response);
//return ((this.response == rhs.response)||((this.response!= null)&&this.response.equals(rhs.response)));
}
}
}
}

View File

@ -1,40 +0,0 @@
/*
* Auto-CreamAPI
* Copyright (C) 2020 Jeddunk
*
* 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
* <https://www.gnu.org/licenses/>.
*/
package xyz.jeddunk.autocreamapi.pojo;
import java.time.Instant;
import java.util.List;
public class SteamAppsList {
private Instant timestamp;
private List<App> steamAppsList;
public Instant getTimestamp() {
return timestamp;
}
public void setTimestamp(Instant timestamp) {
this.timestamp = timestamp;
}
public List<App> getSteamAppsList() {
return steamAppsList;
}
public void setSteamAppsList(List<App> steamAppsList) {
this.steamAppsList = steamAppsList;
}
}

View File

@ -1,52 +0,0 @@
/*
* Auto-CreamAPI
* Copyright (C) 2020 Jeddunk
*
* 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
* <https://www.gnu.org/licenses/>.
*/
package xyz.jeddunk.autocreamapi.util;
import org.apache.commons.codec.digest.DigestUtils;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
public class CreamApiDllHandler {
private static CreamApiDllHandler creamApiDllHandlerInstance;
private final Path steamApiDllPath = Paths.get("steam_api.dll");
private final Path steamApi64DllPath = Paths.get("steam_api64.dll");
private final String steamApiDllMd5;
private final String steamApi64DllMd5;
private CreamApiDllHandler() throws IOException {
this.steamApiDllMd5 = DigestUtils.md5Hex(Files.newInputStream(steamApiDllPath));
this.steamApi64DllMd5 = DigestUtils.md5Hex(Files.newInputStream(steamApi64DllPath));
}
public static synchronized CreamApiDllHandler getInstance() throws IOException {
if (creamApiDllHandlerInstance == null) {
creamApiDllHandlerInstance = new CreamApiDllHandler();
}
return creamApiDllHandlerInstance;
}
public Path getDllPath(boolean is64Bit) {
return is64Bit ? steamApi64DllPath : steamApiDllPath;
}
public String getDllMd5(boolean is64Bit) {
return is64Bit ? steamApi64DllMd5 : steamApiDllMd5;
}
}

View File

@ -1,279 +0,0 @@
/*
* Auto-CreamAPI
* Copyright (C) 2020 Jeddunk
*
* 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
* <https://www.gnu.org/licenses/>.
*/
package xyz.jeddunk.autocreamapi.util;
import com.gargoylesoftware.htmlunit.BrowserVersion;
import com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException;
import com.gargoylesoftware.htmlunit.WebClient;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
import com.gargoylesoftware.htmlunit.util.Cookie;
import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
import com.google.gson.reflect.TypeToken;
import kong.unirest.HttpResponse;
import kong.unirest.Unirest;
import me.xdrop.fuzzywuzzy.FuzzySearch;
import me.xdrop.fuzzywuzzy.model.BoundExtractedResult;
import org.jsoup.HttpStatusException;
import org.jsoup.Jsoup;
import org.jsoup.nodes.Document;
import org.jsoup.nodes.Element;
import org.jsoup.select.Elements;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import xyz.jeddunk.autocreamapi.pojo.App;
import xyz.jeddunk.autocreamapi.pojo.SteamAppsList;
import xyz.jeddunk.autocreamapi.util.env.MainEnv;
import java.io.*;
import java.lang.reflect.Type;
import java.net.URL;
import java.time.Duration;
import java.time.Instant;
import java.util.*;
import java.util.stream.Collectors;
public class SteamAppsListCache {
final Logger logger = LoggerFactory.getLogger(SteamAppsListCache.class);
private SteamAppsList list = new SteamAppsList();
private final File cacheFile = new File("steamapps.json");
private MainEnv env;
private String cfduid = "";
public SteamAppsListCache() {
try {
Class<?> envDefault = Class.forName("xyz.jeddunk.autocreamapi.util.env.Default");
env = (MainEnv) envDefault.newInstance();
// System.out.println(env.getKey());
} catch (ClassNotFoundException e) {
logger.debug("Default environment missing, using main environemnt...");
env = new MainEnv();
} catch (IllegalAccessException | InstantiationException e) {
// Only thrown by newInstance()
e.printStackTrace();
}
//boolean fileFound = true;
try {
getListFromFile();
} catch (FileNotFoundException e) {
logger.info("File does not exist, trying to create steamapps.json for the first time...");
//fileFound = false;
sync();
} catch (JsonSyntaxException e) {
logger.warn("File seems to be corrupt, trying to recreate steamapps.json...");
//fileFound = false;
sync();
}
if (Instant.now().isAfter(list.getTimestamp().plus(Duration.ofDays(3)))) {
logger.info("List in file is not recent!");
sync();
}
}
private void sync() {
getListFromApi();
try {
saveListToFile();
} catch (IOException ex) {
ex.printStackTrace();
}
}
public App getGame(int appId) {
return list.getSteamAppsList().stream().filter(app -> app.getAppId() == appId).findFirst().orElse(null);
}
@SuppressWarnings("unused")
public App getGame(String name) {
return list.getSteamAppsList().stream()
.filter(app -> app.getName().equalsIgnoreCase(name)).findFirst().orElse(null);
}
public List<App> findListOfGames(String name) {
List<BoundExtractedResult<App>> match = FuzzySearch.extractSorted(name, list.getSteamAppsList(), app ->
app.getName().toLowerCase().replaceAll("[^a-zA-Z0-9\\s+]", ""), 80);
List<App> collect = match.stream().map(BoundExtractedResult::getReferent).collect(Collectors.toList());
for (App app : collect) {
if (app.getName().replaceAll("[^a-zA-Z0-9\\s+]", "")
.equalsIgnoreCase(name.replaceAll("[^a-zA-Z0-9\\s+]", ""))) {
collect = new ArrayList<>();
collect.add(app);
break;
}
}
return collect;
}
private void getListFromApi() {
logger.info("Trying to get SteamAppList from API...");
List<App> apps = getApps();
list.setTimestamp(Instant.now());
list.setSteamAppsList(apps);
}
private List<App> getApps() {
HttpResponse<String> httpResponse =
Unirest.get("https://api.steampowered.com/IStoreService/GetAppList/v1/" +
"?key=" + env.getKey() + "&include_games=1&max_results=50000").asString();
return new Gson()
.fromJson(httpResponse.getBody(), App.Rezponze.Download.class)
.getResponse().getApps();
}
private void saveListToFile() throws IOException {
logger.info("Trying to save SteamAppList to file \"" + cacheFile.getAbsolutePath() + "\"...");
Gson gson = new Gson();
String jsonString = gson.toJson(list);
BufferedWriter fOut = new BufferedWriter(new FileWriter(cacheFile));
fOut.write(jsonString);
fOut.close();
logger.info("Successfully saved SteamAppList to file \"" + cacheFile.getAbsolutePath() + "\"...");
}
private void getListFromFile() throws FileNotFoundException, JsonSyntaxException {
logger.info("Trying to get SteamAppList from file \"" + cacheFile.getAbsolutePath() + "\"...");
BufferedReader fIn = new BufferedReader(new FileReader(cacheFile));
String json = fIn.lines().collect(Collectors.joining());
final Type type = new TypeToken<SteamAppsList>() {
}.getType();
Gson gson = new Gson();
list = gson.fromJson(json, type);
logger.info("Successfully got SteamAppList from file \"" + cacheFile.getAbsolutePath() + "\"...");
}
public Map<Integer, String> getDlcMap(String appId, boolean use_steamdb) {
logger.info("Getting list of DLC for AppID: " + appId + "...");
Map<Integer, String> steamStoreDLCs = new HashMap<>();
Map<Integer, String> steamDbDLCs = new HashMap<>();
// Steam Store
try {
logger.info("Trying to get DLC from Steam store page...");
Document steamDoc = Jsoup
.connect("https://store.steampowered.com/app/" + appId + "/")
.cookie("birthtime", "470703601")
.cookie("wants_mature_content", "1")
.get();
Elements steamDLCs = steamDoc.getElementsByClass("game_area_dlc_row");
for (Element dlc : steamDLCs) {
String dlc_id = dlc.attr("data-ds-appid");
String dlc_name = dlc
.getElementsByClass("game_area_dlc_name")
.text().replace("\n", "").trim();
steamStoreDLCs.put(Integer.parseInt(dlc_id), dlc_name);
}
logger.info("Got DLC from Steam store page successfully.");
} catch (HttpStatusException e) {
logger.error(e.getUrl());
if (e.getStatusCode() == 404) {
logger.error("App ID empty or not found! (HTTP Status Code: 404)");
} else {
logger.error("Error occurred while trying to get list of DLCs " +
"(HTTP Status Code: " + e.getStatusCode() + ")");
}
} catch (NullPointerException | IOException e) {
// ignore
}
// SteamDB
if (use_steamdb) {
logger.info("Trying to get DLC from SteamDB...");
if (cfduid.equals("")) {
logger.info("Missing CF cookie, trying to get it...");
WebClient client = new WebClient(BrowserVersion.CHROME);
client.getOptions().setCssEnabled(false);
client.getOptions().setJavaScriptEnabled(false);
client.getOptions().setThrowExceptionOnFailingStatusCode(false);
client.getOptions().setRedirectEnabled(true);
client.getCache().setMaxSize(0);
/*client.waitForBackgroundJavaScript(10000);
client.setJavaScriptTimeout(10000);
client.waitForBackgroundJavaScriptStartingBefore(10000);*/
try {
String urlString = "https://steamdb.info/";
HtmlPage page = client.getPage(urlString);
//noinspection SynchronizationOnLocalVariableOrMethodParameter
synchronized (page) {
page.wait(8000);
}
//Print cookies for test purposes. Comment out in production.
URL url = new URL(urlString);
for (Cookie c : client.getCookies(url)) {
//System.out.println(c.getName() +"="+c.getValue());
if (c.getName().equals("__cfduid")) {
cfduid = c.getValue();
logger.info("Got CF cookie successfully.");
}
}
//This prints the content after bypassing Cloudflare.
// System.out.println(client.getPage(url).getWebResponse().getContentAsString());
} catch (FailingHttpStatusCodeException | IOException | InterruptedException e) {
// e.printStackTrace();
logger.error("Could not get CF cookie, skipping SteamDB DLC list...");
}
}
if ((!(cfduid.equals(""))) && (!(cfduid.equals("N/A")))) {
try {
Document steamDbDoc = Jsoup
.connect("https://steamdb.info/app/" + appId + "/dlc/")
.cookie("__cfduid", cfduid)
.userAgent(BrowserVersion.CHROME.getUserAgent())
.get();
Element steamDbDlcSection = steamDbDoc.getElementById("dlc");
Elements steamDbDLCElements = steamDbDlcSection.getElementsByClass("app");
for (Element dlc : steamDbDLCElements) {
String dlc_id = dlc.attr("data-appid");
String dlc_name = "Unknown DLC " + dlc_id;
Elements td = dlc.getElementsByTag("td");
if (!td.isEmpty()) {
dlc_name = td.get(1).text().replace("\n", "").trim();
}
steamDbDLCs.put(Integer.parseInt(dlc_id), dlc_name);
}
logger.info("Got DLC from SteamDB successfully.");
} catch (HttpStatusException e) {
logger.error(e.getUrl());
if (e.getStatusCode() == 404) {
logger.error("App ID empty or not found! (HTTP Status Code: 404)");
} else {
logger.error("Error occurred while trying to get list of DLCs " +
"(HTTP Status Code: " + e.getStatusCode() + ")");
}
} catch (NullPointerException | IOException e) {
// ignore
}
}
}
logger.info("Merging both DLC lists...");
Map<Integer, String> allDLCs = new HashMap<>(steamStoreDLCs);
steamDbDLCs.forEach(allDLCs::putIfAbsent);
logger.info("DLC list is done!");
return allDLCs.entrySet().stream()
.sorted(Map.Entry.comparingByKey())
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue,
(oldValue, newValue) -> oldValue, LinkedHashMap::new));
}
}

View File

@ -1,24 +0,0 @@
/*
* Auto-CreamAPI
* Copyright (C) 2020 Jeddunk
*
* 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
* <https://www.gnu.org/licenses/>.
*/
package xyz.jeddunk.autocreamapi.util.env;
public class MainEnv {
String key = "";
public String getKey() {
return key;
}
}

View File

@ -1 +1 @@
Main-Class: xyz.jeddunk.autocreamapi.Main Main-Class: Main

View File

@ -1,50 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Auto-CreamAPI
~ Copyright (C) 2020 Jeddunk
~
~ 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
~ <https://www.gnu.org/licenses/>.
-->
<configuration>
<property name="PATTERN" value="%d{HH:mm:ss.SSS} [%thread] %-5level %logger{0} - %msg%n"/>
<!-- Insert the current time formatted as "yyyyMMdd'T'HHmmss" under
the key "bySecond" into the logger context. This value will be
available to all subsequent configuration elements. -->
<timestamp key="bySecond" datePattern="yyyy'_'MM'_'dd'-'HH'_'mm'_'ss"/>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!--withJansi>true</withJansi-->
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
<pattern>${PATTERN}</pattern>
</encoder>
</appender>
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<!-- use the previously created timestamp to create a uniquely
named log file -->
<file>autocreamapi_${bySecond}.log</file>
<encoder>
<pattern>${PATTERN}</pattern>
</encoder>
</appender>
<logger name="com.base22" level="TRACE"/>
<root level="debug">
<appender-ref ref="STDOUT" />
<appender-ref ref="FILE" />
</root>
</configuration>

View File

@ -0,0 +1,54 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import com.jfoenix.controls.JFXCheckBox?>
<?import com.jfoenix.controls.JFXComboBox?>
<?import com.jfoenix.controls.JFXTextArea?>
<?import com.jfoenix.controls.JFXTextField?>
<?import de.jensd.fx.glyphs.fontawesome.FontAwesomeIconView?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?>
<GridPane hgap="10.0" minHeight="360.0" minWidth="655.0" vgap="10.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="Controller">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="-Infinity" prefWidth="375.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="-Infinity" minWidth="-Infinity" prefWidth="120.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="-Infinity" minWidth="-Infinity" prefWidth="120.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="-Infinity" minHeight="-Infinity" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="-Infinity" minHeight="-Infinity" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="-Infinity" minHeight="-Infinity" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="-Infinity" minHeight="-Infinity" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="-Infinity" minHeight="-Infinity" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="-Infinity" minHeight="-Infinity" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="-Infinity" prefHeight="60.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="-Infinity" minHeight="-Infinity" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
<JFXTextField fx:id="path_textfield" promptText="Path to game's steam_api(64).dll..." GridPane.columnSpan="2" />
<JFXButton fx:id="path_button" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" onAction="#openFileChooser" GridPane.columnIndex="2">
<graphic>
<FontAwesomeIconView glyphName="FOLDER_OPEN" glyphSize="24" />
</graphic>
</JFXButton>
<JFXTextField fx:id="game_name_textfield" promptText="Game..." GridPane.rowIndex="1" />
<JFXButton fx:id="getAppId_button" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" onAction="#getAppId" GridPane.columnIndex="1" GridPane.rowIndex="1">
<graphic>
<FontAwesomeIconView glyphName="SEARCH" glyphSize="24" />
</graphic>
</JFXButton>
<JFXTextField fx:id="appId_textfield" prefWidth="299.0" promptText="Steam AppID..." GridPane.columnIndex="2" GridPane.rowIndex="1" />
<JFXComboBox fx:id="language_combobox" editable="true" promptText="Language" GridPane.columnSpan="2147483647" GridPane.rowIndex="2" />
<JFXCheckBox fx:id="offline_checkbox" text="Force offline mode" GridPane.columnSpan="2147483647" GridPane.rowIndex="3" />
<JFXCheckBox fx:id="extra_protection_checkbox" text="Try to bypass game-specific protection" GridPane.columnSpan="2147483647" GridPane.rowIndex="4" />
<JFXCheckBox fx:id="unlock_all_checkbox" onAction="#unlockAll_disableDlcTextArea" text="Unlock all DLC (if possible)" GridPane.columnSpan="2147483647" GridPane.rowIndex="5" />
<JFXTextArea fx:id="dlc_textarea" promptText="List of DLC..." GridPane.columnSpan="2147483647" GridPane.rowIndex="6" />
<JFXButton fx:id="retrieveDlcList_button" maxHeight="1.7976931348623157E308" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" onAction="#getDlcList" text="Get DLCs for AppID" GridPane.rowIndex="7" />
<JFXButton fx:id="save_button" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" onAction="#save" text="Save" GridPane.columnIndex="1" GridPane.rowIndex="7" />
<JFXButton fx:id="reset_button" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" onAction="#reset" text="Reset" GridPane.columnIndex="2" GridPane.rowIndex="7" />
</GridPane>

View File

@ -1,202 +0,0 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

View File

@ -1,144 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import com.jfoenix.controls.JFXCheckBox?>
<?import com.jfoenix.controls.JFXComboBox?>
<?import com.jfoenix.controls.JFXTextArea?>
<?import com.jfoenix.controls.JFXTextField?>
<?import de.jensd.fx.glyphs.fontawesome.FontAwesomeIconView?>
<?import java.net.URL?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TitledPane?>
<?import javafx.scene.layout.BorderPane?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.text.Font?>
<!--
~ Auto-CreamAPI
~ Copyright (C) 2020 Jeddunk
~
~ 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
~ <https://www.gnu.org/licenses/>.
-->
<BorderPane prefHeight="450.0" prefWidth="705.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="xyz.jeddunk.autocreamapi.Controller">
<center>
<GridPane hgap="10.0" minHeight="410.0" minWidth="655.0" vgap="10.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" maxWidth="1.7976931348623157E308" minWidth="-Infinity" prefWidth="375.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="-Infinity" minWidth="-Infinity" prefWidth="120.0" />
<ColumnConstraints hgrow="SOMETIMES" maxWidth="-Infinity" minWidth="-Infinity" prefWidth="120.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints maxHeight="-Infinity" minHeight="-Infinity" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="-Infinity" minHeight="-Infinity" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="-Infinity" minHeight="-Infinity" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="-Infinity" minHeight="-Infinity" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="-Infinity" minHeight="-Infinity" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="-Infinity" prefHeight="60.0" vgrow="SOMETIMES" />
<RowConstraints maxHeight="-Infinity" minHeight="-Infinity" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
<TitledPane animated="false" collapsible="false" maxHeight="1.7976931348623157E308" styleClass="dlcSettings"
text="DLC Settings" GridPane.columnSpan="2147483647" GridPane.rowIndex="5">
<GridPane hgap="10.0" maxHeight="1.7976931348623157E308" vgap="10.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0"/>
</columnConstraints>
<rowConstraints>
<RowConstraints/>
<RowConstraints/>
<RowConstraints maxHeight="1.7976931348623157E308"/>
</rowConstraints>
<JFXCheckBox fx:id="unlock_all_checkbox" onAction="#unlockAll_disableDlcTextArea"
text="Unlock all DLC (if possible)" GridPane.columnSpan="2147483647"/>
<JFXTextArea fx:id="dlc_textarea" maxHeight="1.7976931348623157E308" prefHeight="999999.0"
promptText="List of DLC..." GridPane.columnSpan="2147483647" GridPane.rowIndex="2"
GridPane.rowSpan="2147483647"/>
<JFXCheckBox fx:id="steamdb_dlc_checkbox" text="Additionally use SteamDB for DLCs"
GridPane.rowIndex="1"/>
</GridPane>
</TitledPane>
<JFXTextField fx:id="path_textfield" promptText="Path to game's steam_api(64).dll..." GridPane.columnSpan="2" />
<JFXButton fx:id="path_button" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" onAction="#openFileChooser" ripplerFill="BLACK" GridPane.columnIndex="2">
<graphic>
<FontAwesomeIconView glyphName="FOLDER_OPEN" glyphSize="24" />
</graphic>
</JFXButton>
<JFXTextField fx:id="game_name_textfield" promptText="Game..." GridPane.rowIndex="1" />
<JFXButton fx:id="getAppId_button" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" onAction="#getAppId" ripplerFill="BLACK" GridPane.columnIndex="1" GridPane.rowIndex="1">
<graphic>
<FontAwesomeIconView glyphName="SEARCH" glyphSize="24" />
</graphic>
</JFXButton>
<JFXTextField fx:id="appId_textfield" prefWidth="299.0" promptText="Steam AppID..." GridPane.columnIndex="2" GridPane.rowIndex="1" />
<JFXComboBox fx:id="language_combobox" editable="true" promptText="Language" GridPane.columnSpan="2147483647" GridPane.rowIndex="2" />
<JFXCheckBox fx:id="offline_checkbox" text="Force offline mode" GridPane.columnSpan="2147483647" GridPane.rowIndex="3" />
<JFXCheckBox fx:id="extra_protection_checkbox" text="Try to bypass game-specific protection" GridPane.columnSpan="2147483647" GridPane.rowIndex="4" />
<JFXButton fx:id="getDlcList_button" maxHeight="1.7976931348623157E308" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" onAction="#getDlcList" ripplerFill="BLACK" text="Get DLCs for AppID" GridPane.rowIndex="6" />
<JFXButton fx:id="save_button" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" onAction="#save" ripplerFill="BLACK" text="Save" GridPane.columnIndex="1" GridPane.rowIndex="6" />
<JFXButton fx:id="reset_button" maxHeight="1.7976931348623157E308" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" onAction="#resetFromButton" ripplerFill="BLACK" text="Reset" GridPane.columnIndex="2" GridPane.rowIndex="6" />
<BorderPane.margin>
<Insets />
</BorderPane.margin>
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
</GridPane>
</center>
<bottom>
<Label fx:id="state_label" maxWidth="1.7976931348623157E308" minHeight="25.0" minWidth="-Infinity" prefWidth="905.0" text="Ready." textFill="#555555" BorderPane.alignment="CENTER">
<BorderPane.margin>
<Insets />
</BorderPane.margin>
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
</Label>
</bottom>
<right>
<GridPane maxHeight="-Infinity" maxWidth="1.7976931348623157E308" minHeight="-Infinity" minWidth="250.0" BorderPane.alignment="CENTER">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
<Label fx:id="creamApiDllApplied" maxHeight="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" text="CreamAPI DLL applied">
<font>
<Font size="14.0" />
</font>
<graphic>
<FontAwesomeIconView fx:id="creamApiDllAppliedIcon" glyphName="TIMES" size="20" />
</graphic>
</Label>
<Label fx:id="creamApiConfigExists" layoutX="20.0" layoutY="20.0" maxHeight="1.7976931348623157E308" minHeight="-Infinity" minWidth="-Infinity" text="CreamAPI configuration file exists" GridPane.rowIndex="1">
<font>
<Font size="14.0" />
</font>
<graphic>
<FontAwesomeIconView fx:id="creamApiConfigExistsIcon" glyphName="TIMES" size="20" />
</graphic>
</Label>
</GridPane>
</right>
<stylesheets>
<URL value="@stylesheet.css" />
</stylesheets>
</BorderPane>

View File

@ -1,53 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import com.jfoenix.controls.JFXButton?>
<?import com.jfoenix.controls.JFXTreeTableView?>
<?import java.net.URL?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.ButtonBar?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TreeTableColumn?>
<?import javafx.scene.layout.VBox?>
<!--
~ Auto-CreamAPI
~ Copyright (C) 2020 Jeddunk
~
~ 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
~ <https://www.gnu.org/licenses/>.
-->
<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="655.0" prefWidth="420.0" xmlns="http://javafx.com/javafx/8.0.171" xmlns:fx="http://javafx.com/fxml/1" fx:controller="xyz.jeddunk.autocreamapi.SearchResultWindowController">
<opaqueInsets>
<Insets />
</opaqueInsets>
<padding>
<Insets bottom="10.0" left="10.0" right="10.0" top="10.0" />
</padding>
<Label maxWidth="1.7976931348623157E308" text="Choose a game from the list below:" />
<JFXTreeTableView fx:id="gameTable" fixedCellSize="28.0" maxHeight="1.7976931348623157E308" onMouseClicked="#doubleclickConfirm" prefHeight="570.0" prefWidth="400.0" showRoot="false">
<columns>
<TreeTableColumn fx:id="appIdCol" editable="false" maxWidth="100.0" minWidth="100.0" prefWidth="100.0" resizable="false" text="AppID" />
<TreeTableColumn fx:id="nameCol" editable="false" maxWidth="285.0" minWidth="285.0" prefWidth="285.0" resizable="false" text="Name" />
</columns>
<VBox.margin>
<Insets bottom="10.0" top="10.0" />
</VBox.margin>
</JFXTreeTableView>
<ButtonBar prefHeight="40.0" prefWidth="200.0">
<buttons>
<JFXButton fx:id="okButton" mnemonicParsing="false" onAction="#confirm" text="OK" ripplerFill="BLACK" />
<JFXButton fx:id="cancelButton" mnemonicParsing="false" onAction="#cancel" text="Cancel" ripplerFill="BLACK" />
</buttons>
</ButtonBar>
<stylesheets>
<URL value="@stylesheet.css" />
</stylesheets>
</VBox>

View File

@ -1,71 +0,0 @@
/*
* Auto-CreamAPI
* Copyright (C) 2020 Jeddunk
*
* 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
* <https://www.gnu.org/licenses/>.
*/
@font-face {
font-family: 'Roboto Condensed', sans-serif;
src: url("fonts/roboto-condensed/RobotoCondensed-Regular.ttf");
}
@font-face {
font-family: 'Roboto Condensed', sans-serif;
font-weight: bold;
src: url("fonts/roboto-condensed/RobotoCondensed-Bold.ttf");
}
@font-face {
font-family: 'Roboto Condensed', sans-serif;
font-weight: italic;
src: url("fonts/roboto-condensed/RobotoCondensed-Italic.ttf");
}
@font-face {
font-family: 'Roboto Mono', monospace;
src: url("fonts/roboto-mono/RobotoMono-Regular.ttf");
}
@font-face {
font-family: 'Roboto Mono', monospace;
font-weight: bold;
src: url("fonts/roboto-mono/RobotoMono-Bold.ttf");
}
@font-face {
font-family: 'Roboto Mono', monospace;
font-weight: italic;
src: url("fonts/roboto-mono/RobotoMono-Italic.ttf");
}
* {
-fx-font-size: 14;
-fx-font-family: 'Roboto Condensed', sans-serif;
}
JFXButton {
-fx-background-color: #ddd;
}
#state_label {
-fx-background-color: #ddd;
-fx-border-color: #aaa;
}
#dlc_textarea {
-fx-font-family: 'Roboto Mono', sans-serif;
}
.dlcSettings > .title {
-fx-background-color: #ddd;
}

Binary file not shown.

Binary file not shown.

View File

@ -1 +0,0 @@
4.5.0.0