From 8976b6660583eed43d86e6d31a417a086eee02a5 Mon Sep 17 00:00:00 2001 From: Eric Windmill Date: Wed, 11 Dec 2024 15:02:57 -0500 Subject: [PATCH] codelab_rebuild nav_and_routing --- navigation_and_routing/.metadata | 30 +++++------ navigation_and_routing/android/.gitignore | 2 +- .../android/app/build.gradle | 53 ++++++------------- .../android/app/src/main/AndroidManifest.xml | 14 ++++- .../dev/flutter/bookstore/MainActivity.kt | 5 ++ .../navigation_and_routing/MainActivity.kt | 6 --- navigation_and_routing/android/build.gradle | 16 +----- .../android/gradle.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../android/settings.gradle | 12 ++--- .../ios/Flutter/AppFrameworkInfo.plist | 2 +- navigation_and_routing/ios/Podfile | 2 +- .../ios/Runner.xcodeproj/project.pbxproj | 52 +++++++++--------- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- .../ios/Runner/AppDelegate.swift | 4 +- navigation_and_routing/ios/Runner/Info.plist | 4 +- navigation_and_routing/linux/CMakeLists.txt | 27 ++-------- .../linux/runner/CMakeLists.txt | 26 +++++++++ .../linux/{ => runner}/main.cc | 0 .../linux/{ => runner}/my_application.cc | 30 ++++++++++- .../linux/{ => runner}/my_application.h | 0 .../macos/Runner.xcodeproj/project.pbxproj | 30 +++++++---- .../xcshareddata/xcschemes/Runner.xcscheme | 10 ++-- .../macos/Runner/AppDelegate.swift | 6 ++- .../macos/Runner/Configs/AppInfo.xcconfig | 6 +-- .../macos/RunnerTests/RunnerTests.swift | 2 +- navigation_and_routing/web/index.html | 6 +-- navigation_and_routing/web/index.html.orig | 38 +++++++++++++ navigation_and_routing/web/manifest.json | 4 +- navigation_and_routing/windows/CMakeLists.txt | 4 +- .../windows/runner/Runner.rc | 10 ++-- .../windows/runner/main.cpp | 2 +- .../windows/runner/runner.exe.manifest | 6 --- .../windows/runner/utils.cpp | 4 +- 34 files changed, 237 insertions(+), 182 deletions(-) create mode 100644 navigation_and_routing/android/app/src/main/kotlin/dev/flutter/bookstore/MainActivity.kt delete mode 100644 navigation_and_routing/android/app/src/main/kotlin/dev/flutter/navigation_and_routing/MainActivity.kt create mode 100644 navigation_and_routing/linux/runner/CMakeLists.txt rename navigation_and_routing/linux/{ => runner}/main.cc (100%) rename navigation_and_routing/linux/{ => runner}/my_application.cc (76%) rename navigation_and_routing/linux/{ => runner}/my_application.h (100%) create mode 100644 navigation_and_routing/web/index.html.orig diff --git a/navigation_and_routing/.metadata b/navigation_and_routing/.metadata index d22992edb..0edb585db 100644 --- a/navigation_and_routing/.metadata +++ b/navigation_and_routing/.metadata @@ -4,7 +4,7 @@ # This file should be version controlled and should not be manually edited. version: - revision: "db7ef5bf9f59442b0e200a90587e8fa5e0c6336a" + revision: "8495dee1fd4aacbe9de707e7581203232f591b2f" channel: "stable" project_type: app @@ -13,26 +13,26 @@ project_type: app migration: platforms: - platform: root - create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a - base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + create_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f + base_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f - platform: android - create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a - base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + create_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f + base_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f - platform: ios - create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a - base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + create_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f + base_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f - platform: linux - create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a - base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + create_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f + base_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f - platform: macos - create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a - base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + create_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f + base_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f - platform: web - create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a - base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + create_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f + base_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f - platform: windows - create_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a - base_revision: db7ef5bf9f59442b0e200a90587e8fa5e0c6336a + create_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f + base_revision: 8495dee1fd4aacbe9de707e7581203232f591b2f # User provided section diff --git a/navigation_and_routing/android/.gitignore b/navigation_and_routing/android/.gitignore index 6f568019d..55afd919c 100644 --- a/navigation_and_routing/android/.gitignore +++ b/navigation_and_routing/android/.gitignore @@ -7,7 +7,7 @@ gradle-wrapper.jar GeneratedPluginRegistrant.java # Remember to never publicly share your keystore. -# See https://flutter.dev/docs/deployment/android#reference-the-keystore-from-the-app +# See https://flutter.dev/to/reference-keystore key.properties **/*.keystore **/*.jks diff --git a/navigation_and_routing/android/app/build.gradle b/navigation_and_routing/android/app/build.gradle index ad0c90590..74fac5261 100644 --- a/navigation_and_routing/android/app/build.gradle +++ b/navigation_and_routing/android/app/build.gradle @@ -1,67 +1,44 @@ plugins { id "com.android.application" id "kotlin-android" + // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins. id "dev.flutter.flutter-gradle-plugin" } -def localProperties = new Properties() -def localPropertiesFile = rootProject.file('local.properties') -if (localPropertiesFile.exists()) { - localPropertiesFile.withReader('UTF-8') { reader -> - localProperties.load(reader) - } -} - -def flutterVersionCode = localProperties.getProperty('flutter.versionCode') -if (flutterVersionCode == null) { - flutterVersionCode = '1' -} - -def flutterVersionName = localProperties.getProperty('flutter.versionName') -if (flutterVersionName == null) { - flutterVersionName = '1.0' -} - android { - namespace "dev.flutter.navigation_and_routing" - compileSdkVersion flutter.compileSdkVersion - ndkVersion flutter.ndkVersion + namespace = "dev.flutter.bookstore" + compileSdk = flutter.compileSdkVersion + ndkVersion = flutter.ndkVersion compileOptions { - sourceCompatibility JavaVersion.VERSION_1_8 - targetCompatibility JavaVersion.VERSION_1_8 + sourceCompatibility = JavaVersion.VERSION_1_8 + targetCompatibility = JavaVersion.VERSION_1_8 } kotlinOptions { - jvmTarget = '1.8' - } - - sourceSets { - main.java.srcDirs += 'src/main/kotlin' + jvmTarget = JavaVersion.VERSION_1_8 } defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "dev.flutter.navigation_and_routing" + applicationId = "dev.flutter.bookstore" // You can update the following values to match your application needs. - // For more information, see: https://docs.flutter.dev/deployment/android#reviewing-the-gradle-build-configuration. - minSdkVersion flutter.minSdkVersion - targetSdkVersion flutter.targetSdkVersion - versionCode flutterVersionCode.toInteger() - versionName flutterVersionName + // For more information, see: https://flutter.dev/to/review-gradle-config. + minSdk = flutter.minSdkVersion + targetSdk = flutter.targetSdkVersion + versionCode = flutter.versionCode + versionName = flutter.versionName } buildTypes { release { // TODO: Add your own signing config for the release build. // Signing with the debug keys for now, so `flutter run --release` works. - signingConfig signingConfigs.debug + signingConfig = signingConfigs.debug } } } flutter { - source '../..' + source = "../.." } - -dependencies {} diff --git a/navigation_and_routing/android/app/src/main/AndroidManifest.xml b/navigation_and_routing/android/app/src/main/AndroidManifest.xml index eb496d7c4..d7cb37811 100644 --- a/navigation_and_routing/android/app/src/main/AndroidManifest.xml +++ b/navigation_and_routing/android/app/src/main/AndroidManifest.xml @@ -1,12 +1,13 @@ + + + + + + + diff --git a/navigation_and_routing/android/app/src/main/kotlin/dev/flutter/bookstore/MainActivity.kt b/navigation_and_routing/android/app/src/main/kotlin/dev/flutter/bookstore/MainActivity.kt new file mode 100644 index 000000000..a6095b40e --- /dev/null +++ b/navigation_and_routing/android/app/src/main/kotlin/dev/flutter/bookstore/MainActivity.kt @@ -0,0 +1,5 @@ +package dev.flutter.bookstore + +import io.flutter.embedding.android.FlutterActivity + +class MainActivity: FlutterActivity() diff --git a/navigation_and_routing/android/app/src/main/kotlin/dev/flutter/navigation_and_routing/MainActivity.kt b/navigation_and_routing/android/app/src/main/kotlin/dev/flutter/navigation_and_routing/MainActivity.kt deleted file mode 100644 index 86b094594..000000000 --- a/navigation_and_routing/android/app/src/main/kotlin/dev/flutter/navigation_and_routing/MainActivity.kt +++ /dev/null @@ -1,6 +0,0 @@ -package dev.flutter.navigation_and_routing - -import io.flutter.embedding.android.FlutterActivity - -class MainActivity: FlutterActivity() { -} diff --git a/navigation_and_routing/android/build.gradle b/navigation_and_routing/android/build.gradle index e83fb5dac..d2ffbffa4 100644 --- a/navigation_and_routing/android/build.gradle +++ b/navigation_and_routing/android/build.gradle @@ -1,15 +1,3 @@ -buildscript { - ext.kotlin_version = '1.7.10' - repositories { - google() - mavenCentral() - } - - dependencies { - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" - } -} - allprojects { repositories { google() @@ -17,12 +5,12 @@ allprojects { } } -rootProject.buildDir = '../build' +rootProject.buildDir = "../build" subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { - project.evaluationDependsOn(':app') + project.evaluationDependsOn(":app") } tasks.register("clean", Delete) { diff --git a/navigation_and_routing/android/gradle.properties b/navigation_and_routing/android/gradle.properties index 598d13fee..259717082 100644 --- a/navigation_and_routing/android/gradle.properties +++ b/navigation_and_routing/android/gradle.properties @@ -1,3 +1,3 @@ -org.gradle.jvmargs=-Xmx4G +org.gradle.jvmargs=-Xmx4G -XX:MaxMetaspaceSize=2G -XX:+HeapDumpOnOutOfMemoryError android.useAndroidX=true android.enableJetifier=true diff --git a/navigation_and_routing/android/gradle/wrapper/gradle-wrapper.properties b/navigation_and_routing/android/gradle/wrapper/gradle-wrapper.properties index 3c472b99c..7bb2df6ba 100644 --- a/navigation_and_routing/android/gradle/wrapper/gradle-wrapper.properties +++ b/navigation_and_routing/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-all.zip diff --git a/navigation_and_routing/android/settings.gradle b/navigation_and_routing/android/settings.gradle index 7cd712855..b9e43bd37 100644 --- a/navigation_and_routing/android/settings.gradle +++ b/navigation_and_routing/android/settings.gradle @@ -5,25 +5,21 @@ pluginManagement { def flutterSdkPath = properties.getProperty("flutter.sdk") assert flutterSdkPath != null, "flutter.sdk not set in local.properties" return flutterSdkPath - } - settings.ext.flutterSdkPath = flutterSdkPath() + }() - includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle") + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") repositories { google() mavenCentral() gradlePluginPortal() } - - plugins { - id "dev.flutter.flutter-gradle-plugin" version "1.0.0" apply false - } } plugins { id "dev.flutter.flutter-plugin-loader" version "1.0.0" - id "com.android.application" version "7.3.0" apply false + id "com.android.application" version "8.1.0" apply false + id "org.jetbrains.kotlin.android" version "1.8.22" apply false } include ":app" diff --git a/navigation_and_routing/ios/Flutter/AppFrameworkInfo.plist b/navigation_and_routing/ios/Flutter/AppFrameworkInfo.plist index 9625e105d..7c5696400 100644 --- a/navigation_and_routing/ios/Flutter/AppFrameworkInfo.plist +++ b/navigation_and_routing/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 11.0 + 12.0 diff --git a/navigation_and_routing/ios/Podfile b/navigation_and_routing/ios/Podfile index fdcc671eb..d97f17e22 100644 --- a/navigation_and_routing/ios/Podfile +++ b/navigation_and_routing/ios/Podfile @@ -1,5 +1,5 @@ # Uncomment this line to define a global platform for your project -# platform :ios, '11.0' +# platform :ios, '12.0' # CocoaPods analytics sends network stats synchronously affecting flutter build latency. ENV['COCOAPODS_DISABLE_STATS'] = 'true' diff --git a/navigation_and_routing/ios/Runner.xcodeproj/project.pbxproj b/navigation_and_routing/ios/Runner.xcodeproj/project.pbxproj index 248246046..fe1f33115 100644 --- a/navigation_and_routing/ios/Runner.xcodeproj/project.pbxproj +++ b/navigation_and_routing/ios/Runner.xcodeproj/project.pbxproj @@ -8,12 +8,12 @@ /* Begin PBXBuildFile section */ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; }; + 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; }; 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; }; 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; }; 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; }; 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; }; - 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -42,6 +42,8 @@ /* Begin PBXFileReference section */ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; }; 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; }; + 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; + 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; }; 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; }; 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -53,8 +55,6 @@ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; }; 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; - 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -68,6 +68,14 @@ /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 331C8082294A63A400263BE5 /* RunnerTests */ = { + isa = PBXGroup; + children = ( + 331C807B294A618700263BE5 /* RunnerTests.swift */, + ); + path = RunnerTests; + sourceTree = ""; + }; 9740EEB11CF90186004384FC /* Flutter */ = { isa = PBXGroup; children = ( @@ -79,14 +87,6 @@ name = Flutter; sourceTree = ""; }; - 331C8082294A63A400263BE5 /* RunnerTests */ = { - isa = PBXGroup; - children = ( - 331C807B294A618700263BE5 /* RunnerTests.swift */, - ); - path = RunnerTests; - sourceTree = ""; - }; 97C146E51CF9000F007C117D = { isa = PBXGroup; children = ( @@ -129,7 +129,6 @@ buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */; buildPhases = ( 331C807D294A63A400263BE5 /* Sources */, - 331C807E294A63A400263BE5 /* Frameworks */, 331C807F294A63A400263BE5 /* Resources */, ); buildRules = ( @@ -169,7 +168,7 @@ isa = PBXProject; attributes = { BuildIndependentTargetsInParallel = YES; - LastUpgradeCheck = 1430; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 331C8080294A63A400263BE5 = { @@ -308,6 +307,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -337,6 +337,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -345,7 +346,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -367,7 +368,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.navigationAndRouting; + PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.bookstore; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -377,14 +378,13 @@ }; 331C8088294A63A400263BE5 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AE0B7B92F70575B8D7E0D07E /* Pods-RunnerTests.debug.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.navigationAndRouting.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.bookstore.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -395,14 +395,13 @@ }; 331C8089294A63A400263BE5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 89B67EB44CE7B6631473024E /* Pods-RunnerTests.release.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.navigationAndRouting.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.bookstore.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; @@ -411,14 +410,13 @@ }; 331C808A294A63A400263BE5 /* Profile */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 640959BDD8F10B91D80A66BE /* Pods-RunnerTests.profile.xcconfig */; buildSettings = { BUNDLE_LOADER = "$(TEST_HOST)"; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.navigationAndRouting.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.bookstore.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; @@ -429,6 +427,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -458,6 +457,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -472,7 +472,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; @@ -484,6 +484,7 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; @@ -513,6 +514,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -521,7 +523,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SUPPORTED_PLATFORMS = iphoneos; @@ -545,7 +547,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.navigationAndRouting; + PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.bookstore; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -567,7 +569,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.navigationAndRouting; + PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.bookstore; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; diff --git a/navigation_and_routing/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/navigation_and_routing/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 87131a09b..8e3ca5dfe 100644 --- a/navigation_and_routing/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/navigation_and_routing/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ CFBundleDevelopmentRegion $(DEVELOPMENT_LANGUAGE) CFBundleDisplayName - Navigation And Routing + Bookstore CFBundleExecutable $(EXECUTABLE_NAME) CFBundleIdentifier @@ -13,7 +13,7 @@ CFBundleInfoDictionaryVersion 6.0 CFBundleName - navigation_and_routing + bookstore CFBundlePackageType APPL CFBundleShortVersionString diff --git a/navigation_and_routing/linux/CMakeLists.txt b/navigation_and_routing/linux/CMakeLists.txt index c444a31d6..ce148c45a 100644 --- a/navigation_and_routing/linux/CMakeLists.txt +++ b/navigation_and_routing/linux/CMakeLists.txt @@ -1,13 +1,13 @@ # Project-level configuration. -cmake_minimum_required(VERSION 3.10) +cmake_minimum_required(VERSION 3.13) project(runner LANGUAGES CXX) # The name of the executable created for the application. Change this to change # the on-disk name of your application. -set(BINARY_NAME "navigation_and_routing") +set(BINARY_NAME "bookstore") # The unique GTK application identifier for this application. See: # https://wiki.gnome.org/HowDoI/ChooseApplicationID -set(APPLICATION_ID "dev.flutter.navigation_and_routing") +set(APPLICATION_ID "dev.flutter.bookstore") # Explicitly opt in to modern CMake behaviors to avoid warnings with recent # versions of CMake. @@ -54,25 +54,8 @@ add_subdirectory(${FLUTTER_MANAGED_DIR}) find_package(PkgConfig REQUIRED) pkg_check_modules(GTK REQUIRED IMPORTED_TARGET gtk+-3.0) -add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") - -# Define the application target. To change its name, change BINARY_NAME above, -# not the value here, or `flutter run` will no longer work. -# -# Any new source files that you add to the application should be added here. -add_executable(${BINARY_NAME} - "main.cc" - "my_application.cc" - "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" -) - -# Apply the standard set of build settings. This can be removed for applications -# that need different build settings. -apply_standard_settings(${BINARY_NAME}) - -# Add dependency libraries. Add any application-specific dependencies here. -target_link_libraries(${BINARY_NAME} PRIVATE flutter) -target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) +# Application build; see runner/CMakeLists.txt. +add_subdirectory("runner") # Run the Flutter tool portions of the build. This must not be removed. add_dependencies(${BINARY_NAME} flutter_assemble) diff --git a/navigation_and_routing/linux/runner/CMakeLists.txt b/navigation_and_routing/linux/runner/CMakeLists.txt new file mode 100644 index 000000000..e97dabc70 --- /dev/null +++ b/navigation_and_routing/linux/runner/CMakeLists.txt @@ -0,0 +1,26 @@ +cmake_minimum_required(VERSION 3.13) +project(runner LANGUAGES CXX) + +# Define the application target. To change its name, change BINARY_NAME in the +# top-level CMakeLists.txt, not the value here, or `flutter run` will no longer +# work. +# +# Any new source files that you add to the application should be added here. +add_executable(${BINARY_NAME} + "main.cc" + "my_application.cc" + "${FLUTTER_MANAGED_DIR}/generated_plugin_registrant.cc" +) + +# Apply the standard set of build settings. This can be removed for applications +# that need different build settings. +apply_standard_settings(${BINARY_NAME}) + +# Add preprocessor definitions for the application ID. +add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}") + +# Add dependency libraries. Add any application-specific dependencies here. +target_link_libraries(${BINARY_NAME} PRIVATE flutter) +target_link_libraries(${BINARY_NAME} PRIVATE PkgConfig::GTK) + +target_include_directories(${BINARY_NAME} PRIVATE "${CMAKE_SOURCE_DIR}") diff --git a/navigation_and_routing/linux/main.cc b/navigation_and_routing/linux/runner/main.cc similarity index 100% rename from navigation_and_routing/linux/main.cc rename to navigation_and_routing/linux/runner/main.cc diff --git a/navigation_and_routing/linux/my_application.cc b/navigation_and_routing/linux/runner/my_application.cc similarity index 76% rename from navigation_and_routing/linux/my_application.cc rename to navigation_and_routing/linux/runner/my_application.cc index 85d083567..d32388a5a 100644 --- a/navigation_and_routing/linux/my_application.cc +++ b/navigation_and_routing/linux/runner/my_application.cc @@ -40,11 +40,11 @@ static void my_application_activate(GApplication* application) { if (use_header_bar) { GtkHeaderBar* header_bar = GTK_HEADER_BAR(gtk_header_bar_new()); gtk_widget_show(GTK_WIDGET(header_bar)); - gtk_header_bar_set_title(header_bar, "navigation_and_routing"); + gtk_header_bar_set_title(header_bar, "bookstore"); gtk_header_bar_set_show_close_button(header_bar, TRUE); gtk_window_set_titlebar(window, GTK_WIDGET(header_bar)); } else { - gtk_window_set_title(window, "navigation_and_routing"); + gtk_window_set_title(window, "bookstore"); } gtk_window_set_default_size(window, 1280, 720); @@ -81,6 +81,24 @@ static gboolean my_application_local_command_line(GApplication* application, gch return TRUE; } +// Implements GApplication::startup. +static void my_application_startup(GApplication* application) { + //MyApplication* self = MY_APPLICATION(object); + + // Perform any actions required at application startup. + + G_APPLICATION_CLASS(my_application_parent_class)->startup(application); +} + +// Implements GApplication::shutdown. +static void my_application_shutdown(GApplication* application) { + //MyApplication* self = MY_APPLICATION(object); + + // Perform any actions required at application shutdown. + + G_APPLICATION_CLASS(my_application_parent_class)->shutdown(application); +} + // Implements GObject::dispose. static void my_application_dispose(GObject* object) { MyApplication* self = MY_APPLICATION(object); @@ -91,12 +109,20 @@ static void my_application_dispose(GObject* object) { static void my_application_class_init(MyApplicationClass* klass) { G_APPLICATION_CLASS(klass)->activate = my_application_activate; G_APPLICATION_CLASS(klass)->local_command_line = my_application_local_command_line; + G_APPLICATION_CLASS(klass)->startup = my_application_startup; + G_APPLICATION_CLASS(klass)->shutdown = my_application_shutdown; G_OBJECT_CLASS(klass)->dispose = my_application_dispose; } static void my_application_init(MyApplication* self) {} MyApplication* my_application_new() { + // Set the program name to the application ID, which helps various systems + // like GTK and desktop environments map this running application to its + // corresponding .desktop file. This ensures better integration by allowing + // the application to be recognized beyond its binary name. + g_set_prgname(APPLICATION_ID); + return MY_APPLICATION(g_object_new(my_application_get_type(), "application-id", APPLICATION_ID, "flags", G_APPLICATION_NON_UNIQUE, diff --git a/navigation_and_routing/linux/my_application.h b/navigation_and_routing/linux/runner/my_application.h similarity index 100% rename from navigation_and_routing/linux/my_application.h rename to navigation_and_routing/linux/runner/my_application.h diff --git a/navigation_and_routing/macos/Runner.xcodeproj/project.pbxproj b/navigation_and_routing/macos/Runner.xcodeproj/project.pbxproj index 1220eab4c..ab20b4371 100644 --- a/navigation_and_routing/macos/Runner.xcodeproj/project.pbxproj +++ b/navigation_and_routing/macos/Runner.xcodeproj/project.pbxproj @@ -64,7 +64,7 @@ 331C80D7294CF71000263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; }; 333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = ""; }; 335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = ""; }; - 33CC10ED2044A3C60003C045 /* navigation_and_routing.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "navigation_and_routing.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 33CC10ED2044A3C60003C045 /* bookstore.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "bookstore.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; 33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = ""; }; 33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; }; @@ -131,7 +131,7 @@ 33CC10EE2044A3C60003C045 /* Products */ = { isa = PBXGroup; children = ( - 33CC10ED2044A3C60003C045 /* navigation_and_routing.app */, + 33CC10ED2044A3C60003C045 /* bookstore.app */, 331C80D5294CF71000263BE5 /* RunnerTests.xctest */, ); name = Products; @@ -217,7 +217,7 @@ ); name = Runner; productName = Runner; - productReference = 33CC10ED2044A3C60003C045 /* navigation_and_routing.app */; + productReference = 33CC10ED2044A3C60003C045 /* bookstore.app */; productType = "com.apple.product-type.application"; }; /* End PBXNativeTarget section */ @@ -226,8 +226,9 @@ 33CC10E52044A3C60003C045 /* Project object */ = { isa = PBXProject; attributes = { + BuildIndependentTargetsInParallel = YES; LastSwiftUpdateCheck = 0920; - LastUpgradeCheck = 1430; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = ""; TargetAttributes = { 331C80D4294CF70F00263BE5 = { @@ -384,10 +385,10 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.navigationAndRouting.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.bookstore.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/navigation_and_routing.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/navigation_and_routing"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/bookstore.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/bookstore"; }; name = Debug; }; @@ -398,10 +399,10 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.navigationAndRouting.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.bookstore.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/navigation_and_routing.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/navigation_and_routing"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/bookstore.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/bookstore"; }; name = Release; }; @@ -412,10 +413,10 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.navigationAndRouting.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.bookstore.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; - TEST_HOST = "$(BUILT_PRODUCTS_DIR)/navigation_and_routing.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/navigation_and_routing"; + TEST_HOST = "$(BUILT_PRODUCTS_DIR)/bookstore.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/bookstore"; }; name = Profile; }; @@ -424,6 +425,7 @@ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -447,9 +449,11 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -497,6 +501,7 @@ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -520,9 +525,11 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -550,6 +557,7 @@ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; @@ -573,9 +581,11 @@ CLANG_WARN_SUSPICIOUS_MOVE = YES; CODE_SIGN_IDENTITY = "-"; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; diff --git a/navigation_and_routing/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/navigation_and_routing/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 025d0cec1..80c51b7b0 100644 --- a/navigation_and_routing/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/navigation_and_routing/macos/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ @@ -31,7 +31,7 @@ @@ -65,7 +65,7 @@ @@ -82,7 +82,7 @@ diff --git a/navigation_and_routing/macos/Runner/AppDelegate.swift b/navigation_and_routing/macos/Runner/AppDelegate.swift index d53ef6437..b3c176141 100644 --- a/navigation_and_routing/macos/Runner/AppDelegate.swift +++ b/navigation_and_routing/macos/Runner/AppDelegate.swift @@ -1,9 +1,13 @@ import Cocoa import FlutterMacOS -@NSApplicationMain +@main class AppDelegate: FlutterAppDelegate { override func applicationShouldTerminateAfterLastWindowClosed(_ sender: NSApplication) -> Bool { return true } + + override func applicationSupportsSecureRestorableState(_ app: NSApplication) -> Bool { + return true + } } diff --git a/navigation_and_routing/macos/Runner/Configs/AppInfo.xcconfig b/navigation_and_routing/macos/Runner/Configs/AppInfo.xcconfig index 57da72ec3..c389e77f4 100644 --- a/navigation_and_routing/macos/Runner/Configs/AppInfo.xcconfig +++ b/navigation_and_routing/macos/Runner/Configs/AppInfo.xcconfig @@ -5,10 +5,10 @@ // 'flutter create' template. // The application's name. By default this is also the title of the Flutter window. -PRODUCT_NAME = navigation_and_routing +PRODUCT_NAME = bookstore // The application's bundle identifier -PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.navigationAndRouting +PRODUCT_BUNDLE_IDENTIFIER = dev.flutter.bookstore // The copyright displayed in application information -PRODUCT_COPYRIGHT = Copyright © 2023 dev.flutter. All rights reserved. +PRODUCT_COPYRIGHT = Copyright © 2024 dev.flutter. All rights reserved. diff --git a/navigation_and_routing/macos/RunnerTests/RunnerTests.swift b/navigation_and_routing/macos/RunnerTests/RunnerTests.swift index 5418c9f53..61f3bd1fc 100644 --- a/navigation_and_routing/macos/RunnerTests/RunnerTests.swift +++ b/navigation_and_routing/macos/RunnerTests/RunnerTests.swift @@ -1,5 +1,5 @@ -import FlutterMacOS import Cocoa +import FlutterMacOS import XCTest class RunnerTests: XCTestCase { diff --git a/navigation_and_routing/web/index.html b/navigation_and_routing/web/index.html index e1ff8cc27..e35ff94d5 100644 --- a/navigation_and_routing/web/index.html +++ b/navigation_and_routing/web/index.html @@ -21,15 +21,15 @@ - + - + - navigation_and_routing + bookstore diff --git a/navigation_and_routing/web/index.html.orig b/navigation_and_routing/web/index.html.orig new file mode 100644 index 000000000..2ab492192 --- /dev/null +++ b/navigation_and_routing/web/index.html.orig @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + bookstore + + + + + + diff --git a/navigation_and_routing/web/manifest.json b/navigation_and_routing/web/manifest.json index 7631ed214..af04f19c0 100644 --- a/navigation_and_routing/web/manifest.json +++ b/navigation_and_routing/web/manifest.json @@ -1,6 +1,6 @@ { - "name": "navigation_and_routing", - "short_name": "navigation_and_routing", + "name": "bookstore", + "short_name": "bookstore", "start_url": ".", "display": "standalone", "background_color": "#0175C2", diff --git a/navigation_and_routing/windows/CMakeLists.txt b/navigation_and_routing/windows/CMakeLists.txt index 75690487b..fd47d7966 100644 --- a/navigation_and_routing/windows/CMakeLists.txt +++ b/navigation_and_routing/windows/CMakeLists.txt @@ -1,10 +1,10 @@ # Project-level configuration. cmake_minimum_required(VERSION 3.14) -project(navigation_and_routing LANGUAGES CXX) +project(bookstore LANGUAGES CXX) # The name of the executable created for the application. Change this to change # the on-disk name of your application. -set(BINARY_NAME "navigation_and_routing") +set(BINARY_NAME "bookstore") # Explicitly opt in to modern CMake behaviors to avoid warnings with recent # versions of CMake. diff --git a/navigation_and_routing/windows/runner/Runner.rc b/navigation_and_routing/windows/runner/Runner.rc index d97574e4e..3dc25e530 100644 --- a/navigation_and_routing/windows/runner/Runner.rc +++ b/navigation_and_routing/windows/runner/Runner.rc @@ -90,12 +90,12 @@ BEGIN BLOCK "040904e4" BEGIN VALUE "CompanyName", "dev.flutter" "\0" - VALUE "FileDescription", "navigation_and_routing" "\0" + VALUE "FileDescription", "bookstore" "\0" VALUE "FileVersion", VERSION_AS_STRING "\0" - VALUE "InternalName", "navigation_and_routing" "\0" - VALUE "LegalCopyright", "Copyright (C) 2023 dev.flutter. All rights reserved." "\0" - VALUE "OriginalFilename", "navigation_and_routing.exe" "\0" - VALUE "ProductName", "navigation_and_routing" "\0" + VALUE "InternalName", "bookstore" "\0" + VALUE "LegalCopyright", "Copyright (C) 2024 dev.flutter. All rights reserved." "\0" + VALUE "OriginalFilename", "bookstore.exe" "\0" + VALUE "ProductName", "bookstore" "\0" VALUE "ProductVersion", VERSION_AS_STRING "\0" END END diff --git a/navigation_and_routing/windows/runner/main.cpp b/navigation_and_routing/windows/runner/main.cpp index 391128534..b177257c3 100644 --- a/navigation_and_routing/windows/runner/main.cpp +++ b/navigation_and_routing/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"navigation_and_routing", origin, size)) { + if (!window.Create(L"bookstore", origin, size)) { return EXIT_FAILURE; } window.SetQuitOnClose(true); diff --git a/navigation_and_routing/windows/runner/runner.exe.manifest b/navigation_and_routing/windows/runner/runner.exe.manifest index a42ea7687..153653e8d 100644 --- a/navigation_and_routing/windows/runner/runner.exe.manifest +++ b/navigation_and_routing/windows/runner/runner.exe.manifest @@ -9,12 +9,6 @@ - - - - - - diff --git a/navigation_and_routing/windows/runner/utils.cpp b/navigation_and_routing/windows/runner/utils.cpp index b2b08734d..3a0b46511 100644 --- a/navigation_and_routing/windows/runner/utils.cpp +++ b/navigation_and_routing/windows/runner/utils.cpp @@ -45,13 +45,13 @@ std::string Utf8FromUtf16(const wchar_t* utf16_string) { if (utf16_string == nullptr) { return std::string(); } - int target_length = ::WideCharToMultiByte( + unsigned int target_length = ::WideCharToMultiByte( CP_UTF8, WC_ERR_INVALID_CHARS, utf16_string, -1, nullptr, 0, nullptr, nullptr) -1; // remove the trailing null character int input_length = (int)wcslen(utf16_string); std::string utf8_string; - if (target_length <= 0 || target_length > utf8_string.max_size()) { + if (target_length == 0 || target_length > utf8_string.max_size()) { return utf8_string; } utf8_string.resize(target_length);