-
-
Notifications
You must be signed in to change notification settings - Fork 449
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
[UX] Built in widget to install components and fonts from Winetricks #3102
Conversation
@@ -616,35 +616,6 @@ async function runWineCommandOnGame( | |||
}) | |||
} | |||
|
|||
// Calls WineCFG or Winetricks. If is WineCFG, use the same binary as wine to launch it to dont update the prefix | |||
ipcMain.handle('callTool', async (event, { tool, exe, appName, runner }) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved this into tools.tsx
to stop adding more callbacks in main.ts, it's becoming too big and it feels like a big bag of everything
@@ -429,7 +432,7 @@ export const Winetricks = { | |||
runner: Runner, | |||
appName: string, | |||
args: string[], | |||
event?: Electron.IpcMainInvokeEvent | |||
returnOutput = false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we didn't need the event for the messages to work so I removed that
I also added a new parameters to make the method return the output instead of sending messages, so we can capture the results of some commands
sendFrontendMessage('progressOfWinetricks', executeMessages) | ||
progressUpdated = false | ||
} | ||
}, 1000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is just removing the event
, the formatter is changed too many lines
const { t } = useTranslation() | ||
const navigate = useNavigate() | ||
|
||
export default function SearchBar({ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made this component more generic, customizable with props to extend it for both LibrarySearchBar and WinetricksSearchBar, most of the code I removed here is now in LibrarySearchBar
async function callTools(tool: Tool, exe?: string) { | ||
if (tool === 'winetricks') { | ||
setWinetricksRunning(true) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we now call winetricks from within the other dialog
Testing this one here and looks pretty good so far.
Other than that it is a good improvement for what we have right now. :D |
I am blind, just saw this one is implemented already 👍🏽 |
I've been thinking about that a bit more and I think I have a better solution (basically, keep track of that info in the backend instead and push the tool name also along with the progress)
I wasn't sure what to do here, cause there are A LOT of components and I don't know how to fit all that in the UI. Maybe we can have the search and a few One comment though is that if you can still open the original winetricks to see all the available options, my original idea for this is more like a shortcut to help people follow guides that already tell you what you need to search for. |
I updated the modal to show the name of the component that is being installed. I'll leave the addition of some commonly installed components for a future iteration once we decide what makes sense to include in that list. |
…uncher into built-in-winetricks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good stuff!
That is pretty useful and cleaner for people that knows that to install. ⚔️
This PR adds a search/install functionality for winetricks built-in into the Winetricks dialog.
This should make it easier for users to install things like vcrun, d3dcompiler, etc with simpler instructions (Winetricks GUI is not user friendly and too complex for what we usually use it).
Now we can point the users to: settings > winetricks > search "XYZ" > install > wait
The original GUI is still available with an
Open Winetricks GUI
button for more advanced usage if needed.Some things I changed:
Things I didn't include in this PR:
winetricks.mp4
Use the following Checklist if you have changed something on the Backend or Frontend: