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

Add Mf workaround #1149

Draft
wants to merge 35 commits into
base: master
Choose a base branch
from
Draft

Conversation

Zemogiter
Copy link
Contributor

@Zemogiter Zemogiter commented Dec 6, 2019

Description

A workaround for Media Foundation
https://github.com/z0z0z/mf-install
Needed for games that rely on it for ingame video and cutscenes. For example, benchmark videos in PC Building Simulator. After following instructions in the repo linked above, I can report they work just like on Windows now.

What works

Extracting the file, copying the dll files, setting dll overrides

What does not work

  • dll override adds "native" to the name of the overriden dll not where it supoused to be fixed by Fix Wine plugin "Override DLL" #1152
  • no entries from mf.reg are applied to the registry. Regedit plugin shows no errors

What was not tested

Everything after above mentioned

Test

  • Operating system (and linux kernel version): Ubuntu 19.10
  • Hardware (GPU/CPU):i7-7700K,GTX 1080ti

Ready for review

  • Script tested as a regular phoenicis user and working (if you have a problem -> create as draft and ask for help).
  • json-align and eslint run according to the documentation.
  • Codacy and travis checked.

Update the fork with changes from master fork.
Merging changes to the fork
Merging updates from master fork
Merging changes from master
Updated the way virtual desktop plugin is used.
@Zemogiter
Copy link
Contributor Author

Output of eslint:

  79:68    error  Unnecessary escape character: \S  no-useless-escape
  79:77    error  Unnecessary escape character: \W  no-useless-escape
  79:82    error  Unnecessary escape character: \L  no-useless-escape
  79:576   error  Unnecessary escape character: \C  no-useless-escape
  79:582   error  Unnecessary escape character: \{  no-useless-escape
  79:675   error  Unnecessary escape character: \C  no-useless-escape
  79:681   error  Unnecessary escape character: \{  no-useless-escape
  79:720   error  Unnecessary escape character: \I  no-useless-escape
  79:795   error  Unnecessary escape character: \C  no-useless-escape
  79:801   error  Unnecessary escape character: \{  no-useless-escape
  79:888   error  Unnecessary escape character: \C  no-useless-escape
  79:894   error  Unnecessary escape character: \{  no-useless-escape
  79:933   error  Unnecessary escape character: \I  no-useless-escape
  79:1008  error  Unnecessary escape character: \C  no-useless-escape
  79:1014  error  Unnecessary escape character: \{  no-useless-escape
  79:1107  error  Unnecessary escape character: \C  no-useless-escape
  79:1113  error  Unnecessary escape character: \{  no-useless-escape
  79:1152  error  Unnecessary escape character: \I  no-useless-escape

@plata
Copy link
Collaborator

plata commented Dec 12, 2019

Why does this PR contain Applications/Games/Heroes of Might & Magic IV/miniatures/main.png?

@Zemogiter
Copy link
Contributor Author

I don't know. I've created separate branches for both Heroes 4 and this PR from master.

@plata
Copy link
Collaborator

plata commented Dec 16, 2019

Can you fix it?

@Zemogiter
Copy link
Contributor Author

Done

@Zemogiter
Copy link
Contributor Author

Zemogiter commented Dec 20, 2019

These escape characters are needed because reg entries must be in separate lines.

@madoar madoar added the WIP Work in progress label Dec 23, 2019
@Zemogiter
Copy link
Contributor Author

OP was updated

@Zemogiter
Copy link
Contributor Author

Zemogiter commented Dec 25, 2019

Tried referencing the .reg file inside mfWorkaroundDir but the same issue happens.

        const regeditFile = `${prefixDirectory}/mfWorkaround/mf-install-master/mf.reg`
        new Regedit(this.wine).patch(regeditFile);

Replaced the long and broken (at least according to Codacy) line of registry entries with reference to an already existing file.
@Zemogiter Zemogiter mentioned this pull request Dec 29, 2019
18 tasks
@madoar
Copy link
Collaborator

madoar commented Dec 29, 2019

By issue you mean that the .reg file is not modified?

@madoar
Copy link
Collaborator

madoar commented Dec 29, 2019

@Zemogiter patch requires two parameters to work, please see:

patch(patchContent, contentType) {
const content = this.convertPatchContent(patchContent, contentType);
const tmpFile = createTempFile("reg");
writeToFile(tmpFile, content);
this.wine.run("regedit", [tmpFile], this.wine.prefixDirectory(), false, true);
return this;
}

@Zemogiter
Copy link
Contributor Author

By issue I mean the registry entries from mf.reg are not in registry editor.

}

const regeditFile = `${prefixDirectory}/mfWorkaround/mf-install-master/mf.reg`;
new Regedit(this.wine).patch(regeditFile);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Try new Regedit(this.wine).open(regeditFile);

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tried that. It did not fix the issue.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

patch is definitely wrong. See my argument above.

What "error" do you get when you use open?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thats the thing. No error in terminal window in either patch or open.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One parameter should work (the type can be undefined). I think it should be

new Regedit(this.wine).patch(cat(regeditFile));

Regedit#patch writes the patchContent to a file. So in your case, it tries to patch the registry with the string "${prefixDirectory}/mfWorkaround/mf-install-master/mf.reg" instead of the content of that file.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case it cannot be a Phoenicis issue. Maybe something is wrong in the file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@plata just tried it on plain Wine and the whole .reg file is in the registry editor.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you tried other scripts that make use of Regedit? Do they work for you?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@madoar yes they do

Copy link
Collaborator

@plata plata Dec 30, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Strange. If Phoenicis uses the same command line as plain Wine, how can it be different...

Engines/Wine/Verbs/mfWorkaround/script.js Outdated Show resolved Hide resolved
Engines/Wine/Verbs/mfWorkaround/script.js Outdated Show resolved Hide resolved
Engines/Wine/Verbs/mfWorkaround/script.js Outdated Show resolved Hide resolved
Engines/Wine/Verbs/mfWorkaround/script.js Show resolved Hide resolved
Engines/Wine/Verbs/mfWorkaround/script.js Outdated Show resolved Hide resolved
Comment removal
@madoar
Copy link
Collaborator

madoar commented Jan 3, 2020

Has the regedit problem be solved or is it still work in progress?

@Zemogiter
Copy link
Contributor Author

@madoar still work in progress

Included the second .reg file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WIP Work in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants