static void BuildSong(BuildOptions options) { string currentDir = Directory.GetCurrentDirectory(); string packagePath = Path.Combine(currentDir, "package"); string songPath = Path.Combine(currentDir, "song.json"); if (!File.Exists(songPath)) { Console.WriteLine($"Can't find \"song.json\" file in {currentDir}"); return; } if (!Directory.Exists(packagePath)) { // Create package directory Directory.CreateDirectory(packagePath); } var env = FEnvironment.New(packagePath, "bfforever", 2517); env.SavePendingChanges(); SongManager man = new SongManager(env); man.ImportSong(songPath); //FusedSong song = FusedSong.Import(songPath); // TODO: Calculate audio file checksums to determine if re-encoding is needed }
public SongManager(FEnvironment env) { _packageManager = env; }
public SongManager(string packageRoot) { _packageManager = new FEnvironment(); _packageManager.LoadPackage(packageRoot); }