feat: use noto sans sc as default font; fix build script on arm64 linux.
This commit is contained in:
+36
-2
@@ -2,23 +2,57 @@
|
|||||||
|
|
||||||
VERSION=$(dart version.dart)
|
VERSION=$(dart version.dart)
|
||||||
|
|
||||||
|
if [ -e pubspec.yaml.bak ]; then
|
||||||
|
mv pubspec.yaml.bak pubspec.yaml
|
||||||
|
fi
|
||||||
|
|
||||||
flutter clean
|
flutter clean
|
||||||
|
|
||||||
|
cp pubspec.yaml pubspec.yaml.bak
|
||||||
|
ln -s /usr/share/fonts/opentype/noto/ noto_fonts
|
||||||
|
|
||||||
|
cat >> pubspec.yaml << EOF
|
||||||
|
fonts:
|
||||||
|
- family: NotoSansSC
|
||||||
|
fonts:
|
||||||
|
- asset: noto_fonts/NotoSansCJK-Regular.ttc
|
||||||
|
weight: 400
|
||||||
|
- asset: noto_fonts/NotoSansCJK-Bold.ttc
|
||||||
|
weight: 700
|
||||||
|
|
||||||
|
EOF
|
||||||
|
|
||||||
flutter build linux
|
flutter build linux
|
||||||
|
|
||||||
|
rm pubspec.yaml
|
||||||
|
rm noto_fonts
|
||||||
|
mv pubspec.yaml.bak pubspec.yaml
|
||||||
|
|
||||||
if [ -e deb_builder ]; then
|
if [ -e deb_builder ]; then
|
||||||
rm -rf deb_builder
|
rm -rf deb_builder
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
ARCH="x64"
|
||||||
|
|
||||||
|
if [[ $(uname -m) == aarch64 ]]; then
|
||||||
|
ARCH="arm64"
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir "deb_builder"
|
mkdir "deb_builder"
|
||||||
|
|
||||||
cp -r debian deb_builder/DEBIAN
|
cp -r debian deb_builder/DEBIAN
|
||||||
|
chmod -R 755 deb_builder/DEBIAN
|
||||||
cp ../LICENSE deb_builder/DEBIAN/copyright
|
cp ../LICENSE deb_builder/DEBIAN/copyright
|
||||||
|
|
||||||
echo Version: "$VERSION" >> deb_builder/DEBIAN/control
|
echo Version: "$VERSION" >> deb_builder/DEBIAN/control
|
||||||
|
|
||||||
mkdir -p deb_builder/opt/apps/com.debuggerx.dde-gesture-manager/
|
mkdir -p deb_builder/opt/apps/com.debuggerx.dde-gesture-manager/
|
||||||
|
|
||||||
cp -r build/linux/x64/release/bundle deb_builder/opt/apps/com.debuggerx.dde-gesture-manager/files
|
cp -r build/linux/"$ARCH"/release/bundle deb_builder/opt/apps/com.debuggerx.dde-gesture-manager/files
|
||||||
|
|
||||||
|
rm -rf deb_builder/opt/apps/com.debuggerx.dde-gesture-manager/files/data/flutter_assets/noto_fonts/
|
||||||
|
|
||||||
|
ln -s /usr/share/fonts/opentype/noto/ deb_builder/opt/apps/com.debuggerx.dde-gesture-manager/files/data/flutter_assets/noto_fonts
|
||||||
|
|
||||||
cp -r dde_package_info/* deb_builder/opt/apps/com.debuggerx.dde-gesture-manager/
|
cp -r dde_package_info/* deb_builder/opt/apps/com.debuggerx.dde-gesture-manager/
|
||||||
|
|
||||||
@@ -32,4 +66,4 @@ sed -i "s/VERSION/$VERSION/g" deb_builder/opt/apps/com.debuggerx.dde-gesture-man
|
|||||||
|
|
||||||
dpkg-deb -b deb_builder
|
dpkg-deb -b deb_builder
|
||||||
|
|
||||||
mv deb_builder.deb dgm-"$VERSION"_x64.deb
|
mv deb_builder.deb dgm-"$VERSION"_"$ARCH".deb
|
||||||
|
|||||||
@@ -10,4 +10,5 @@ Build-Depends:
|
|||||||
Homepage: https://github.com/debuggerx01/dde_gesture_manager
|
Homepage: https://github.com/debuggerx01/dde_gesture_manager
|
||||||
Package: dde-gesture-manager
|
Package: dde-gesture-manager
|
||||||
Architecture: amd64
|
Architecture: amd64
|
||||||
|
Depends: fonts-noto-cjk
|
||||||
Description: 专为 DDE 桌面环境打造的触摸板手势管理工具(缩写:dgm),使用 Flutter 构建。
|
Description: 专为 DDE 桌面环境打造的触摸板手势管理工具(缩写:dgm),使用 Flutter 构建。
|
||||||
|
|||||||
@@ -21,6 +21,8 @@ const double defaultButtonHeight = 36;
|
|||||||
|
|
||||||
const userGestureConfigFilePath = 'deepin/dde-daemon/gesture.json';
|
const userGestureConfigFilePath = 'deepin/dde-daemon/gesture.json';
|
||||||
|
|
||||||
|
const defaultFontFamily = 'NotoSansSC';
|
||||||
|
|
||||||
const deepinLogoutCommands = [
|
const deepinLogoutCommands = [
|
||||||
'dbus-send',
|
'dbus-send',
|
||||||
'--type=method_call',
|
'--type=method_call',
|
||||||
|
|||||||
@@ -1,7 +1,13 @@
|
|||||||
import 'package:flutter/material.dart';
|
|
||||||
import 'package:dde_gesture_manager/constants/constants.dart';
|
import 'package:dde_gesture_manager/constants/constants.dart';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
var darkTheme = ThemeData.dark().copyWith(
|
final _darkTheme = ThemeData(
|
||||||
|
brightness: Brightness.dark,
|
||||||
|
fontFamily: kIsWeb ? null : defaultFontFamily,
|
||||||
|
);
|
||||||
|
|
||||||
|
var darkTheme = _darkTheme.copyWith(
|
||||||
primaryColor: Colors.grey,
|
primaryColor: Colors.grey,
|
||||||
scaffoldBackgroundColor: Color(0xff252525),
|
scaffoldBackgroundColor: Color(0xff252525),
|
||||||
backgroundColor: Color(0xff282828),
|
backgroundColor: Color(0xff282828),
|
||||||
@@ -9,21 +15,23 @@ var darkTheme = ThemeData.dark().copyWith(
|
|||||||
color: Color(0xffc0c6d4),
|
color: Color(0xffc0c6d4),
|
||||||
),
|
),
|
||||||
dividerColor: Color(0xfff3f3f3),
|
dividerColor: Color(0xfff3f3f3),
|
||||||
textTheme: ThemeData.dark().textTheme.copyWith(
|
textTheme: _darkTheme.textTheme.copyWith(
|
||||||
headline1: TextStyle(
|
headline1: TextStyle(
|
||||||
color: Color(0xffc0c6d4),
|
color: Color(0xffc0c6d4),
|
||||||
|
fontFamilyFallback: kIsWeb ? null : [defaultFontFamily],
|
||||||
),
|
),
|
||||||
bodyText2: TextStyle(
|
bodyText2: TextStyle(
|
||||||
color: Color(0xffc0c6d4),
|
color: Color(0xffc0c6d4),
|
||||||
|
fontFamilyFallback: kIsWeb ? null : [defaultFontFamily],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
popupMenuTheme: ThemeData.dark().popupMenuTheme.copyWith(
|
popupMenuTheme: _darkTheme.popupMenuTheme.copyWith(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(defaultBorderRadius),
|
borderRadius: BorderRadius.circular(defaultBorderRadius),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
dialogBackgroundColor: Color(0xff202020),
|
dialogBackgroundColor: Color(0xff202020),
|
||||||
tooltipTheme: ThemeData.dark().tooltipTheme.copyWith(
|
tooltipTheme: _darkTheme.tooltipTheme.copyWith(
|
||||||
textStyle: TextStyle(
|
textStyle: TextStyle(
|
||||||
color: Colors.grey,
|
color: Colors.grey,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -1,7 +1,13 @@
|
|||||||
import 'package:dde_gesture_manager/constants/constants.dart';
|
import 'package:dde_gesture_manager/constants/constants.dart';
|
||||||
|
import 'package:flutter/foundation.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
var lightTheme = ThemeData.light().copyWith(
|
final _lightTheme = ThemeData(
|
||||||
|
brightness: Brightness.light,
|
||||||
|
fontFamily: kIsWeb ? null : defaultFontFamily,
|
||||||
|
);
|
||||||
|
|
||||||
|
var lightTheme = _lightTheme.copyWith(
|
||||||
primaryColor: Colors.blue,
|
primaryColor: Colors.blue,
|
||||||
scaffoldBackgroundColor: Color(0xfff8f8f8),
|
scaffoldBackgroundColor: Color(0xfff8f8f8),
|
||||||
backgroundColor: Color(0xffffffff),
|
backgroundColor: Color(0xffffffff),
|
||||||
@@ -9,21 +15,23 @@ var lightTheme = ThemeData.light().copyWith(
|
|||||||
color: Color(0xff414d68),
|
color: Color(0xff414d68),
|
||||||
),
|
),
|
||||||
dividerColor: Colors.grey.shade600,
|
dividerColor: Colors.grey.shade600,
|
||||||
textTheme: ThemeData.light().textTheme.copyWith(
|
textTheme: _lightTheme.textTheme.copyWith(
|
||||||
headline1: TextStyle(
|
headline1: TextStyle(
|
||||||
color: Color(0xff414d68),
|
color: Color(0xff414d68),
|
||||||
|
fontFamilyFallback: kIsWeb ? null : [defaultFontFamily],
|
||||||
),
|
),
|
||||||
bodyText2: TextStyle(
|
bodyText2: TextStyle(
|
||||||
color: Color(0xff414d68),
|
color: Color(0xff414d68),
|
||||||
|
fontFamilyFallback: kIsWeb ? null : [defaultFontFamily],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
popupMenuTheme: ThemeData.dark().popupMenuTheme.copyWith(
|
popupMenuTheme: _lightTheme.popupMenuTheme.copyWith(
|
||||||
shape: RoundedRectangleBorder(
|
shape: RoundedRectangleBorder(
|
||||||
borderRadius: BorderRadius.circular(defaultBorderRadius),
|
borderRadius: BorderRadius.circular(defaultBorderRadius),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
dialogBackgroundColor: Color(0xfffefefe),
|
dialogBackgroundColor: Color(0xfffefefe),
|
||||||
tooltipTheme: ThemeData.dark().tooltipTheme.copyWith(
|
tooltipTheme: _lightTheme.tooltipTheme.copyWith(
|
||||||
textStyle: TextStyle(
|
textStyle: TextStyle(
|
||||||
color: Colors.grey.shade600,
|
color: Colors.grey.shade600,
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user