It is currently 25 Apr 2024, 09:18
   
Text Size

Patches?

Post MTG Forge Related Programming Questions Here

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

Patches?

Postby abbcdfin » 05 Mar 2014, 20:59

Hello!

I have a few fixes in my local development branch, but I'm brand new to this forum and app in general. What's the best way to get a patch file to the developers? I'll attach it to this post for now.

I have two things, one is a fix for the fake SpellAbility that friarsol added in r25047. The fakeSA works great if you pay the cost, but if you cancel the payment for attacking it crashes. It seems the reason is the fakeSA doesn't have an activating player.


Code: Select all
fakeSA.setActivatingPlayer(c.getController());
The other is a fix for the OSX DMG builds with Java 7. With the maven build process I can now generate a DMG with the Forge.app and Java 7 runtime embedded. I've sent it to a few of my friends and it starts up fine for them and me as well. I had to modify the oracle appbundler source (GPL2) and create a new jar that is used to package the app (also attached).

EDIT: Looks like EmptySa is the way to go here which can take the player as a parameter. viewtopic.php?f=52&t=6333&start=2805#p147851
Attachments
appbundler.patch.txt
patch to appbundler
(2.16 KiB) Downloaded 177 times
fix_osx_build.patch.txt
diff from r25048
(8.06 KiB) Downloaded 190 times
appbundler-1.0-custom.jar.zip
custom app bundler
(128.93 KiB) Downloaded 177 times
User avatar
abbcdfin
 
Posts: 8
Joined: 04 Mar 2014, 06:46
Location: Mac OSX Mavericks
Has thanked: 0 time
Been thanked: 4 times

Re: Patches?

Postby Chris H. » 06 Mar 2014, 04:00

Hello abbcdfin,

I am the release dev and I have a couple scripts that I run that contain a Maven command for the daily snapshots and the beta build and deploys. Dave is our resident Maven expert and he built our current system. He is very busy with other things in his life and tends not to be very active in our project the last couple of years.

My knowledge base is fairly limited, I can run the scripts and figure out a few easy thing but that is my limits.

A few months ago we updated the project to require Java 7 and Dave and I noticed that the Mac OSX app builder created an app that would not launch under Java 7 on the Mac.

I have been with the project since 2008 and we have never included Java with the release archives and we require that the user base download and install Java on their own. Could you remove this inclusion and not have the Java 7 JRE/JDK embeded?

After the above is accomplished could you build the Mac OS archive and attach this archive to a message? I would like to test this out.

It would be nice if we could include a Mac OS X archive in the next beta release.
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Patches?

Postby abbcdfin » 06 Mar 2014, 04:31

Thanks for replying Chris.

Attached is a snapshot build without Java. It's about 38Mb, and with the JRE it's ~85Mb for reference.
Attachments
forge-gui-1.5.14-SNAPSHOT.dmg.zip
(35.87 MiB) Downloaded 227 times
User avatar
abbcdfin
 
Posts: 8
Joined: 04 Mar 2014, 06:46
Location: Mac OSX Mavericks
Has thanked: 0 time
Been thanked: 4 times

Re: Patches?

Postby Chris H. » 06 Mar 2014, 17:50

abbcdfin wrote:Thanks for replying Chris.

Attached is a snapshot build without Java. It's about 38Mb, and with the JRE it's ~85Mb for reference.
 
Your archive works for me. Thank you.

I will give you commit privileges and this will allow you to commit your changes/fixes. :)
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Patches?

Postby abbcdfin » 06 Mar 2014, 23:03

Thanks Chris!

One problem I was having was a failing test when I run the maven build:

Code: Select all
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running TestSuite
Configuring TestNG with: TestNG652Configurator
Tests run: 6, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.557 sec <<< FAILURE! - in TestSuite
guiProgressBarWindowTest1(forge.GuiProgressBarWindowTest)  Time elapsed: 0.026 sec  <<< FAILURE!
java.lang.ExceptionInInitializerError: null
   at forge.view.FDialog$BackdropPanel.<clinit>(FDialog.java:320)
   at forge.view.FDialog.<clinit>(FDialog.java:313)
   at forge.GuiProgressBarWindowTest.guiProgressBarWindowTest1(GuiProgressBarWindowTest.java:21)


Results :

Failed tests:
  GuiProgressBarWindowTest.guiProgressBarWindowTest1:21 » ExceptionInInitializer

Tests run: 6, Failures: 1, Errors: 0, Skipped: 0
Is anyone else getting this same problem or have seen it before? I tracked it down to the Skin colors not being initialized yet, so if I modify that test file and add FSkin.Colors.updateAll(); before it instantiates the GuiProgressBarWindow, then the test will pass. I don't know whether to include that change with my commit or not...
User avatar
abbcdfin
 
Posts: 8
Joined: 04 Mar 2014, 06:46
Location: Mac OSX Mavericks
Has thanked: 0 time
Been thanked: 4 times

Re: Patches?

Postby Chris H. » 06 Mar 2014, 23:15

abbcdfin wrote:Thanks Chris!

One problem I was having was a failing test when I run the maven build:

Code: Select all
-------------------------------------------------------
 T E S T S
-------------------------------------------------------
Running TestSuite
Configuring TestNG with: TestNG652Configurator
Tests run: 6, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 1.557 sec <<< FAILURE! - in TestSuite
guiProgressBarWindowTest1(forge.GuiProgressBarWindowTest)  Time elapsed: 0.026 sec  <<< FAILURE!
java.lang.ExceptionInInitializerError: null
   at forge.view.FDialog$BackdropPanel.<clinit>(FDialog.java:320)
   at forge.view.FDialog.<clinit>(FDialog.java:313)
   at forge.GuiProgressBarWindowTest.guiProgressBarWindowTest1(GuiProgressBarWindowTest.java:21)


Results :

Failed tests:
  GuiProgressBarWindowTest.guiProgressBarWindowTest1:21 » ExceptionInInitializer

Tests run: 6, Failures: 1, Errors: 0, Skipped: 0
Is anyone else getting this same problem or have seen it before? I tracked it down to the Skin colors not being initialized yet, so if I modify that test file and add FSkin.Colors.updateAll(); before it instantiates the GuiProgressBarWindow, then the test will pass. I don't know whether to include that change with my commit or not...
 
Something broke in the tests a few months ago. Dave was not able to find the time to fix the problem and he suggested that I add the following to my Maven goal:

Code: Select all
-DskipTests=true -Darguments="-DskipTests=true"
 
I think that you should include your test fix as I am looking forward to run the build and deploy goal without the above arguments. :)
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Patches?

Postby Chris H. » 07 Mar 2014, 18:09

I did a snapshot build and deploy and we now have a working Mac OS X archive for Mac users to try.

When I open the dmg file I see that the window does not include the picture or the file arrangement.

I will now try removing the skip tests portion of my Maven goal and see if this now works. :)
 
Attachments
Screen Shot.jpg
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Patches?

Postby Chris H. » 07 Mar 2014, 18:33

Chris H. wrote:I will now try removing the skip tests portion of my Maven goal and see if this now works. :)
 
 
It works correctly. :)
User avatar
Chris H.
Forge Moderator
 
Posts: 6320
Joined: 04 Nov 2008, 12:11
Location: Mac OS X Yosemite
Has thanked: 644 times
Been thanked: 643 times

Re: Patches?

Postby abbcdfin » 07 Mar 2014, 18:35

Great news!

Edit: I just downloaded your DMG you announced at the other thread and I see the background image and layout just fine. Excellent!
User avatar
abbcdfin
 
Posts: 8
Joined: 04 Mar 2014, 06:46
Location: Mac OSX Mavericks
Has thanked: 0 time
Been thanked: 4 times


Return to Developer's Corner

Who is online

Users browsing this forum: No registered users and 89 guests


Who is online

In total there are 89 users online :: 0 registered, 0 hidden and 89 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 89 guests

Login Form