-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.c
50 lines (45 loc) · 1.3 KB
/
main.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define WEBSITE_DEV https://gitpod.io/#https://github.com/AndreHeber/fastdev
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__) || defined(__NT__)
//define something for Windows (32-bit and 64-bit, this part is common)
#define START_BROWSER "explorer WEBSITE_DEV"
#ifdef _WIN64
//define something for Windows (64-bit only)
#else
//define something for Windows (32-bit only)
#endif
#elif __APPLE__
#include <TargetConditionals.h>
#if TARGET_IPHONE_SIMULATOR
// iOS Simulator
#elif TARGET_OS_IPHONE
// iOS device
#elif TARGET_OS_MAC
// Other kinds of Mac OS
#define START_BROWSER "open WEBSITE_DEV"
#else
# error "Unknown Apple platform"
#endif
#elif __linux__
// linux
#define START_BROWSER "open WEBSITE_DEV"
#elif __unix__ // all unices not caught above
// Unix
#define START_BROWSER "open WEBSITE_DEV"
#elif defined(_POSIX_VERSION)
// POSIX
#define START_BROWSER "open WEBSITE_DEV"
#else
# error "Unknown compiler"
#endif
int main ( int argc, char ** argv ) {
if ( argc != 2 ) {
printf ( "# %s develop\n", argv [ 0 ] );
exit ( 0 );
}
if ( strcmp ( argv [ 1 ] , "develop" ) == 0 )
system ( START_BROWSER );
return 0;
}