diff --git a/src/PowerShell/Microsoft.WinGet.Client/Microsoft.WinGet.Client.csproj b/src/PowerShell/Microsoft.WinGet.Client/Microsoft.WinGet.Client.csproj index 8196f9cfe4..c4b03ddf71 100644 --- a/src/PowerShell/Microsoft.WinGet.Client/Microsoft.WinGet.Client.csproj +++ b/src/PowerShell/Microsoft.WinGet.Client/Microsoft.WinGet.Client.csproj @@ -17,7 +17,7 @@ $(OutputPath)\Microsoft.WinGet.Client.xml - + USE_PROD_CLSIDS @@ -85,22 +85,13 @@ 10.0.17763.0 - - - x64 - - - - Win32 - - - - Arm64 - - - + + + + $(OutputPath)..\..\UndockedRegFreeWinRT\ + - + diff --git a/src/PowerShell/Microsoft.WinGet.Client/Module/Microsoft.WinGet.Client.psd1 b/src/PowerShell/Microsoft.WinGet.Client/Module/Microsoft.WinGet.Client.psd1 index b1d7b81b7c..6afef78db4 100644 --- a/src/PowerShell/Microsoft.WinGet.Client/Module/Microsoft.WinGet.Client.psd1 +++ b/src/PowerShell/Microsoft.WinGet.Client/Module/Microsoft.WinGet.Client.psd1 @@ -66,14 +66,11 @@ PowerShellVersion = '5.1.0' FormatsToProcess = 'Format.ps1xml' # Modules to import as nested modules of the module specified in RootModule/ModuleToProcess -NestedModules = if ($env:PROCESSOR_ARCHITECTURE -like 'AMD64' -OR $env:PROCESSOR_ARCHITECTURE -like 'IA64') { - "x64\$PSEdition\Microsoft.WinGet.Client.dll" -} -elseif ($env:PROCESSOR_ARCHITECTURE -like 'ARM64') { - "ARM64\$PSEdition\Microsoft.WinGet.Client.dll" +NestedModules = if ($env:PROCESSOR_ARCHITECTURE -like 'x86') { + "x86\$PSEdition\Microsoft.WinGet.Client.dll" } else { - "x86\$PSEdition\Microsoft.WinGet.Client.dll" + "x64\$PSEdition\Microsoft.WinGet.Client.dll" } # Functions to export from this module, for best performance, do not use wildcards and do not delete the entry, use an empty array if there are no functions to export. diff --git a/src/PowerShell/Microsoft.WinGet.Client/README.md b/src/PowerShell/Microsoft.WinGet.Client/README.md index 8a26754c07..d905fbb820 100644 --- a/src/PowerShell/Microsoft.WinGet.Client/README.md +++ b/src/PowerShell/Microsoft.WinGet.Client/README.md @@ -2,11 +2,19 @@ This project contains the source code for building the Windows Package Manager PowerShell Module. -## Running the PowerShell Module Locally +## Building the PowerShell Module Locally After building the project solution, the `Microsoft.WinGet.Client` PowerShell module can be found in the output directory in the `PowerShell` folder. For example if you built the project as x64 release, you should expect to find the module files in `$(SolutionDirectory)/src/x64/Release/PowerShell`. -To run the module, make sure you are using the latest version of PowerShell (not Windows PowerShell), then import the module manifest (Microsoft.WinGet.Client.psd1). +## Quick Start Guide + +**To run the module, make sure you are using the latest version of PowerShell (not Windows PowerShell)**. + +``` +winget install --id Microsoft.Powershell +``` + +Import the module manifest (Microsoft.WinGet.Client.psd1) by running the following command: ``` Import-Module diff --git a/src/WinGetServer/WinGetServer.vcxproj b/src/WinGetServer/WinGetServer.vcxproj index 49df102033..dde774aa01 100644 --- a/src/WinGetServer/WinGetServer.vcxproj +++ b/src/WinGetServer/WinGetServer.vcxproj @@ -149,7 +149,7 @@ /debug:full /debugtype:cv,fixup /incremental:no %(AdditionalOptions) - + USE_PROD_WINGET_SERVER;%(PreprocessorDefinitions) diff --git a/src/WinGetServer/WinGetServerManualActivation_Client.cpp b/src/WinGetServer/WinGetServerManualActivation_Client.cpp index b74b8d0fcd..2e4dc11fda 100644 --- a/src/WinGetServer/WinGetServerManualActivation_Client.cpp +++ b/src/WinGetServer/WinGetServerManualActivation_Client.cpp @@ -14,7 +14,7 @@ #include #include -#if USE_PROD_WINGET_SERVER +#ifdef USE_PROD_WINGET_SERVER const std::wstring_view s_ServerExePath = L"Microsoft\\WindowsApps\\Microsoft.DesktopAppInstaller_8wekyb3d8bbwe\\WindowsPackageManagerServer.exe"; #else const std::wstring_view s_ServerExePath = L"Microsoft\\WindowsApps\\WinGetDevCLI_8wekyb3d8bbwe\\WindowsPackageManagerServerDev.exe"; diff --git a/src/Xlang/UndockedRegFreeWinRT/src/UndockedRegFreeWinRT/Directory.Build.props b/src/Xlang/UndockedRegFreeWinRT/src/UndockedRegFreeWinRT/Directory.Build.props deleted file mode 100644 index 9e83720c39..0000000000 --- a/src/Xlang/UndockedRegFreeWinRT/src/UndockedRegFreeWinRT/Directory.Build.props +++ /dev/null @@ -1,13 +0,0 @@ - - - 1.0.0.0 - $(Platform) - x86 - $([System.IO.Path]::GetFullPath('$(SolutionDir)_build\$(BuildPlatform)\$(Configuration)\')) - $(BuildOutDir) - $([System.IO.Path]::GetFullPath('$(SolutionDir)_build\x86\$(Configuration)\')) - $(CsWinRTDir)cswinrt.exe - $(BuildOutDir) - $(OutDir)$(ProjectName)\ - - \ No newline at end of file diff --git a/src/Xlang/UndockedRegFreeWinRT/src/UndockedRegFreeWinRT/UndockedRegFreeWinRT/UndockedRegFreeWinRT.vcxproj b/src/Xlang/UndockedRegFreeWinRT/src/UndockedRegFreeWinRT/UndockedRegFreeWinRT/UndockedRegFreeWinRT.vcxproj index 284a63c620..34a02ca7cf 100644 --- a/src/Xlang/UndockedRegFreeWinRT/src/UndockedRegFreeWinRT/UndockedRegFreeWinRT/UndockedRegFreeWinRT.vcxproj +++ b/src/Xlang/UndockedRegFreeWinRT/src/UndockedRegFreeWinRT/UndockedRegFreeWinRT/UndockedRegFreeWinRT.vcxproj @@ -40,6 +40,8 @@ Win32Proj UndockedRegFreeWinRT 10.0.22000.0 + $(Platform) + x86 @@ -70,13 +72,13 @@ winrtact true $(Platform)\$(Configuration)\ - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ + $(SolutionDir)$(BuildPlatform)\$(Configuration)\$(ProjectName)\ winrtact false $(Platform)\$(Configuration)\ - $(SolutionDir)$(Platform)\$(Configuration)\$(ProjectName)\ + $(SolutionDir)$(BuildPlatform)\$(Configuration)\$(ProjectName)\ Spectre @@ -251,6 +253,11 @@ winrtact.def + + + USE_PROD_WINGET_SERVER;%(PreprocessorDefinitions) + +