|
|
 |
10-17-2005, 04:27 PM
|
#41
|
|
Junior Member
Join Date: Dec 2003
Location: France
Posts: 260
|
yes or perhaps i can use the syscall file function of Jedi academt to write a file instead of using fwrite...
the problem is that i don't know where goes the file writen by those syscall function on MAC os X
if it does not go in ~/Libraty/appliction support/jedi academy/base
the pk3 will not be loaded
******************************
Slider
JA+ MOD Author for Jedi Academy
the lastest version on
http://www.japlus.net/
******************************
|
|
you may:
quote & reply,
|
10-17-2005, 07:30 PM
|
#42
|
|
Impressive, Terran!
Join Date: May 2002
Posts: 9,153
|
*shrug* seems like an interesting feature but I'm not sure it would be worth the time commitment. The only people that regular use OJP run it in server-only mode so spending the time to port/debug this sort of code seems like time that could be better spent on gameplay features.
---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder

|
|
you may:
quote & reply,
|
10-19-2005, 12:58 AM
|
#43
|
Join Date: Aug 2002
Location: Philadelphia
Posts: 227
|
i found a code snippet that copies the file and it's only like 20 lines in the C code. i'll post it later
|
|
you may:
quote & reply,
|
10-19-2005, 09:36 AM
|
#44
|
|
The Stig
Join Date: Nov 2004
Location: Sawtooth Cauldron
Posts: 1,242
Current Game: Borderlands 2
|
1 line :x
Code:
FS_CopyFile ( fromOSpath, toOSpath );
|
|
you may:
quote & reply,
|
10-19-2005, 09:43 AM
|
#45
|
Join Date: Aug 2002
Location: Philadelphia
Posts: 227
|
Code:
int FileCopy( const char *src, const char *dst )
{
#define BUFSZ 16000
char *buf[BUFSZ];
FILE *fi;
FILE *fo;
unsigned amount;
unsigned written;
int result;
// buf = new char;
fi = fopen( src, "rb" );
fo = fopen( dst, "wb" );
result = COPY_OK;
if ((fi == NULL) || (fo == NULL) )
{
result = COPY_ERROR;
if (fi != NULL) fclose(fi);
if (fo != NULL) fclose(fo);
}
if (result == COPY_OK)
{
do
{
amount = fread( buf, sizeof(char), BUFSZ, fi );
if (amount)
{
written = fwrite( buf, sizeof(char), amount, fo );
if (written != amount)
{
result = COPY_ERROR; // out of disk space or some other disk err?
}
}
} // when amount read is < BUFSZ, copy is done
while ((result == COPY_OK) && (amount == BUFSZ));
fclose(fi);
fclose(fo);
}
//delete [] buf;
return(result);
}
you have control over the path with this
|
|
you may:
quote & reply,
|
10-19-2005, 10:09 AM
|
#46
|
|
Junior Member
Join Date: Dec 2003
Location: France
Posts: 260
|
yes i know what fo = fopen( dst, "wb" ); does
i already use it for the win32 version
the pb is that on mac the dst path is ~/Library/........./base which points to /Users/USERNAME_onMAC_OS_X/Library/................/base
fopen( "/Users/USERNAME_onMAC_OS_X/Library/................/base/test.pk3"
, "wb" ); will WORK
fopen( "~/Library/................/base/test.pk3"
, "wb" ); will NOT WORK
so i need on mac os X to know the user starting the JediAcademy.app application which is absolutly not in the same folders like for the windows game...
OR as i said, perhaps using the trap syscall fs_write functions will give on mac os x a better result as the main client programm will make the work to write the files in the good folder...
I think it will give a try to this method for mac ox x....
on windows i used fwrite because i can like that write the pk3 in base folder...
I am pratically sure that the base engine syscall fs_write will write the file in the fs_game folder which is not what i want...
******************************
Slider
JA+ MOD Author for Jedi Academy
the lastest version on
http://www.japlus.net/
******************************
Last edited by Slider744; 10-19-2005 at 10:49 AM.
|
|
you may:
quote & reply,
|
10-19-2005, 10:12 AM
|
#47
|
|
Junior Member
Join Date: Dec 2003
Location: France
Posts: 260
|
woa stubert, you live philadelhpia?
i went to philadelphia a few month ago...
^^
******************************
Slider
JA+ MOD Author for Jedi Academy
the lastest version on
http://www.japlus.net/
******************************
|
|
you may:
quote & reply,
|
10-19-2005, 11:58 AM
|
#48
|
|
Rookie
Join Date: Nov 2003
Location: Using a Mac
Posts: 48
|
The path seems to be stored in fs_homepath on the OS X version. I don't think that "base" is included at the end of the path
|
|
you may:
quote & reply,
|
10-19-2005, 01:13 PM
|
#49
|
Join Date: Aug 2002
Location: Philadelphia
Posts: 227
|
thats cool slider, you were on vacation?
|
|
you may:
quote & reply,
|
10-19-2005, 02:51 PM
|
#50
|
|
Junior Member
Join Date: Dec 2003
Location: France
Posts: 260
|
Quote:
|
Originally Posted by stubert
thats cool slider, you were on vacation?
|
heu no it was for work
can u tell me redsaurus what is the value of fs_homepath?
is it /Users/Redsaurus/Library/Application SUpport/Jedi Academy/ ?
then inside there is base and all other mod folders like japlus ?
******************************
Slider
JA+ MOD Author for Jedi Academy
the lastest version on
http://www.japlus.net/
******************************
|
|
you may:
quote & reply,
|
10-19-2005, 03:34 PM
|
#51
|
|
Impressive, Terran!
Join Date: May 2002
Posts: 9,153
|
Wow, cooperation. Sweet. 
---Jedi Guardian of the Newbie Questions
---Masters of the Force Team Leader / Creator
---Open Jedi Project Lead Moderator / Co-Founder

|
|
you may:
quote & reply,
|
10-19-2005, 03:59 PM
|
#52
|
|
Rookie
Join Date: Sep 2005
Posts: 72
|
cooperation is sweet indeed 
*winks to redsaurus* have you checked your email??
p.s. sry for off-topic
|
|
you may:
quote & reply,
|
10-20-2005, 07:53 AM
|
#53
|
|
Rookie
Join Date: Nov 2003
Location: Using a Mac
Posts: 48
|
Quote:
|
Originally Posted by Slider744
heu no it was for work
can u tell me redsaurus what is the value of fs_homepath?
is it /Users/Redsaurus/Library/Application SUpport/Jedi Academy/ ?
then inside there is base and all other mod folders like japlus ?
|
The value of fs_homepath is stored in old Mac OS 9 folder system paths, it seems:
Code:
Macintosh HD:Users:<username>:Library:Application Support:Jedi Academy MP
Jufa: yes  I'll reply to it soon
|
|
you may:
quote & reply,
|
10-20-2005, 10:07 AM
|
#54
|
|
Junior Member
Join Date: Dec 2003
Location: France
Posts: 260
|
Quote:
|
Originally Posted by redsaurus
The value of fs_homepath is stored in old Mac OS 9 folder system paths, it seems:
Code:
Macintosh HD:Users:<username>:Library:Application Support:Jedi Academy MP
Jufa: yes  I'll reply to it soon
|
Hum
but is it because you have an old MAC version?
******************************
Slider
JA+ MOD Author for Jedi Academy
the lastest version on
http://www.japlus.net/
******************************
|
|
you may:
quote & reply,
|
| Thread Tools |
|
|
| Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
Forum Jump
|
|
|
|
|
|