From c7eded933114bff8837fcde94e19d377f33b4665 Mon Sep 17 00:00:00 2001 From: LUS Date: Mon, 8 Jan 2024 19:35:29 +0900 Subject: [PATCH] =?UTF-8?q?[=EC=9D=B4=EC=9A=B0=EC=84=AD]=200108=20?= =?UTF-8?q?=ED=85=8C=EC=8A=A4=ED=8A=B8=EC=BD=94=EB=93=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95,=20dependencies=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- clean.sh | 5 ++ ios/Runner.xcodeproj/project.pbxproj | 3 +- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- lib/test_text.dart | 73 ++++++++----------- pubspec.yaml | 2 +- 5 files changed, 38 insertions(+), 47 deletions(-) create mode 100644 clean.sh diff --git a/clean.sh b/clean.sh new file mode 100644 index 0000000..9b0a910 --- /dev/null +++ b/clean.sh @@ -0,0 +1,5 @@ +rm -rf pubspec.lock ios/Podfile.lock +flutter clean +flutter pub get +cd ios +arch -x86_64 pod install \ No newline at end of file diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 0900b65..e04175a 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -156,7 +156,7 @@ 97C146E61CF9000F007C117D /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 1300; + LastUpgradeCheck = 1430; ORGANIZATIONNAME = ""; TargetAttributes = { 97C146ED1CF9000F007C117D = { @@ -222,6 +222,7 @@ files = ( ); inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); name = "Thin Binary"; outputPaths = ( diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 3db53b6..b52b2e6 100644 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ { List imageList = []; String _currentText = ""; - int _currentIndex = 0; - bool _isRunning = false; - bool _isInitialized = false; final FFMpegManager _ffmpegManager = FFMpegManager(); @@ -50,7 +47,7 @@ class _TestWidgetState extends State { imageList = []; }); - final List allTexts = ResourceManager.getInstance().getTextDataList(autoEditOnly: true, lineCount: 2); + final List allTexts = ResourceManager.getInstance().getTextDataList(autoEditOnly: false, lineCount: 2); allTexts.sort((a, b) { final aValue = "${a.group}_${a.key}"; final bValue = "${b.group}_${b.key}"; @@ -58,24 +55,20 @@ class _TestWidgetState extends State { return aValue.compareTo(bValue); }); - // final String currentText = - // allTexts[(_currentIndex) % allTexts.length]; - - // print('text is $currentText'); - // print('_currentIndex is $_currentIndex'); - - // await _vmTextWidget.loadText(currentText); - - // String? preview = _vmTextWidget.previewImagePath; - // setState(() { - // if (preview != null) imageList = [preview]; - // }); - - // _currentIndex++; - - List list = []; - - Map excepts = { + Map filteredText = { + // "Title_ES005": true, + // "Title_ES006": true, + // "Title_ES007": true, + // "Title_JH014": true, + // "Title_JH015": true, + // "Title_JH016": true, + // "Title_SW042": true, + // "Title_SW043": true, + // "Title_SW044": true, + // "Title_SW045": true, + // "Title_YE001": true, + // "Title_YE002": true, + // "Title_YE003": true, }; for (int i = 0; i < allTexts.length; i++) { @@ -83,20 +76,19 @@ class _TestWidgetState extends State { final TextData currentTextData = allTexts[i]; final String currentText = currentTextData.key; - if (excepts.containsKey(currentText)) continue; + // if (!filteredText.containsKey(currentText)) continue; print('text is $currentText'); print('_currentIndex is $i / ${allTexts.length}'); // await _vmTextWidget.loadText(currentText, initTexts: ["첫번째줄 테스트", "두번째줄 테스트"]); - await _vmTextWidget.loadText(currentText, initTexts: ["THIS IS TITLE"], language: "en"); + // await _vmTextWidget.loadText(currentText, initTexts: ["THIS IS TITLE"], language: "en"); // await _vmTextWidget.loadText(currentText, initTexts: ["パスワードを再確認してください。", "パスワードを再確認してください。"]); // await _vmTextWidget.loadText(currentText, initTexts: ["Sẵn sàng tiệc chưa?", "Sẵn sàng tiệc chưa?"]); // await _vmTextWidget.loadText(currentText, initTexts: ["วิดีโอที่คุณสร้างกำลังรอคุณอยู่", "วิดีโอที่คุณสร้างกำลังรอคุณอยู่"]); - // await _vmTextWidget.loadText(currentText, initTexts: ["THIS IS TITLE THIS IS TITLE THIS IS TITLE THIS IS TITLE", "THIS IS SUBTITLE THIS IS SUBTITLE THIS IS SUBTITLE THIS IS SUBTITLE"]); - // await _vmTextWidget.loadText(currentText, initTexts: ["THIS IS SUBTITLE THIS IS SUBTITLE THIS IS SUBTITLE THIS IS SUBTITLE"]); - + await _vmTextWidget.loadText(currentText, initTexts: ["THIS IS TITLE", "THIS IS SUBTITLE"], language: "ko"); + // await _vmTextWidget.loadText(currentText, initTexts: ["첫번째줄 테스트", "두번째줄 테스트"], language: "ko"); await _vmTextWidget.extractAllSequence((progress) => {}); final String appDirPath = await getAppDirectoryPath(); @@ -106,8 +98,8 @@ class _TestWidgetState extends State { String? preview = _vmTextWidget.previewImagePath; - int width = (_vmTextWidget.width).floor(); - int height = (_vmTextWidget.height).floor(); + int width = (_vmTextWidget.width / 2).floor(); + int height = (_vmTextWidget.height / 2).floor(); width -= width % 2; height -= height % 2; @@ -119,11 +111,13 @@ class _TestWidgetState extends State { "${_vmTextWidget.allSequencesPath!}/%d.png", "-vf", "scale=$width:$height", + "-c:v", "libvpx-vp9", "-pix_fmt", "yuva420p", "$webmPath/${currentTextData.group}_$currentText.webm", + // "-c:v", // "libx264", // "-preset", @@ -131,6 +125,7 @@ class _TestWidgetState extends State { // "-pix_fmt", // "yuv420p", // "$webmPath/${currentTextData.group}_$currentText.mp4", + "-y" ], (p0) => null); @@ -140,11 +135,6 @@ class _TestWidgetState extends State { print(webmPath); print(currentText); - // if (_vmTextWidget.elapsedTime >= 1000) { - // print("heavy!"); - // print(""); - // } - await Future.delayed(const Duration(milliseconds: 1000)); setState(() { @@ -155,26 +145,21 @@ class _TestWidgetState extends State { print(""); } - print(""); + print("done!"); } catch (e) { print(e); - } finally { - // _isRunning = false; } } - List RectangleBoxList(isPreview, index) { - VMTextWidget textWidget = _vmTextWidget; - + List rectangleBoxList(isPreview, index) { List list = []; - list.add(Container( - child: Image.file( + list.add(Image.file( File(imageList[index]), width: MediaQuery.of(this.context).size.width, fit: BoxFit.fitWidth, ), - )); + ); if (isPreview) { final textList = _vmTextWidget.textDataMap.values.toList(); @@ -212,7 +197,7 @@ class _TestWidgetState extends State { itemBuilder: (BuildContext context, int index) { bool isPreview = imageList.length == 1; return Stack( - children: RectangleBoxList(isPreview, index), + children: rectangleBoxList(isPreview, index), ); }, ), diff --git a/pubspec.yaml b/pubspec.yaml index 8c16836..0bd295f 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -41,7 +41,7 @@ dependencies: google_mlkit_face_detection: google_mlkit_image_labeling: firebase_core: - flutter_inappwebview: + flutter_inappwebview: 5.8.0 uuid: ^3.0.6 http: rxdart: