Skip to content

Commit

Permalink
Merge branch 'develop' into feat/channel_archived
Browse files Browse the repository at this point in the history
  • Loading branch information
Npepperlinux committed Nov 19, 2024
2 parents 7b2c3d6 + b01c83c commit 4152f1b
Show file tree
Hide file tree
Showing 54 changed files with 960 additions and 275 deletions.
4 changes: 2 additions & 2 deletions .fvmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"flutter": "3.24.3"
}
"flutter": "3.24.5"
}
140 changes: 140 additions & 0 deletions .github/workflows/linux_deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@

name: デプロイ(linux)
on:
workflow_dispatch:
release:
types: [published]

env:
APP_NAME: 'miria'
MAINTAINER: 'sorairo <sorairo@shiosyakeyakini.info>'

permissions:
contents: write

jobs:
build-snap:
name: ビルド(Snap)
runs-on: ubuntu-latest
strategy:
matrix:
platform: [amd64, arm64]
outputs:
snap: ${{ steps.snapcraft.outputs.snap }}
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Setup QEMU
uses: docker/setup-qemu-action@v3

- name: Build Snap
id: snapcraft
uses: diddlesnaps/snapcraft-multiarch-action@v1
with:
architecture: ${{ matrix.platform }}

- name: Get Build Version
run: |
echo "VERSION=$(yq -r '.version' pubspec.yaml)" >> $GITHUB_ENV
- name: Upload snap
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload v$VERSION ${{ steps.snapcraft.outputs.snap }}
# https://gihyo.jp/admin/serial/01/ubuntu-recipe/0660#sec3 : Snapパッケージアップロードまでの流れ
# https://github.com/snapcore/action-publish : Snap ActionのREADME.md
# Snap Storeでパッケージ名"miria"を予約($ snapcraft register miria)後、"SNAPCRAFT_STORE_CREDENTIALS"を登録し、
# 以下をコメントアウトを解除することでSnap Storeへアップロードすることが可能です。
# 通常、SnapファイルをそのままStore外で公開することはありません。
#
#- name: Upload Snap Store
# uses: snapcore/action-publish@v1
# env:
# SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.STORE_LOGIN }}
# with:
# snap: ${{ steps.snapcraft.outputs.snap }}
# release: stable


build-debs:
name: ビルド(Deb)
runs-on: ubuntu-latest
strategy:
matrix:
platform: [amd64]
steps:
- name: Clone repository
uses: actions/checkout@v4

- name: Get Flutter version from .fvmrc
run: echo "FLUTTER_FVM_VERSION=$(jq -r .flutter .fvmrc)" >> $GITHUB_ENV

- name: Install Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_FVM_VERSION }}
cache: true

- name: Patch for linux build
run: |
sudo apt-get update -y
sudo apt-get install -y ninja-build libgtk-3-dev libsecret-1-dev libstdc++-12-dev nasm
sudo pip3 install meson
- name: Build libmpv
run: |
git clone https://github.com/mpv-player/mpv-build.git
cd mpv-build
sed -i 's|checkout_ffmpeg=master|checkout_ffmpeg=@dcdfd7fb62464beeeb03c24f21713bf3914b9ea4|g' update
sed -i 's|checkout_libplacebo=master|checkout_libplacebo=@ed29e541a55acf28022738440b2a925386292551|g' update
sed -i 's|checkout_mpv=master|checkout_mpv=@140ec21c89d671d392877a7f3b91d67e7d7b9239|g' update
sed -i 's|OPTIONS="--enable-static --disable-shared"|OPTIONS="--enable-shared"|g' scripts/libass-config
sed -i 's|--prefix="$BUILD/build_libs" --libdir="$BUILD/build_libs/lib"||g' scripts/libass-config
sed -i 's|^meson setup build.*||g' scripts/mpv-config
echo -e "\npython3 ./bootstrap.py\n./waf configure --disable-alsa --enable-libmpv-shared\n./waf build" >> scripts/mpv-config
./update
./scripts/libplacebo-config
./scripts/libplacebo-build -j$(nproc)
./scripts/libass-config
sudo make -C libass install -j$(nproc)
./scripts/ffmpeg-config
./scripts/ffmpeg-build -j$(nproc)
./scripts/mpv-config
cd mpv
sudo ./waf install
- run: flutter pub get
# - run: flutter test
- run: flutter build linux
- name: Get Build Version
run: |
echo "VERSION=$(yq -r '.version' pubspec.yaml)" >> $GITHUB_ENV
- name: Prepare to build DEB
run: |
echo "DESC=$(awk -F '=' '/^Comment=/{print $2}' ./snap/gui/miria.desktop)" >> $GITHUB_ENV
sed -i -E 's|^Version=.*|Version=${{ env.VERSION }}|g' ./snap/gui/miria.desktop
sed -i -E 's|^Icon=.*|Icon=/usr/share/pixmaps/miria.png|g' ./snap/gui/miria.desktop
sed -i -E 's|^Exec=.*|Exec=/opt/miria/miria|g' ./snap/gui/miria.desktop
mkdir -p .debpkg/opt/miria .debpkg/usr/share/applications .debpkg/usr/share/pixmaps
cp -rp ./build/linux/x64/release/bundle/* .debpkg/opt/miria/
cp ./snap/gui/miria.desktop .debpkg/usr/share/applications/
cp ./assets/images/icon.png .debpkg/usr/share/pixmaps/miria.png
- name: Build DEB
uses: jiro4989/build-deb-action@v3
with:
desc: '${{ env.DESC }}'
package: ${{ env.APP_NAME }}
maintainer: ${{ env.MAINTAINER }}
version: ${{ env.VERSION }}
arch: "amd64"
package_root: ".debpkg"
depends: "libgtk-3-0, libstdc++6, libx11-6, libmpv2, libsecret-1-0"

- name: Upload DEB
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release upload v$VERSION ./miria_${{ env.VERSION }}_amd64.deb
54 changes: 0 additions & 54 deletions .github/workflows/snap_deploy.yml

This file was deleted.

4 changes: 0 additions & 4 deletions .github/workflows/windows_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,6 @@ jobs:
- name: Delete unnecessary DLL
run: |
rm build\windows\x64\runner\Release\api-ms-*.dll
rm build\windows\x64\runner\Release\concrt140.dll
rm build\windows\x64\runner\Release\msvcp*.dll
rm build\windows\x64\runner\Release\ucrtbas*.dll
rm build\windows\x64\runner\Release\vc*.dll
- name: Get translation files for Inno Setup
run: |
Expand Down
5 changes: 3 additions & 2 deletions README-ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ MiriaはiOS, Android向けMisskeyクライアントです。Windowsでも動作
- [Play Store](https://play.google.com/store/apps/details?id=info.shiosyakeyakini.miria)
- [App Store](https://apps.apple.com/jp/app/miria/id6449201469)
- 最新版をGitHubからインストール
- [GitHub最新版のリリース(Windows版もあります)](https://github.com/shiosyakeyakini-info/miria/releases/latest)
- [GitHub最新版のリリース(Windows版とSnapパッケージもあります)](https://github.com/shiosyakeyakini-info/miria/releases/latest)
- [Obtainium(APKマネージャー)](https://apps.obtainium.imranr.dev/redirect?r=obtainium://app/%7B%22id%22%3A%22info.shiosyakeyakini.miria%22%2C%22url%22%3A%22https%3A%2F%2Fgit.luolix.top%2Fshiosyakeyakini-info%2Fmiria%22%2C%22author%22%3A%22shiosyakeyakini-info%22%2C%22name%22%3A%22miria%22%2C%22additionalSettings%22%3A%22%7B%5C%22includePrereleases%5C%22%3Atrue%2C%5C%22fallbackToOlderReleases%5C%22%3Atrue%2C%5C%22verifyLatestTag%5C%22%3Afalse%2C%5C%22dontSortReleasesList%5C%22%3Afalse%2C%5C%22releaseTitleAsVersion%5C%22%3Afalse%2C%5C%22trackOnly%5C%22%3Afalse%2C%5C%22versionDetection%5C%22%3Atrue%7D%22%2C%22overrideSource%22%3Anull%7D)
- 最新版をTestFlightからインストール
- [TestFlight](https://testflight.apple.com/join/X6Q7pE98)

Expand All @@ -37,7 +38,7 @@ MiriaはiOS, Android向けMisskeyクライアントです。Windowsでも動作
- ただし、一部の機能を独自に取り込んだり、特定のサーバー向けの実装を行っている場合があります。
- MiriaはMisskey v13以上とそれらのフォークされたサーバーでのみ動作します。
- [Sharkey](https://joinsharkey.org/)[CherryPick](https://github.com/kokonect-link/cherrypick)[もこきー](https://mkkey.net/)では動作するかもしれませんが、テストは行われていません。
- [Firefish](https://joinfirefish.org/ja/)[Catodon](https://catodon.social/)およびMastodonへは今後もサポートする予定はありません。
- [Iceshrimp](https://iceshrimp.dev/)[Catodon](https://catodon.social/)およびMastodonへは今後もサポートする予定はありません。
- MiriaはAiScript関連の機能(プラグイン、Play)は実装されていません。難しすぎるためです。
- Miriaはブラウザの機能に依存していません。
- MFMの見た目がブラウザと異なる場合があります。
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,11 @@ Miria is Misskey Client App for iOS, Android and many targets which made by Flut

## Install

- [Play Store](https://play.google.com/store/apps/details?id=info.shiosyakeyakini.miria)
- [App Store](https://apps.apple.com/jp/app/miria/id6449201469)
- [Download latest release from GitHub(Include Windows Version)](https://github.com/shiosyakeyakini-info/miria/releases/latest)
- [Play Store](https://play.google.com/store/apps/details?id=info.shiosyakeyakini.miria)
- [TestFlight](https://testflight.apple.com/join/X6Q7pE98)
- [Obtainium](https://apps.obtainium.imranr.dev/redirect?r=obtainium://app/%7B%22id%22%3A%22info.shiosyakeyakini.miria%22%2C%22url%22%3A%22https%3A%2F%2Fgit.luolix.top%2Fshiosyakeyakini-info%2Fmiria%22%2C%22author%22%3A%22shiosyakeyakini-info%22%2C%22name%22%3A%22miria%22%2C%22additionalSettings%22%3A%22%7B%5C%22includePrereleases%5C%22%3Atrue%2C%5C%22fallbackToOlderReleases%5C%22%3Atrue%2C%5C%22verifyLatestTag%5C%22%3Afalse%2C%5C%22dontSortReleasesList%5C%22%3Afalse%2C%5C%22releaseTitleAsVersion%5C%22%3Afalse%2C%5C%22trackOnly%5C%22%3Afalse%2C%5C%22versionDetection%5C%22%3Atrue%7D%22%2C%22overrideSource%22%3Anull%7D)
- [Download latest release from GitHub(Include Windows Version & Snap packages)](https://github.com/shiosyakeyakini-info/miria/releases/latest)

I'm planning to deploy from F-Droid.

Expand All @@ -33,12 +34,12 @@ I'm planning to deploy from F-Droid.

- Miria does not support forked server's unique features.
- Miria supports only over Misskey v13 and forked servers.
- [Sharkey](https://joinsharkey.org/), [CherryPick](https://github.com/kokonect-link/cherrypick) and [mkkey.net](https://mkkey.net/) may be available but did not test.
- [Firefish](https://joinfirefish.org/ja/), [Catodon](https://catodon.social/), Mastodon will not support in the future too.
- Available in [Sharkey](https://joinsharkey.org/), [CherryPick](https://github.com/kokonect-link/cherrypick) and [mkkey.net](https://mkkey.net/), but not tested.
- [Iceshrimp](https://iceshrimp.dev/), [Catodon](https://catodon.social/), Mastodon will not be supported in the future.
- Miria does not support AiScript related features. (Plugin, Play)
- Miria does not depend browser features. ¥
- Miria does not depend on browser features.
- There are cases in which Miria's MFM appearance is different from browsers.
- Custom CSS didn't support.
- Custom CSS not supported.

## Contribute

Expand Down
2 changes: 1 addition & 1 deletion ios/Podfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,6 @@ SPEC CHECKSUMS:
wakelock_plus: 78ec7c5b202cab7761af8e2b2b3d0671be6c4ae1
webview_flutter_wkwebview: 0982481e3d9c78fd5c6f62a002fcd24fc791f1e4

PODFILE CHECKSUM: 9a5aff7d2a4fe2dcc914618b99f9ff063b14915b
PODFILE CHECKSUM: fc9f5883117ffc5dbdfedd53e44b13710e7871f2

COCOAPODS: 1.14.3
14 changes: 8 additions & 6 deletions lib/l10n/app_ja-oj.arb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
"noneAction": "なにもいたしませんわ",
"pleaseInput": "お入れなさって",
"pleaseSelect": "お選びになさって",
"clipDescription": "説明(なくてもよろしくてよ)",

"serverRules": "サーバーの定め",
"antennaSourceUserHintText": "ユーザーネームを改行で区切って指定いたしますわ",
Expand All @@ -22,9 +21,6 @@
"confirmDeletingAntenna": "アンテナを削除いたしますこと?",
"channelJoinningCounts": "{usersCount}人が参加なされてますわ",

"willFavorite": "お気に入りに入れますわ",
"willFollow": "フォローいたしますわ",

"confirmDeleteClip": "クリップを削除いたしますこと?",
"clipDescription": "説明(省略されてもよろしくてよ)",
"alreadyAddedClip": "こちらのノートすでにクリップに追加されていますわ",
Expand Down Expand Up @@ -58,6 +54,8 @@
"openAsOtherAccount": "開くアカウントを選びなさって",
"pickColor": "色を選びなさって",
"decideColor": "これにいたしますわ",
"replyNotePlaceholder": "何と送りますの?",
"defaultNotePlaceholder": "ごきげんよう",

"followedNotification": "{userName}からフォローされましてよ",
"followRequestAcceptedNotification": "{userName}がフォローしてもよくってよとお聞きいたしましたわ",
Expand Down Expand Up @@ -106,10 +104,14 @@
"cannotMentionToRemoteInLocalOnlyNote": "連合切られているのに他のサーバーの人がメンションに含まれているようですわ",
"cannotPublicReplyToPrivateNote": "リプライが{visibility}のようでして……パブリックにはできませんこと",

"unsupportedFile": "対応してないファイルのようですわ",
"failedFileSave": "ファイルの保存に失敗したようですわね…"
"memoDescription": "メモしたいことをお書きくださいまし",
"confirmCreateBlock": "ブロックなさりますの?",

"unsupportedFile": "対応してないファイルのようですわ",
"unsupportedFileWithFilename": "{filename}は対応してないファイルのようですわ",
"failedFileSave": "ファイルの保存に失敗したようですわね…",

"nothingHere": "ここには何もありませんわ"



Expand Down
9 changes: 8 additions & 1 deletion lib/l10n/app_ja.arb
Original file line number Diff line number Diff line change
Expand Up @@ -990,6 +990,7 @@
"updatedAtDescendingOrder": "更新された順",

"unsupportedFile": "対応してないファイルやわ",
"unsupportedFileWithFilename": "{filename}は対応してないファイルやわ",
"failedFileSave": "ファイルの保存に失敗したみたいや",

"misskeyGames": "Misskey Games",
Expand All @@ -1006,6 +1007,12 @@
}
}
},
"nonInvitedReversi": "招待はされとらへんみたいや"
"nonInvitedReversi": "招待はされとらへんみたいや",

"remoteServerWithoutLogin": "相手先のサーバー(ログインなし)",
"nothingHere": "なんもないで",

"deckMode": "デッキモード",
"enableDeckMode": "デッキモードにする"

}
4 changes: 3 additions & 1 deletion lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ class Miria extends HookConsumerWidget with WidgetsBindingObserver {
}

Future<void> _initWindow(WidgetRef ref) async {
if (!isDesktop) return;
await windowManager.setPreventClose(true);
final config = ref.read(desktopSettingsRepositoryProvider).settings;

Expand Down Expand Up @@ -187,7 +188,8 @@ class MiriaWindowListener with WindowListener {
} catch (e) {
if (kDebugMode) print(e);
} finally {
await windowManager.destroy();
await windowManager.setPreventClose(false);
await windowManager.close();
}
}
}
2 changes: 1 addition & 1 deletion lib/repository/general_settings_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ class GeneralSettingsRepository extends ChangeNotifier {

Future<void> update(GeneralSettings settings) async {
_settings = settings;
notifyListeners();
final prefs = await SharedPreferences.getInstance();
await prefs.setString("general_settings", jsonEncode(settings.toJson()));
notifyListeners();
}
}
6 changes: 4 additions & 2 deletions lib/repository/import_export_repository.dart
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,10 @@ class ImportExportRepository extends ChangeNotifier {
await SimpleMessageDialog.show(context, S.of(context).importCompleted);

if (!context.mounted) return;
context.router.removeWhere((route) => true);
await context.router.push(const SplashRoute());
await context.router.pushAndPopUntil(
const SplashRoute(),
predicate: (_) => false,
);
}

Future<void> export(BuildContext context, Account account) async {
Expand Down
5 changes: 3 additions & 2 deletions lib/router/app_router.gr.dart

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 4152f1b

Please sign in to comment.