diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..4b38b43 --- /dev/null +++ b/LICENSE @@ -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. diff --git a/sources-example.ini b/sources-example.ini new file mode 100644 index 0000000..4a75e9c --- /dev/null +++ b/sources-example.ini @@ -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/ diff --git a/src/main/java/net/shrimpworks/unreal/scriptbrowser/App.java b/src/main/java/net/shrimpworks/unreal/scriptbrowser/App.java index 359d5b1..e1032c3 100644 --- a/src/main/java/net/shrimpworks/unreal/scriptbrowser/App.java +++ b/src/main/java/net/shrimpworks/unreal/scriptbrowser/App.java @@ -45,7 +45,7 @@ public static void main(String[] args) throws IOException { final Path outPath = Paths.get(cli.commands()[0]); - final List sources = createSourcesFromProperties(); + final List sources = createSourcesFromProperties(cli.option("sources", "sources.ini")); if (!cli.flag("skip-sources")) { for (USources source : sources) { @@ -92,8 +92,8 @@ public static void main(String[] args) throws IOException { System.err.println("Done"); } - private static List createSourcesFromProperties() throws IOException { - final IniFile config = new IniFile(Paths.get("sources.ini")); + private static List createSourcesFromProperties(String sources) throws IOException { + final IniFile config = new IniFile(Paths.get(sources)); return config.sections().stream() .map(s -> new USources( s,