Coder Social home page Coder Social logo

smartmodinserter's Introduction

Smart Mod Inserter

This is a smart mod manager for factorio. It will allow you to create modpacks and later launch factorio with the mods of those modpacks with a single click.

Features

An incomplete list of features. Features marked with a * are only available in the indev version.

  • Modpacks

    Define multiple modpacks and switch between them with a single click.

  • Dependency resolving *

    If you have a modpack and you didn't include all the dependencies in the modpack, this application will try to solve that problem.

  • Savegames *

    You can select any save game from the Saves tab and hit Play. This will install all the mods that are listed as required in this save.

  • Download mods *

    If you want to download a mod from factoriomods.com, you can do so by clicking on the Install with FMM button on that website. This will download the mod and store it under the Mods tab. All other websites are welcome to implement the factoriomods URI scheme

Future features

  • Factorio version management

    You'll be able to define more than one factorio version. Dependency resolving will then automatically determine the correct factorio version for each modpack.

  • Automatic updates

    Keep your mods and factorio up to date.

  • Server browser

    Add all your favorite servers to a list and have Smart Mod Inserter figure out which mods they use. Then it will install all those mods and launch factorio with a flag to directly connect to that server.

Download and Install

To download, head over to the releases page. From there, select a release and download the appropriate file.

The .jar files are recommended for everyone, however, for OS X users there will be special .app bundles available starting with version 0.3. Additionally to the benefit of having an app-bundle, it will allow you to click the Install links on factoriomods.com.

To run, you need the Java Runtime Environment with version 8 u 40 or higher. Windows users should vary as to not install any unwanted 3rd party software along with Java. To fully prevent installing Ask-Toolbar and the like, usage of this ninite installer package is recommended.

If you have Java installed, simply opening the .jar or .app is enough to launch Smart Mod Inserter.

Linux Users

JavaFX is required and may not be installed by default. On Ubuntu, you can fix this by installing these packages:

sudo apt-get install openjdk-8-jre openjfx libopenjfx-java

First launch

Upon first launching Smart Mod Inserter, it will probably ask you to define the factorio application path and the data path. On some setups, it will automatically be able to figure out some of those paths. Until you have all necessary paths selected, the close button will stay disabled.

After all paths have been defined, Smart Mod Inserter will move all mods found in <datadir>/mods/ to <datadir>/fmm/mods/ and create a modpack titled Default containing those mods. You can edit the name if you want.

If you put mods into the <datadir>/mods/ folder after that, they will also be moved to <datadir>/fmm/mods/, if they don't already exist in that folder.

Compile

To compile, you need at least JDK 1.8_40 and maven.

After executing

    mvn clean package

from the command line, you'll have a .jar file in the target/ directory.

OS X

A special build plugin is configured to create an OS X .app bundle. To create this, use maven with the appbundle:bundle goal.

License

This project is licensed under the GNU Lesser General Public License, Version 3

smartmodinserter's People

Contributors

mickael9 avatar narrowtux avatar riking avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

smartmodinserter's Issues

Doesn't copy over mods that are unzipped

I have to load Orbital Ion Cannon as an unzipped folder, but the mod manager doesn't copy over the unzipped folder to /Factorio/mods/ so I have to copy it manually every time I run it.

This is undesired behavior.

Version 0.21

Crash with Nullpointer Exception on start [v0.2.1]

Program crashes with NullPointerException at startup.

java.lang.NullPointerException at com.narrowtux.fmm.Main.start(Main.java:40) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863) at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326) at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at com.sun.glass.ui.gtk.GtkApplication.lambda$null$49(GtkApplication.java:139) at java.lang.Thread.run(Thread.java:745)

Content is not allowed in prolog

I have no idea about java and the mod manager worked great, until after a couple of relaunches (messing around with packs) it just wouldn't load. I checked the process with Task Manager (I have Windows 10) and it wasn't using more memory to load it, it was just staying the same. I tried launching with java web start launcher instead of standard javaw.exe and it would give these errors.

Launch File

PK

Exeption

JNLParseException[ Could not parse launch file. Error at line 1.]
at com.sun.javaws.jnl.XMLFormat.parse(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
at com.sun.javaws.Main.launchApp(Unknown Source)
at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
at com.sun.javaws.Main.access$000(Unknown Source)
at com.sun.javaws.Main$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
at com.sun.deploy.xml.XMLParser.parse(Unknown Source)
at com.sun.deploy.xml.XMLParser.parse(Unknown Source)
... 8 more

Wrapped Exeption

org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content is not allowed in prolog.
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(Unknown Source)
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.fatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLErrorReporter.reportError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLScanner.reportFatalError(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source)
at com.sun.deploy.xml.XMLParser.parse(Unknown Source)
at com.sun.deploy.xml.XMLParser.parse(Unknown Source)
at com.sun.javaws.jnl.XMLFormat.parse(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
at com.sun.javaws.jnl.LaunchDescFactory.buildDescriptor(Unknown Source)
at com.sun.javaws.Main.launchApp(Unknown Source)
at com.sun.javaws.Main.continueInSecureThread(Unknown Source)
at com.sun.javaws.Main.access$000(Unknown Source)
at com.sun.javaws.Main$1.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

java.lang.NullPointerException on startup with Linux

Attempting to run the program results in this:

java.lang.NullPointerException
at com.narrowtux.fmm.Main.start(Main.java:40)
at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at com.sun.glass.ui.gtk.GtkApplication.lambda$null$49(GtkApplication.java:139)
at java.lang.Thread.run(Thread.java:745)

Doesn't work with openjdk / linux

$ java -version
openjdk version "1.8.0_60"
OpenJDK Runtime Environment (build 1.8.0_60-b27)
OpenJDK 64-Bit Server VM (build 25.60-b23, mixed mode)

$ java -jar FactorioModManager-0.2.1.jar 
Error: Could not find or load main class com.narrowtux.fmm.Main

Doesn't run on Linux

All I get is this:

$ ./FactorioModManager-0.2.1.jar 
Picked up JAVA_TOOL_OPTIONS: -javaagent:/usr/share/java/jayatanaag.jar 
java.lang.NullPointerException
    at com.narrowtux.fmm.Main.start(Main.java:40)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$163(LauncherImpl.java:863)
    at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$176(PlatformImpl.java:326)
    at com.sun.javafx.application.PlatformImpl.lambda$null$174(PlatformImpl.java:295)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$175(PlatformImpl.java:294)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
    at com.sun.glass.ui.gtk.GtkApplication.lambda$null$50(GtkApplication.java:139)
    at java.lang.Thread.run(Thread.java:745)

Linux - Won't start due to missing required directories

The application wont initially run due to missing directories...

Exception in main thread: ~/.factorio/fmm is not a directory.
java.nio.file.NoSuchFileException: ~/.factorio/fmm
    at sun.nio.fs.UnixException.translateToIOException(Unknown Source)
    at sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
    at sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
    at sun.nio.fs.UnixFileSystemProvider.createDirectory(Unknown Source)
    at java.nio.file.Files.createDirectory(Unknown Source)
    at com.narrowtux.fmm.FactorioModManagerApplication.continueStartup(FactorioModManagerApplication.java:141)
    at com.narrowtux.fmm.FactorioModManagerApplication.start(FactorioModManagerApplication.java:121)
    at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(Unknown Source)
    at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(Unknown Source)
    at com.sun.javafx.application.PlatformImpl.lambda$null$173(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(Unknown Source)
    at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(Unknown Source)
    at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
    at com.sun.glass.ui.gtk.GtkApplication.lambda$null$49(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
Exception in Application start method

Also

java.nio.file.NoSuchFileException: ~/.factorio/saves
    at sun.nio.fs.UnixException.translateToIOException(Unknown Source)
    at sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
    at sun.nio.fs.UnixException.rethrowAsIOException(Unknown Source)
    at sun.nio.fs.UnixFileAttributeViews$Basic.readAttributes(Unknown Source)
    at sun.nio.fs.UnixFileSystemProvider.readAttributes(Unknown Source)
    at sun.nio.fs.LinuxFileSystemProvider.readAttributes(Unknown Source)
    at java.nio.file.Files.readAttributes(Unknown Source)
    at java.nio.file.FileTreeWalker.getAttributes(Unknown Source)
    at java.nio.file.FileTreeWalker.visit(Unknown Source)
    at java.nio.file.FileTreeWalker.walk(Unknown Source)
    at java.nio.file.FileTreeIterator.<init>(Unknown Source)
    at java.nio.file.Files.walk(Unknown Source)
    at java.nio.file.Files.walk(Unknown Source)
    at com.narrowtux.fmm.model.Datastore$2.call(Datastore.java:104)
    at com.narrowtux.fmm.model.Datastore$2.call(Datastore.java:79)
    at javafx.concurrent.Task$TaskCallable.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at com.narrowtux.fmm.io.tasks.TaskService.lambda$null$78(TaskService.java:38)
    at java.lang.Thread.run(Unknown Source)
java -version
java version "1.8.0_73"
Java(TM) SE Runtime Environment (build 1.8.0_73-b02)
Java HotSpot(TM) 64-Bit Server VM (build 25.73-b02, mixed mode)

This is using the version compiled from f3c6389

I worked around this by temporarily creating the directories and then changing the settings once the program had loaded.

PS: Many thanks for your work on making this work on linux. Much appreciated :)

Doesn't start on linux, unhelpful error message

When I try to start this tool on linux I get :

$ java -jar FactorioModManager-0.2.0.jar 
Exception in Application start method
Jul 29, 2015 11:01:27 PM com.narrowtux.fmm.dirwatch.SimpleDirectoryWatchService run
INFO: Starting file watcher service.

And it stop.

Application crashes if mod metadata is not valid json

com.google.gson.JsonSyntaxException: duplicate key: factorio_version
        at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:190)
        at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145)
        at com.google.gson.Gson.fromJson(Gson.java:803)
        at com.google.gson.Gson.fromJson(Gson.java:741)
        at com.narrowtux.fmm.ModpackDetectorVisitor.visitFile(ModpackDetectorVisitor.java:76)
        at com.narrowtux.fmm.ModpackDetectorVisitor.visitFile(ModpackDetectorVisitor.java:21)
        at java.nio.file.Files.walkFileTree(Unknown Source)
        at java.nio.file.Files.walkFileTree(Unknown Source)
        at com.narrowtux.fmm.Datastore.scanDirectory(Datastore.java:71)
        at com.narrowtux.fmm.Main.continueStartup(Main.java:85)
        at com.narrowtux.fmm.Main.start(Main.java:72)
        at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863)
        at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326)
        at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295)
        at java.security.AccessController.doPrivileged(Native Method)
        at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294)
        at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
        at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
        at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191)
        at java.lang.Thread.run(Unknown Source)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.