public override SolutionItemConfiguration CreateConfiguration(string name) { var conf = new MeeGoProjectConfiguration(name); conf.CopyFrom(base.CreateConfiguration(name)); return(conf); }
public static bool NeedsUploading(MeeGoProjectConfiguration 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 static void TouchUploadMarker (MeeGoProjectConfiguration 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 static void TouchUploadMarker(MeeGoProjectConfiguration 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"); } }
//FIXME: needs better file list and handling of subdirectories public static IAsyncOperation Upload (MeeGoDevice targetDevice, MeeGoProjectConfiguration conf, TextWriter outWriter, TextWriter errorWriter) { var sftp = new Sftp (targetDevice.Address, targetDevice.Username, targetDevice.Password); var files = Directory.GetFiles (conf.OutputDirectory, "*", SearchOption.TopDirectoryOnly); var op = conf.OutputDirectory.ParentDirectory; for (int i = 0; i < files.Length; i++) files[i] = op.Combine (files[i]); var scop = new SshTransferOperation<Sftp> (sftp, delegate (Sftp s) { var dir = conf.ParentItem.Name; try { s.Mkdir (dir); } catch {} s.Put (files, dir); }); scop.Run (); return scop; }
//FIXME: needs better file list and handling of subdirectories public static IAsyncOperation Upload(MeeGoDevice targetDevice, MeeGoProjectConfiguration conf, TextWriter outWriter, TextWriter errorWriter) { var sftp = new Sftp(targetDevice.Address, targetDevice.Username, targetDevice.Password); var files = Directory.GetFiles(conf.OutputDirectory, "*", SearchOption.TopDirectoryOnly); var op = conf.OutputDirectory.ParentDirectory; for (int i = 0; i < files.Length; i++) { files[i] = op.Combine(files[i]); } var scop = new SshTransferOperation <Sftp> (sftp, delegate(Sftp s) { var dir = conf.ParentItem.Name; try { s.Mkdir(dir); } catch {} s.Put(files, dir); }); scop.Run(); return(scop); }
public override SolutionItemConfiguration CreateConfiguration (string name) { var conf = new MeeGoProjectConfiguration (name); conf.CopyFrom (base.CreateConfiguration (name)); return conf; }
public MeeGoExecutionCommand(MeeGoProjectConfiguration config) : base(config.CompiledOutputName) { this.Config = config; }
public MeeGoExecutionCommand (MeeGoProjectConfiguration config) : base (config.CompiledOutputName) { this.Config = config; }
public static bool NeedsUploading (MeeGoProjectConfiguration conf) { var markerFile = conf.OutputDirectory.Combine (".meego_last_uploaded"); return File.Exists (conf.CompiledOutputName) && (!File.Exists (markerFile) || File.GetLastWriteTime (markerFile) < File.GetLastWriteTime (conf.OutputAssembly)); }