mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-13 03:28:19 +00:00
e985632fae
Changing the filenames of the releases will be a bit more annoying, so not sure we want to do that
24 lines
516 B
Objective-C
24 lines
516 B
Objective-C
#import <Cocoa/Cocoa.h>
|
|
#include <base/system.h>
|
|
|
|
extern int TWMain(int argc, const char **argv);
|
|
|
|
int main(int argc, const char **argv)
|
|
{
|
|
BOOL FinderLaunch = argc >= 2 && !str_comp_num(argv[1], "-psn", 4);
|
|
|
|
NSString *resourcePath = [[NSBundle mainBundle] resourcePath];
|
|
if(!resourcePath)
|
|
return -1;
|
|
|
|
[[NSFileManager defaultManager] changeCurrentDirectoryPath:resourcePath];
|
|
|
|
if(FinderLaunch)
|
|
{
|
|
const char *paArgv[2] = { argv[0], NULL };
|
|
return TWMain(1, paArgv);
|
|
}
|
|
else
|
|
return TWMain(argc, argv);
|
|
}
|