Working installer. No more StepMania Libs files that you all hate so much.

This commit is contained in:
Steve Checkoway
2003-09-16 04:22:25 +00:00
parent 223db1e0e5
commit ec8b6fcf1a
3 changed files with 11 additions and 2 deletions
+3 -1
View File
@@ -30,6 +30,8 @@ void HandleFile(const CString& file, const CString& dir, const CString& archiveP
NSString *filePath = [NSString stringWithCString:dir];
filePath = [filePath stringByAppendingFormat:@"%s%s", (dir == "/" ? "" : "/"), file.c_str()];
if (!overwrite && DoesFileExist([filePath cString]))
return;
[c postMessage:filePath];
/* This is rediculus */
char f[file.length() + 1];
@@ -60,7 +62,7 @@ void HandleFile(const CString& file, const CString& dir, const CString& archiveP
status = AuthorizationExecuteWithPrivileges(auth, path, kAuthorizationFlagDefaults, arguments+1, NULL);
if (status != errAuthorizationSuccess)
[c postMessage:@"failed"];
wait(&status);
wait(&int(status));
}
else
{
+6
View File
@@ -38,6 +38,12 @@ inline bool IsADirectory(const CString& path)
return s.st_mode & S_IFDIR;
}
bool DoesFileExist(const CString& path)
{
struct stat s;
return !stat(path, &s);
}
inline CString LastPathComponent(const CString& path)
{
unsigned pos = path.rfind('/');
+2 -1
View File
@@ -14,7 +14,8 @@ using namespace std;
void split(const CString& Source, const CString& Deliminator, vector<CString>& AddIt);
bool IsADirectory(const CString& path);
CString LastPathComponent(const CString& path);
bool DoesFileExist(const CString& path);
inline CString LastPathComponent(const CString& path);
void FileListingForDirectoryWithIgnore(const CString& path, CStringArray& list, CStringArray& dirs,
const set<CString>& ignore, bool ignoreDot = true);
int mkdir_p(const CString& path);