Skip to content

Conversation

@teyrana
Copy link

@teyrana teyrana commented Feb 28, 2020

  • updated the jogl libraries to a newer version
  • convinced Intellij to actually package said libraries in our output jar.

Edit: rebased to the front of your branch :)

@neilbalch
Copy link
Owner

neilbalch commented Feb 28, 2020

Intellij doesn't automatically pull the com.jogamp.opengl package, and therefore doesn't know where to find them. How did you make Intellij load all of the dependencies?

@neilbalch
Copy link
Owner

neilbalch commented Feb 28, 2020

Ah, I had to do this: https://stackoverflow.com/a/1051705/3339274 with the swing/lib/jogl package/folder.

@neilbalch
Copy link
Owner

@teyrana We can merge this once you add the following lines to the bottom of the OpenRocket Swing.iml, OpenRocket Core.iml, and OpenRocket Test Libraries.iml files:

    <orderEntry type="library" name="jogl-all" level="project" />
    <orderEntry type="library" name="jogl" level="project" />

In context:

    <orderEntry type="module-library">
      <library>
        <CLASSES>
          <root url="jar://$MODULE_DIR$/../lib-test/uispec4j-2.3-jdk16.jar!/" />
        </CLASSES>
        <JAVADOC />
        <SOURCES />
      </library>
    </orderEntry>
    <orderEntry type="library" name="jogl-all" level="project" />
    <orderEntry type="library" name="jogl" level="project" />
  </component>
</module>

@teyrana
Copy link
Author

teyrana commented Feb 28, 2020

Intellij doesn't automatically pull the ....

Dangit, that's exactly what this was supposed to fix :(

How did you make Intellij load all of the dependencies?

I went to the build settings > artifact ,and added extracted versions if all the native libraries

Okay, I'll take another look at it.

@teyrana
Copy link
Author

teyrana commented Feb 29, 2020

@neilbalch
Hey, I double-checked this. it build fine on my machine. (heh. "works on my machine" is a trope for a reason.) Where are you running into, specificall?

The changes of interested are:

  • .idea/artifacts/openrocket_jar.xml -- tells Intellij to extract those jars into the output jar?
  • swing/lib/jogl/*.jar -- updates the new jogl jars themselves
  • swing/OpenRocket Swing.iml -- lists the directory with the jars, above.
  • the rest of the .java files are just switching over to the new namespace.

Specifically, I'm trying to fixed two things:

  1. Can we run Openrocket directly from Intellij?
  2. Can we generate a standalone jar?

Both work for me, on my windows machine; so if they're not working for you, it's probably something about the build system config files, I think?

@neilbalch
Copy link
Owner

@teyrana Maybe that's the case. Intellij didn't know where to find the jogl library .jar, so the fix for me was to add them as a library in the Intellij interface. I suggested changes which I think should make the patch I had to make permanent.

@teyrana
Copy link
Author

teyrana commented Feb 29, 2020

Sorry, I don't follow. I literally can't reproduce the the issue. Can you elaborate?
Are you referring to this PR, or prior to this?
What OS & JDK are you running?

( if one can't reproduce a problem, one can't validate the corresponding fix... )

@neilbalch
Copy link
Owner

neilbalch commented Mar 1, 2020

What I'm trying to say is that I think my problem would be resolved by you submitting an addendum to this patch following my recommendations earlier.

I'm pretty sure I'm running a similar system setup to you, Windows 10 with Intellij set to the latest official Java JDK 13 release. (i.e. not OpenJDK)

Looking back at our correspondence, I don't think I explained why I believe my recommendation to be an appropriate fix. I think that when you initially added the jogl library to Intellij a few days ago Intellij didn't properly record it into its own xml config files. The xml patch I suggest is what Intellij changed when I re-added the jogl library to the project in the Intellij interface.

@teyrana
Copy link
Author

teyrana commented Mar 2, 2020

You know, it sounds both a lot easier, and less error-prone if you just push the changes you're talking about to the parent branch directly. There are a couple ways to do that, off the top of my head . . .

  1. You could merge this PR ([fix] Restores 3d Views to PR #556 -- Java 11 upgrade #3), and then push your changes on top
  2. you could push your changes, and then I can rebase this PR on top of them
  3. we could move all of this to the openrocket repo itself?

What would get us moving forward ?

p.s. Here's the jarfile that my branch builds Does it at least run for you?

@neilbalch
Copy link
Owner

Sorry for the delayed response, I've had a lot on my plate recently. Your build works perfectly fine, I have no doubt that the patch works, it's just the Intellij Idea configuration to build it that's dysfunctional.

I think I'll merge and push my changes on top, thanks for the recommendation.

@neilbalch neilbalch merged commit c0203b9 into neilbalch:java11-upgrade Mar 3, 2020
@teyrana
Copy link
Author

teyrana commented Mar 3, 2020

Yea, I think our intellij setups vary somehow. But it sounds like we both have more interesting things to do, for now.

@teyrana
Copy link
Author

teyrana commented Mar 3, 2020

@neilbalch
Hey, I'm thinking we can just merge this parent PR into OR. Any objections?

@teyrana teyrana deleted the fix_java11_3d branch March 22, 2020 00:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants