diff --git a/{{cookiecutter.out_dir}}/README.md b/{{cookiecutter.out_dir}}/README.md index a1b9c18..6cb1666 100644 --- a/{{cookiecutter.out_dir}}/README.md +++ b/{{cookiecutter.out_dir}}/README.md @@ -4,12 +4,13 @@ ## Template variables -* `{{ cookiecutter.project_name }}` - project name - lowercase, no spaces, i.e. "snake_case" identifier - used as a package name, iOS/macOS/Android bundle name and Windows/Linux executable file name. +* `{{ cookiecutter.project_name }}` - project identifier (lowercase, no spaces, i.e. "snake_case") used for bundle IDs and package names. * `{{ cookiecutter.project_description }}` - project description. -* `{{ cookiecutter.product_name }}` - project display name that is shown in window titles and about app dialogs. +* `{{ cookiecutter.artifact_name }}` - executable or bundle name on disk. +* `{{ cookiecutter.product_name }}` - display name shown in window titles and about app dialogs. * `{{ cookiecutter.org_name }}` - org name in reverse domain name notation, e.g. `com.mycompany.myproject`. * `{{ cookiecutter.company_name }}` - the name of the company. -* `{{ cookiecutter.copyright }}` - the name of the company. +* `{{ cookiecutter.copyright }}` - the copyright notice. ## Icons @@ -26,4 +27,4 @@ * Android (light) - `assets/splash_android.png` (or any supported image format). Defaults to `assets/splash.png` and then `assets/icon.png`. * Android (dark) - `assets/splash_dark_android.png` (or any supported image format). Defaults to light Android splash, then to `assets/splash_dark.png`, then to `assets/splash.png` and then `assets/icon.png`. * Web (light) - `assets/splash_web.png` (or any supported image format). Defaults to `assets/splash.png` and then `assets/icon.png`. -* Web (dark) - `assets/splash_dark_web.png` (or any supported image format). Defaults to light web splash, then `assets/splash_dark.png`, then to `assets/splash.png` and then `assets/icon.png`. \ No newline at end of file +* Web (dark) - `assets/splash_dark_web.png` (or any supported image format). Defaults to light web splash, then `assets/splash_dark.png`, then to `assets/splash.png` and then `assets/icon.png`. diff --git a/{{cookiecutter.out_dir}}/windows/CMakeLists.txt b/{{cookiecutter.out_dir}}/windows/CMakeLists.txt index e4fbce0..7bddc41 100644 --- a/{{cookiecutter.out_dir}}/windows/CMakeLists.txt +++ b/{{cookiecutter.out_dir}}/windows/CMakeLists.txt @@ -2,8 +2,8 @@ cmake_minimum_required(VERSION 3.14) project({{ cookiecutter.project_name }} LANGUAGES CXX) -# The name of the executable created for the application. Change this to change -# the on-disk name of your application. +# The name of the application target. The on-disk name is set in +# runner/CMakeLists.txt to keep Flutter tooling behavior intact. set(BINARY_NAME "{{ cookiecutter.project_name }}") # Explicitly opt in to modern CMake behaviors to avoid warnings with recent diff --git a/{{cookiecutter.out_dir}}/windows/runner/CMakeLists.txt b/{{cookiecutter.out_dir}}/windows/runner/CMakeLists.txt index 394917c..1f14dcf 100644 --- a/{{cookiecutter.out_dir}}/windows/runner/CMakeLists.txt +++ b/{{cookiecutter.out_dir}}/windows/runner/CMakeLists.txt @@ -16,6 +16,10 @@ add_executable(${BINARY_NAME} WIN32 "runner.exe.manifest" ) +# Keep the target name stable for Flutter tooling, but set the output name. +# OUTPUT_NAME controls the on-disk executable name (artifact). +set_target_properties(${BINARY_NAME} PROPERTIES OUTPUT_NAME "{{ cookiecutter.artifact_name }}") + # Apply the standard set of build settings. This can be removed for applications # that need different build settings. apply_standard_settings(${BINARY_NAME}) diff --git a/{{cookiecutter.out_dir}}/windows/runner/Runner.rc b/{{cookiecutter.out_dir}}/windows/runner/Runner.rc index df3da98..60a1e5b 100644 --- a/{{cookiecutter.out_dir}}/windows/runner/Runner.rc +++ b/{{cookiecutter.out_dir}}/windows/runner/Runner.rc @@ -92,9 +92,9 @@ BEGIN VALUE "CompanyName", "{{ cookiecutter.company_name }}" "\0" VALUE "FileDescription", "{{ cookiecutter.product_name }}" "\0" VALUE "FileVersion", VERSION_AS_STRING "\0" - VALUE "InternalName", "{{ cookiecutter.project_name }}" "\0" + VALUE "InternalName", "{{ cookiecutter.artifact_name }}" "\0" VALUE "LegalCopyright", "{{ cookiecutter.copyright }}" "\0" - VALUE "OriginalFilename", "{{ cookiecutter.project_name }}.exe" "\0" + VALUE "OriginalFilename", "{{ cookiecutter.artifact_name }}.exe" "\0" VALUE "ProductName", "{{ cookiecutter.product_name }}" "\0" VALUE "ProductVersion", VERSION_AS_STRING "\0" END diff --git a/{{cookiecutter.out_dir}}/windows/runner/main.cpp b/{{cookiecutter.out_dir}}/windows/runner/main.cpp index 3ed2eba..7c91006 100644 --- a/{{cookiecutter.out_dir}}/windows/runner/main.cpp +++ b/{{cookiecutter.out_dir}}/windows/runner/main.cpp @@ -27,7 +27,7 @@ int APIENTRY wWinMain(_In_ HINSTANCE instance, _In_opt_ HINSTANCE prev, FlutterWindow window(project); Win32Window::Point origin(10, 10); Win32Window::Size size(1280, 720); - if (!window.Create(L"{{ cookiecutter.project_name }}", origin, size)) { + if (!window.Create(L"{{ cookiecutter.product_name }}", origin, size)) { return EXIT_FAILURE; } window.SetQuitOnClose(true);