Skip to content

Commit

Permalink
Build fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
yaroslavyaroslav committed Feb 12, 2025
1 parent 7035abd commit 0275ed6
Show file tree
Hide file tree
Showing 6 changed files with 60 additions and 44 deletions.
4 changes: 3 additions & 1 deletion client/amnezia_application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,8 @@ void AmneziaApplication::init()
m_engine->addImageProvider(QLatin1String("installedAppImage"), new InstalledAppsImageProvider);
#endif

#if defined(Q_OS_IOS) || defined(MACOS_NE)
#if defined(Q_OS_IOS)
#if defined(MACOS_NE)
IosController::Instance()->initialize();
connect(IosController::Instance(), &IosController::importConfigFromOutside, this, [this](QString data) {
emit m_pageController->goToPageHome();
Expand All @@ -134,6 +135,7 @@ void AmneziaApplication::init()
m_pageController->goToPageSettingsBackup();
emit m_settingsController->importBackupFromOutside(filePath);
});
#endif

QTimer::singleShot(0, this, [this]() { AmneziaVPN::toggleScreenshots(m_settings->isScreenshotsEnabled()); });

Expand Down
2 changes: 1 addition & 1 deletion client/configurators/ssh_configurator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ QProcessEnvironment SshConfigurator::prepareEnv()
pathEnvVar.clear();
pathEnvVar.prepend(QDir::toNativeSeparators(QApplication::applicationDirPath()) + "\\cygwin;");
pathEnvVar.prepend(QDir::toNativeSeparators(QApplication::applicationDirPath()) + "\\openvpn;");
#elif defined(Q_OS_MAC) !defined(MACOS_NE)
#elif defined(Q_OS_MAC) && !defined(MACOS_NE)
pathEnvVar.prepend(QDir::toNativeSeparators(QApplication::applicationDirPath()) + "/Contents/MacOS");
#endif

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,34 +3,56 @@
<plist version="1.0">
<dict>
<key>com.apple.application-identifier</key>
<string>$(AppIdentifierPrefix)org.amnezia.AmneziaVPN.network-extension</string>
<string>X7UJ388FXK.org.amnezia.AmneziaVPN.network-extension</string>
<key>com.apple.developer.networking.networkextension</key>
<array>
<string>packet-tunnel-provider</string>
</array>
<key>com.apple.developer.team-identifier</key>
<string>$(AppIdentifierPrefix)</string>
<string>X7UJ388FXK</string>
<key>com.apple.security.app-sandbox</key>
<true/>
<key>com.apple.security.application-groups</key>
<array>
<string>group.org.amnezia.AmneziaVPN</string>
</array>
<key>com.apple.security.assets.movies.read-write</key>
<true/>
<key>com.apple.security.assets.music.read-write</key>
<true/>
<key>com.apple.security.assets.pictures.read-write</key>
<true/>
<key>com.apple.security.device.audio-input</key>
<true/>
<key>com.apple.security.device.bluetooth</key>
<true/>
<key>com.apple.security.device.camera</key>
<true/>
<key>com.apple.security.device.usb</key>
<true/>
<key>com.apple.security.files.downloads.read-write</key>
<true/>
<key>com.apple.security.files.user-selected.read-write</key>
<true/>
<key>com.apple.security.network.client</key>
<true/>
<key>com.apple.developer.networking.networkextension</key>
<array>
<string>packet-tunnel-provider</string>
</array>
<key>com.apple.security.network.server</key>
<true/>
<!-- <key>com.apple.security.networkextension</key>
<true/> -->
<key>com.apple.security.personal-information.addressbook</key>
<true/>
<key>com.apple.security.personal-information.calendars</key>
<true/>
<key>com.apple.security.personal-information.location</key>
<true/>
<key>com.apple.security.print</key>
<true/>
<key>keychain-access-groups</key>
<array>
<string>$(AppIdentifierPrefix)org.amnezia.AmneziaVPN.network-extension</string>
</array>
<!-- <key>com.apple.security.network.extension</key>
<true/> -->
</dict>
</plist>
36 changes: 0 additions & 36 deletions client/macos/scripts/openvpn.sh

This file was deleted.

17 changes: 17 additions & 0 deletions client/platforms/ios/QRCodeReaderBase.mm
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#if !MACOS_NE
#include "QRCodeReaderBase.h"

#import <UIKit/UIKit.h>
Expand Down Expand Up @@ -108,3 +109,19 @@ - (void)captureOutput:(AVCaptureOutput *)output didOutputMetadataObjects:(NSArra
void QRCodeReader::stopReading() {
[m_qrCodeReader stopReading];
}
#else
#include "QRCodeReaderBase.h"

QRCodeReader::QRCodeReader()
{

}

QRect QRCodeReader::cameraSize() {
return QRect();
}

void QRCodeReader::startReading() {}
void QRCodeReader::stopReading() {}
void QRCodeReader::setCameraSize(QRect) {}
#endif
11 changes: 11 additions & 0 deletions client/platforms/ios/ScreenProtection.swift
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
#if MACOS_NE
public func toggleScreenshots(_ isEnabled: Bool) {

}

class ScreenProtection {


}
#else
import UIKit

public func toggleScreenshots(_ isEnabled: Bool) {
Expand Down Expand Up @@ -85,3 +95,4 @@ struct ProtectionPair {
textField.removeFromSuperview()
}
}
#endif

0 comments on commit 0275ed6

Please sign in to comment.