Last active
October 26, 2017 20:13
-
-
Save IvelleGames/38f3f0cd0a6b63301ef7c62b3d8cb51f to your computer and use it in GitHub Desktop.
cserver win
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <cstdlib> | |
#include <cstring> | |
int main(int argc, char **argv) { | |
char str[1024]; | |
#ifdef __linux__ | |
strcpy(str, "/opt/google/chrome/chrome"); | |
#endif | |
#ifdef _WIN32 | |
strcpy(str, "start chrome.exe "); | |
#endif | |
strcat(str, " --allow-file-access-from-files "); | |
strcat(str, argv[1]); | |
#ifdef __linux__ | |
strcat(str, " &"); | |
#endif | |
std::system(str); | |
return EXIT_SUCCESS; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment