installer.cpp 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*
  2. * ZeroTier One - Global Peer to Peer Ethernet
  3. * Copyright (C) 2012-2013 ZeroTier Networks LLC
  4. *
  5. * This program is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU General Public License
  16. * along with this program. If not, see <http://www.gnu.org/licenses/>.
  17. *
  18. * --
  19. *
  20. * ZeroTier may be used and distributed under the terms of the GPLv3, which
  21. * are available at: http://www.gnu.org/licenses/gpl-3.0.html
  22. *
  23. * If you would like to embed ZeroTier into a commercial application or
  24. * redistribute it in a modified binary form, please contact ZeroTier Networks
  25. * LLC. Start here: http://www.zerotier.com/
  26. */
  27. #include <stdio.h>
  28. #include <stdlib.h>
  29. #include <string.h>
  30. #include <stdint.h>
  31. #include "node/Constants.hpp"
  32. #include "version.h"
  33. #ifdef __WINDOWS__
  34. #include <WinSock2.h>
  35. #include <Windows.h>
  36. #include <tchar.h>
  37. #include <wchar.h>
  38. #else
  39. #include <unistd.h>
  40. #include <pwd.h>
  41. #include <sys/types.h>
  42. #include <sys/stat.h>
  43. #include <signal.h>
  44. #endif
  45. #include "ext/lz4/lz4.h"
  46. #include "ext/lz4/lz4hc.h"
  47. // Include generated binaries -------------------------------------------------
  48. // zerotier-one binary (or zerotier-one.exe for Windows)
  49. #include "installer-build/zerotier-one.build.c"
  50. // Linux init.d script
  51. #ifdef __LINUX__
  52. #include "installer-build/redhat__init.d__zerotier-one.build.c"
  53. #include "installer-build/debian__init.d__zerotier-one.build.c"
  54. #endif
  55. // Apple Tap device driver
  56. #ifdef __APPLE__
  57. #include "installer-build/tap-mac__tap.build.c"
  58. #include "installer-build/tap-mac__Info.plist.build.c"
  59. #endif
  60. // Windows Tap device drivers
  61. #ifdef __WINDOWS__
  62. #include "installer-build/tap-windows__x64__ztTap100.sys.build.c"
  63. #include "installer-build/tap-windows__x64__ztTap100.inf.build.c"
  64. #include "installer-build/tap-windows__x86__ztTap100.sys.build.c"
  65. #include "installer-build/tap-windows__x86__ztTap100.inf.build.c"
  66. #include "installer-build/tap-windows__devcon32.exe.build.c"
  67. #include "installer-build/tap-windows__devcon64.exe.build.c"
  68. #endif
  69. // ----------------------------------------------------------------------------
  70. #ifdef __WINDOWS__
  71. int _tmain(int argc, _TCHAR* argv[])
  72. #else
  73. int main(int argc,char **argv)
  74. #endif
  75. {
  76. }