Compare commits
19 Commits
photos-v0.
...
auth-v4.0.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ae77a38846 | ||
|
|
d7946fbfc5 | ||
|
|
594843f48b | ||
|
|
4c5942016f | ||
|
|
39765dd802 | ||
|
|
bd9bcf607c | ||
|
|
30e26a815f | ||
|
|
d873921422 | ||
|
|
528f503444 | ||
|
|
fa9d171287 | ||
|
|
43ba2ee2da | ||
|
|
3292655ff7 | ||
|
|
484b05bdb2 | ||
|
|
cdbcc93571 | ||
|
|
00415cb6fe | ||
|
|
6af1604026 | ||
|
|
2e01a96477 | ||
|
|
fa8a8dd639 | ||
|
|
4a03388cf1 |
112
.github/workflows/auth-release.yml
vendored
112
.github/workflows/auth-release.yml
vendored
@@ -96,7 +96,8 @@ jobs:
|
||||
- name: Build desktop app
|
||||
run: |
|
||||
flutter config --enable-linux-desktop
|
||||
dart pub global activate flutter_distributor
|
||||
# dart pub global activate flutter_distributor
|
||||
dart pub global activate --source git https://github.com/prateekmedia/flutter_distributor --git-ref develop --git-path packages/flutter_distributor
|
||||
flutter_distributor package --platform=linux --targets=deb --skip-clean
|
||||
mv dist/**/*-*-linux.deb artifacts/ente-${{ github.ref_name }}-x86_64.deb
|
||||
env:
|
||||
@@ -104,7 +105,7 @@ jobs:
|
||||
|
||||
- name: Generate checksums and push to artifacts
|
||||
run: |
|
||||
sha256sum artifacts/ente-* > artifacts/sha256sum-apk-deb
|
||||
sha256sum artifacts/ente-* > artifacts/sha256sum-apk-deb
|
||||
|
||||
- name: Create a draft GitHub release
|
||||
uses: ncipollo/release-action@v1
|
||||
@@ -125,65 +126,65 @@ jobs:
|
||||
track: internal
|
||||
|
||||
build-fedora-etc:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
defaults:
|
||||
run:
|
||||
working-directory: auth
|
||||
defaults:
|
||||
run:
|
||||
working-directory: auth
|
||||
|
||||
steps:
|
||||
- name: Checkout code and submodules
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
steps:
|
||||
- name: Checkout code and submodules
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Install Flutter ${{ env.FLUTTER_VERSION }}
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: "stable"
|
||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||
cache: true
|
||||
- name: Install Flutter ${{ env.FLUTTER_VERSION }}
|
||||
uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: "stable"
|
||||
flutter-version: ${{ env.FLUTTER_VERSION }}
|
||||
cache: true
|
||||
|
||||
- name: Create artifacts directory
|
||||
run: mkdir artifacts
|
||||
- name: Create artifacts directory
|
||||
run: mkdir artifacts
|
||||
|
||||
- name: Install dependencies for desktop build
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y libsecret-1-dev libsodium-dev libwebkit2gtk-4.0-dev libfuse2 ninja-build libgtk-3-dev dpkg-dev pkg-config rpm patchelf libsqlite3-dev locate libayatana-appindicator3-dev libffi-dev libtiff5 xz-utils libarchive-tools
|
||||
sudo updatedb --localpaths='/usr/lib/x86_64-linux-gnu'
|
||||
- name: Install dependencies for desktop build
|
||||
run: |
|
||||
sudo apt-get update -y
|
||||
sudo apt-get install -y libsecret-1-dev libsodium-dev libwebkit2gtk-4.0-dev libfuse2 ninja-build libgtk-3-dev dpkg-dev pkg-config rpm patchelf libsqlite3-dev locate libayatana-appindicator3-dev libffi-dev libtiff5 xz-utils libarchive-tools
|
||||
sudo updatedb --localpaths='/usr/lib/x86_64-linux-gnu'
|
||||
|
||||
- name: Install appimagetool
|
||||
run: |
|
||||
wget -O appimagetool "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
|
||||
chmod +x appimagetool
|
||||
mv appimagetool /usr/local/bin/
|
||||
- name: Install appimagetool
|
||||
run: |
|
||||
wget -O appimagetool "https://github.com/AppImage/AppImageKit/releases/download/continuous/appimagetool-x86_64.AppImage"
|
||||
chmod +x appimagetool
|
||||
mv appimagetool /usr/local/bin/
|
||||
|
||||
- name: Build desktop app
|
||||
run: |
|
||||
flutter config --enable-linux-desktop
|
||||
# dart pub global activate flutter_distributor
|
||||
dart pub global activate --source git https://github.com/prateekmedia/flutter_distributor --git-ref pacman --git-path packages/flutter_distributor
|
||||
# Run below command if it is a beta or nightly
|
||||
if [[ ${{ github.ref }} =~ beta|nightly ]]; then
|
||||
flutter_distributor package --platform=linux --targets=pacman --skip-clean
|
||||
mv dist/**/*-*-linux.pacman artifacts/ente-${{ github.ref_name }}-x86_64.pacman
|
||||
fi
|
||||
flutter_distributor package --platform=linux --targets=rpm --skip-clean
|
||||
mv dist/**/*-*-linux.rpm artifacts/ente-${{ github.ref_name }}-x86_64.rpm
|
||||
flutter_distributor package --platform=linux --targets=appimage --skip-clean
|
||||
mv dist/**/*-*-linux.AppImage artifacts/ente-${{ github.ref_name }}-x86_64.AppImage
|
||||
- name: Build desktop app
|
||||
run: |
|
||||
flutter config --enable-linux-desktop
|
||||
# dart pub global activate flutter_distributor
|
||||
dart pub global activate --source git https://github.com/prateekmedia/flutter_distributor --git-ref develop --git-path packages/flutter_distributor
|
||||
# Run below command if it is a beta or nightly
|
||||
if [[ ${{ github.ref }} =~ beta|nightly ]]; then
|
||||
flutter_distributor package --platform=linux --targets=pacman --skip-clean
|
||||
mv dist/**/*-*-linux.pacman artifacts/ente-${{ github.ref_name }}-x86_64.pacman
|
||||
fi
|
||||
flutter_distributor package --platform=linux --targets=rpm --skip-clean
|
||||
mv dist/**/*-*-linux.rpm artifacts/ente-${{ github.ref_name }}-x86_64.rpm
|
||||
flutter_distributor package --platform=linux --targets=appimage --skip-clean
|
||||
mv dist/**/*-*-linux.AppImage artifacts/ente-${{ github.ref_name }}-x86_64.AppImage
|
||||
|
||||
- name: Generate checksums
|
||||
run: sha256sum artifacts/ente-* >> artifacts/sha256sum-rpm-appimage
|
||||
- name: Generate checksums
|
||||
run: sha256sum artifacts/ente-* >> artifacts/sha256sum-rpm-appimage
|
||||
|
||||
- name: Create a draft GitHub release
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
artifacts: "auth/artifacts/*"
|
||||
draft: true
|
||||
allowUpdates: true
|
||||
updateOnlyUnreleased: true
|
||||
- name: Create a draft GitHub release
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
artifacts: "auth/artifacts/*"
|
||||
draft: true
|
||||
allowUpdates: true
|
||||
updateOnlyUnreleased: true
|
||||
|
||||
build-windows:
|
||||
runs-on: windows-latest
|
||||
@@ -211,10 +212,11 @@ jobs:
|
||||
- name: Build Windows installer
|
||||
run: |
|
||||
flutter config --enable-windows-desktop
|
||||
dart pub global activate flutter_distributor
|
||||
# dart pub global activate flutter_distributor
|
||||
dart pub global activate --source git https://github.com/prateekmedia/flutter_distributor --git-ref develop --git-path packages/flutter_distributor
|
||||
make innoinstall
|
||||
flutter_distributor package --platform=windows --targets=exe --skip-clean
|
||||
mv dist/**/ente_auth-*-windows-setup.exe artifacts/ente-${{ github.ref_name }}-installer.exe
|
||||
mv dist/**/*-windows-setup.exe artifacts/ente-${{ github.ref_name }}-installer.exe
|
||||
|
||||
- name: Retain Windows EXE and DLLs
|
||||
run: cp -r build/windows/x64/runner/Release ente-${{ github.ref_name }}-windows
|
||||
@@ -307,7 +309,7 @@ jobs:
|
||||
flutter config --enable-macos-desktop
|
||||
dart pub global activate flutter_distributor
|
||||
flutter_distributor package --platform=macos --targets=dmg --skip-clean
|
||||
mv dist/**/ente_auth-*-macos.dmg artifacts/ente-${{ github.ref_name }}.dmg
|
||||
mv dist/**/*-macos.dmg artifacts/ente-${{ github.ref_name }}.dmg
|
||||
|
||||
- name: Code sign DMG
|
||||
run: |
|
||||
|
||||
@@ -13,11 +13,11 @@ import 'package:ente_auth/models/key_attributes.dart';
|
||||
import 'package:ente_auth/models/key_gen_result.dart';
|
||||
import 'package:ente_auth/models/private_key_attributes.dart';
|
||||
import 'package:ente_auth/store/authenticator_db.dart';
|
||||
import 'package:ente_auth/utils/directory_utils.dart';
|
||||
import 'package:ente_auth/utils/lock_screen_settings.dart';
|
||||
import 'package:ente_crypto_dart/ente_crypto_dart.dart';
|
||||
import 'package:flutter_secure_storage/flutter_secure_storage.dart';
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:sqflite_common_ffi/sqflite_ffi.dart';
|
||||
import 'package:tuple/tuple.dart';
|
||||
@@ -56,7 +56,6 @@ class Configuration {
|
||||
static final _logger = Logger("Configuration");
|
||||
|
||||
String? _cachedToken;
|
||||
late String _documentsDirectory;
|
||||
late SharedPreferences _preferences;
|
||||
String? _key;
|
||||
String? _secretKey;
|
||||
@@ -75,8 +74,7 @@ class Configuration {
|
||||
_preferences = await SharedPreferences.getInstance();
|
||||
sqfliteFfiInit();
|
||||
_secureStorage = const FlutterSecureStorage();
|
||||
_documentsDirectory = (await getApplicationDocumentsDirectory()).path;
|
||||
_tempDirectory = "$_documentsDirectory/temp/";
|
||||
_tempDirectory = (await DirectoryUtils.getDirectoryForInit()).path;
|
||||
final tempDirectory = io.Directory(_tempDirectory);
|
||||
try {
|
||||
final currentTime = DateTime.now().microsecondsSinceEpoch;
|
||||
|
||||
@@ -23,6 +23,7 @@ import 'package:ente_auth/store/code_store.dart';
|
||||
import 'package:ente_auth/ui/tools/app_lock.dart';
|
||||
import 'package:ente_auth/ui/tools/lock_screen.dart';
|
||||
import 'package:ente_auth/ui/utils/icon_utils.dart';
|
||||
import 'package:ente_auth/utils/directory_utils.dart';
|
||||
import 'package:ente_auth/utils/lock_screen_settings.dart';
|
||||
import 'package:ente_auth/utils/platform_util.dart';
|
||||
import 'package:ente_auth/utils/window_protocol_handler.dart';
|
||||
@@ -69,6 +70,10 @@ void main() async {
|
||||
HttpOverrides.global = WindowsHttpOverrides();
|
||||
}
|
||||
|
||||
if (Platform.isLinux) {
|
||||
await DirectoryUtils.migrateNamingChanges();
|
||||
}
|
||||
|
||||
if (PlatformUtil.isDesktop()) {
|
||||
await windowManager.ensureInitialized();
|
||||
await WindowListenerService.instance.init();
|
||||
|
||||
@@ -1,12 +1,95 @@
|
||||
import 'dart:io';
|
||||
|
||||
import 'package:logging/logging.dart';
|
||||
import 'package:path/path.dart' as p;
|
||||
import 'package:path_provider/path_provider.dart';
|
||||
import 'package:xdg_directories/xdg_directories.dart';
|
||||
|
||||
class DirectoryUtils {
|
||||
static Future<String> getDatabasePath(String databaseName) async => p.joinAll(
|
||||
[
|
||||
(await getApplicationDocumentsDirectory()).path,
|
||||
"ente",
|
||||
".$databaseName",
|
||||
],
|
||||
static final logger = Logger('DirectoryUtils');
|
||||
|
||||
static Future<String> getDatabasePath(String databaseName) async {
|
||||
String? directoryPath;
|
||||
|
||||
if (Platform.isLinux) {
|
||||
try {
|
||||
directoryPath = dataHome.path;
|
||||
} catch (e) {
|
||||
logger.warning("Failed to get dataHome: $e");
|
||||
}
|
||||
}
|
||||
|
||||
directoryPath ??= (await getApplicationDocumentsDirectory()).path;
|
||||
|
||||
return p.joinAll(
|
||||
[
|
||||
directoryPath,
|
||||
"enteauth",
|
||||
".$databaseName",
|
||||
],
|
||||
);
|
||||
}
|
||||
|
||||
static Future<Directory> getDirectoryForInit() async {
|
||||
Directory? directory;
|
||||
if (Platform.isLinux) {
|
||||
try {
|
||||
return cacheHome;
|
||||
} catch (e) {
|
||||
logger.warning("Failed to get cacheHome: $e");
|
||||
}
|
||||
}
|
||||
|
||||
directory ??= await getApplicationDocumentsDirectory();
|
||||
|
||||
return Directory(p.join(directory.path, "enteauthinit"));
|
||||
}
|
||||
|
||||
static Future<Directory> getTempsDir() async {
|
||||
return await getTemporaryDirectory();
|
||||
}
|
||||
|
||||
static migrateNamingChanges() async {
|
||||
final databaseFile = File(
|
||||
p.join(
|
||||
(await getApplicationDocumentsDirectory()).path,
|
||||
"ente",
|
||||
".ente.authenticator.db",
|
||||
),
|
||||
);
|
||||
final offlineDatabaseFile = File(
|
||||
p.join(
|
||||
(await getApplicationDocumentsDirectory()).path,
|
||||
"ente",
|
||||
".ente.offline_authenticator.db",
|
||||
),
|
||||
);
|
||||
|
||||
final oldDataDir = Directory(
|
||||
p.join(dataHome.path, "ente_auth"),
|
||||
);
|
||||
final newDir = Directory(
|
||||
p.join(dataHome.path, "enteauth"),
|
||||
);
|
||||
await newDir.create(recursive: true);
|
||||
|
||||
if (await databaseFile.exists()) {
|
||||
await databaseFile.rename(
|
||||
p.join(newDir.path, ".ente.authenticator.db"),
|
||||
);
|
||||
}
|
||||
|
||||
if (await offlineDatabaseFile.exists()) {
|
||||
await offlineDatabaseFile.rename(
|
||||
p.join(newDir.path, ".ente.offline_authenticator.db"),
|
||||
);
|
||||
}
|
||||
|
||||
if (await oldDataDir.exists()) {
|
||||
await oldDataDir.list().forEach((file) async {
|
||||
await file.rename(p.join(newDir.path, p.basename(file.path)));
|
||||
});
|
||||
await oldDataDir.delete(recursive: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,6 +10,7 @@ import 'package:ente_auth/ui/components/dialog_widget.dart';
|
||||
import 'package:ente_auth/ui/components/models/button_type.dart';
|
||||
import 'package:ente_auth/ui/tools/debug/log_file_viewer.dart';
|
||||
import 'package:ente_auth/utils/dialog_util.dart';
|
||||
import 'package:ente_auth/utils/directory_utils.dart';
|
||||
import 'package:ente_auth/utils/platform_util.dart';
|
||||
import 'package:ente_auth/utils/share_utils.dart';
|
||||
import 'package:ente_auth/utils/toast_util.dart';
|
||||
@@ -146,7 +147,7 @@ Future<String> getZippedLogsFile(BuildContext context) async {
|
||||
await dialog.show();
|
||||
final logsPath = (await getApplicationSupportDirectory()).path;
|
||||
final logsDirectory = Directory("$logsPath/logs");
|
||||
final tempPath = (await getTemporaryDirectory()).path;
|
||||
final tempPath = (await DirectoryUtils.getTempsDir()).path;
|
||||
final zipFilePath =
|
||||
"$tempPath/logs-${Configuration.instance.getUserID() ?? 0}.zip";
|
||||
final encoder = ZipFileEncoder();
|
||||
|
||||
@@ -4,7 +4,7 @@ project(runner LANGUAGES CXX)
|
||||
|
||||
# The name of the executable created for the application. Change this to change
|
||||
# the on-disk name of your application.
|
||||
set(BINARY_NAME "ente_auth")
|
||||
set(BINARY_NAME "enteauth")
|
||||
# The unique GTK application identifier for this application. See:
|
||||
# https://wiki.gnome.org/HowDoI/ChooseApplicationID
|
||||
set(APPLICATION_ID "io.ente.auth")
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
display_name: Auth
|
||||
display_name: Ente Auth
|
||||
package_name: enteauth
|
||||
license: GPLv3
|
||||
|
||||
metainfo: linux/packaging/ente_auth.appdata.xml
|
||||
@@ -26,9 +27,9 @@ startup_notify: false
|
||||
# include:
|
||||
# - libcurl.so.4
|
||||
include:
|
||||
- libffi.so.8
|
||||
- libtiff.so.5
|
||||
- libjpeg.so.8
|
||||
- libffi.so.8
|
||||
- libtiff.so.5
|
||||
- libjpeg.so.8
|
||||
|
||||
supported_mime_type:
|
||||
- x-scheme-handler/enteauth
|
||||
- x-scheme-handler/enteauth
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
display_name: Auth
|
||||
package_name: auth
|
||||
display_name: Ente Auth
|
||||
package_name: enteauth
|
||||
include_build_number: false
|
||||
|
||||
maintainer:
|
||||
name: Ente.io Developers
|
||||
email: auth@ente.io
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<component type="desktop-application">
|
||||
<id>ente_auth</id>
|
||||
<id>enteauth</id>
|
||||
<metadata_license>CC0-1.0</metadata_license>
|
||||
<project_license>AGPL-3.0</project_license>
|
||||
<name>Ente Auth</name>
|
||||
@@ -10,7 +10,7 @@
|
||||
<p>Auth has an app for every platform. Mobile, desktop and web. Your codes sync across all your devices, end-to-end encrypted.</p>
|
||||
<p>Auth also comes with Offline mode, tags, icons, pins, import/export and more</p>
|
||||
</description>
|
||||
<launchable type="desktop-id">ente_auth.desktop</launchable>
|
||||
<launchable type="desktop-id">enteauth.desktop</launchable>
|
||||
<url type="homepage">https://ente.io/auth</url>
|
||||
<screenshots>
|
||||
<screenshot type="default">
|
||||
@@ -18,10 +18,10 @@
|
||||
</screenshot>
|
||||
</screenshots>
|
||||
<releases>
|
||||
<release version="3.0.12" date="2024-06-17"/>
|
||||
<release version="4.0.3" date="2024-09-29" />
|
||||
</releases>
|
||||
<provides>
|
||||
<id>ente_auth.desktop</id>
|
||||
<id>enteauth.desktop</id>
|
||||
</provides>
|
||||
<content_rating type="oars-1.0" />
|
||||
<developer id="io.github.ente-io.ente">
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
display_name: Auth
|
||||
package_name: auth
|
||||
display_name: Ente Auth
|
||||
package_name: enteauth
|
||||
maintainer:
|
||||
name: Ente.io Developers
|
||||
email: auth@ente.io
|
||||
|
||||
@@ -6,6 +6,8 @@ packager: Ente.io Developers
|
||||
packagerEmail: auth@ente.io
|
||||
license: GPLv3
|
||||
url: https://github.com/ente-io/ente
|
||||
package_name: enteauth
|
||||
include_build_number: false
|
||||
|
||||
display_name: Auth
|
||||
|
||||
|
||||
@@ -1792,7 +1792,7 @@ packages:
|
||||
source: hosted
|
||||
version: "0.4.2"
|
||||
xdg_directories:
|
||||
dependency: transitive
|
||||
dependency: "direct main"
|
||||
description:
|
||||
name: xdg_directories
|
||||
sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
name: ente_auth
|
||||
description: ente two-factor authenticator
|
||||
version: 4.0.2+402
|
||||
version: 4.0.3+403
|
||||
publish_to: none
|
||||
|
||||
environment:
|
||||
@@ -105,6 +105,7 @@ dependencies:
|
||||
uuid: ^4.2.2
|
||||
win32: ^5.1.1
|
||||
window_manager: ^0.4.2
|
||||
xdg_directories: ^1.0.4
|
||||
|
||||
dependency_overrides:
|
||||
flutter_secure_storage_linux:
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
app_id: 9E5F0C93-96A3-4DA9-AE52-1AA6339851FC
|
||||
package_name: enteauth
|
||||
publisher: ente.io
|
||||
publisher_url: https://github.com/ente-io/ente
|
||||
display_name: Ente Auth
|
||||
|
||||
Reference in New Issue
Block a user