Skip to content

Commit

Permalink
change name to myapp
Browse files Browse the repository at this point in the history
  • Loading branch information
canxin121 committed Mar 27, 2024
1 parent a2e9af7 commit 621abef
Show file tree
Hide file tree
Showing 17 changed files with 41 additions and 41 deletions.
12 changes: 6 additions & 6 deletions ios/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -368,7 +368,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.violet;
PRODUCT_BUNDLE_IDENTIFIER = com.example.myapp;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
Expand All @@ -384,7 +384,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.violet.RunnerTests;
PRODUCT_BUNDLE_IDENTIFIER = com.example.myapp.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand All @@ -401,7 +401,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.violet.RunnerTests;
PRODUCT_BUNDLE_IDENTIFIER = com.example.myapp.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
Expand All @@ -416,7 +416,7 @@
CURRENT_PROJECT_VERSION = 1;
GENERATE_INFOPLIST_FILE = YES;
MARKETING_VERSION = 1.0;
PRODUCT_BUNDLE_IDENTIFIER = com.example.violet.RunnerTests;
PRODUCT_BUNDLE_IDENTIFIER = com.example.myapp.RunnerTests;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_VERSION = 5.0;
TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
Expand Down Expand Up @@ -547,7 +547,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.violet;
PRODUCT_BUNDLE_IDENTIFIER = com.example.myapp;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
Expand All @@ -569,7 +569,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
PRODUCT_BUNDLE_IDENTIFIER = com.example.violet;
PRODUCT_BUNDLE_IDENTIFIER = com.example.myapp;
PRODUCT_NAME = "$(TARGET_NAME)";
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
SWIFT_VERSION = 5.0;
Expand Down
6 changes: 3 additions & 3 deletions ios/Runner/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@
<key>CFBundleDevelopmentRegion</key>
<string>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleDisplayName</key>
<string>Violet</string>
<string>Myapp</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>violet</string>
<string>myapp</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
Expand All @@ -29,7 +29,7 @@
<string>Editor</string>
<key>CFBundleURLSchemes</key>
<array>
<string>violet</string>
<string>myapp</string>
</array>
</dict>
</array>
Expand Down
4 changes: 2 additions & 2 deletions lib/main.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import 'package:flutter/material.dart';
import 'package:violet/src/rust/api/simple.dart';
import 'package:myapp/src/rust/api/simple.dart';

import 'package:violet/src/rust/frb_generated.dart';
import 'package:myapp/src/rust/frb_generated.dart';

Future<void> main() async {
await RustLib.init();
Expand Down
2 changes: 1 addition & 1 deletion lib/src/rust/frb_generated.dart
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class RustLib extends BaseEntrypoint<RustLibApi, RustLibApiImpl, RustLibWire> {

static const kDefaultExternalLibraryLoaderConfig =
ExternalLibraryLoaderConfig(
stem: 'rust_lib_violet',
stem: 'rust_lib_myapp',
ioDirectory: 'rust/target/release/',
webPrefix: 'pkg/',
);
Expand Down
2 changes: 1 addition & 1 deletion pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ packages:
url: "https://pub.dev"
source: hosted
version: "5.0.2"
rust_lib_violet:
rust_lib_myapp:
dependency: "direct main"
description:
path: rust_builder
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: violet
name: myapp
description: Open Source Hentai Viewer App

# The following defines the version and build number for your application.
Expand All @@ -24,7 +24,7 @@ dependencies:
flutter_localizations:
sdk: flutter
flutter_rust_bridge: 2.0.0-dev.28
rust_lib_violet:
rust_lib_myapp:
path: rust_builder

dev_dependencies:
Expand Down
2 changes: 1 addition & 1 deletion rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[package]
name = "rust_lib_violet"
name = "rust_lib_myapp"
version = "0.1.0"
edition = "2021"

Expand Down
4 changes: 2 additions & 2 deletions rust/src/api/simple.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// This source code is a part of Project Violet.
// Copyright (C) 2020-2024. violet-team. Licensed under the Apache-2.0 License.
// This source code is a part of Project Myapp.
// Copyright (C) 2020-2024. myapp-team. Licensed under the Apache-2.0 License.


#[flutter_rust_bridge::frb(init)]
Expand Down
6 changes: 3 additions & 3 deletions rust_builder/android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// The Android Gradle Plugin builds the native code with the Android NDK.

group 'com.flutter_rust_bridge.rust_lib_violet'
group 'com.flutter_rust_bridge.rust_lib_myapp'
version '1.0'

buildscript {
Expand All @@ -26,7 +26,7 @@ apply plugin: 'com.android.library'

android {
if (project.android.hasProperty("namespace")) {
namespace 'com.flutter_rust_bridge.rust_lib_violet'
namespace 'com.flutter_rust_bridge.rust_lib_myapp'
}

// Bumping the plugin compileSdkVersion requires all clients of this plugin
Expand All @@ -52,5 +52,5 @@ android {
apply from: "../cargokit/gradle/plugin.gradle"
cargokit {
manifestDir = "../../rust"
libname = "rust_lib_violet"
libname = "rust_lib_myapp"
}
2 changes: 1 addition & 1 deletion rust_builder/android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rootProject.name = 'rust_lib_violet'
rootProject.name = 'rust_lib_myapp'
2 changes: 1 addition & 1 deletion rust_builder/android/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.flutter_rust_bridge.rust_lib_violet">
package="com.flutter_rust_bridge.rust_lib_myapp">
</manifest>
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
# Run `pod lib lint rust_lib_violet.podspec` to validate before publishing.
# Run `pod lib lint rust_lib_myapp.podspec` to validate before publishing.
#
Pod::Spec.new do |s|
s.name = 'rust_lib_violet'
s.name = 'rust_lib_myapp'
s.version = '0.0.1'
s.summary = 'A new Flutter FFI plugin project.'
s.description = <<-DESC
Expand All @@ -29,17 +29,17 @@ A new Flutter FFI plugin project.
s.script_phase = {
:name => 'Build Rust library',
# First argument is relative path to the `rust` folder, second is name of rust library
:script => 'sh "$PODS_TARGET_SRCROOT/../cargokit/build_pod.sh" ../../rust rust_lib_violet',
:script => 'sh "$PODS_TARGET_SRCROOT/../cargokit/build_pod.sh" ../../rust rust_lib_myapp',
:execution_position => :before_compile,
:input_files => ['${BUILT_PRODUCTS_DIR}/cargokit_phony'],
# Let XCode know that the static library referenced in -force_load below is
# created by this build step.
:output_files => ["${BUILT_PRODUCTS_DIR}/librust_lib_violet.a"],
:output_files => ["${BUILT_PRODUCTS_DIR}/librust_lib_myapp.a"],
}
s.pod_target_xcconfig = {
'DEFINES_MODULE' => 'YES',
# Flutter.framework does not contain a i386 slice.
'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386',
'OTHER_LDFLAGS' => '-force_load ${BUILT_PRODUCTS_DIR}/librust_lib_violet.a',
'OTHER_LDFLAGS' => '-force_load ${BUILT_PRODUCTS_DIR}/librust_lib_myapp.a',
}
end
6 changes: 3 additions & 3 deletions rust_builder/linux/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
cmake_minimum_required(VERSION 3.10)

# Project-level configuration.
set(PROJECT_NAME "rust_lib_violet")
set(PROJECT_NAME "rust_lib_myapp")
project(${PROJECT_NAME} LANGUAGES CXX)

include("../cargokit/cmake/cargokit.cmake")
apply_cargokit(${PROJECT_NAME} ../../rust rust_lib_violet "")
apply_cargokit(${PROJECT_NAME} ../../rust rust_lib_myapp "")

# List of absolute paths to libraries that should be bundled with the plugin.
# This list could contain prebuilt libraries, or libraries created by an
# external build triggered from this build file.
set(rust_lib_violet_bundled_libraries
set(rust_lib_myapp_bundled_libraries
"${${PROJECT_NAME}_cargokit_lib}"
PARENT_SCOPE
)
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
#
# To learn more about a Podspec see http://guides.cocoapods.org/syntax/podspec.html.
# Run `pod lib lint rust_lib_violet.podspec` to validate before publishing.
# Run `pod lib lint rust_lib_myapp.podspec` to validate before publishing.
#
Pod::Spec.new do |s|
s.name = 'rust_lib_violet'
s.name = 'rust_lib_myapp'
s.version = '0.0.1'
s.summary = 'A new Flutter FFI plugin project.'
s.description = <<-DESC
Expand All @@ -28,17 +28,17 @@ A new Flutter FFI plugin project.
s.script_phase = {
:name => 'Build Rust library',
# First argument is relative path to the `rust` folder, second is name of rust library
:script => 'sh "$PODS_TARGET_SRCROOT/../cargokit/build_pod.sh" ../../rust rust_lib_violet',
:script => 'sh "$PODS_TARGET_SRCROOT/../cargokit/build_pod.sh" ../../rust rust_lib_myapp',
:execution_position => :before_compile,
:input_files => ['${BUILT_PRODUCTS_DIR}/cargokit_phony'],
# Let XCode know that the static library referenced in -force_load below is
# created by this build step.
:output_files => ["${BUILT_PRODUCTS_DIR}/librust_lib_violet.a"],
:output_files => ["${BUILT_PRODUCTS_DIR}/librust_lib_myapp.a"],
}
s.pod_target_xcconfig = {
'DEFINES_MODULE' => 'YES',
# Flutter.framework does not contain a i386 slice.
'EXCLUDED_ARCHS[sdk=iphonesimulator*]' => 'i386',
'OTHER_LDFLAGS' => '-force_load ${BUILT_PRODUCTS_DIR}/librust_lib_violet.a',
'OTHER_LDFLAGS' => '-force_load ${BUILT_PRODUCTS_DIR}/librust_lib_myapp.a',
}
end
2 changes: 1 addition & 1 deletion rust_builder/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: rust_lib_violet
name: rust_lib_myapp
description: "Utility to build Rust code"
version: 0.0.1
publish_to: none
Expand Down
6 changes: 3 additions & 3 deletions rust_builder/windows/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@
cmake_minimum_required(VERSION 3.14)

# Project-level configuration.
set(PROJECT_NAME "rust_lib_violet")
set(PROJECT_NAME "rust_lib_myapp")
project(${PROJECT_NAME} LANGUAGES CXX)

include("../cargokit/cmake/cargokit.cmake")
apply_cargokit(${PROJECT_NAME} ../../../../../../rust rust_lib_violet "")
apply_cargokit(${PROJECT_NAME} ../../../../../../rust rust_lib_myapp "")

# List of absolute paths to libraries that should be bundled with the plugin.
# This list could contain prebuilt libraries, or libraries created by an
# external build triggered from this build file.
set(rust_lib_violet_bundled_libraries
set(rust_lib_myapp_bundled_libraries
"${${PROJECT_NAME}_cargokit_lib}"
PARENT_SCOPE
)

0 comments on commit 621abef

Please sign in to comment.