Skip to content
This repository was archived by the owner on Aug 19, 2022. It is now read-only.

Commit 8d91855

Browse files
committed
fix: windows build issue?
1 parent d67576c commit 8d91855

File tree

4 files changed

+53
-18
lines changed

4 files changed

+53
-18
lines changed

.github/workflows/flutterci.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ jobs:
6262
channel: beta
6363
cache: true
6464
- run: flutter config --enable-windows-desktop
65+
- run: flutter pub run flutter_native_splash:create
6566
- run: flutter build windows
6667
- run: choco install make -y
6768
- run: make innoinstall
@@ -100,6 +101,7 @@ jobs:
100101
- run: sudo apt-get update -y
101102
- run: sudo apt-get install -y clang cmake ninja-build pkg-config libgtk-3-dev vlc libvlc-dev libwebkit2gtk-4.0-dev libmediainfo-dev dpkg-dev alien
102103
- run: flutter config --enable-linux-desktop
104+
- run: flutter pub run flutter_native_splash:create
103105
- run: flutter build linux --release
104106

105107
- name: Build .deb executable

lib/main.dart

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,11 @@ void main(List<String> args) async {
4040

4141
windowManager.waitUntilReadyToShow().then((_) async {
4242
// Hide window title bar
43-
44-
await windowManager.setTitleBarStyle('hidden');
43+
if (defaultTargetPlatform == TargetPlatform.windows) {
44+
await windowManager.setTitleBarStyle('hidden');
45+
await windowManager.setMinimumSize(const Size(755, 545));
46+
}
4547
await windowManager.setSize(const Size(800, 600));
46-
await windowManager.setMinimumSize(const Size(755, 545));
4748
await windowManager.center();
4849
await windowManager.show();
4950
await windowManager.setSkipTaskbar(false);
@@ -176,24 +177,23 @@ class _TModInstallerPageState extends State<TModInstallerPage> {
176177
return true;
177178
}).toList();
178179
return NavigationView(
179-
appBar: NavigationAppBar(
180-
title: () {
181-
return const DragToMoveArea(
182-
child: Align(
183-
alignment: AlignmentDirectional.centerStart,
184-
child: Text("TMod Installer"),
185-
),
186-
);
187-
}(),
188-
actions: defaultTargetPlatform == TargetPlatform.windows
189-
? DragToMoveArea(
180+
appBar: defaultTargetPlatform == TargetPlatform.windows
181+
? NavigationAppBar(
182+
title: () {
183+
return const DragToMoveArea(
184+
child: Align(
185+
alignment: AlignmentDirectional.centerStart,
186+
child: Text("TMod Installer"),
187+
),
188+
);
189+
}(),
190+
actions: DragToMoveArea(
190191
child: Row(
191192
crossAxisAlignment: CrossAxisAlignment.start,
192193
children: const [Spacer(), WindowButtons()],
193194
),
194-
)
195-
: null,
196-
),
195+
))
196+
: null,
197197
pane: NavigationPane(
198198
selected: index,
199199
onChanged: (i) => setState(() => index = i),

pubspec.lock

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,13 @@ packages:
1515
url: "https://pub.dartlang.org"
1616
source: hosted
1717
version: "3.3.1"
18+
archive:
19+
dependency: transitive
20+
description:
21+
name: archive
22+
url: "https://pub.dartlang.org"
23+
source: hosted
24+
version: "3.2.1"
1825
args:
1926
dependency: "direct main"
2027
description:
@@ -316,6 +323,13 @@ packages:
316323
url: "https://pub.dartlang.org"
317324
source: hosted
318325
version: "0.6.9"
326+
flutter_native_splash:
327+
dependency: "direct main"
328+
description:
329+
name: flutter_native_splash
330+
url: "https://pub.dartlang.org"
331+
source: hosted
332+
version: "2.0.5"
319333
flutter_svg:
320334
dependency: "direct main"
321335
description:
@@ -382,6 +396,13 @@ packages:
382396
url: "https://pub.dartlang.org"
383397
source: hosted
384398
version: "4.0.0"
399+
image:
400+
dependency: transitive
401+
description:
402+
name: image
403+
url: "https://pub.dartlang.org"
404+
source: hosted
405+
version: "3.1.3"
385406
intl:
386407
dependency: transitive
387408
description:
@@ -814,6 +835,13 @@ packages:
814835
url: "https://pub.dartlang.org"
815836
source: hosted
816837
version: "1.3.0"
838+
universal_io:
839+
dependency: transitive
840+
description:
841+
name: universal_io
842+
url: "https://pub.dartlang.org"
843+
source: hosted
844+
version: "2.0.4"
817845
url_launcher:
818846
dependency: "direct main"
819847
description:

pubspec.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@ dependencies:
1616
system_theme: ^1.0.1
1717
flutter_acrylic: ^1.0.0+1
1818
provider: ^6.0.2
19+
flutter_native_splash: ^2.0.5
1920
url_launcher: ^6.0.20
2021
url_strategy: ^0.2.0
22+
bitsdojo_window: ^0.1.1+1
2123
window_manager: ^0.1.6
2224
shared_preferences: ^2.0.8
2325
flutter_svg: ^1.0.3
@@ -31,7 +33,6 @@ dependencies:
3133
file_selector_macos:
3234
file_selector_windows:
3335
file_selector: ^0.8.3
34-
bitsdojo_window: ^0.1.1+1
3536

3637
dev_dependencies:
3738
build_runner: ^2.0.0
@@ -43,6 +44,10 @@ dev_dependencies:
4344
# For information on the generic Dart part of this file, see the
4445
# following page: https://dart.dev/tools/pub/pubspec
4546

47+
flutter_native_splash:
48+
color: '#42a5f5'
49+
image: assets/tmodinstaller.png
50+
4651
flutter:
4752
assets:
4853
- assets/Logo.svg

0 commit comments

Comments
 (0)