lionheart-remake icon indicating copy to clipboard operation
lionheart-remake copied to clipboard

Improve project build and run

Open Ygarr opened this issue 1 year ago • 4 comments

Tasks

  • [ ] Deploy new releases and snapshots on maven central
  • [ ] Allow to run simply with java -jar lionheart-pc.jar
  • [ ] Working both with lionheart-assets.jar and extracted resources

Initial comment

cloning cd lionheart-pc mvn install got:

Downloading from jitpack.io: https://jitpack.io/com/b3dgs/lionheart/lionheart-game/1.3.0-SNAPSHOT/lionheart-game-1.3.0-SNAPSHOT.jar
Downloading from jitpack.io: https://jitpack.io/com/b3dgs/lionheart/lionheart-assets/1.3.0-SNAPSHOT/lionheart-assets-1.3.0-SNAPSHOT.jar
Downloading from snapshots: https://oss.sonatype.org/content/repositories/snapshots/com/b3dgs/lionheart/lionheart-game/1.3.0-SNAPSHOT/lionheart-game-1.3.0-SNAPSHOT.jar
Downloading from snapshots: https://oss.sonatype.org/content/repositories/snapshots/com/b3dgs/lionheart/lionheart-assets/1.3.0-SNAPSHOT/lionheart-assets-1.3.0-SNAPSHOT.jar
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  24.174 s
[INFO] Finished at: 2022-09-17T10:44:36+03:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project lionheart-pc: Could not resolve dependencies for project com.b3dgs.lionheart:lionheart-pc:jar:1.3.0-SNAPSHOT: The following artifacts could not be resolved: com.b3dgs.lionheart:lionheart-game:jar:1.3.0-SNAPSHOT, com.b3dgs.lionheart:lionheart-assets:jar:1.3.0-SNAPSHOT: Could not find artifact com.b3dgs.lionheart:lionheart-game:jar:1.3.0-SNAPSHOT in jitpack.io (https://jitpack.io) -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

Ygarr avatar Sep 17 '22 07:09 Ygarr

This is because there is no snapshot build on repository. Clone parent, assets and game to build pc. I will try to deploy snapshots on next commits.

DjThunder avatar Sep 17 '22 10:09 DjThunder

Ive made mvn install` for above mentioned folder and now have success build. Thanks! P.S. Test passing looks mad)

  • Then copied lieonheart-assets.jar to target folder to run the game
  • after pushing "play" at options window got this: Exception in thread "AWT-EventQueue-0" java.nio.file.InvalidPathException: Illegal char <:> at index 4: file:\C:\Users\user\SHARE\GAMES\lionheart-remake\lionheart-pc\target\lionheart-pc-1.3.0-SNAPSHOT.jar!\com\b3dgs\lionheart\lionheart.properties

Hope your commits help...

Ygarr avatar Sep 18 '22 08:09 Ygarr

Ah yes, current run is a little bit manual.

Here the following tree:

  • dist/
    • lionheart-pc.jar
    • data/assets/ (extract lionheart-assets.jar here, without com/b3dgs/lionheart

run from data/ java -jar ../lionheart-pc.jar

I will also make it more flexible next time with resources auto detection.

DjThunder avatar Sep 18 '22 11:09 DjThunder

Thanks, got it running! But some new bugs and one old bug(water glitch) are present though.

Ygarr avatar Sep 19 '22 07:09 Ygarr