Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TAStudio export to bk2: specify name #4172

Open
warmCabin opened this issue Jan 7, 2025 · 6 comments
Open

TAStudio export to bk2: specify name #4172

warmCabin opened this issue Jan 7, 2025 · 6 comments

Comments

@warmCabin
Copy link
Contributor

warmCabin commented Jan 7, 2025

Summary

The export to bk2 option always outputs a file of the same name as the .tasproj. I'd like to be able to save a particular branch or progress update without overwriting the bk2 for my project. To that end, I'd like an "Export As..." menu item that lets me choose the destination file.

Evidently you touched on this topic in #3504, but it never made it into a feature request.

Host env

  • BizHawk 2.9.1
@CasualPokePlayer
Copy link
Member

The export to bk2 option always outputs a file of the same name as the .tasproj

It does not. The current behavior will bring up the save file chooser menu if said bk2 already exists, allowing you to rename it (or just spam enter to overwrite the file regardless).

@warmCabin
Copy link
Contributor Author

warmCabin commented Jan 7, 2025

I can't even use TAStudio in 2.10.0 right now. I get a configuration corruption issue (nothing to do with #4172, I promise 😭)

But in 2.9.1, it asks me if I want to overwrite the existing file, and if I click No, it's the same as hitting cancel. No file picker.

@CasualPokePlayer
Copy link
Member

CasualPokePlayer commented Jan 7, 2025

Old tasprojs are not compatible with 2.10 (they are not expected to be cross version compatible in the first place). You can attempt to migrate them with an exported bk2.

But in 2.9.1, it asks me if I want to overwrite the existing file, and if I click No, it's the same as hitting cancel. No file picker.

This was added in 2.10, not 2.9.1.

@warmCabin
Copy link
Contributor Author

warmCabin commented Jan 7, 2025

Old tasprojs are not compatible with 2.10 (they are not expected to be cross version compatible in the first place).

If that's the case, could you add some kind of version check instead of letting it trip over the config parsing?

Newtonsoft.Json.JsonSerializationException: Error resolving type specified in JSON 'BizHawk.Client.EmuHawk.InputRoll+InputRollSettings, EmuHawk'. Path 'o.$type', line 1, position 75. ---> Newtonsoft.Json.JsonSerializationException: Could not load assembly 'EmuHawk'.
   at Newtonsoft.Json.Serialization.DefaultSerializationBinder.GetTypeFromTypeNameKey(StructMultiKey`2 typeNameKey)
   at System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory)
   at Newtonsoft.Json.Serialization.DefaultSerializationBinder.BindToType(String assemblyName, String typeName)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolveTypeName(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, String qualifiedTypeName)
   --- End of inner exception stack trace ---
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ResolveTypeName(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, String qualifiedTypeName)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadMetadataProperties(JsonReader reader, Type& objectType, JsonContract& contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue, Object& newValue, String& id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.SetPropertyValue(JsonProperty property, JsonConverter propertyConverter, JsonContainerContract containerContract, JsonProperty containerProperty, JsonReader reader, Object target)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.PopulateObject(Object newObject, JsonReader reader, JsonObjectContract contract, JsonProperty member, String id)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateObject(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.CreateValueInternal(JsonReader reader, Type objectType, JsonContract contract, JsonProperty member, JsonContainerContract containerContract, JsonProperty containerMember, Object existingValue)
   at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
   at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader reader, Type objectType)
   at BizHawk.Client.Common.ConfigService.LoadWithType(String serialized) in /_/src/BizHawk.Client.Common/config/ConfigService.cs:line 132
   at BizHawk.Client.EmuHawk.InputRoll.LoadSettingsSerialized(String settingsJson) in /_/src/BizHawk.Client.EmuHawk/CustomControls/InputRoll/InputRoll.cs:line 656
   at BizHawk.Client.EmuHawk.TAStudio.StartNewMovieWrapper(ITasMovie movie, Boolean isNew) in /_/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs:line 560
   at BizHawk.Client.EmuHawk.TAStudio.LoadMovie(ITasMovie tasMovie, Boolean startsFromSavestate, Int32 gotoFrame) in /_/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs:line 480
   at BizHawk.Client.EmuHawk.TAStudio.LoadFileWithFallback(String path) in /_/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs:line 596
   at BizHawk.Client.EmuHawk.TAStudio.DummyLoadProject(String path) in /_/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs:line 582
   at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
   at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
   at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
   at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
   at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ToolStrip.WndProc(Message& m)
   at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

@warmCabin
Copy link
Contributor Author

I can at least confirm the behavior requested in this issue on 2.10. It's a bit odd that the default behavior is to not ask you the name, then if the expected file exists, show a file picker without warning. I would expect it to always show the file picker now. But, I can live with it :)

@vadosnaprimer
Copy link
Contributor

It's a bit odd that the default behavior is to not ask you the name, then if the expected file exists, show a file picker without warning. I would expect it to always show the file picker now.

Agreed. I've been finding silent export weird since day one, just not annoying enough to go and fix it. Does anyone know why it's still preferred to be silent if it's a new file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants