chore: source app display name from platform config
This commit is contained in:
1 parent
d8543cc0f3
commit
77eb0de1c3
6 files changed
+18
-5
No files matched your search
@@ -1,6 +1,6 @@
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<application
|
||||
android:label="mobile"
|
||||
android:label="@string/app_name"
|
||||
android:name="${applicationName}"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
<activity
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="app_name">KiriMemo</string>
|
||||
</resources>
|
||||
@@ -7,7 +7,7 @@
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>$(DEVELOPMENT_LANGUAGE)</string>
|
||||
<key>CFBundleDisplayName</key>
|
||||
<string>Mobile</string>
|
||||
<string>KiriMemo</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
@@ -15,7 +15,7 @@
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>mobile</string>
|
||||
<string>KiriMemo</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
|
||||
@@ -8,6 +8,10 @@ set(BINARY_NAME "mobile")
|
||||
# The unique GTK application identifier for this application. See:
|
||||
# https://wiki.gnome.org/HowDoI/ChooseApplicationID
|
||||
set(APPLICATION_ID "cn.saltworks.kirimemo.mobile")
|
||||
# Human-readable application name, shown in the window title bar.
|
||||
# Keep it in sync with the Android `app_name` string resource and the
|
||||
# `CFBundleDisplayName` / `CFBundleName` entries in ios/Runner/Info.plist.
|
||||
set(APPLICATION_TITLE "KiriMemo")
|
||||
|
||||
# Explicitly opt in to modern CMake behaviors to avoid warnings with recent
|
||||
# versions of CMake.
|
||||
|
||||
@@ -16,8 +16,10 @@ add_executable(${BINARY_NAME}
|
||||
# that need different build settings.
|
||||
apply_standard_settings(${BINARY_NAME})
|
||||
|
||||
# Add preprocessor definitions for the application ID.
|
||||
# Add preprocessor definitions for the application ID and title. The values come
|
||||
# from the top-level CMakeLists.txt so they are not duplicated in C++ sources.
|
||||
add_definitions(-DAPPLICATION_ID="${APPLICATION_ID}")
|
||||
add_definitions(-DAPPLICATION_TITLE="${APPLICATION_TITLE}")
|
||||
|
||||
# Add dependency libraries. Add any application-specific dependencies here.
|
||||
target_link_libraries(${BINARY_NAME} PRIVATE flutter)
|
||||
|
||||
@@ -31,7 +31,10 @@ static void my_application_activate(GApplication* application) {
|
||||
// out of place and noticeably thicker than the native title bar. Relying on
|
||||
// the compositor gives the native Breeze/KWin decoration on Plasma, and the
|
||||
// desktop's own title bar everywhere else.
|
||||
gtk_window_set_title(window, "KiriMemo");
|
||||
// The title comes from APPLICATION_TITLE in linux/CMakeLists.txt (passed as a
|
||||
// preprocessor definition by linux/runner/CMakeLists.txt), so the name lives
|
||||
// in the project configuration instead of being duplicated here.
|
||||
gtk_window_set_title(window, APPLICATION_TITLE);
|
||||
|
||||
gtk_window_set_default_size(window, 1280, 720);
|
||||
|
||||
|
||||
Reference in new issue
Block a user