private void KeepUpdated() { foreach (LibraryAsset asset in project.LibraryAssets) { if (asset.UpdatePath != null) { string assetName = Path.GetFileName(asset.Path); string assetPath = project.GetAbsolutePath(asset.Path); string updatePath = project.GetAbsolutePath(asset.UpdatePath); if (File.Exists(updatePath)) { // check size/modified FileInfo source = new FileInfo(updatePath); FileInfo dest = new FileInfo(assetPath); if (source.LastWriteTime != dest.LastWriteTime || source.Length != dest.Length) { Console.WriteLine("Updating asset '" + assetName + "'"); File.Copy(updatePath, assetPath, true); } } else { Console.Error.WriteLine("Warning: asset '" + assetName + "' could " + " not be updated, as the source file could does not exist."); } } } }
public void AddInput() { string path = project.FixDebugReleasePath(project.GetAbsolutePath(project.InputPath)); Add("-swf", "\"" + path + "\""); }