Author Topic: Compiling on Debian Lenny  (Read 5174 times)

0 Members and 1 Guest are viewing this topic.

Re: Compiling on Debian Lenny
Interesting.

If I use the FS dir of my Windows partition, but leave the executable where it is now, it runs. Extremely slow, but it runs. So it is not possible to have the data and the executable on the same folder on Linux, apparently.

Even more interesting, copying the executable to another folder and running it while in the /freespace folder won't work.

Is there a serious limit on the kind of path where the data is placed?
just another newbie without any modding, FREDding or real programming experience

you haven't learned masochism until you've tried to read a Microsoft help file.  -- Goober5000
I've got 2 drug-addict syblings and one alcoholic whore. And I'm a ****ing sociopath --an0n
You cannot defeat Windows through strength alone. Only patience, a lot of good luck, and a sledgehammer will do the job. --StratComm

 

Offline Iss Mneur

  • 210
  • TODO:
Re: Compiling on Debian Lenny
Okay, I have now checked the code and it seems the check for the root directory happens sooner than I thought so the log is never gets opened.

But in looking at the code, I have found the cause for your problems.  It seems that the function that checks to see if the game is being run from a root directory (like c:/) does not seem to make any distinction for UNIX systems, so "/freespace" is considered the same as "c:/", because it only has one slash.  Thus, it considered a "root" directory.  The easiest way to fix this would be to just move freespace to (for example) "/games/freespace" or to somehow get two slashes in the path ("/freespace/freespace") would also work.
"I love deadlines. I like the whooshing sound they make as they fly by." -Douglas Adams
wxLauncher 0.9.4 public beta (now with no config file editing for FRED) | wxLauncher 2.0 Request for Comments

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Compiling on Debian Lenny
Damn I almost suggested using /games/freespace2 and thought, nah, that's silly.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 
Re: Compiling on Debian Lenny
I pretty much guessed this was something forgotten in making the game cross-platform. The only reason I moved it to /freespace was because I was having issues at first with the executable located on a NTFS drive. That's all fixed now.

I suppose an OS check (even at compile time would do) would fix this?

As for the game running slowly, that's an OGL issue which I'll have to fix first. I'll post once I get that going.
just another newbie without any modding, FREDding or real programming experience

you haven't learned masochism until you've tried to read a Microsoft help file.  -- Goober5000
I've got 2 drug-addict syblings and one alcoholic whore. And I'm a ****ing sociopath --an0n
You cannot defeat Windows through strength alone. Only patience, a lot of good luck, and a sledgehammer will do the job. --StratComm

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Compiling on Debian Lenny
It could be fixed in code I'm sure, file a bug if you want, but there's a fairly simple workaround for now I guess.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 
Re: Compiling on Debian Lenny
Oh, for me it works, but this either needs to go into the documentation or be fixed. It's a pain for new users, and it's odd. If you tell me which file the check is in I'll submit a patch soonish.

edit: in /code/cfile/cfile.cpp:
Code: [Select]
155,160d154
< #if defined SCP_UNIX
< // /freespace works, / shouldn't
< if(token_count <= 1){
< return 1;
< }
< #endif

« Last Edit: July 18, 2010, 04:44:54 pm by kasperl »
just another newbie without any modding, FREDding or real programming experience

you haven't learned masochism until you've tried to read a Microsoft help file.  -- Goober5000
I've got 2 drug-addict syblings and one alcoholic whore. And I'm a ****ing sociopath --an0n
You cannot defeat Windows through strength alone. Only patience, a lot of good luck, and a sledgehammer will do the job. --StratComm

 

Offline Iss Mneur

  • 210
  • TODO:
Re: Compiling on Debian Lenny
Code: [Select]
Index: code/cfile/cfile.cpp
===================================================================
--- code/cfile/cfile.cpp (revision 6294)
+++ code/cfile/cfile.cpp (working copy)
@@ -147,9 +147,14 @@
  token_count++;
  tok = strtok(NULL, DIR_SEPARATOR_STR);
  } while(tok != NULL);
-
- // root directory if we have <= 1 slash
+
+#ifdef SCP_UNIX
+ // /freespace works, / does not
+ if(token_count <= 1) {
+#else
+ // C:/freespace works, C:/ does not
  if(token_count <= 2){
+#endif
  return 1;
  }

I have tested this on both Ubuntu and Windows 7.
« Last Edit: July 18, 2010, 07:08:52 pm by Iss Mneur »
"I love deadlines. I like the whooshing sound they make as they fly by." -Douglas Adams
wxLauncher 0.9.4 public beta (now with no config file editing for FRED) | wxLauncher 2.0 Request for Comments

 
Re: Compiling on Debian Lenny
Definitely better then what I did, thanks.
just another newbie without any modding, FREDding or real programming experience

you haven't learned masochism until you've tried to read a Microsoft help file.  -- Goober5000
I've got 2 drug-addict syblings and one alcoholic whore. And I'm a ****ing sociopath --an0n
You cannot defeat Windows through strength alone. Only patience, a lot of good luck, and a sledgehammer will do the job. --StratComm

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Minecraft
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Compiling on Debian Lenny
Committed in r6316, and on my list to backport after a bit more testing.
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays