Compare commits

...

10 commits

Author SHA1 Message Date
Mike Griese c5e20398db Misc things tooling around in here 2019-08-20 08:23:58 -05:00
Mike Griese 46cca6ba57 TURNS OUT CASE SENSITIVITY IS IMPORTANT 2019-08-20 08:23:35 -05:00
Mike Griese c064b58a78 This _should_ work 2019-08-19 17:29:39 -05:00
Mike Griese 32be2d4d6c Merge branch 'master' into dev/migrie/f/2171-openterm.cmd 2019-08-19 12:36:27 -05:00
Mike Griese 559c68079e Initial draft of openterm.cmd
related to #2171

  TODO: Figure out the resources.pri thing.
2019-07-31 09:07:41 -05:00
Mike Griese 44d23f4fce PR nits 2019-07-31 09:05:35 -05:00
Mike Griese db0cd1f587 fix some bugs with building outside a project directory. 2019-07-31 08:37:51 -05:00
Mike Griese 9d2c3ec2dd Cleanup for PR 2019-07-31 08:13:17 -05:00
Mike Griese 87571fb5d8 Merge remote-tracking branch 'origin/master' into dev/migrie/f/bx.cmd 2019-07-31 07:08:58 -05:00
Mike Griese ae02a9c104 Try createing a script to only build the current working directory
Inspired by #2078.

  I wanted to use this for WindowsTerminal, but I can't generate the
  resources.pri from just building WindowsTerminal. Maybe @dhowett-msft has
  some ideas.
2019-07-25 07:43:37 -05:00
5 changed files with 66 additions and 2 deletions

View file

@ -5,6 +5,7 @@
#include "../TerminalApp/ColorScheme.h"
#include "../TerminalApp/CascadiaSettings.h"
#include <winrt/Microsoft.Terminal.TerminalConnection.h>
using namespace Microsoft::Console;
using namespace TerminalApp;
@ -31,6 +32,7 @@ namespace TerminalAppLocalTests
END_TEST_CLASS()
TEST_METHOD(TryCreateWinRTType);
TEST_METHOD(TryCreateConnection);
TEST_METHOD(ValidateProfilesExist);
TEST_METHOD(ValidateDefaultProfileExists);
TEST_METHOD(ValidateDuplicateProfiles);
@ -56,6 +58,12 @@ namespace TerminalAppLocalTests
return root;
}
void SettingsTests::TryCreateConnection()
{
winrt::Microsoft::Terminal::TerminalConnection::EchoConnection conn{};
VERIFY_IS_NOT_NULL(conn);
}
void SettingsTests::TryCreateWinRTType()
{
winrt::Microsoft::Terminal::Settings::TerminalSettings settings{};

View file

@ -3,7 +3,6 @@
#include "pch.h"
#include <winrt/Microsoft.Terminal.TerminalControl.h>
#include <winrt/TerminalApp.h>
#include "NonClientIslandWindow.h"

View file

@ -9,7 +9,7 @@
<application>
<!-- Windows 10 1903 -->
<!-- See https://docs.microsoft.com/en-us/windows/apps/desktop/modernize/xaml-islands -->
<maxVersionTested Id="10.0.18362.0"/>
<maxversiontested Id="10.0.18362.0"/>
<supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" />
</application>
</compatibility>

View file

@ -4,6 +4,7 @@
#include "pch.h"
#include "AppHost.h"
#include "resource.h"
// #include <winrt/Microsoft.Terminal.TerminalConnection.h>
using namespace winrt;
using namespace Windows::UI;
@ -107,6 +108,8 @@ int __stdcall wWinMain(HINSTANCE, HINSTANCE, LPWSTR, int)
// provides an implementation of Windows.UI.Xaml.Application.
AppHost host;
// winrt::Microsoft::Terminal::TerminalConnection::EchoConnection conn{};
// !!! LOAD BEARING !!!
// This is _magic_. Do the initial loading of our settings *BEFORE* we
// initialize our COM apartment type. This is because the Windows.Storage

54
tools/openterm.cmd Normal file
View file

@ -0,0 +1,54 @@
@echo off
rem openterm - launch the Windows Terminal binary
rem Runs the windowsterminal.exe binary generated by the build in the debug directory.
rem Passes any args along.
setlocal
set _last_build_bin=%OPENCON%\bin\%ARCH%\%_LAST_BUILD_CONF%
set _last_build=%OPENCON%\%ARCH%\%_LAST_BUILD_CONF%
set _package_root="%OPENCON%\src\cascadia\CascadiaPackage"
set _package_obj=%_package_root%\obj\%ARCH%\%_LAST_BUILD_CONF%
set _package_output=%_package_root%\bin\%ARCH%\%_LAST_BUILD_CONF%
if not exist %_last_build%\WindowsTerminal.exe (
echo Could not locate the WindowsTerminal.exe in %_last_build%. Double check that it has been built and try again.
goto :eof
)
set _r=%random%
set copy_dir=OpenConsole\%_r%\WindowsTerminal
rem Generate a unique name, so that we can debug multiple revisions of the binary at the same time if needed.
(xcopy /Y %_last_build_bin%\OpenConsole.exe %TEMP%\%copy_dir%\conhost.exe*) > nul
(xcopy /Y %_last_build_bin%\console.dll %TEMP%\%copy_dir%\console.dll*) > nul
(xcopy /Y %_last_build%\*.dll %TEMP%\%copy_dir%\*.dll*) > nul
(xcopy /Y %_last_build%\*.xbf %TEMP%\%copy_dir%\*.xbf*) > nul
(xcopy /Y %_last_build%\WindowsTerminal.exe %TEMP%\%copy_dir%\WindowsTerminal.exe*) > nul
rem If the resources.pri file is older than WindowsTerminal.exe binary, than we
rem definitely need to rebuild it. This step will only work once the
rem CascadiaPackage has been built once! Instead of trying to totally reverse
rem engineer the wapproj MakePri machinery, we're just going to assume that 99%
rem of the work was already done for us:
rem @echo on
rem set _need_to_build_resources=1
rem if (%_need_to_build_resources%)==(1) (
rem "C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64\MakePri.exe" ^
rem New -ProjectRoot %_package_root%\ ^
rem -ConfigXml %_package_obj%\priconfig.xml ^
rem -OutputFile %_package_output%\resources.pri ^
rem -IndexName WindowsTerminalDev ^
rem -Verbose -Overwrite
rem )
rem Copy the resources form the package project to the same directory too. We
rem need this to be able to launch. TODO: Find out how to generate this if we're
rem _only_ building the WindowsTerminal project.
(xcopy /Y %_package_output%\resources.pri %TEMP%\%copy_dir%\resources.pri*) > nul
rem start %TEMP%\%copy_dir%\WindowsTerminal.exe %*
start %TEMP%\%copy_dir%\
echo Launching %TEMP%\%copy_dir%\WindowsTerminal.exe...