BuildSettings.h 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. //
  2. // Copyright (c) 2014-2016 THUNDERBEAST GAMES LLC
  3. //
  4. // Permission is hereby granted, free of charge, to any person obtaining a copy
  5. // of this software and associated documentation files (the "Software"), to deal
  6. // in the Software without restriction, including without limitation the rights
  7. // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  8. // copies of the Software, and to permit persons to whom the Software is
  9. // furnished to do so, subject to the following conditions:
  10. //
  11. // The above copyright notice and this permission notice shall be included in
  12. // all copies or substantial portions of the Software.
  13. //
  14. // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  15. // IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  16. // FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  17. // AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  18. // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  19. // OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  20. // THE SOFTWARE.
  21. //
  22. #pragma once
  23. /*
  24. #include <rapidjson/document.h>
  25. #include <rapidjson/filestream.h>
  26. #include <rapidjson/prettywriter.h>
  27. #include <Atomic/Container/Str.h>
  28. #include <Atomic/Core/Object.h>
  29. using namespace Atomic;
  30. namespace ToolCore
  31. {
  32. struct AndroidBuildSettings
  33. {
  34. String appName;
  35. String package;
  36. String targetSDKVersion;
  37. String minSDKVersion;
  38. String activityName;
  39. String companyName;
  40. String productName;
  41. };
  42. struct IOSBuildSettings
  43. {
  44. String appName;
  45. String package;
  46. String companyName;
  47. String productName;
  48. String provisionFile;
  49. String appidPrefix;
  50. };
  51. struct MacBuildSettings
  52. {
  53. String appName;
  54. String package;
  55. String companyName;
  56. String productName;
  57. };
  58. struct WindowsBuildSettings
  59. {
  60. String appName;
  61. String package;
  62. String companyName;
  63. String productName;
  64. };
  65. struct WebGLSettings
  66. {
  67. String appName;
  68. String package;
  69. String companyName;
  70. String productName;
  71. };
  72. class BuildSettings : public Object
  73. {
  74. OBJECT(BuildSettings);
  75. public:
  76. /// Construct.
  77. BuildSettings(Context* context);
  78. /// Destruct.
  79. virtual ~BuildSettings();
  80. const AndroidBuildSettings& GetAndroidSettings() { return android_; }
  81. void SetAndroidSettings(const AndroidBuildSettings& settings) { android_ = settings; }
  82. const IOSBuildSettings& GetIOSSettings() { return ios_; }
  83. void SetIOSSettings(const IOSBuildSettings& settings) { ios_ = settings; }
  84. const MacBuildSettings& GetMacSettings() { return mac_; }
  85. void SetMacSettings(const MacBuildSettings& settings) { mac_ = settings; }
  86. const WindowsBuildSettings& GetWindowsSettings() { return windows_; }
  87. void SetWindowsSettings(const WindowsBuildSettings& settings) { windows_ = settings; }
  88. const WebGLSettings& GetWebGLSettings() { return webgl_; }
  89. void SetWebGLSettings(const WebGLSettings& settings) { webgl_ = settings; }
  90. void Load(rapidjson::Value::Member* jobject);
  91. void Save(rapidjson::PrettyWriter<rapidjson::FileStream>& writer);
  92. private:
  93. String GetStringMember(rapidjson::Value::Member* jobject, const String& name);
  94. AndroidBuildSettings android_;
  95. IOSBuildSettings ios_;
  96. MacBuildSettings mac_;
  97. WindowsBuildSettings windows_;
  98. WebGLSettings webgl_;
  99. };
  100. }
  101. */