Working installer. No more StepMania Libs files that you all hate so much.
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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('/');
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user