Development Blah: Comments

All other topics around Descent and D2X-XL

Moderators: Frustikus, simX, Aus-RED-5

Sirius
Posts: 1990
Joined: Tue Sep 25, 2007 10:29 pm
Location: Bellevue, WA
Contact:

Re: Development Blah: Comments

Postby Sirius » Thu Jun 12, 2014 4:37 pm

Eclipse used to be a pretty good IDE back when I used it, although I think that was pretty much entirely for Java as part of a computer science degree... and it was also 7-8 years ago. It was a little slow but I figured that was the price you paid for all the auto-complete stuff.
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Re: Development Blah: Comments

Postby karx11erx » Thu Jun 12, 2014 5:49 pm

It is slow because it is written in Java - jit compiler or not.

steel,

100% agreement on sudo handling. I using Eclipse not just for debugging, but for editing my source code. code::blocks looks interesting, but I would need to learn yet another IDE - and I have no clue of your cmake project.
steel01
Posts: 89
Joined: Mon Jun 02, 2014 11:44 am

Re: Development Blah: Comments

Postby steel01 » Thu Jun 12, 2014 6:24 pm

I wouldn't think editing files in code blocks would be any different than any other editor. Go to declaration or implementation is on the right click menu, etc. But yeah, it's said the best tool is the one you know. Personally, I haven't got there yet. I like poking at new stuff.

Setting up cmake for a test run should be fairly simple if you ever want to try. Apply the patch, run cmake, open the project.

Code: Select all

cd $d2x-xl-dir
patch -p0 < /path/to/name.patch
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=Debug -G "CodeBlocks - Unix Makefiles" ..

Then open the CBP in code blocks. To generate normal make files, leave off the -G param, then run make. Release is the other valid build type. The other cmake build types won't have the preprocessor defines the code expects.

Steel01
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Re: Development Blah: Comments

Postby karx11erx » Thu Jun 12, 2014 8:32 pm

I have understood now that code::blocks is a full blown IDE, not just a debugger. Looks very interesting. I will try it as soon as I find time.

What exactly does your patch do? If any files that are or should be in the source repo are affected, I would like to add/update these after patching.
steel01
Posts: 89
Joined: Mon Jun 02, 2014 11:44 am

Re: Development Blah: Comments

Postby steel01 » Thu Jun 12, 2014 8:47 pm

The patch adds the CMakeLists.txt file that cmake uses for to define everything. It also modifies audio.h and #ifdefs out the conf.h reference there like every other reference has. Very simple. But like I said in the SF request, the followup cleanup will be somewhat more work.

Steel01
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Re: Development Blah: Comments

Postby karx11erx » Thu Jun 12, 2014 9:28 pm

Do you have an idea why d2x-xl cannot create subfolders in /var/cache/d2x-xl on my system despite /var/cache/d2x-xl having access rights "drwxrw-rw-"?

Edit:

Darn umask ... couldn't create folders in ~/.d2x-xl either. Now I can there, but still not in /var/cache/d2x-xl. :think:

Edit 2:

I know why everything is so dark. Change the brightness setting in the render options to "standard", and there will be light. ;)
steel01
Posts: 89
Joined: Mon Jun 02, 2014 11:44 am

Re: Development Blah: Comments

Postby steel01 » Fri Jun 13, 2014 12:48 am

Well, to traverse a directory, you have to have execute privileges. So, you'll probably want 777. I'll use 775 owned by root:games. Then I'll sure gaming users are members of the games group.

Hmm... I'll have to check the brightness. I think I turned it up to standard, but some areas still seem too dark. Like going down the hallway off to the left of the spawn in D2:L1. After the bots get mowed down, it's really dark. But that might just be me.

Steel01
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Re: Development Blah: Comments

Postby karx11erx » Fri Jun 13, 2014 1:10 am

Just fixed a bug that could cause crashes, plus a ton of fixes to the game folder handling.

How do you make sure games group members can write to /var/cache/d2x-xl?
steel01
Posts: 89
Joined: Mon Jun 02, 2014 11:44 am

Re: Development Blah: Comments

Postby steel01 » Fri Jun 13, 2014 1:53 am

I don't know if there's a better way than trying to open a file for writing. A quick google shows a couple stackoverflow questions with answers confirming that. If the program can't write, fall back to the user cache. Though technically, if the folder exists and is readable, the shared cache should be read, but new stuff written to the user cache. But that's likely more trouble than it's worth.

Steel01
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Re: Development Blah: Comments

Postby karx11erx » Fri Jun 13, 2014 11:36 am

If /var/cache/d2x-xl has r/w access for the "other" users, then d2x-xl should at least be able to create subfolders in it, shouldn't it?

Well, I will create a "games" group (if there isn't one already), add my current desktop user to it, and make that group own /var/cache/d2x-xl. Maybe that will help.
steel01
Posts: 89
Joined: Mon Jun 02, 2014 11:44 am

Re: Development Blah: Comments

Postby steel01 » Fri Jun 13, 2014 1:05 pm

I guess I didn't put it clearly. You need the x bit set to be able to enter and go through a directory. So if you want others to be able to read files in a directory, the directory needs to be r-x, while the files are r--. That's why I said your case needs the directory to be 777 instead of 766.

Steel01
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Re: Development Blah: Comments

Postby karx11erx » Fri Jun 13, 2014 2:55 pm

I had understood you, but I wasn't quite sure whether creating a subfolder requires entering its parent folder ... ofc it does, I just didn't spend much thought on it.
steel01
Posts: 89
Joined: Mon Jun 02, 2014 11:44 am

Re: Development Blah: Comments

Postby steel01 » Fri Jun 13, 2014 11:05 pm

So, I can't reply in the patch request on SF for some reason... But the answer to the question is pretty much the same as the first two steps in the post above. The only file added is CMakeLists.txt and the only modified file is include/audio.h. Both will need added/updated in the svn repo.

Steel01
User avatar
karx11erx
D2X-XL Master
D2X-XL Master
Posts: 8112
Joined: Mon Sep 24, 2007 8:48 pm
Location: Wilferdingen, Germany
Contact:

Re: Development Blah: Comments

Postby karx11erx » Fri Jun 13, 2014 11:21 pm

Applied. CMakeLists.txt now is in the repo and the source archive.
steel01
Posts: 89
Joined: Mon Jun 02, 2014 11:44 am

Re: Development Blah: Comments

Postby steel01 » Sat Jun 21, 2014 1:20 am

That new music layout sounds great. A quick rename of my playlists and it should all work. I'll be testing that over the weekend or early next week.

Steel01

Return to “General Discussions”

Who is online

Users browsing this forum: No registered users and 6 guests