
This moves the app template more toward being a more generic starting point for any Flutter application, eliminating some hard-code assumptions about there being a single window/engine pair that is directly bound to the life of the application: - Moves the runloop into its own class, making it capable of servicing any number of engine instances. - Moves the logic for setting up a window containing only a Flutter view into a window subclass for ease of re-use. - Makes quit-on-window-close an optional property. (Long term this should be even more generic, like a quit-when-last-window-closes option, but this is a short-term improvement that removes the binding between the runloop and the window). - Allows for multiple instances of Win32Window to exist without issues relating to the window class registration. Since there are getting to be a non-trivial number of files associated with the runner, this moves the source into a runner/ directory, as is already done on some other platforms. Note that creating multiple Flutter windows at the same time still doesn't work correctly even with this change, but this addresses some of the known issues, and makes it easier to test in the future (e.g., for debugging engine-level issues with multiple instances). Fixes #45397
261 lines
12 KiB
XML
261 lines
12 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
|
<ItemGroup Label="ProjectConfigurations">
|
|
<ProjectConfiguration Include="Debug|x64">
|
|
<Configuration>Debug</Configuration>
|
|
<Platform>x64</Platform>
|
|
</ProjectConfiguration>
|
|
<ProjectConfiguration Include="Profile|x64">
|
|
<Configuration>Profile</Configuration>
|
|
<Platform>x64</Platform>
|
|
</ProjectConfiguration>
|
|
<ProjectConfiguration Include="Release|x64">
|
|
<Configuration>Release</Configuration>
|
|
<Platform>x64</Platform>
|
|
</ProjectConfiguration>
|
|
</ItemGroup>
|
|
<PropertyGroup Label="Globals">
|
|
<VCProjectVersion>15.0</VCProjectVersion>
|
|
<ProjectGuid>{5A827760-CF8B-408A-99A3-B6C0AD2271E7}</ProjectGuid>
|
|
<RootNamespace>{{projectName}}</RootNamespace>
|
|
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
|
|
</PropertyGroup>
|
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
|
|
<ConfigurationType>Application</ConfigurationType>
|
|
<UseDebugLibraries>true</UseDebugLibraries>
|
|
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset>
|
|
<PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>
|
|
<CharacterSet>Unicode</CharacterSet>
|
|
</PropertyGroup>
|
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
|
|
<ConfigurationType>Application</ConfigurationType>
|
|
<UseDebugLibraries>false</UseDebugLibraries>
|
|
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset>
|
|
<PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>
|
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
<CharacterSet>Unicode</CharacterSet>
|
|
</PropertyGroup>
|
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Profile|x64'" Label="Configuration">
|
|
<ConfigurationType>Application</ConfigurationType>
|
|
<UseDebugLibraries>false</UseDebugLibraries>
|
|
<PlatformToolset Condition="'$(VisualStudioVersion)' == '15.0'">v141</PlatformToolset>
|
|
<PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>
|
|
<WholeProgramOptimization>true</WholeProgramOptimization>
|
|
<CharacterSet>Unicode</CharacterSet>
|
|
</PropertyGroup>
|
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
|
<ImportGroup Label="ExtensionSettings">
|
|
</ImportGroup>
|
|
<ImportGroup Label="Shared">
|
|
</ImportGroup>
|
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
<Import Project="flutter\ephemeral\Generated.props" />
|
|
<Import Project="AppConfiguration.props" />
|
|
<Import Project="flutter\GeneratedPlugins.props" />
|
|
</ImportGroup>
|
|
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
<Import Project="flutter\ephemeral\Generated.props" />
|
|
<Import Project="AppConfiguration.props" />
|
|
<Import Project="flutter\GeneratedPlugins.props" />
|
|
</ImportGroup>
|
|
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Profile|x64'" Label="PropertySheets">
|
|
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
|
<Import Project="flutter\ephemeral\Generated.props" />
|
|
<Import Project="AppConfiguration.props" />
|
|
<Import Project="flutter\GeneratedPlugins.props" />
|
|
</ImportGroup>
|
|
<PropertyGroup Label="UserMacros" />
|
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
<OutDir>$(ProjectDir)..\build\windows\$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
|
|
<IntDir>$(ProjectDir)..\build\windows\intermediates\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
|
</PropertyGroup>
|
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
<OutDir>$(ProjectDir)..\build\windows\$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
|
|
<IntDir>$(ProjectDir)..\build\windows\intermediates\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
|
</PropertyGroup>
|
|
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Profile|x64'">
|
|
<OutDir>$(ProjectDir)..\build\windows\$(Platform)\$(Configuration)\$(ProjectName)\</OutDir>
|
|
<IntDir>$(ProjectDir)..\build\windows\intermediates\$(Platform)\$(Configuration)\$(ProjectName)\</IntDir>
|
|
</PropertyGroup>
|
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
|
|
<ClCompile>
|
|
<WarningLevel>Level4</WarningLevel>
|
|
<Optimization>Disabled</Optimization>
|
|
<SDLCheck>true</SDLCheck>
|
|
<ConformanceMode>true</ConformanceMode>
|
|
<AdditionalIncludeDirectories>$(ProjectDir);$(FLUTTER_EPHEMERAL_DIR);$(FLUTTER_EPHEMERAL_DIR)\cpp_client_wrapper\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
<PreprocessorDefinitions>_MBCS;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
<TreatWarningAsError>true</TreatWarningAsError>
|
|
<DisableSpecificWarnings>4100</DisableSpecificWarnings>
|
|
</ClCompile>
|
|
<Link>
|
|
<AdditionalDependencies>flutter_windows.dll.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
<AdditionalLibraryDirectories>$(FLUTTER_EPHEMERAL_DIR);$(OutDir)..\Plugins;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
|
</Link>
|
|
<PreBuildEvent>
|
|
<Command>
|
|
</Command>
|
|
<Message>
|
|
</Message>
|
|
</PreBuildEvent>
|
|
<PreLinkEvent>
|
|
<Command>
|
|
</Command>
|
|
<Message>
|
|
</Message>
|
|
</PreLinkEvent>
|
|
<PostBuildEvent>
|
|
<Command>
|
|
</Command>
|
|
</PostBuildEvent>
|
|
<PostBuildEvent>
|
|
<Message>
|
|
</Message>
|
|
</PostBuildEvent>
|
|
<CustomBuildStep>
|
|
<Command>"$(ProjectDir)scripts\bundle_assets_and_deps" "$(FLUTTER_EPHEMERAL_DIR)\" "$(OutputPath)" "$(OutputPath)..\Plugins\" "$(TargetFileName)"</Command>
|
|
</CustomBuildStep>
|
|
<CustomBuildStep>
|
|
<Message>Bundling dependencies</Message>
|
|
<Outputs>Dummy_Run_Always</Outputs>
|
|
<Inputs>
|
|
</Inputs>
|
|
</CustomBuildStep>
|
|
</ItemDefinitionGroup>
|
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
|
|
<ClCompile>
|
|
<WarningLevel>Level4</WarningLevel>
|
|
<Optimization>MaxSpeed</Optimization>
|
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
<SDLCheck>true</SDLCheck>
|
|
<ConformanceMode>true</ConformanceMode>
|
|
<AdditionalIncludeDirectories>$(ProjectDir);$(FLUTTER_EPHEMERAL_DIR);$(FLUTTER_EPHEMERAL_DIR)\cpp_client_wrapper\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
<PreprocessorDefinitions>_MBCS;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
<TreatWarningAsError>true</TreatWarningAsError>
|
|
<DisableSpecificWarnings>4100</DisableSpecificWarnings>
|
|
</ClCompile>
|
|
<Link>
|
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
<OptimizeReferences>true</OptimizeReferences>
|
|
<AdditionalDependencies>flutter_windows.dll.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
<AdditionalLibraryDirectories>$(FLUTTER_EPHEMERAL_DIR);$(OutDir)..\Plugins;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
|
</Link>
|
|
<PreBuildEvent>
|
|
<Command>
|
|
</Command>
|
|
<Message>
|
|
</Message>
|
|
</PreBuildEvent>
|
|
<PreLinkEvent>
|
|
<Command>
|
|
</Command>
|
|
<Message>
|
|
</Message>
|
|
</PreLinkEvent>
|
|
<PostBuildEvent>
|
|
<Command>
|
|
</Command>
|
|
</PostBuildEvent>
|
|
<PostBuildEvent>
|
|
<Message>
|
|
</Message>
|
|
</PostBuildEvent>
|
|
<CustomBuildStep>
|
|
<Command>"$(ProjectDir)scripts\bundle_assets_and_deps" "$(FLUTTER_EPHEMERAL_DIR)\" "$(OutputPath)" "$(OutputPath)..\Plugins\" "$(TargetFileName)"</Command>
|
|
</CustomBuildStep>
|
|
<CustomBuildStep>
|
|
<Message>Bundling dependencies</Message>
|
|
<Outputs>Dummy_Run_Always</Outputs>
|
|
<Inputs>
|
|
</Inputs>
|
|
</CustomBuildStep>
|
|
</ItemDefinitionGroup>
|
|
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Profile|x64'">
|
|
<ClCompile>
|
|
<WarningLevel>Level4</WarningLevel>
|
|
<Optimization>MaxSpeed</Optimization>
|
|
<FunctionLevelLinking>true</FunctionLevelLinking>
|
|
<IntrinsicFunctions>true</IntrinsicFunctions>
|
|
<SDLCheck>true</SDLCheck>
|
|
<ConformanceMode>true</ConformanceMode>
|
|
<AdditionalIncludeDirectories>$(ProjectDir);$(FLUTTER_EPHEMERAL_DIR);$(FLUTTER_EPHEMERAL_DIR)\cpp_client_wrapper\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
|
|
<PreprocessorDefinitions>_MBCS;_HAS_EXCEPTIONS=0;%(PreprocessorDefinitions)</PreprocessorDefinitions>
|
|
<TreatWarningAsError>true</TreatWarningAsError>
|
|
<DisableSpecificWarnings>4100</DisableSpecificWarnings>
|
|
</ClCompile>
|
|
<Link>
|
|
<EnableCOMDATFolding>true</EnableCOMDATFolding>
|
|
<OptimizeReferences>true</OptimizeReferences>
|
|
<AdditionalDependencies>flutter_windows.dll.lib;%(AdditionalDependencies)</AdditionalDependencies>
|
|
<AdditionalLibraryDirectories>$(FLUTTER_EPHEMERAL_DIR);$(OutDir)..\Plugins;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
|
|
</Link>
|
|
<PreBuildEvent>
|
|
<Command>
|
|
</Command>
|
|
<Message>
|
|
</Message>
|
|
</PreBuildEvent>
|
|
<PreLinkEvent>
|
|
<Command>
|
|
</Command>
|
|
<Message>
|
|
</Message>
|
|
</PreLinkEvent>
|
|
<PostBuildEvent>
|
|
<Command>
|
|
</Command>
|
|
</PostBuildEvent>
|
|
<PostBuildEvent>
|
|
<Message>
|
|
</Message>
|
|
</PostBuildEvent>
|
|
<CustomBuildStep>
|
|
<Command>"$(ProjectDir)scripts\bundle_assets_and_deps" "$(FLUTTER_EPHEMERAL_DIR)\" "$(OutputPath)" "$(OutputPath)..\Plugins\" "$(TargetFileName)"</Command>
|
|
</CustomBuildStep>
|
|
<CustomBuildStep>
|
|
<Message>Bundling dependencies</Message>
|
|
<Outputs>Dummy_Run_Always</Outputs>
|
|
<Inputs>
|
|
</Inputs>
|
|
</CustomBuildStep>
|
|
</ItemDefinitionGroup>
|
|
<ItemGroup>
|
|
<ClCompile Include="runner\main.cpp" />
|
|
<ClCompile Include="flutter\generated_plugin_registrant.cc" />
|
|
<ClCompile Include="runner\run_loop.cpp" />
|
|
<ClCompile Include="runner\window_configuration.cpp" />
|
|
<ClCompile Include="runner\win32_window.cpp" />
|
|
<ClCompile Include="runner\flutter_window.cpp" />
|
|
<ClCompile Include="$(FLUTTER_EPHEMERAL_DIR)\cpp_client_wrapper\engine_method_result.cc" />
|
|
<ClCompile Include="$(FLUTTER_EPHEMERAL_DIR)\cpp_client_wrapper\flutter_view_controller.cc" />
|
|
<ClCompile Include="$(FLUTTER_EPHEMERAL_DIR)\cpp_client_wrapper\plugin_registrar.cc" />
|
|
</ItemGroup>
|
|
<ItemGroup>
|
|
<ClInclude Include="flutter\generated_plugin_registrant.h" />
|
|
<ClInclude Include="runner\resource.h" />
|
|
<ClInclude Include="runner\run_loop.h" />
|
|
<ClInclude Include="runner\win32_window.h" />
|
|
<ClInclude Include="runner\flutter_window.h" />
|
|
<ClInclude Include="runner\window_configuration.h" />
|
|
</ItemGroup>
|
|
<ItemGroup>
|
|
<Manifest Include="runner\runner.exe.manifest" />
|
|
</ItemGroup>
|
|
<ItemGroup>
|
|
<ResourceCompile Include="runner\Runner.rc" />
|
|
</ItemGroup>
|
|
<ItemGroup>
|
|
<Image Include="runner\resources\app_icon.ico" />
|
|
</ItemGroup>
|
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
|
<ImportGroup Label="ExtensionTargets">
|
|
</ImportGroup>
|
|
<PropertyGroup>
|
|
<LocalDebuggerWorkingDirectory>$(SolutionDir)</LocalDebuggerWorkingDirectory>
|
|
</PropertyGroup>
|
|
</Project>
|