Commit graph

30 commits

Author SHA1 Message Date
Mike Griese df06c54e70
Wrap these commands with quotes (#11807)
I'm pretty exactly following the diff from #917. These paths weren't wrapped in `"`s, so building the solution in a directory with a space in it would explode.

Closes #917.

Turns out, the diff provided by that user wasn't exactly right. I've tested building in a directory with spaces now, and this seems to work. 

Also caught a bug in the Generate Feature Flags script.
2021-11-23 17:01:59 +00:00
Dan Thompson e2005ca5d7 Merged PR 6176782: [Git2Git] Get rid of dead build macros/#defines FE_IME, W32_SB, etc.
Retrieved from https://microsoft.visualstudio.com os.2020 OS official/rs_wdx_dxp_windev 40df712b33a40e76aeeac87f823bbb028d2e3972

Related work items: MSFT-32007459
2021-06-21 10:50:52 -07:00
Dustin Howett 3909cc103a Merged PR 5770253: [Git2Git] Merged PR 5760120: Add propsheet chooser to Windows
[Git2Git] Merged PR 5760120: Add propsheet chooser to Windows

Now the inbox console propsheet can choose which terminal is default

Related work items: MSFT-32007202 #492

Retrieved from https://microsoft.visualstudio.com os.2020 OS official/rs_wdx_dxp_windev d80f506858bd990c267de6cefae7ff55707b3a57
2021-03-10 01:19:04 +00:00
N d09fdd61cb
Change backslashes in include statements to forward slashes (#8205)
Many include statements use forward slashes, while others use backwards
slashes. This is inconsistent formatting. For this reason, I changed the
backward slashes to forward slashes since that is the standard.
2020-11-25 21:02:10 +00:00
Dustin Howett d5bfd237e5
Merged PR 5289766: [Git2Git] Reflect OS changes for ARM64 build
Retrieved from https://microsoft.visualstudio.com os.2020 OS official/rs_onecore_dep_uxp 8bbacf82e9da4627096ff2c2b1b4c5b183db75d4
2020-11-11 10:03:28 -08:00
Dustin Howett 4c75ffb327 Merged PR 5131018: [Git2Git] Migrate OS changes to console property sheet manifest
Retrieved from https://microsoft.visualstudio.com os.2020 OS official/rs_onecore_dep_uxp dd0c54d9abd94dea1ffe956373a4c20b30a6151e

Related work items: MSFT-26187783
2020-09-03 21:38:04 +00:00
Dustin L. Howett dbbe820ae4
Update clang-format to 10.0 (#7389)
This commit removes our local copy of clang-format 8 and replaces it
with a newly-built nuget package containing clang-format 10.

This resolves the inconsistency between our version of clang-format and
the one shipped in Visual Studio.

A couple minor format changes were either required or erroneously forced
upon us--chief among them is a redistribution of `*`s around SAL
annotations in inline class members of COM classes. Don't ask why; I
couldn't figure it out.

We had some aspirational goals for our formatting, which were left in
but commented out. Enabling them changes our format a little more than
I'm comfortable with, so I uncommented them and locked them to the
format style we've been using for the past year. We may not love it, but
our aspirations may not matter here any longer. Consistent formatting is
better than perfect formatting.
2020-08-25 17:15:43 +00:00
pi1024e 02d5f90837
Replace old C headers (xxx.h) with modern ones (cxxx) (#5080) 2020-07-01 11:00:24 -07:00
Malcolm Smith 601286ac69
Find icon from shortcut target if shortcut doesn't specify it (#6277)
Implements what I was suggesting in #6266 where if a shortcut doesn't
specify an icon, the shortcut target full path is used before searching
for a matching executable in the path.

## References

Found due to not getting the right icon in conhost from the Yori
installer.  It's fixed in the installer from
5af366b6a5
for all current users of conhost though, so this PR is just trying to
minimize surprises for the next guy.

## Detailed Description of the Pull Request / Additional comments

I know conhost and shortcut settings aren't really the team's focus
which is why I'm doing this.  I understand though if there's a better
way or there are factors that I hadn't considered.  Note that the path
searching code is used when programs are launched without using a
shortcut, and it will match if the working directory of the shortcut is
the directory containing the executable.

## Validation Steps Performed

Created a shortcut that didn't specify an icon to a binary that wasn't
in the path, and verified that the icon in the upper left of the console
window could resolve correctly when opening the shortcut.  I'm not aware
of a way to get into this path (of launching via a shortcut to a command
line process) without replacing the system conhost, which is what I did
to verify it.  In order to diagnose it, I used hardcoded DebugBreak()
since even ImageFileExecutionOptions didn't like running against conhost-
is there are better way to debug and test these cases without being so
invasive on the system?

Closes #6266
2020-06-01 17:19:05 +00:00
Michael Niksa e390111dfb
Give cursor radio buttons their own sequential IDs in propsheet (#6231)
For a radio button group to work properly, they need sequential IDs.
This moves the cursor radio buttons on the `conhost` property sheet to
be sequential.

## References
- Introduced with #2663
- Found while investigating #4186

## PR Checklist
* [x] Closes unfiled issue found while investigating #4186
* [x] I work here.
* [x] Manual test.
* [x] No documentation required.
* [x] Am core contributor.

## Detailed Description of the Pull Request / Additional comments
- `CheckRadioButton` takes a contiguous group of IDs. It will set one
  item in the list and then uncheck the rest. When a new one was added
  to the group, it was added to the end of the segment in the IDs file,
  but not immediately after the existing radio buttons. This means it
  accidentally turned off all the other buttons in the middle.
- To resolve this, I moved all the cursor buttons into their own
  sequential group number and I deprecated the old values.

## Validation Steps Performed
- [x] Ensured that the "Discard Old Duplicates" value was set in the
  registry, walked through debugger as `conhost` packed the `TRUE` value
  into the property sheet blob, walked through the property sheet
  `console.dll` as it unpacked the `TRUE`, then observed that the
  checkbox was actually set instead of getting unset by the
  `CheckRadioButton` call that went from 107 to 119 and accidentally
  unchecked number 112, `IDD_HISTORY_NODUP` even though I swear it was
  just set.
2020-05-28 14:16:10 -07:00
Mike Griese 2453e8e1ed
Rename propsheet/TerminalPage to propsheet/TerminalPropsheetPage (#5882)
My workflow is to use Sublime's <kbd>Ctrl+P</kbd> shortcut to navigate to files by name. However, the propsheet version of the files _always_ comes up before the `TerminalApp` one does. This results in me having to close the file and re-open the right one.

This PR renames the propsheet one, so it's unambiguous which one I'm opening.

It's really the most trivial nit.
2020-05-14 01:49:20 +00:00
Josh Soref 5de9fa9cf3
ci: run spell check in CI, fix remaining issues (#4799)
This commit introduces a github action to check our spelling and fixes
the following misspelled words so that we come up green.

It also renames TfEditSes to TfEditSession, because Ses is not a word.

currently, excerpt, fallthrough, identified, occurred, propagate,
provided, rendered, resetting, separate, succeeded, successfully,
terminal, transferred, adheres, breaks, combining, preceded,
architecture, populated, previous, setter, visible, window, within,
appxmanifest, hyphen, control, offset, powerpoint, suppress, parsing,
prioritized, aforementioned, check in, build, filling, indices, layout,
mapping, trying, scroll, terabyte, vetoes, viewport, whose
2020-03-25 11:02:53 -07:00
pi1024e 9f95b54f2c
Change NULL to nullptr since they are pointers (#4960)
Some functions and variables are having NULL assigned to them when they are in fact pointers, so nullptr might be more accurate here.
2020-03-20 20:35:12 +00:00
Josh Soref a13ccfd0f5
Fix a bunch of spelling errors across the project (#4295)
Generated by https://github.com/jsoref/spelling `f`; to maintain your repo, please consider `fchurn`

I generally try to ignore upstream bits. I've accidentally included some items from the `deps/` directory. I expect someone will give me a list of items to drop, I'm happy to drop whole files/directories, or to split the PR into multiple items (E.g. comments/locals/public).

Closes #4294
2020-02-10 20:40:01 +00:00
Chester Liu dd1dbf5780 Remove global namespaced min/max and replace it with STL min/max (#4173)
<!-- Enter a brief description/summary of your PR here. What does it fix/what does it change/how was it tested (even manually, if necessary)? -->
## Summary of the Pull Request

It's 2020 now. It's *about* time that we move on from 1990's macros.

<!-- Other than the issue solved, is this relevant to any other issues/existing PRs? --> 
## References

<!-- Please review the items on the PR checklist before submitting-->
## PR Checklist
* [X] Closes #4152 
* [X] CLA signed. If not, go over [here](https://cla.opensource.microsoft.com/microsoft/Terminal) and sign the CLA
* [ ] Tests added/passed
* [ ] Requires documentation to be updated
* [ ] I've discussed this with core contributors already. If not checked, I'm ready to accept this work might be rejected in favor of a different grand plan. Issue number where discussion took place: #xxx

<!-- Provide a more detailed description of the PR, other things fixed or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments

Remove global namespaced min/max and replace it with STL min/max.

<!-- Describe how you validated the behavior. Add automated tests wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed

Run it.
2020-01-10 13:27:05 +00:00
Michael Niksa b4673bd475 Integrate inbox changes up to 68d3b53286dd
sources files and testmd changes

(cherry picked from commit 41b3b2a49d2d4510cd046101616f8a561bd28ceb)
2019-12-02 17:24:26 -08:00
Dustin L. Howett (MSFT) 9dc922fc37
Unify and clean up the common build properties (#3429)
This commit cleans up and deduplicates all of the common build
preamble/postamble across exe, dll, lib and c++/winrt projects.

The following specific changes have been made:
* All projects now define their ConfigurationType
* All projects now set all their properties *before* including a common
  build file (or any other build files)
* cppwinrt.pre and cppwinrt.post now delegate most of their
  configuration to common.pre and common.post
* (becuase of the above,) all build options are conserved between
  console and c++/winrt components, including specific warnings and
  preprocessor definitions.
* More properties that are configurable per-project are now
  conditioned so the common props don't override them.
* The exe, dll, exe.or.dll, and lib postincludes have been merged into
  pre or post and switched based on condition as required
* Shared items (-shared, -common) are now explicitly vcxitems instead of
  vcxproj files.
* The link line is now manipulated after Microsoft.Cpp sets it, so the
  libraries we specify "win". All console things link first against
  onecore_apiset.lib.
* Fix all compilation errors caused by build unification
* Move CascadiaPackage's resources into a separate item file

Fixes #922.
2019-11-05 14:29:11 -08:00
Mike Griese b97db63030 Prevent the v1 propsheet from zeroing colors, causing black text on black background. (#2651)
* This fixes the registry path

  What's happening is the console is writing the Forcev2 setting, then the v1
  console is ignoring those settings, then when you check the checkbox to save
  the v2 settings, we'll write the zeros out. That's obviously bad. So we'll
  only write the v2 settings back to the registry if the propsheet was launched
  from a v2 console.

  This does not fix the shortcut path. That'll be the next commit.

* Fix the shortcut loading too

  fixes #2319

* remove the redundant property I added

* add some notes to the bx.ps1 change
2019-10-02 16:04:59 -07:00
Michael Niksa 52534c94cc Combined changes to make the build work again (see inside) (#2945)
* Revert "Add source linking information during the build (#2857)"

This reverts commit 6b728cd6d0.

* Need reference to renderer base inside UnitTests_TerminalCore
* add dependency for TerminalControl to Types project.
* Set build to single threaded as parallel build is broken by 16.3 build toolchain.
* Disable new rule C26814 as it's breaking builds
   Wrote a follow up task #2941 to roll it out later.
* Add noexcept to dx header.
2019-09-30 10:39:55 -07:00
Michael Niksa 6b728cd6d0
Add source linking information during the build (#2857)
Copies source linking scripts and processes from Microsoft/Microsoft-UI-XAML. This embeds source information inside the PDBs in two formats: One for WinDBG using a PowerShell script that runs during the build, and one for Visual Studio using the Microsoft.SourceLink.GitHub NuGet pacakge. Sources are automatically pulled from raw.githubusercontent.com when debugging a release build inside either of these utilities as of this change.
2019-09-26 09:31:09 -07:00
Mike Griese ce34c7320c Prevent "Options" propsheet from reverting cursor shape settings (#2663)
* this actually fixes #1219

* the terminal page should check the checkbox on the options page

* Discard these changes from #2651

* Add comments, pull function out to helper
2019-09-09 14:45:05 +00:00
Dustin L. Howett (MSFT) 08464648f2
inbox: reflect incoming changes from Windows (#1359)
official/rs_onecore_dep_acioss 9638166d8c8374081a2aa8b8f9ecabf2bae0df0a
2019-06-20 17:51:04 -07:00
Dustin L. Howett (MSFT) ecfaa76a89
inbox: merge refactoring payload from FI
`official/rs_onecore_dep_acioss 6fa4fbe485365ed72be2f557621fe58d4fc75197`
2019-06-11 17:01:26 -07:00
adiviness 9b92986b49
add clang-format conf to the project, format the c++ code (#1141) 2019-06-11 13:27:09 -07:00
Shawn Walker-Salas e52170e2cf Apply [[nodiscard]] to functions returning error codes (#953)
* Apply [[nodiscard]] to functions returning error codes

- applied [[nodiscard]] for all HRESULT, LRESULT, and NTSTATUS functions
- fixed IntelliSense declaration complaints leading to function not
  implemented warnings
- deleted declared but never implemented functions
- fixed unused parameter warnings

How verified:
- bcz dbg
- opencon
- testcon
- VS2019 debug build

* - use LOG_IF_FAILED where applicable
- remove use of goto
- make MakeAltRasterFont return void

* - add missing [[nodiscard]]
- remove vestigal function declarations
- fix inconsistent function declaration
2019-05-30 16:20:42 +00:00
adiviness cc30475955
add audit mode to ci (#948)
* add audit mode to ci
2019-05-24 14:48:10 -07:00
Ilya Shipitsin 547cba968c fix couple of null pointer dereferences (#927)
found by cppcheck

[src/propsheet/OptionsPage.cpp:216] -> [src/propsheet/OptionsPage.cpp:242]: (warning) Either the condition 'lParam' is redundant or there is possible null pointer dereference: pshn.
[src/propsheet/TerminalPage.cpp:352] -> [src/propsheet/TerminalPage.cpp:378]: (warning) Either the condition 'lParam' is redundant or there is possible null pointer dereference: pshn.
2019-05-23 12:42:39 -05:00
Eric Budai 06a5583c86 Fix a bunch of static analysis issues (#553)
* static analysis fixes
* using C++ style casts
* explicit delete changed to reset(nullptr)
* fix for null apiMsg.OtherId during tracing in Compare()
* changed INVALID_ID macro to constexpr
* properly handle null ReplyMsg in ConsoleIoThread()
* Fixed wrong static_cast for State.InputBuffer
* compensate for null reply message to fix deref problem of ReplyMsg in srvinit.cpp by changing signature in DeviceComm.h
2019-05-23 10:35:30 -07:00
Bartosz Brachaczek 73ad742c12 Fix signatures of some callback functions (#871)
* Fix signatures of callback functions

* Fix calling conventions of callback functions

* Remove now-unnecessary casts of pointers to callback functions
2019-05-17 20:32:51 +00:00
Dustin Howett d4d59fa339 Initial release of the Windows Terminal source code
This commit introduces all of the Windows Terminal and Console Host source,
under the MIT license.
2019-05-02 15:29:04 -07:00