-
Notifications
You must be signed in to change notification settings - Fork 385
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 build setup in PowerShell #923
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
Thank you for the pull request, but I guess what we should double check is to see if we still need to run the following batch file or not in our build instruction, rather than mechanically copying the command to PowerShell.
I'll check to see it and remove the above line if I can confirm that it's no longer necessary. Thanks! |
It doesn't have any effect in PS: PowerShell 7.4.2
PS C:\Users\tatsu> (gcm cl).path
Get-Command: The term 'cl' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
PS C:\Users\tatsu> & "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsamd64_x86.bat"
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.9.6
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64_x86'
PS C:\Users\tatsu> (gcm cl).path
Get-Command: The term 'cl' is not recognized as a name of a cmdlet, function, script file, or executable program.
Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
PS C:\Users\tatsu> & 'C:\Program Files\Microsoft Visual Studio\2022\Community\Common7\Tools\Launch-VsDevShell.ps1' -HostArch amd64 -Arch x86 -SkipAutomaticLocation
**********************************************************************
** Visual Studio 2022 Developer PowerShell v17.9.6
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
PS C:\Users\tatsu> (gcm cl).path
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\HostX64\x86\cl.exe
CMD: Microsoft Windows [Version 10.0.22631.3447]
(c) Microsoft Corporation. All rights reserved.
C:\Users\tatsu>where cl
情報: 与えられたパターンのファイルが見つかりませんでした。
C:\Users\tatsu>"C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsamd64_x86.bat"
**********************************************************************
** Visual Studio 2022 Developer Command Prompt v17.9.6
** Copyright (c) 2022 Microsoft Corporation
**********************************************************************
[vcvarsall.bat] Environment initialized for: 'x64_x86'
C:\Users\tatsu>where cl
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\Hostx64\x86\cl.exe
C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC\14.39.33519\bin\Hostx64\x64\cl.exe In the first place, a quoted string in PS is evaluated as an expression without command execution:
|
This is a follow up to my previous commits [1][2], which aimed to automate and encapsulate vcvarsall.bat handling in build_qt.py rather than asking each developer to call it before running build_qt.py. As seen in #923, however, build_mozc.py still requires us to run vcvarsall.bat (or its variant) before running any sub-command in build_qt.py. In order to let build_mozc.py take care of vcvarsall.bat handling internally, this commit extracts out 'get_vs_env_vars' from build_qt.py into a newly introduced vs_util.py so that build_mozc.py can reuse it in a subsequent commit. This is just a mechanical refactoring commit. There must be no developer-observable difference in this commit. #codehealth [1]: c777896 [2]: f88dd04 PiperOrigin-RevId: 629244129
Hi tats-u, We appreciate your PR. Thank you, |
It’s unfortunate that the PR was not merged, but it’s good that as a result, you can now build by typing the commands as described even in PowerShell. |
Features * Added more symbol characters (#933) * Added words of 対象内 / 対象外 by fixing the format error (#928) Bug fix * Fixed the crash issue on saving the user dictionary. (42cbb3f) * Fixed the crash issue on the debug build caused by converting negative numbers (#878) * macOS: Replaced "Google Japanese Input" with Mozc in UI messages. (caeb9ce) * macOS: Fixed the crash issue of mozc_emacs_helper (#900) * macOS (Apple Silicon): Fixed the crash issue of GUI tools (#791) Build * Set proper release/debug build options for GitHub Actions (07c5f89) * Updated the Protobuf version: v26.1 → v27.0 (#937) * Updated the Qt version: 6.7.0 → 6.7.1 (#934) * Linux: Added Dockerfile for Ubuntu 24.04 (#924) * Windows: Simplified the build process by reducing manual execution of the vcvars .bat file. (#923) Code * Applied Clang's build cleaner * Completed the migration from base/logging.h to Abseil log. * macOS: Applied suggestions from code scanning alerts (b955086) PiperOrigin-RevId: 639975159
Description
A clear and concise description of this pull request.
vcvarsamd64_x86.bat
is only for CMD.If you are using PowerShell, you should use
Launch-VsDevShell.ps1
instead.This PR adds how to use
Launch-VsDevShell.ps1
instead ofvcvarsamd64_x86.bat
todocs\build_mozc_in_windows.md
.Issue IDs
Issue and/or discussion IDs related to this pull request.
Steps to test new behaviors (if any)
A clear and concise description about how to verify new behaviors (if any).
docs\build_mozc_in_windows.md
(gcm cl).path
(PowerShell) /where cl
(CMD)Additional context
Add any other context about the pull request here.