//FIXME: needs better file list and handling of subdirectories public static void Upload (TizenSdkInfo sdkInfo, TizenProjectConfiguration conf, string[] extraPaths, TextWriter outWriter, TextWriter errorWriter) { var sdb = new TizenSdkSdb (conf, sdkInfo); var outDirFiles = Directory.GetFiles (conf.OutputDirectory, "*", SearchOption.TopDirectoryOnly); var op = conf.OutputDirectory.ParentDirectory; var localPaths = new List<string> (); for (int i = 0; i < outDirFiles.Length; i++) localPaths.Add (op.Combine (outDirFiles[i])); if (extraPaths != null) localPaths.AddRange (extraPaths); var s = TizenSdkSdb.DevicePathSeparator; var remoteDir = TizenSdkSdb.DeviceHome + s + conf.ParentItem.Name; foreach (var localPath in localPaths) { var f = Path.GetFileName (localPath); var remotePath = remoteDir + s + f; sdb.Push (localPath, remotePath); } }
public static void TouchUploadMarker (TizenProjectConfiguration conf) { var markerFile = conf.OutputDirectory.Combine (".meego_last_uploaded"); if (File.Exists (markerFile)) File.SetLastWriteTime (markerFile, DateTime.Now); else File.WriteAllText (markerFile, "This file is used to determine when the app was last uploaded to a device"); }
public override SolutionItemConfiguration CreateConfiguration (string name) { var conf = new TizenProjectConfiguration (name); conf.CopyFrom (base.CreateConfiguration (name)); return conf; }
public TizenSdkBuild (TizenProjectConfiguration config, TizenSdkInfo sdkInfo) { this.Config = config; this.SdkInfo = sdkInfo; }
public static bool NeedsUploading (TizenProjectConfiguration conf) { var markerFile = conf.OutputDirectory.Combine (".meego_last_uploaded"); return File.Exists (conf.CompiledOutputName) && (!File.Exists (markerFile) || File.GetLastWriteTime (markerFile) < File.GetLastWriteTime (conf.OutputAssembly)); }
public TizenExecutionCommand (TizenProjectConfiguration config) : base (config.CompiledOutputName) { this.Config = config; }