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 powershell app based on PowerShell Core 6.1, #1440
Conversation
… to satisfy installers requiring powershell
src/winetricks
Outdated
for file in *\\*; do target="${file//\\//}"; mkdir -p "${target%/*}"; mv -v "$file" "$target"; done | ||
w_append_path "$W_SYSTEM32_DLLS"/WindowsPowerShell/v1.0 |
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.
Reason for this is this is a non-compliant zip file that has back slashes. While unzip detects that and extracts archive reversing slashes it fails to successfully extract archive due to a different reasn (for w/e reason it creates one of directories without executable bit and then fails to extract files into it with permission denied)
So you don't need WMF to satisfy MTGA? o.O |
No, you don't
…On Wed, Nov 27, 2019, 15:14 Kreyren ***@***.***> wrote:
So you don't need WMF to satisfy MTGA? o.O
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#1440?email_source=notifications&email_token=AAJPL3HKFANJTPF365LOIILQV35L7A5CNFSM4JSMDFB2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFK7MWY#issuecomment-559281755>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJPL3B4J3PIEVLE3LIPZKDQV35L7ANCNFSM4JSMDFBQ>
.
|
no, you don't |
src/winetricks
Outdated
{ | ||
if test "$W_ARCH" = "win64"; then | ||
w_die "Only implemented for 32bit arch at the moment" | ||
fi |
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.
You can use w_package_unsupported_win64 for that.
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 can technically add win64 support if you would prefer that. I don't really see an issue adding it.
However if you would like that indeed - what would be the best example of handling separate x86/64 archives?
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.
That would be preferable, but not required.
There are several examples, e.g., amstream:
https://github.com/Winetricks/winetricks/blob/master/src/winetricks#L5586
you'll want to unconditionally install win32 (as win64 always supports win32), then selectively install win64 if $W_ARCH = win64.
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 am honestly not sure what is the right way to install this properly and integrate into system and how PATH is supposed to be set up in the right way if both 32 and 64 bit things are installed so I guess I'll just leave it as is here
src/winetricks
Outdated
|
||
w_warn "Installing Powershell into $W_SYSTEM32_DLLS_WIN/WindowsPowerShell/v1.0/" | ||
w_warn "So that apps that require psh scripts to be executed would find it" | ||
w_warn "Note that some functionality may not work without Windows Management Framework" |
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 will give 3 popups in GUI mode, please combine it into one.
src/winetricks
Outdated
|
||
w_call dotnet462 | ||
|
||
w_download https://github.com/PowerShell/PowerShell/releases/download/v6.1.6/PowerShell-6.1.6-win-x86.zip 1dc690c9a1091d0ed5b71de903ab3cd7b58ba9638acdfeb9f9fe7031abaf47e9 PowerShell-6.1.6-win-x86.zip |
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.
Since you're not changing the filename, there's no need to specify it as the last argument.
src/winetricks
Outdated
w_try_7z "$W_SYSTEM32_DLLS"/WindowsPowerShell/v1.0/ "${W_CACHE}/${W_PACKAGE}/${file1}" | ||
w_try_cd "$W_SYSTEM32_DLLS"/WindowsPowerShell/v1.0 | ||
w_try cp -f pwsh.exe powershell.exe | ||
for file in *\\*; do target="${file//\\//}"; mkdir -p "${target%/*}"; mv -v "$file" "$target"; done |
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.
mkdir/mv should be behind w_try().
This also introduces a bashism, causing travis to fail.
64-bit prefix support would be really nice! There's an app (MTGA) that needs powershell for the installation process but it seems to crash in 32-bit prefix for some reason. |
well, MTGA installer is actually what this PR has been tested with. There is no reason it should require 64bit prefix |
oh, weird, you're right. My prefix must have gotten borked during testing. |
Hi, i attached script that also installs 64 bit powershell here: |
@PietJankbal does this actually work? because it specified |
I think I might have found a valid usecase for a 64-bit powershell verb. |
That is commented out, it should be reoved really |
Oh, didn't notice it's commented out :D |
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.
A couple minor things, then this can go in as far as I'm concerned (unless you want to get 64-bit working before merging).
|
||
load_powershell() | ||
{ | ||
w_package_unsupported_win64 |
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.
Can be removed, as you said (proper 64-bit support can be a followup PR).
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 wasn't planning on adding win64 support
w_override_dlls native powershell.exe | ||
|
||
# remove builtin placeholders | ||
rm -f "$W_SYSTEM32_DLLS"/powershell.exe |
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.
Prepend with w_try
# remove builtin placeholders | ||
rm -f "$W_SYSTEM32_DLLS"/powershell.exe | ||
|
||
|
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.
Please remove the extra newline.
frankly, I'm not sure anymore this has much value. It does work after being installed but I'm not sure why anyone would use it. Original intent was to make Magic Arena installer work but as it happens just moving wine's stub to a proper location fixes that (in 5.0-rc4). |
Hi, A few remarks. As theli-ua already pointed out wine`s stub has moved so this line is not up to date any more: Anyway, i still think it Powershell 6 and up are really kind of "add-ons" to Windows so those versions of powershell should be called by "wine pwsh.exe". The installers for powershell ver. 6 and up work fine if you put a fake pwrshlplugin.dll (with high enough version resource) in system32/wow64. The right way to go is i think install powershell2.0 (i have a script for this and it installs and with a bit of aftermath repair work because of bug 25740 it has at least minimal functionality like reporting version correctly) Version 2.0 is btw also the version that is reported on my win7 partition when you start powershell (see e.g. https://appuals.com/how-to-check-powershell-version-on-windows-10-8-and-7/) I Regards |
@PietJankbal sure, feel free to pick this up |
See https://raw.githubusercontent.com/PietJankbal/temporary_stuff/master/pwsh20.diff I`ll do PR if my other Pull request are settled down |
@PietJankbal the last link is now broken as you removed your repository |
Hi, i rearranged some files, it`s here: https://github.com/PietJankbal/storage/blob/master/pwsh20.diff |
Hi, @austin987, @theli-ua I could take over here. Should I copy this branch into a new PR? Or I can someone assign this one to me? |
@allentiak I'm not sure if GH will let you push over another user's branch (it tells me I can, but I'm the maintainer). I'd suggest making your own PR. |
Then, I'll make a new PR out of this one. Give me a few days. |
functionality enough to satisfy installers requiring powershell
For example this allows Magic Arena ( https://magic.wizards.com/en/mtgarena ) installer work in wine
Note: https://docs.microsoft.com/en-us/powershell/scripting/install/installing-powershell-core-on-windows?view=powershell-6 says WMF is a prerequisite but I have not found a way to install it. And installing it this way is at least enough for installer to work (thus warns).
It is also not clear what dotnet version it requires ... it works with 462 but probably any 45+ will work (not sure how to reflect such dependency)