ago1024 / WurmClientModLauncher

ModLauncher and mods for WurmUnlimited client
26 stars 10 forks source link

Cannot create a mod - missing dependencies #7

Closed marad closed 7 years ago

marad commented 7 years ago

Hi! I wanted to create a mod using your client mod launcher but unfortunately I cannot get the dependencies straight.

Tried adding dependency to your [org.gotti.wurmunlimited/client-modlauncher "0.4"] but this gives me an error:

Failed to resolve version for org.gotti.wurmunlimited:common-client:jar:LATEST: Could not find metadata org.gotti.wurmunlimited:common-client/maven-metadata.xml

I've got the same error when I've tried to download and build your LiveHudMap mod. Looks like you are missing some library version in public repository.

ago1024 commented 7 years ago

There is a project in modules/steam-files that downloads the client with steamcmd and packages client.jar and common.jar.

The project reads build.properties from that folder with those keys: steamcmd=Path to steamcmd steamuser=Steam user steampasswd=Password for the user

When you've created build.properties run mvn install to download the files and install them to your local maven repository.

When steamcmd logs in the login data from the Steam client becomes invalid and you must logoff and logon witht he steam client to be able to play steam games again.

marad commented 7 years ago

So if I understand correctly this missing dependency is just client.jar and common.jar. The same files that are installed on my disk with the game?

They are repackaged to one JAR file and installed in local maven repository as org.gotti.wurmunlimited:common-client, correct?

I wonder if I can just do this myself from files that I already have on my machine.

ago1024 commented 7 years ago

Basicly yes but it's actually each jar as an individual package.

https://maven.apache.org/guides/mini/guide-3rd-party-jars-local.html

Those two commands should install the files. The version number is the current build id.

mvn install:install-file -Dfile= -DgroupId=org.gotti.wurmunlimited -DartifactId=common-client -Dversion=1370158 -Dpackaging=jar mvn install:install-file -Dfile= -DgroupId=org.gotti.wurmunlimited -DartifactId=client -Dversion=1370158 -Dpackaging=jar

marad commented 7 years ago

I'm browsing the source of steam-files. Looks like it just installs common.jar as client-common and client.jar as client artifacts in local repository.

I use Clojure and leiningen as a build tool so with localrepo plugin for lein this is quite simple:

lein localrepo install client.jar org.gotti.wurmunlimited/client 0.1
lein localrepo install common.jar org.gotti.wurmunlimited/common-client 0.1

This would install the files so that they can be used.

EDIT: yeah, that's basically the same what you've written :)

marad commented 7 years ago

It would be really helpfull to have some kind of manual for bootstraping a mod.

marad commented 7 years ago

Looks like this resolved my problems and created simple WU mod using your tools :)

marad commented 7 years ago

@ago1024 I've created this: https://github.com/marad/wurm-clojure-repl Thanks for the help!