Skip to content

Commit

Permalink
PlayFabGameServer can now build from Jenkins with no manual steps.
Browse files Browse the repository at this point in the history
Summary: PlayFabGameServer can now build from Jenkins with no manual steps.

Test Plan: New Jenernaught job

Reviewers: #devtools_in-progress, Marco.Williams

Reviewed By: #devtools_in-progress, Marco.Williams

Subscribers: Marco.Williams

Maniphest Tasks: T1791

Differential Revision: https://phab.playfabdev.com/D1741
  • Loading branch information
pgilmorepf committed Jun 28, 2016
1 parent 942e200 commit 9c61ecd
Show file tree
Hide file tree
Showing 9 changed files with 116 additions and 105 deletions.
9 changes: 7 additions & 2 deletions SDKBuildScripts/unity_gameserver.bat
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
pushd ..
rem === BUILDING UnitySDK ===
node generate.js ..\API_Specs csharp-unity-gameserver=..\sdks\UnityGameServer
if [%1] == [] (
rem === BUILDING Unity PlayFabGameServer ===
node generate.js ..\API_Specs csharp-unity-gameserver=..\sdks\PlayFabGameServer
) else (
rem === BUILDING Unity PlayFabGameServer with params %* ===
node generate.js ..\API_Specs csharp-unity-gameserver=..\sdks\PlayFabGameServer %*
)
popd
5 changes: 5 additions & 0 deletions SDKGenerator.njsproj
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@
<OutputPath>bin\</OutputPath>
<ScriptArguments>..\API_Specs postman=..\sdks\PostmanCollection -buildIdentifier pg_PostmanCollection_manual</ScriptArguments>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'PlayFabGameServer' ">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\</OutputPath>
<ScriptArguments>..\API_Specs csharp-unity-gameserver=..\sdks\PlayFabGameServer -buildIdentifier pg_UnitySDK_manual</ScriptArguments>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'UnitySDK' ">
<DebugSymbols>true</DebugSymbols>
<OutputPath>bin\</OutputPath>
Expand Down
3 changes: 3 additions & 0 deletions SDKGenerator.sln
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Global
LumberyardSdk|Any CPU = LumberyardSdk|Any CPU
NodeSDK|Any CPU = NodeSDK|Any CPU
PostmanCollection|Any CPU = PostmanCollection|Any CPU
PlayFabGameServer|Any CPU = PlayFabGameServer|Any CPU
UnitySDK|Any CPU = UnitySDK|Any CPU
UnrealBlueprintSDK|Any CPU = UnrealBlueprintSDK|Any CPU
UnrealCppSdk|Any CPU = UnrealCppSdk|Any CPU
Expand All @@ -37,6 +38,8 @@ Global
{2BA807EF-310C-43B5-8D42-1ABCFFF39BE9}.NodeSDK|Any CPU.Build.0 = NodeSDK|Any CPU
{2BA807EF-310C-43B5-8D42-1ABCFFF39BE9}.PostmanCollection|Any CPU.ActiveCfg = PostmanCollection|Any CPU
{2BA807EF-310C-43B5-8D42-1ABCFFF39BE9}.PostmanCollection|Any CPU.Build.0 = PostmanCollection|Any CPU
{2BA807EF-310C-43B5-8D42-1ABCFFF39BE9}.PlayFabGameServer|Any CPU.ActiveCfg = PlayFabGameServer|Any CPU
{2BA807EF-310C-43B5-8D42-1ABCFFF39BE9}.PlayFabGameServer|Any CPU.Build.0 = PlayFabGameServer|Any CPU
{2BA807EF-310C-43B5-8D42-1ABCFFF39BE9}.UnitySDK|Any CPU.ActiveCfg = UnitySDK|Any CPU
{2BA807EF-310C-43B5-8D42-1ABCFFF39BE9}.UnitySDK|Any CPU.Build.0 = UnitySDK|Any CPU
{2BA807EF-310C-43B5-8D42-1ABCFFF39BE9}.UnrealBlueprintSDK|Any CPU.ActiveCfg = UnrealBlueprintSDK|Any CPU
Expand Down
166 changes: 82 additions & 84 deletions targets/csharp-unity-gameserver/make.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions targets/csharp-unity-gameserver/source/Internal/Log.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,31 +8,31 @@ public static void Debug(string text, params object[] args)
{
if ((PlayFabSettings.LogLevel & PlayFabLogLevel.Debug) != 0)
{
UnityEngine.Debug.Log(PlayFabUtil.timeStamp + " DEBUG: " + Util.Format(text, args));
UnityEngine.Debug.Log(PlayFabUtil.timeStamp + " DEBUG: " + PlayFabUtil.Format(text, args));
}
}

public static void Info(string text, params object[] args)
{
if ((PlayFabSettings.LogLevel & PlayFabLogLevel.Info) != 0)
{
UnityEngine.Debug.Log(PlayFabUtil.timeStamp + " INFO: " + Util.Format(text, args));
UnityEngine.Debug.Log(PlayFabUtil.timeStamp + " INFO: " + PlayFabUtil.Format(text, args));
}
}

public static void Warning(string text, params object[] args)
{
if ((PlayFabSettings.LogLevel & PlayFabLogLevel.Warning) != 0)
{
UnityEngine.Debug.LogWarning(PlayFabUtil.timeStamp + " WARNING: " + Util.Format(text, args));
UnityEngine.Debug.LogWarning(PlayFabUtil.timeStamp + " WARNING: " + PlayFabUtil.Format(text, args));
}
}

public static void Error(string text, params object[] args)
{
if ((PlayFabSettings.LogLevel & PlayFabLogLevel.Error) != 0)
{
UnityEngine.Debug.LogError(PlayFabUtil.timeStamp + " ERROR: " + Util.Format(text, args));
UnityEngine.Debug.LogError(PlayFabUtil.timeStamp + " ERROR: " + PlayFabUtil.Format(text, args));
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion targets/csharp-unity-gameserver/source/Internal/Util.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace PlayFab.Internal
{
internal static class Util
internal static class PlayFabUtil
{
public static readonly string[] _defaultDateTimeFormats = new string[]{ // All possible input time formats

Expand Down
16 changes: 8 additions & 8 deletions targets/csharp-unity-gameserver/templates/API.cs.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -21,20 +21,20 @@ namespace PlayFab
/// </summary>
<% } %> public static void <%- apiCall.name %>(<%- apiCall.request %> request, ProcessApiCallback<<%- apiCall.result %>> resultCallback, ErrorCallback errorCallback, object customData = null)
{
<%- getRequestActions(apiCall, api) %>
<%- GetRequestActions(apiCall, api) %>
string serializedJson = JsonWrapper.SerializeObject(request, PlayFabUtil.ApiSerializerStrategy);
Action<CallRequestContainer> callback = delegate(CallRequestContainer requestContainer)
{
<% if (hasResultActions(apiCall, api)) {
<% if (HasResultActions(apiCall, api)) {
%> ResultContainer<<%- apiCall.result %>>.HandleResults(requestContainer, resultCallback, errorCallback, <%- apiCall.name %>ResultAction);
<% } else {
%> ResultContainer<<%- apiCall.result %>>.HandleResults(requestContainer, resultCallback, errorCallback, null);
<% } %> };
PlayFabHTTP.Post("<%- apiCall.url %>", serializedJson, <%- getAuthParams(apiCall) %>, callback, request, customData);
PlayFabHTTP.Post("<%- apiCall.url %>", serializedJson, <%- GetAuthParams(apiCall) %>, callback, request, customData);
}
<% if (hasResultActions(apiCall, api)) { %> public static void <%- apiCall.name %>ResultAction(<%- apiCall.result %> result, CallRequestContainer requestContainer)
<% if (HasResultActions(apiCall, api)) { %> public static void <%- apiCall.name %>ResultAction(<%- apiCall.result %> result, CallRequestContainer requestContainer)
{
<%- getResultActions(apiCall, api) %>
<%- GetResultActions(apiCall, api) %>
}
<% } %>
<% } %><% if (hasClientOptions) { %> private static string _authKey = null;
Expand Down Expand Up @@ -87,9 +87,9 @@ namespace PlayFab
disableAdvertising = adInfo.Get<bool>("limitAdTrackingEnabled");
}
#elif UNITY_IOS && !UNITY_EDITOR
advertisingIdType = PlayFab.PlayFabSettings.AD_TYPE_IDFA;
advertisingIdValue = PlayFabiOSPlugin.getIdfa();
disableAdvertising = PlayFabiOSPlugin.getAdvertisingDisabled();
advertisingIdType = PlayFab.PlayFabSettings.AD_TYPE_IDFA;
advertisingIdValue = PlayFabiOSPlugin.getIdfa();
disableAdvertising = PlayFabiOSPlugin.getAdvertisingDisabled();
#endif
}
catch (Exception e)
Expand Down
6 changes: 3 additions & 3 deletions targets/csharp-unity-gameserver/templates/Model.cs.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
/// <summary>
/// <%- datatype.description %>
/// </summary><% } %>
public class <%- datatype.name %><% if(isResultHandler(datatype)) { %> : PlayFabResultCommon<% } %>
public class <%- datatype.name %><% if(GetIsResultHandler(datatype)) { %> : PlayFabResultCommon<% } %>
{<% for(var i in datatype.properties) { var property = datatype.properties[i] %>
<% if(property.description) { %>
/// <summary>
/// <%- property.description %>
/// </summary><% } %><%- getPropertyAttribs(property, datatype) %>
public <%- getPropertyDef(property, datatype) %> { get; set;}<% } %>
/// </summary><% } %><%- GetPropertyAttribs(property, datatype) %>
public <%- GetModelPropertyDef(property, datatype) %> { get; set;}<% } %>
}
6 changes: 3 additions & 3 deletions targets/csharp-unity/templates/API.cs.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ namespace PlayFab
disableAdvertising = adInfo.Get<bool>("limitAdTrackingEnabled");
}
#elif UNITY_IOS && !UNITY_EDITOR
advertisingIdType = PlayFab.PlayFabSettings.AD_TYPE_IDFA;
advertisingIdValue = PlayFabiOSPlugin.getIdfa();
disableAdvertising = PlayFabiOSPlugin.getAdvertisingDisabled();
advertisingIdType = PlayFab.PlayFabSettings.AD_TYPE_IDFA;
advertisingIdValue = PlayFabiOSPlugin.getIdfa();
disableAdvertising = PlayFabiOSPlugin.getAdvertisingDisabled();
#endif
}
catch (Exception e)
Expand Down

0 comments on commit 9c61ecd

Please sign in to comment.