I’m trying to deploy a game to Itch.io during PostExportMethod.
I’m trying to debug this for over a day, as I can only try building the project once an hour.
I’ve managed to do most of what I’ve tried to achive.
Moved credentials and buttler app out of streaming assets.
Zip archived the rest.
And call the buttler. However it gives me Win32Exception with error code 2 - file not found.
What am I doing wrong? I have no idea now.
Full log: Running Prebuild stepsIn quiet period, build will start momentarily...Agent - Pastebin.com
public static void OnProjectBuilt(string pathToPlayer)
{
try
{
var i = pathToPlayer.LastIndexOf('/');
pathToPlayer = pathToPlayer.Substring(0, i+ 1);
var pathToEditor = pathToPlayer.Substring(0, pathToPlayer.LastIndexOf('/') +1);
File.Delete(pathToEditor + "butler_creds");
File.Delete(pathToEditor + "butler");
File.Move(pathToPlayer + "ExperimentalProject_Data/StreamingAssets/butler_creds", pathToEditor + "butler_creds");
File.Move(pathToPlayer + "ExperimentalProject_Data/StreamingAssets/butler", pathToEditor + "butler");
string args = String.Format(" -i {0} push {1} {2}:{3}",
pathToEditor + "butler_creds",
pathToEditor + "ExperimentalProject.zip",
AccountName,
ChannelName
);
ZipFile file = new ZipFile();
file.AddDirectory(pathToPlayer);
file.Save(pathToEditor + "ExperimentalProject.zip");
System.Diagnostics.Process uploadProc = new System.Diagnostics.Process();
uploadProc.StartInfo.FileName = pathToEditor + "butler";
uploadProc.StartInfo.Arguments = args;
uploadProc.StartInfo.UseShellExecute = false;
uploadProc.Start();
uploadProc.WaitForExit();
}
catch (Exception e)
{
UnityEngine.Debug.Log(e);
}
}