diff --git a/packages/client-flutter/android/app/build.gradle b/packages/client-flutter/android/app/build.gradle index 593df02..fbc0165 100644 --- a/packages/client-flutter/android/app/build.gradle +++ b/packages/client-flutter/android/app/build.gradle @@ -26,7 +26,7 @@ apply plugin: 'kotlin-android' apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" android { - namespace "org.refracturemedia.refracture_music" + namespace "media.refracture.refracture_music" compileSdkVersion flutter.compileSdkVersion ndkVersion flutter.ndkVersion @@ -45,7 +45,7 @@ android { defaultConfig { // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html). - applicationId "org.refracturemedia.refracture_music" + applicationId "media.refracture.refracture_music" // 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 21 diff --git a/packages/client-flutter/android/app/src/main/kotlin/org/refracturemedia/refracture_music/MainActivity.kt b/packages/client-flutter/android/app/src/main/kotlin/org/refracturemedia/refracture_music/MainActivity.kt index 8df98b4..057f345 100644 --- a/packages/client-flutter/android/app/src/main/kotlin/org/refracturemedia/refracture_music/MainActivity.kt +++ b/packages/client-flutter/android/app/src/main/kotlin/org/refracturemedia/refracture_music/MainActivity.kt @@ -1,4 +1,4 @@ -package org.refracturemedia.refracture_music +package media.refracture.refracture_music import io.flutter.embedding.android.FlutterActivity diff --git a/packages/client-flutter/ios/Runner.xcodeproj/project.pbxproj b/packages/client-flutter/ios/Runner.xcodeproj/project.pbxproj index 514901c..967fb25 100644 --- a/packages/client-flutter/ios/Runner.xcodeproj/project.pbxproj +++ b/packages/client-flutter/ios/Runner.xcodeproj/project.pbxproj @@ -366,7 +366,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = org.refracturemedia.refractureMusic; + PRODUCT_BUNDLE_IDENTIFIER = media.refracture.refractureMusic; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; @@ -383,7 +383,7 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = org.refracturemedia.refractureMusic.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = media.refracture.refractureMusic.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -401,7 +401,7 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = org.refracturemedia.refractureMusic.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = media.refracture.refractureMusic.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; @@ -417,7 +417,7 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = org.refracturemedia.refractureMusic.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = media.refracture.refractureMusic.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner"; @@ -544,7 +544,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = org.refracturemedia.refractureMusic; + PRODUCT_BUNDLE_IDENTIFIER = media.refracture.refractureMusic; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; @@ -566,7 +566,7 @@ "$(inherited)", "@executable_path/Frameworks", ); - PRODUCT_BUNDLE_IDENTIFIER = org.refracturemedia.refractureMusic; + PRODUCT_BUNDLE_IDENTIFIER = media.refracture.refractureMusic; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h"; SWIFT_VERSION = 5.0; diff --git a/packages/client-flutter/lib/app/load_core.dart b/packages/client-flutter/lib/app/load_core.dart index 05fdf30..a369786 100644 --- a/packages/client-flutter/lib/app/load_core.dart +++ b/packages/client-flutter/lib/app/load_core.dart @@ -2,6 +2,7 @@ import 'dart:async'; import 'dart:convert'; import 'dart:io'; +import 'package:flutter_js/extensions/fetch.dart'; import 'package:sqflite_common_ffi/sqflite_ffi.dart'; import 'package:path/path.dart'; import 'package:path_provider/path_provider.dart'; @@ -51,7 +52,9 @@ Future load() async { final core = getJavascriptRuntime(); - await core.evaluateAsync(bundle); + await core.enableFetch(); + + await core.enableHandlePromises(); initDatabase() async { @@ -73,5 +76,13 @@ Future load() async { return db.query(query); }); - print(core); + core.onMessage('test', (message) { + print(message); + }); + + await core.evaluateAsync(""" + var connection_data = ${json.encode({"address": "http://localhost:4829"})}; + """); + + await core.evaluateAsync(bundle); } \ No newline at end of file diff --git a/packages/client-flutter/linux/CMakeLists.txt b/packages/client-flutter/linux/CMakeLists.txt index 1e644dd..6007bd2 100644 --- a/packages/client-flutter/linux/CMakeLists.txt +++ b/packages/client-flutter/linux/CMakeLists.txt @@ -7,7 +7,7 @@ project(runner LANGUAGES CXX) set(BINARY_NAME "refracture_music") # The unique GTK application identifier for this application. See: # https://wiki.gnome.org/HowDoI/ChooseApplicationID -set(APPLICATION_ID "org.refracturemedia.refracture_music") +set(APPLICATION_ID "media.refracture.refracture_music") # Explicitly opt in to modern CMake behaviors to avoid warnings with recent # versions of CMake. diff --git a/packages/client-flutter/macos/Runner.xcodeproj/project.pbxproj b/packages/client-flutter/macos/Runner.xcodeproj/project.pbxproj index 812e97d..41c0544 100644 --- a/packages/client-flutter/macos/Runner.xcodeproj/project.pbxproj +++ b/packages/client-flutter/macos/Runner.xcodeproj/project.pbxproj @@ -384,7 +384,7 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = org.refracturemedia.refractureMusic.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = media.refracture.refractureMusic.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/refracture_music.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/refracture_music"; @@ -398,7 +398,7 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = org.refracturemedia.refractureMusic.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = media.refracture.refractureMusic.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/refracture_music.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/refracture_music"; @@ -412,7 +412,7 @@ CURRENT_PROJECT_VERSION = 1; GENERATE_INFOPLIST_FILE = YES; MARKETING_VERSION = 1.0; - PRODUCT_BUNDLE_IDENTIFIER = org.refracturemedia.refractureMusic.RunnerTests; + PRODUCT_BUNDLE_IDENTIFIER = media.refracture.refractureMusic.RunnerTests; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/refracture_music.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/refracture_music"; diff --git a/packages/client-flutter/macos/Runner/Configs/AppInfo.xcconfig b/packages/client-flutter/macos/Runner/Configs/AppInfo.xcconfig index 32a1d46..fa28ed5 100644 --- a/packages/client-flutter/macos/Runner/Configs/AppInfo.xcconfig +++ b/packages/client-flutter/macos/Runner/Configs/AppInfo.xcconfig @@ -8,7 +8,7 @@ PRODUCT_NAME = refracture_music // The application's bundle identifier -PRODUCT_BUNDLE_IDENTIFIER = org.refracturemedia.refractureMusic +PRODUCT_BUNDLE_IDENTIFIER = media.refracture.refractureMusic // The copyright displayed in application information -PRODUCT_COPYRIGHT = Copyright © 2023 org.refracturemedia. All rights reserved. +PRODUCT_COPYRIGHT = Copyright © 2023 media.refracture. All rights reserved. diff --git a/packages/client-flutter/windows/runner/Runner.rc b/packages/client-flutter/windows/runner/Runner.rc index d988ae1..8e4b838 100644 --- a/packages/client-flutter/windows/runner/Runner.rc +++ b/packages/client-flutter/windows/runner/Runner.rc @@ -89,11 +89,11 @@ BEGIN BEGIN BLOCK "040904e4" BEGIN - VALUE "CompanyName", "org.refracturemedia" "\0" + VALUE "CompanyName", "media.refracture" "\0" VALUE "FileDescription", "refracture_music" "\0" VALUE "FileVersion", VERSION_AS_STRING "\0" VALUE "InternalName", "refracture_music" "\0" - VALUE "LegalCopyright", "Copyright (C) 2023 org.refracturemedia. All rights reserved." "\0" + VALUE "LegalCopyright", "Copyright (C) 2023 media.refracture. All rights reserved." "\0" VALUE "OriginalFilename", "refracture_music.exe" "\0" VALUE "ProductName", "refracture_music" "\0" VALUE "ProductVersion", VERSION_AS_STRING "\0" diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index ab3369b..3ff97a4 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -21,7 +21,7 @@ export class MusicCore { playlists: ItemManager; async startup () { - await this.session.startup(); + // await this.session.startup(); } constructor() { @@ -41,8 +41,6 @@ export class MusicCore { export const Music = new MusicCore(); -console.log('[Music Core] Hello world!!!!!!!!'); - declare function sendMessage(channel_name: string, message: any): any; sendMessage('test', '[Music Core] Hello? *tap tap* Is this thing on?'); diff --git a/scripts/common.ts b/scripts/common.ts index 96bd211..ab70947 100644 --- a/scripts/common.ts +++ b/scripts/common.ts @@ -46,7 +46,7 @@ export type Releases = { pkg: string, assets: Record, version: s if (files.includes('webpack.config.js')) { const CI = webpackCI(pkg_dir, release, releases, dist, pkg) - if (CI) changelog += CI + if (CI) changelog += await CI } }