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

Commit

Permalink
fix: windows build issue?
Browse files Browse the repository at this point in the history
  • Loading branch information
Tricked-dev committed Mar 3, 2022
1 parent d67576c commit 8d91855
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 18 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/flutterci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ jobs:
channel: beta
cache: true
- run: flutter config --enable-windows-desktop
- run: flutter pub run flutter_native_splash:create
- run: flutter build windows
- run: choco install make -y
- run: make innoinstall
Expand Down Expand Up @@ -100,6 +101,7 @@ jobs:
- run: sudo apt-get update -y
- 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
- run: flutter config --enable-linux-desktop
- run: flutter pub run flutter_native_splash:create
- run: flutter build linux --release

- name: Build .deb executable
Expand Down
34 changes: 17 additions & 17 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,11 @@ void main(List<String> args) async {

windowManager.waitUntilReadyToShow().then((_) async {
// Hide window title bar

await windowManager.setTitleBarStyle('hidden');
if (defaultTargetPlatform == TargetPlatform.windows) {
await windowManager.setTitleBarStyle('hidden');
await windowManager.setMinimumSize(const Size(755, 545));
}
await windowManager.setSize(const Size(800, 600));
await windowManager.setMinimumSize(const Size(755, 545));
await windowManager.center();
await windowManager.show();
await windowManager.setSkipTaskbar(false);
Expand Down Expand Up @@ -176,24 +177,23 @@ class _TModInstallerPageState extends State<TModInstallerPage> {
return true;
}).toList();
return NavigationView(
appBar: NavigationAppBar(
title: () {
return const DragToMoveArea(
child: Align(
alignment: AlignmentDirectional.centerStart,
child: Text("TMod Installer"),
),
);
}(),
actions: defaultTargetPlatform == TargetPlatform.windows
? DragToMoveArea(
appBar: defaultTargetPlatform == TargetPlatform.windows
? NavigationAppBar(
title: () {
return const DragToMoveArea(
child: Align(
alignment: AlignmentDirectional.centerStart,
child: Text("TMod Installer"),
),
);
}(),
actions: DragToMoveArea(
child: Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: const [Spacer(), WindowButtons()],
),
)
: null,
),
))
: null,
pane: NavigationPane(
selected: index,
onChanged: (i) => setState(() => index = i),
Expand Down
28 changes: 28 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "3.3.1"
archive:
dependency: transitive
description:
name: archive
url: "https://pub.dartlang.org"
source: hosted
version: "3.2.1"
args:
dependency: "direct main"
description:
Expand Down Expand Up @@ -316,6 +323,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.9"
flutter_native_splash:
dependency: "direct main"
description:
name: flutter_native_splash
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.5"
flutter_svg:
dependency: "direct main"
description:
Expand Down Expand Up @@ -382,6 +396,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "4.0.0"
image:
dependency: transitive
description:
name: image
url: "https://pub.dartlang.org"
source: hosted
version: "3.1.3"
intl:
dependency: transitive
description:
Expand Down Expand Up @@ -814,6 +835,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0"
universal_io:
dependency: transitive
description:
name: universal_io
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.4"
url_launcher:
dependency: "direct main"
description:
Expand Down
7 changes: 6 additions & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,10 @@ dependencies:
system_theme: ^1.0.1
flutter_acrylic: ^1.0.0+1
provider: ^6.0.2
flutter_native_splash: ^2.0.5
url_launcher: ^6.0.20
url_strategy: ^0.2.0
bitsdojo_window: ^0.1.1+1
window_manager: ^0.1.6
shared_preferences: ^2.0.8
flutter_svg: ^1.0.3
Expand All @@ -31,7 +33,6 @@ dependencies:
file_selector_macos:
file_selector_windows:
file_selector: ^0.8.3
bitsdojo_window: ^0.1.1+1

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

flutter_native_splash:
color: '#42a5f5'
image: assets/tmodinstaller.png

flutter:
assets:
- assets/Logo.svg
Expand Down

0 comments on commit 8d91855

Please sign in to comment.