It is currently 26 Apr 2024, 22:17
   
Text Size

Forge compilation and execution

Post MTG Forge Related Programming Questions Here

Moderators: timmermac, Blacksmith, KrazyTheFox, Agetian, friarsol, CCGHQ Admins

Forge compilation and execution

Postby sky81 » 03 Nov 2022, 10:43

Hello,

First I want to congratulate you for this great project. I like it very much.

I'm trying to compile and run the entire forge project on my local PC without git account. I just want to make some changes locally and see if they work.
So far I made this steps:
1. Install Intellij
2. I took the code from here:
https://github.com/Card-Forge/forge
Get the zip and extracted to some folder
3. Rebuild the entire project. No errors. Everything is ok

How, I don't see any exe file. When I try to run from Intallij, is not working.

What am I missing?

Thank you for your help
George
sky81
 
Posts: 18
Joined: 29 Jan 2021, 18:09
Has thanked: 0 time
Been thanked: 0 time

Re: Forge compilation and execution

Postby BlueTemplar » 03 Nov 2022, 11:02

I am guessing they do that as a separate step ?

Java programs are typically run as .jar
(especially since .exe is a Windows-only thing, while Java is multi-platform even after compilation)
doesn't running the .jar that should result not working for you ?
User avatar
BlueTemplar
 
Posts: 169
Joined: 04 Feb 2012, 22:47
Has thanked: 86 times
Been thanked: 11 times

Re: Forge compilation and execution

Postby sky81 » 03 Nov 2022, 12:28

I've try the jar files but with no luck
Try this one also: forge-master\forge-gui-desktop\src\main\config\appbundler-1.0-custom.jar but nothing happens
Error is this one: no main manifest attribute, in c:\forge-master\forge-gui-desktop\src\main\config\appbundler-1.0-custom.jar file

P.S. I have install: Intellij IDEA 2022.2.3
Click Open and navigate to folder where I extracted the zip file from this page
https://github.com/Card-Forge/forge
sky81
 
Posts: 18
Joined: 29 Jan 2021, 18:09
Has thanked: 0 time
Been thanked: 0 time

Re: Forge compilation and execution

Postby sky81 » 07 Nov 2022, 09:56

I've install Intellij and maven like described. They are working.
I download the Forge project as zip and unziped in a folder
Then I follow these instructions:
https://github.com/Card-Forge/forge/wiki/IntelliJ-setup
But at the end when I try to run/debug project I get this error:
Connected to the target VM, address: '127.0.0.1:49870', transport: 'socket'
Unknown mode.
Known mode is 'sim', 'parse'
Disconnected from the target VM, address: '127.0.0.1:49870', transport: 'socket'

Process finished with exit code 0

Does anyone knows what is the problem?
I cannot figure it out how to run the project

Any help is appreciated
Thanks
sky81
 
Posts: 18
Joined: 29 Jan 2021, 18:09
Has thanked: 0 time
Been thanked: 0 time

Re: Forge compilation and execution

Postby sky81 » 07 Nov 2022, 11:53

I manage to run/debug by deleting the VM options:
"-Xms768m -XX:+UseParallelGC -Dsun.java2d.xrender=false --add-opens java.base/java.util=ALL-UNNAMED --add-opens java.base/java.lang=ALL-UNNAMED --add-opens java.base/java.lang.reflect=ALL-UNNAMED --add-opens java.base/java.text=ALL-UNNAMED --add-opens java.desktop/java.awt.font=ALL-UNNAMED --add-opens java.base/jdk.internal.misc=ALL-UNNAMED --add-opens java.base/sun.nio.ch=ALL-UNNAMED --add-opens java.base/java.nio=ALL-UNNAMED -Dio.netty.tryReflectionSetAccessible=true"

But I get some warnings but eventually it opens. Some where in the arguments above it is an error:
om.thoughtworks.xstream.converters.ConversionException: No converter available
---- Debugging information ----
message : No converter available
type : java.util.EnumMap
converter : com.thoughtworks.xstream.converters.enums.EnumMapConverter
message[1] : Could not initialize class com.thoughtworks.xstream.converters.enums.EnumMapConverter$Reflections
converter[1] : com.thoughtworks.xstream.converters.reflection.SerializableConverter
message[2] : Unable to make private void java.util.EnumMap.readObject(java.io.ObjectInputStream) throws java.io.IOException,java.lang.ClassNotFoundException accessible: module java.base does not "opens java.util" to unnamed module @7a79be86
converter[2] : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
message[3] : Unable to make field transient java.util.Set java.util.AbstractMap.keySet accessible: module java.base does not "opens java.util" to unnamed module @7a79be86
class : forge.deck.Deck
required-type : forge.deck.Deck
converter-type : com.thoughtworks.xstream.converters.reflection.ReflectionConverter
path : /forge.gauntlet.GauntletData/userDeck/parts
line number : 29
class[1] : forge.gamemodes.gauntlet.GauntletData
required-type[1] : forge.gamemodes.gauntlet.GauntletData
version : not available

Anyway, does someone knows hoe to open in debug the AdventureMode?
I've try setting path to forge-adventure folder but it opens some editor and not the screen where I can choose AdventureMode

Thanks
sky81
 
Posts: 18
Joined: 29 Jan 2021, 18:09
Has thanked: 0 time
Been thanked: 0 time


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 84 guests


Who is online

In total there are 84 users online :: 0 registered, 0 hidden and 84 guests (based on users active over the past 10 minutes)
Most users ever online was 4143 on 23 Jan 2024, 08:21

Users browsing this forum: No registered users and 84 guests

Login Form