mirror of
https://github.com/dz0ny/meshcore-sar.git
synced 2026-08-11 16:30:28 +00:00
Refactor voice support and add Greek localization
- Updated voice support to only include iOS, removing MacOS support. - Added Greek (el) to the list of supported locales in LocalePreferences. - Enhanced localization strings for Greek language. - Modified Podfile to exclude C source files from the macOS build of codec2_flutter, as voice messages are iOS-only.
This commit is contained in:
72
.github/workflows/build-artifacts.yml
vendored
72
.github/workflows/build-artifacts.yml
vendored
@@ -12,6 +12,7 @@ permissions:
|
||||
env:
|
||||
FLUTTER_VERSION: "3.35.6"
|
||||
APP_NAME: meshcore-sar
|
||||
ANDROID_NDK_VERSION: "27.0.12077973"
|
||||
|
||||
jobs:
|
||||
build-android:
|
||||
@@ -28,6 +29,9 @@ jobs:
|
||||
distribution: temurin
|
||||
java-version: "17"
|
||||
|
||||
- name: Setup Gradle cache
|
||||
uses: gradle/actions/setup-gradle@v4
|
||||
|
||||
- name: Setup Flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
@@ -35,6 +39,14 @@ jobs:
|
||||
channel: stable
|
||||
cache: true
|
||||
|
||||
- name: Cache Android NDK
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
/usr/local/lib/android/sdk/ndk/${{ env.ANDROID_NDK_VERSION }}
|
||||
/usr/local/lib/android/sdk/licenses
|
||||
key: ${{ runner.os }}-android-ndk-${{ env.ANDROID_NDK_VERSION }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: flutter pub get
|
||||
|
||||
@@ -188,6 +200,56 @@ jobs:
|
||||
path: "${{ env.APP_NAME }}-*-macos.dmg"
|
||||
if-no-files-found: error
|
||||
|
||||
build-ios:
|
||||
name: Build iOS Archive (Manual Signing)
|
||||
runs-on: macos-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Flutter
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||
channel: stable
|
||||
cache: true
|
||||
|
||||
- name: Install dependencies
|
||||
run: flutter pub get
|
||||
|
||||
- name: Build iOS app (no codesign)
|
||||
run: flutter build ios --release --no-codesign
|
||||
|
||||
- name: Package iOS unsigned artifacts
|
||||
run: |
|
||||
RAW_TAG="${{ github.event.release.tag_name || github.ref_name }}"
|
||||
TAG="${RAW_TAG//\//-}"
|
||||
APP_PATH="build/ios/iphoneos/Runner.app"
|
||||
if [ ! -d "$APP_PATH" ]; then
|
||||
echo "Runner.app not found at $APP_PATH"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
mkdir -p ios_payload/Payload
|
||||
cp -R "$APP_PATH" ios_payload/Payload/
|
||||
(
|
||||
cd ios_payload
|
||||
zip -qry "../${APP_NAME}-${TAG}-ios-unsigned.ipa" Payload
|
||||
)
|
||||
rm -rf ios_payload
|
||||
|
||||
zip -qry "${APP_NAME}-${TAG}-ios-runner-app.zip" "$APP_PATH"
|
||||
|
||||
- name: Upload iOS artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release-ios
|
||||
path: |
|
||||
"${{ env.APP_NAME }}-*-ios-unsigned.ipa"
|
||||
"${{ env.APP_NAME }}-*-ios-runner-app.zip"
|
||||
if-no-files-found: error
|
||||
|
||||
upload-release-assets:
|
||||
name: Upload Assets To Release
|
||||
if: github.event_name == 'release'
|
||||
@@ -197,6 +259,7 @@ jobs:
|
||||
- build-linux
|
||||
- build-windows
|
||||
- build-macos
|
||||
- build-ios
|
||||
|
||||
steps:
|
||||
- name: Download all build artifacts
|
||||
@@ -216,11 +279,20 @@ jobs:
|
||||
- Linux (`.tar.gz`)
|
||||
- macOS (`.dmg`)
|
||||
- Windows (`.zip`)
|
||||
- iOS unsigned (`-ios-unsigned.ipa`, `-ios-runner-app.zip`)
|
||||
|
||||
Windows status: currently unusable. The BLE stack on Windows is broken, so BLE features do not work.
|
||||
|
||||
iOS manual signing and install:
|
||||
1. Download `*-ios-unsigned.ipa` (or `*-ios-runner-app.zip`) from this release.
|
||||
2. Re-sign it with your Apple Development/Distribution certificate and provisioning profile.
|
||||
3. If you used `*-ios-runner-app.zip`, create a signed `.ipa` from `Runner.app` during signing.
|
||||
4. Install the signed `.ipa` on your iPhone using Apple Configurator 2 or Xcode (Devices and Simulators).
|
||||
files: |
|
||||
dist/*.apk
|
||||
dist/*.tar.gz
|
||||
dist/*.zip
|
||||
dist/*.dmg
|
||||
dist/*-ios-unsigned.ipa
|
||||
dist/*-ios-runner-app.zip
|
||||
fail_on_unmatched_files: true
|
||||
|
||||
3793
lib/l10n/app_el.arb
Normal file
3793
lib/l10n/app_el.arb
Normal file
File diff suppressed because it is too large
Load Diff
@@ -6,6 +6,7 @@ import 'package:flutter_localizations/flutter_localizations.dart';
|
||||
import 'package:intl/intl.dart' as intl;
|
||||
|
||||
import 'app_localizations_de.dart';
|
||||
import 'app_localizations_el.dart';
|
||||
import 'app_localizations_en.dart';
|
||||
import 'app_localizations_es.dart';
|
||||
import 'app_localizations_fr.dart';
|
||||
@@ -100,6 +101,7 @@ abstract class AppLocalizations {
|
||||
/// A list of this localizations delegate's supported locales.
|
||||
static const List<Locale> supportedLocales = <Locale>[
|
||||
Locale('de'),
|
||||
Locale('el'),
|
||||
Locale('en'),
|
||||
Locale('es'),
|
||||
Locale('fr'),
|
||||
@@ -4066,6 +4068,7 @@ class _AppLocalizationsDelegate
|
||||
@override
|
||||
bool isSupported(Locale locale) => <String>[
|
||||
'de',
|
||||
'el',
|
||||
'en',
|
||||
'es',
|
||||
'fr',
|
||||
@@ -4083,6 +4086,8 @@ AppLocalizations lookupAppLocalizations(Locale locale) {
|
||||
switch (locale.languageCode) {
|
||||
case 'de':
|
||||
return AppLocalizationsDe();
|
||||
case 'el':
|
||||
return AppLocalizationsEl();
|
||||
case 'en':
|
||||
return AppLocalizationsEn();
|
||||
case 'es':
|
||||
|
||||
2251
lib/l10n/app_localizations_el.dart
Normal file
2251
lib/l10n/app_localizations_el.dart
Normal file
File diff suppressed because it is too large
Load Diff
@@ -54,7 +54,7 @@ class _MessagesTabState extends State<MessagesTab> {
|
||||
bool _isRecording = false;
|
||||
bool _isSendingVoice = false;
|
||||
static const int _maxVoicePackets = 10;
|
||||
bool get _voiceSupported => Platform.isIOS || Platform.isMacOS;
|
||||
bool get _voiceSupported => Platform.isIOS;
|
||||
StreamSubscription<Int16List>? _voiceStreamSub;
|
||||
String? _currentVoiceSessionId;
|
||||
final List<Int16List> _recordedChunks = [];
|
||||
|
||||
@@ -14,6 +14,7 @@ class LocalePreferences {
|
||||
Locale('es'), // Spanish
|
||||
Locale('fr'), // French
|
||||
Locale('it'), // Italian
|
||||
Locale('el'), // Greek
|
||||
];
|
||||
|
||||
/// Get the saved locale or return null to use system locale
|
||||
@@ -61,6 +62,8 @@ class LocalePreferences {
|
||||
return 'Français';
|
||||
case 'it':
|
||||
return 'Italiano';
|
||||
case 'el':
|
||||
return 'Greek';
|
||||
default:
|
||||
return locale.languageCode;
|
||||
}
|
||||
@@ -83,6 +86,8 @@ class LocalePreferences {
|
||||
return 'Français';
|
||||
case 'it':
|
||||
return 'Italiano';
|
||||
case 'el':
|
||||
return 'Ελληνικά';
|
||||
default:
|
||||
return locale.languageCode;
|
||||
}
|
||||
|
||||
@@ -38,5 +38,13 @@ end
|
||||
post_install do |installer|
|
||||
installer.pods_project.targets.each do |target|
|
||||
flutter_additional_macos_build_settings(target)
|
||||
# codec2_flutter uses ARM-specific register asm("sp") in debug_alloc.h that
|
||||
# does not compile on x86_64 macOS. Voice messages are iOS-only, so exclude
|
||||
# all C source files from the macOS codec2_flutter build entirely.
|
||||
if target.name == 'codec2_flutter'
|
||||
target.build_configurations.each do |config|
|
||||
config.build_settings['EXCLUDED_SOURCE_FILE_NAMES'] = '*.c *.cpp'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user