Jump to content

Recommended Posts

Posted

Sorry to be a bother, but I've not worked in the Java ecosystem in a very long time and I'm struggling to get the project to build after downloading it from github.

 

I see the dependencies block in build2.gradle.full, but I'm not sure how to go about installing those. It sounds like I should let gradle manage this, but I'm not sure how to trigger that; the Gradle Tasks tab shows only "Click the Refresh Tasks button to get the structure and tasks for the project", but doing so seems to do nothing (because eclipse doesn't know where to find the needed dependencies?)

 

Should I be using the "Buildship Gradle Integration 3.0" plugin available through the Eclipse marketplace, or am I better off with a stand-alone gradle installation (https://gradle.org/install/#manually)? In the later case, do you just use it from the terminal?

 

Also, would you recommend that I start by building at head, or would one of the older commits (maybe the 15.1.1 commit) be better?

 

 

PatrickAWlson
Posted

You are correct in letting gradle manage it.  I use gradle command line. 

  • Get a unix shell
  • cd to the directory with build.gradle and type:
  • ./gradlew build

If you have the test clause in  build.gradle the build will probably fail.  Remove it if you just want to generate the executable.

 

Explanation of test failures:

The full test suite almost never passes.  There is conflict when they multithread and some are running BoS and others are running FC.  I have spent many hours rewriting code to minimize the conflict but have never been 100% successful.  I run them, rerun the failed ones a couple of times to see that they pass standalone, then remove the test clause to build.  The failures are not ever seen by users because users cannot run both BoS and FC at the same time in the  same JVM the way that JUnit does.

 

One day I will figure out how to set up test suites that run in the scope of different JVMs, but at the moment I am not aware that it is possible.

  • Like 1
Posted

Thanks! I'll give this another try when I'm back home on Monday.

  • 5 months later...
Corralandy120000
Posted (edited)
On 2/17/2024 at 7:05 PM, Charon said:

Thanks! I'll give this another try when I'm back home on Monday.

Hey! Did u manage to compile pwcg from scratch? I'm trying to do this as well, but i got some unexisting packages error during the compiling... Can you please write me guide if u were successful? Many thanks 😉

Here´s the log: 

 

C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2>gradle build

> Task :compileJava
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\intel\CampaignIntelligenceReportScreen.java:9: error: package edu.cmu.relativelayout does not exist
import edu.cmu.relativelayout.Binding;
                             ^
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\intel\CampaignIntelligenceReportScreen.java:10: error: package edu.cmu.relativelayout does not exist
import edu.cmu.relativelayout.BindingFactory;
                             ^
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\intel\CampaignIntelligenceReportScreen.java:11: error: package edu.cmu.relativelayout does not exist
import edu.cmu.relativelayout.RelativeConstraints;
                             ^
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\intel\CampaignIntelligenceReportScreen.java:12: error: package edu.cmu.relativelayout does not exist
import edu.cmu.relativelayout.RelativeLayout;
                             ^
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\personnel\CampaignReferencePilotSelectorScreen.java:15: error: package edu.cmu.relativelayout does not exist
import edu.cmu.relativelayout.Binding;
                             ^
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\personnel\CampaignReferencePilotSelectorScreen.java:16: error: package edu.cmu.relativelayout does not exist
import edu.cmu.relativelayout.BindingFactory;
                             ^
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\personnel\CampaignReferencePilotSelectorScreen.java:17: error: package edu.cmu.relativelayout does not exist
import edu.cmu.relativelayout.RelativeConstraints;
                             ^
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\personnel\CampaignReferencePilotSelectorScreen.java:18: error: package edu.cmu.relativelayout does not exist
import edu.cmu.relativelayout.RelativeLayout;
                             ^
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\personnel\CampaignSkinConfigurationScreen.java:12: error: package edu.cmu.relativelayout does not exist
import edu.cmu.relativelayout.Binding;
                             ^
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\personnel\CampaignSkinConfigurationScreen.java:13: error: package edu.cmu.relativelayout does not exist
import edu.cmu.relativelayout.BindingFactory;
                             ^
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\personnel\CampaignSkinConfigurationScreen.java:14: error: package edu.cmu.relativelayout does not exist
import edu.cmu.relativelayout.RelativeConstraints;
                             ^
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\personnel\CampaignSkinConfigurationScreen.java:15: error: package edu.cmu.relativelayout does not exist
import edu.cmu.relativelayout.RelativeLayout;
                             ^
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\intel\CampaignIntelligenceReportScreen.java:35: error: cannot find symbol
        this.setLayout(new RelativeLayout());
                           ^
  symbol:   class RelativeLayout
  location: class CampaignIntelligenceReportScreen
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\intel\CampaignIntelligenceReportScreen.java:59: error: cannot find symbol
        Binding navPanelBinding = BindingFactory.getBindingFactory().directLeftEdge();
        ^
  symbol:   class Binding
  location: class CampaignIntelligenceReportScreen
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\intel\CampaignIntelligenceReportScreen.java:59: error: cannot find symbol
        Binding navPanelBinding = BindingFactory.getBindingFactory().directLeftEdge();
                                  ^
  symbol:   variable BindingFactory
  location: class CampaignIntelligenceReportScreen
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\intel\CampaignIntelligenceReportScreen.java:60: error: cannot find symbol
        RelativeConstraints navPanelConstraints = new RelativeConstraints();
        ^
  symbol:   class RelativeConstraints
  location: class CampaignIntelligenceReportScreen
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\intel\CampaignIntelligenceReportScreen.java:60: error: cannot find symbol
        RelativeConstraints navPanelConstraints = new RelativeConstraints();
                                                      ^
  symbol:   class RelativeConstraints
  location: class CampaignIntelligenceReportScreen
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\intel\CampaignIntelligenceReportScreen.java:64: error: cannot find symbol
        Binding centerPanelBinding = BindingFactory.getBindingFactory().directlyRightOf(navPanel);
        ^
  symbol:   class Binding
  location: class CampaignIntelligenceReportScreen
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\intel\CampaignIntelligenceReportScreen.java:64: error: cannot find symbol
        Binding centerPanelBinding = BindingFactory.getBindingFactory().directlyRightOf(navPanel);
                                     ^
  symbol:   variable BindingFactory
  location: class CampaignIntelligenceReportScreen
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\intel\CampaignIntelligenceReportScreen.java:65: error: cannot find symbol
        RelativeConstraints centerPanelConstraints = new RelativeConstraints();
        ^
  symbol:   class RelativeConstraints
  location: class CampaignIntelligenceReportScreen
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\intel\CampaignIntelligenceReportScreen.java:65: error: cannot find symbol
        RelativeConstraints centerPanelConstraints = new RelativeConstraints();
                                                         ^
  symbol:   class RelativeConstraints
  location: class CampaignIntelligenceReportScreen
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\personnel\CampaignReferencePilotSelectorScreen.java:48: error: cannot find symbol
        this.setLayout(new RelativeLayout());
                           ^
  symbol:   class RelativeLayout
  location: class CampaignReferencePilotSelectorScreen
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\personnel\CampaignReferencePilotSelectorScreen.java:61: error: cannot find symbol
            Binding navPanelBinding = BindingFactory.getBindingFactory().directLeftEdge();
            ^
  symbol:   class Binding
  location: class CampaignReferencePilotSelectorScreen
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\personnel\CampaignReferencePilotSelectorScreen.java:61: error: cannot find symbol
            Binding navPanelBinding = BindingFactory.getBindingFactory().directLeftEdge();
                                      ^
  symbol:   variable BindingFactory
  location: class CampaignReferencePilotSelectorScreen
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\personnel\CampaignReferencePilotSelectorScreen.java:62: error: cannot find symbol
            RelativeConstraints navPanelConstraints = new RelativeConstraints();
            ^
  symbol:   class RelativeConstraints
  location: class CampaignReferencePilotSelectorScreen
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\personnel\CampaignReferencePilotSelectorScreen.java:62: error: cannot find symbol
            RelativeConstraints navPanelConstraints = new RelativeConstraints();
                                                          ^
  symbol:   class RelativeConstraints
  location: class CampaignReferencePilotSelectorScreen
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\personnel\CampaignReferencePilotSelectorScreen.java:67: error: cannot find symbol
            Binding centerPanelBinding = BindingFactory.getBindingFactory().directlyRightOf(navPanel);
            ^
  symbol:   class Binding
  location: class CampaignReferencePilotSelectorScreen
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\personnel\CampaignReferencePilotSelectorScreen.java:67: error: cannot find symbol
            Binding centerPanelBinding = BindingFactory.getBindingFactory().directlyRightOf(navPanel);
                                         ^
  symbol:   variable BindingFactory
  location: class CampaignReferencePilotSelectorScreen
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\personnel\CampaignReferencePilotSelectorScreen.java:68: error: cannot find symbol
            RelativeConstraints centerPanelConstraints = new RelativeConstraints();
            ^
  symbol:   class RelativeConstraints
  location: class CampaignReferencePilotSelectorScreen
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\personnel\CampaignReferencePilotSelectorScreen.java:68: error: cannot find symbol
            RelativeConstraints centerPanelConstraints = new RelativeConstraints();
                                                             ^
  symbol:   class RelativeConstraints
  location: class CampaignReferencePilotSelectorScreen
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\personnel\CampaignSkinConfigurationScreen.java:49: error: cannot find symbol
        this.setLayout(new RelativeLayout());
                           ^
  symbol:   class RelativeLayout
  location: class CampaignSkinConfigurationScreen
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\personnel\CampaignSkinConfigurationScreen.java:71: error: cannot find symbol
        Binding navPanelBinding = BindingFactory.getBindingFactory().directLeftEdge();
        ^
  symbol:   class Binding
  location: class CampaignSkinConfigurationScreen
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\personnel\CampaignSkinConfigurationScreen.java:71: error: cannot find symbol
        Binding navPanelBinding = BindingFactory.getBindingFactory().directLeftEdge();
                                  ^
  symbol:   variable BindingFactory
  location: class CampaignSkinConfigurationScreen
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\personnel\CampaignSkinConfigurationScreen.java:72: error: cannot find symbol
        RelativeConstraints navPanelConstraints = new RelativeConstraints();
        ^
  symbol:   class RelativeConstraints
  location: class CampaignSkinConfigurationScreen
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\personnel\CampaignSkinConfigurationScreen.java:72: error: cannot find symbol
        RelativeConstraints navPanelConstraints = new RelativeConstraints();
                                                      ^
  symbol:   class RelativeConstraints
  location: class CampaignSkinConfigurationScreen
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\personnel\CampaignSkinConfigurationScreen.java:76: error: cannot find symbol
        Binding centerPanelBinding = BindingFactory.getBindingFactory().directlyRightOf(navPanel);
        ^
  symbol:   class Binding
  location: class CampaignSkinConfigurationScreen
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\personnel\CampaignSkinConfigurationScreen.java:76: error: cannot find symbol
        Binding centerPanelBinding = BindingFactory.getBindingFactory().directlyRightOf(navPanel);
                                     ^
  symbol:   variable BindingFactory
  location: class CampaignSkinConfigurationScreen
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\personnel\CampaignSkinConfigurationScreen.java:77: error: cannot find symbol
        RelativeConstraints centerPanelConstraints = new RelativeConstraints();
        ^
  symbol:   class RelativeConstraints
  location: class CampaignSkinConfigurationScreen
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\personnel\CampaignSkinConfigurationScreen.java:77: error: cannot find symbol
        RelativeConstraints centerPanelConstraints = new RelativeConstraints();
                                                         ^
  symbol:   class RelativeConstraints
  location: class CampaignSkinConfigurationScreen
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\personnel\CampaignSkinConfigurationScreen.java:81: error: cannot find symbol
        Binding skinListPanelBinding = BindingFactory.getBindingFactory().directlyRightOf(skinControlPanel);
        ^
  symbol:   class Binding
  location: class CampaignSkinConfigurationScreen
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\personnel\CampaignSkinConfigurationScreen.java:81: error: cannot find symbol
        Binding skinListPanelBinding = BindingFactory.getBindingFactory().directlyRightOf(skinControlPanel);
                                       ^
  symbol:   variable BindingFactory
  location: class CampaignSkinConfigurationScreen
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\personnel\CampaignSkinConfigurationScreen.java:82: error: cannot find symbol
        RelativeConstraints skinListPanelConstraints = new RelativeConstraints();
        ^
  symbol:   class RelativeConstraints
  location: class CampaignSkinConfigurationScreen
C:\Users\Andy\eclipse-workspace\PWCG EDIT2\PWCG EDIT2\src\main\java\pwcg\gui\campaign\personnel\CampaignSkinConfigurationScreen.java:82: error: cannot find symbol
        RelativeConstraints skinListPanelConstraints = new RelativeConstraints();
                                                           ^
  symbol:   class RelativeConstraints
  location: class CampaignSkinConfigurationScreen
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
43 errors

> Task :compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileJava'.
> Compilation failed; see the compiler error output for details.

* Try:
> Run with --info option to get more log output.
> Run with --scan to get full insights.

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.10/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 3s
1 actionable task: 1 executed

 

Edited by Corralandy120000
Corralandy120000
Posted (edited)

Ok, so it looks like I´m missing edu.cmu.relativelayout librabry. Any ideas where I can get it? I´m not able to find it via Google.

 

@PatrickAWlson Mr. Wilson do you have this librabry please? Are u willing to share it with me? Maybe can u share some other libraries the PWCG uses too? Thanks in advance 🙂

 

 

Edited by Corralandy120000
Corralandy120000
Posted (edited)

@PatrickAWlson So I tried it. It looks like now I have all the dependencies and libraries but I´m missing xml file for Launch4j (:/PWCG/Deploy/Launch4JConfigs/BosLaunchConfig.xml) Can you please share this xml? Thanks in adwance 🙂 Maybe there are more files in this directory  needed to succecsfully build PWCG?

 

Anyway, I also had to download mockito-junit-jupiter-5.12.0 and junit-jupiter-api-5.11.0. In gradle.build these packs are defined as version 3.12.2. Shoudl i use this exact version? Can the newer ones I downloaded cause problems? Thanks for more information. 

Edited by Corralandy120000
Corralandy120000
Posted

I guess in Deploy directory should be also the file PWCGBoS (this line in gradle. build refers to it I guess

D:/PWCG/Deploy/PWCGBoS). How can I find this files? Is it some root folder? Can I find it on your GitHub or can you please send it to me? 

 

I tried to write som xmls meantime I it looks like I have buit exe files (they don´t run though) and there are no other files in exe build directory. I guess build folder in deploy directory should looks like the one you can download from your site I guess? I´m also getting this error with zip while building, I guess it´s because of missing files in deploy directory. 

 

I´d like to thank you one more time for your much appreciated help  and patience with me 😊

 


> Task :buildBoS
launch4j: Compiling resources
launch4j: Linking
launch4j: Wrapping
WARNING: Sign the executable to minimize antivirus false positives or use launching instead of wrapping.
launch4j: Successfully created D:\PWCG\Deploy\PWCG.exe

> Task :zipBoS FAILED
The system cannot find the path specified.

> Task :buildFC
launch4j: Compiling resources
launch4j: Linking
launch4j: Wrapping
WARNING: Sign the executable to minimize antivirus false positives or use launching instead of wrapping.
launch4j: Successfully created D:\PWCG\Deploy\PWCGFC.exe

> Task :zipFC FAILED
The system cannot find the path specified.

FAILURE: Build completed with 2 failures.

1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':zipBoS'.
> Process 'command 'cmd'' finished with non-zero exit value 1

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
==============================================================================

2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':zipFC'.
> Process 'command 'cmd'' finished with non-zero exit value 1

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
==============================================================================

Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/8.5/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD FAILED in 2s
13 actionable tasks: 6 executed, 7 up-to-date
<-------------> 0% WAITING
> IDLE

 

PatrickAWlson
Posted

That is the deploy directory that artifacts are written to.  It is not a source of inputs.  You can change it to whatever you like.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...