示例#1
0
        public override SolutionItemConfiguration CreateConfiguration(string name)
        {
            var conf = new MeeGoProjectConfiguration(name);

            conf.CopyFrom(base.CreateConfiguration(name));
            return(conf);
        }
示例#2
0
        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)));
        }
示例#3
0
		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");
		}
示例#4
0
        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");
            }
        }
示例#5
0
		//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;
		}
示例#6
0
        //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);
        }
示例#7
0
		public override SolutionItemConfiguration CreateConfiguration (string name)
		{
			var conf = new MeeGoProjectConfiguration (name);
			conf.CopyFrom (base.CreateConfiguration (name));
			return conf;
		}
示例#8
0
 public MeeGoExecutionCommand(MeeGoProjectConfiguration config) : base(config.CompiledOutputName)
 {
     this.Config = config;
 }
		public MeeGoExecutionCommand (MeeGoProjectConfiguration config) : base (config.CompiledOutputName)
		{
			this.Config = config;
		}
示例#10
0
		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));
		}