Skip to content

Commit

Permalink
Merge pull request #7 from KewbitXMR/development
Browse files Browse the repository at this point in the history
fdroid test
  • Loading branch information
KewbitXMR authored Sep 19, 2024
2 parents 7032b91 + 09a2666 commit f2a4b4a
Show file tree
Hide file tree
Showing 12 changed files with 140 additions and 15 deletions.
1 change: 1 addition & 0 deletions ios/Flutter/Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "Generated.xcconfig"
1 change: 1 addition & 0 deletions ios/Flutter/Release.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "Generated.xcconfig"
44 changes: 44 additions & 0 deletions ios/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Uncomment this line to define a global platform for your project
# platform :ios, '12.0'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}

def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure flutter pub get is executed first"
end

File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Generated.xcconfig, then run flutter pub get"
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_ios_podfile_setup

target 'Runner' do
use_frameworks!
use_modular_headers!

flutter_install_all_ios_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end

post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_ios_build_settings(target)
end
end
24 changes: 12 additions & 12 deletions lib/services/tor_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class TorService {

Future<void> startService() async {
try {
await _tor.startService("ControlPort 9051\nCookieAuthentication 0");
//await _tor.startService("ControlPort 9051\nCookieAuthentication 0");
debugPrint("Tor service started");
_statusController.add("Tor service started.");
} catch (e) {
Expand All @@ -31,7 +31,7 @@ class TorService {

Future<void> stopService() async {
try {
await _tor.stopService();
//await _tor.stopService();
_statusController.add("Tor service stopped.");
} catch (e) {
_statusController.add("Failed to stop Tor: $e");
Expand All @@ -40,12 +40,12 @@ class TorService {

Future<void> initializeDaemonHiddenService({required String hostname, required String privateKey}) async {
try {
final hiddenServiceInfo = await _tor.initializeHiddenService(
listenPort: 3201,
exposePort: 12134,
privateKey: privateKey,
);
_statusController.add("Hidden service initialized: $hiddenServiceInfo");
//final hiddenServiceInfo = await _tor.initializeHiddenService(
// listenPort: 3201,
// exposePort: 12134,
// privateKey: privateKey,
//);
//_statusController.add("Hidden service initialized: $hiddenServiceInfo");
} catch (e) {
_statusController.add("Failed to initialize hidden service: $e");
}
Expand Down Expand Up @@ -80,10 +80,10 @@ class TorService {


void listenToTorServiceEvents() {
_torStatusSubscription = _tor.torServiceEvents.listen((event) {
_statusController.add("Tor event: $event");
debugPrint(event);
});
//_torStatusSubscription = _tor.torServiceEvents.listen((event) {
// _statusController.add("Tor event: $event");
// debugPrint(event);
//});
}

void dispose() {
Expand Down
1 change: 1 addition & 0 deletions linux/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
)

list(APPEND FLUTTER_FFI_PLUGIN_LIST
tor
)

set(PLUGIN_BUNDLED_LIBRARIES)
Expand Down
1 change: 1 addition & 0 deletions macos/Flutter/Flutter-Debug.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.debug.xcconfig"
#include "ephemeral/Flutter-Generated.xcconfig"
1 change: 1 addition & 0 deletions macos/Flutter/Flutter-Release.xcconfig
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
#include? "Pods/Target Support Files/Pods-Runner/Pods-Runner.release.xcconfig"
#include "ephemeral/Flutter-Generated.xcconfig"
43 changes: 43 additions & 0 deletions macos/Podfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
platform :osx, '10.14'

# CocoaPods analytics sends network stats synchronously affecting flutter build latency.
ENV['COCOAPODS_DISABLE_STATS'] = 'true'

project 'Runner', {
'Debug' => :debug,
'Profile' => :release,
'Release' => :release,
}

def flutter_root
generated_xcode_build_settings_path = File.expand_path(File.join('..', 'Flutter', 'ephemeral', 'Flutter-Generated.xcconfig'), __FILE__)
unless File.exist?(generated_xcode_build_settings_path)
raise "#{generated_xcode_build_settings_path} must exist. If you're running pod install manually, make sure \"flutter pub get\" is executed first"
end

File.foreach(generated_xcode_build_settings_path) do |line|
matches = line.match(/FLUTTER_ROOT\=(.*)/)
return matches[1].strip if matches
end
raise "FLUTTER_ROOT not found in #{generated_xcode_build_settings_path}. Try deleting Flutter-Generated.xcconfig, then run \"flutter pub get\""
end

require File.expand_path(File.join('packages', 'flutter_tools', 'bin', 'podhelper'), flutter_root)

flutter_macos_podfile_setup

target 'Runner' do
use_frameworks!
use_modular_headers!

flutter_install_all_macos_pods File.dirname(File.realpath(__FILE__))
target 'RunnerTests' do
inherit! :search_paths
end
end

post_install do |installer|
installer.pods_project.targets.each do |target|
flutter_additional_macos_build_settings(target)
end
end
23 changes: 23 additions & 0 deletions metadata/org.kewbit.havenoPlus.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
Categories: Internet
License: GPL-3.0-or-later
SourceCode: https://github.com/KewbitXMR/haveno-plus
IssueTracker: https://github.com/KewbitXMR/haveno-plus/issues
Changelog: https://github.com/KewbitXMR/haveno-plus/releases
AutoName: Haveno
Summary: A decentralized exchange app for Monero
Description: |-
Haveno is a decentralized peer-to-peer exchange, allowing users to trade privately using Monero and other traditional currencies.
RepoType: git
Repo: https://github.com/KewbitXMR/haveno-plus.git

Builds:
- versionName: '0.0.1'
versionCode: 1
commit: v0.0.1
subdir: android
gradle:
- yes

AutoUpdateMode: Version v%v
UpdateCheckMode: Tags
12 changes: 10 additions & 2 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -380,10 +380,10 @@ packages:
dependency: "direct main"
description:
name: path_provider
sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161
sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378
url: "https://pub.dev"
source: hosted
version: "2.1.3"
version: "2.1.4"
path_provider_android:
dependency: transitive
description:
Expand Down Expand Up @@ -549,6 +549,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.0"
tor:
dependency: "direct main"
description:
name: tor
sha256: eeed80e5c912a1806c2f81825c12e84f4dc5a0b50aebedea59e3a8ba53df3142
url: "https://pub.dev"
source: hosted
version: "0.0.8"
typed_data:
dependency: transitive
description:
Expand Down
3 changes: 2 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: haveno_flutter_app
description: "A new Flutter project."
publish_to: 'none'

version: 1.0.0+1
version: 0.0.1+2

environment:
sdk: '>=3.4.3 <4.0.0'
Expand Down Expand Up @@ -34,6 +34,7 @@ dependencies:
fixnum: ^1.1.0
intl: ^0.17.0
badges: ^3.1.2
tor: ^0.0.8

dev_dependencies:
flutter_test:
Expand Down
1 change: 1 addition & 0 deletions windows/flutter/generated_plugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ list(APPEND FLUTTER_PLUGIN_LIST
)

list(APPEND FLUTTER_FFI_PLUGIN_LIST
tor
)

set(PLUGIN_BUNDLED_LIBRARIES)
Expand Down

0 comments on commit f2a4b4a

Please sign in to comment.