Oolite Bulletins

For information and discussion about Oolite.
It is currently Fri Nov 24, 2017 8:24 pm

All times are UTC




Post new topic  Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Fri Jan 06, 2017 7:41 am 
Offline
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral

Joined: Wed Feb 28, 2007 7:54 am
Posts: 5018
Split from Screenshots thread

OK, thanks for testing. Note that the current 1.85 nightlies do not have PR #153 applied and one of the reasons is that we did not have enough information about what happens at extreme distances. If the 10Mkm disappearance gets sorted out and it does look better, then we could consider bringing #153 into the master branch.

If you feel like experimenting with the distance clear value, try changing the #define MAX_CLEAR_DEPTH 10000000000.0 in MyOpenGLView.h to a much higher value and see how it behaves.

For now, I have updated the comments in the PR on github with your results. Thanks again for your help.


Top
   
 Post subject: Re: Screenshots
PostPosted: Sat Jan 07, 2017 12:35 am 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Fri Mar 30, 2007 8:32 am
Posts: 1474
Location: Witchspace
Quote:
OK, thanks for testing. Note that the current 1.85 nightlies do not have PR #153 applied and one of the reasons is that we did not have enough information about what happens at extreme distances. If the 10Mkm disappearance gets sorted out and it does look better, then we could consider bringing #153 into the master branch.

If you feel like experimenting with the distance clear value, try changing the #define MAX_CLEAR_DEPTH 10000000000.0 in MyOpenGLView.h to a much higher value and see how it behaves.

NP:
For now, I have updated the comments in the PR on github with your results. Thanks again for your help.
Well I tried, but i cant make sense of git. making a local patch procedure is extremely annoying steep learning curve and the help files is not helping. I tried branching etc. but always some box comes up with something about a message and i'm stuck there. allways end up pressing the X (close button)

_________________
Bounty Scanner
Number 935


Top
   
PostPosted: Sat Jan 07, 2017 4:15 am 
Offline
Deadly
Deadly

Joined: Sat Aug 09, 2014 4:16 pm
Posts: 169
Quote:
Well I tried, but i cant make sense of git. making a local patch procedure is extremely annoying steep learning curve and the help files is not helping.
Being in the "Screenshots" thread [sic] I was trying to screenshot the (simple) procedure to apply a patch against a pulled git source tree (using the nice dev environment a_c released). Unfortunately this is what the last step returned:
Code:
$ patch -p1 <../153/153.diff
patching file src/Cocoa/MyOpenGLView.h
Hunk #1 FAILED at 30.
1 out of 1 hunk FAILED -- saving rejects to file src/Cocoa/MyOpenGLView.h.rej
patching file src/Core/Entities/Entity.h
Hunk #1 FAILED at 150.
Hunk #2 FAILED at 275.
2 out of 2 hunks FAILED -- saving rejects to file src/Core/Entities/Entity.h.rej

patching file src/Core/Entities/Entity.m
Hunk #1 FAILED at 94.
Hunk #2 FAILED at 1048.
2 out of 2 hunks FAILED -- saving rejects to file src/Core/Entities/Entity.m.rej

patching file src/Core/Universe.h
Hunk #1 FAILED at 309.
1 out of 1 hunk FAILED -- saving rejects to file src/Core/Universe.h.rej
patching file src/Core/Universe.m
Hunk #1 FAILED at 382.
Hunk #2 FAILED at 4398.
Hunk #3 FAILED at 4489.
Hunk #4 FAILED at 4512.
Hunk #5 FAILED at 4531.
Hunk #6 FAILED at 4581.
Hunk #7 FAILED at 4632.
7 out of 7 hunks FAILED -- saving rejects to file src/Core/Universe.m.rej
patching file src/SDL/MyOpenGLView.h
Hunk #1 FAILED at 41.
1 out of 1 hunk FAILED -- saving rejects to file src/SDL/MyOpenGLView.h.rej
Is it a branch the "153.diff" should be applied to?*

*I've actually did a "pull" and "submodule update" beforehand ...


Top
   
PostPosted: Sat Jan 07, 2017 9:52 am 
Offline
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral

Joined: Wed Feb 28, 2007 7:54 am
Posts: 5018
Applying the patch should be straightforward, but I have unfortunately just confirmed the problem described by Commander_X. The patch utility that the development environment runs is an old version which seems to have problems with applying github formatted patches on Windows. Thankfully, the solution is very easy: Use a newer patch utility, and more specifically, the one that comes with the version of git distributed with the dev environment.

To fix the patch issue:
1. Go to <DevEnvInstallPath>/Msys_x2/1.0/bin, find the files patch.exe and patch.exe.manifest and rename them.
2. Go to <DevEnvInstallPath>/git/bin, find the files with the same name as above and right-click->Copy,
3. Return to <DevEnvInstallPath>/Msys_x2/1.0/bin, right-click->Paste. You now have the newer patch.exe version at the right location.

How to apply a patch (let's use pr153.diff as example):
Normally a pull request patch should be directly applicable to the master branch, unless the PR is too old and things on master have changed a lot compared to the time the PR was created. In any case, we will normally not make you patch incompatible branches, so #153 can be safely merged with current 1.85 master.

1. Go to https://github.com/OoliteProject/oolite/pull/153.diff select everything with Ctrl+A, copy to clipboard and paste in a new file in your text editor; let's call it pr153.diff. Save the file at the top level of your Oolite checkout, i.e. the folder that has src, Docs, Resources etc. directly below it. -- Bonus Tip: You can obtain the patch diff for any pull request or specific revision in github, by navigating to the appropriate github page and adding .diff at the end of the link appearing on yout browser's url box.

2. Using the dev environment shell, go to <OoliteSourcePath>. You will need to be at the top level folder of your Oolte checkout in order for the patch to be able to find the paths of the files it works with.

3. Execute patch -p1 < pr153.diff. If you are using the new version of patch.exe, it should be able to execute without errors.

Hopefully this helps. If you feel it's too much work or too much hassle to go through, don't worry, I fully agree with you :-).


Top
   
PostPosted: Sat Jan 07, 2017 10:38 am 
Offline
Commodore
Commodore
User avatar

Joined: Thu Nov 07, 2013 10:21 pm
Posts: 281
If you're struggling with patches, here's an alternative. Assuming the remote name of the Oolite repo is 'origin' (it is unless you're using your own fork), run the command
Code:
git checkout origin/master
and then
Code:
git merge origin/two_pass_planet_slice
You may be taken into a text editor to record a commit message - if so you can just quit the editor to use the default one. Then you can build as normal.

The branch you created when checking out master will be in a "detached head" state, which means it's a temporary branch which will be lost if you check out another one. To save it for future work, run
Code:
git checkout -b name_of_branch


Top
   
PostPosted: Sat Jan 07, 2017 9:54 pm 
Offline
Deadly
Deadly

Joined: Sat Aug 09, 2014 4:16 pm
Posts: 169
*sighs*

... or I could had used the patch utility from my Cygwin distro. I wasn't sure though if it wasn't due to a branch specific need, that's why I posted. Oh well!


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 10 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
cron
Powered by phpBB® Forum Software © phpBB Limited