Skip to content

Commit

Permalink
add example sources definition, license, option to specify sources file
Browse files Browse the repository at this point in the history
  • Loading branch information
shrimpza committed Jun 18, 2022
1 parent 468d26e commit 9e882c2
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 3 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Kenneth Watson

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
11 changes: 11 additions & 0 deletions sources-example.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
[Unreal Tournament v469b]
out=ut99v469b
paths=/path/to/ut99/469b/

[Unreal Tournament v436]
out=ut99v436
paths=/path/to/ut99/436/

[Unreal Tournament 2004 v3369]
out=ut2004v3369
paths=/path/to/ut99/3369/
6 changes: 3 additions & 3 deletions src/main/java/net/shrimpworks/unreal/scriptbrowser/App.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public static void main(String[] args) throws IOException {

final Path outPath = Paths.get(cli.commands()[0]);

final List<USources> sources = createSourcesFromProperties();
final List<USources> sources = createSourcesFromProperties(cli.option("sources", "sources.ini"));

if (!cli.flag("skip-sources")) {
for (USources source : sources) {
Expand Down Expand Up @@ -92,8 +92,8 @@ public static void main(String[] args) throws IOException {
System.err.println("Done");
}

private static List<USources> createSourcesFromProperties() throws IOException {
final IniFile config = new IniFile(Paths.get("sources.ini"));
private static List<USources> createSourcesFromProperties(String sources) throws IOException {
final IniFile config = new IniFile(Paths.get(sources));
return config.sections().stream()
.map(s -> new USources(
s,
Expand Down

0 comments on commit 9e882c2

Please sign in to comment.