fix ui; update windows build

This commit is contained in:
wgh19
2024-05-23 11:56:49 +08:00
parent 9505b78ae4
commit 187e5f9a09
6 changed files with 94 additions and 10 deletions

View File

@@ -147,7 +147,8 @@
"Submit": "提交",
"Local": "本地",
"Both": "同时",
"This artwork is blocked": "此作品已被屏蔽"
"This artwork is blocked": "此作品已被屏蔽",
"Delete Invalid Items": "删除无效项目"
},
"zh_TW": {
"Search": "搜索",
@@ -297,6 +298,7 @@
"Submit": "提交",
"Local": "本地",
"Both": "同時",
"This artwork is blocked": "此作品已被屏蔽"
"This artwork is blocked": "此作品已被屏蔽",
"Delete Invalid Items": "刪除無效項目"
}
}

View File

@@ -56,7 +56,7 @@ class _DownloadedPageState extends State<DownloadedPage> {
});
},
),
),
),
Expanded(
child: buildBody(),
),
@@ -77,8 +77,9 @@ class _DownloadedPageState extends State<DownloadedPage> {
child: GestureDetector(
behavior: HitTestBehavior.opaque,
onTap: () {
context.to(() => _DownloadedIllustViewPage(
DownloadManager().getImagePaths(illusts[index].illustId)));
App.rootNavigatorKey.currentContext?.to(() =>
_DownloadedIllustViewPage(DownloadManager()
.getImagePaths(illusts[index].illustId)));
},
child: Row(
children: [

View File

@@ -1192,7 +1192,7 @@ class __BlockingPageState extends State<_BlockingPage> {
strokeWidth: 1.6,
).fixWidth(18).fixHeight(18).toAlign(Alignment.center)
: Text("Submit".tl),
).fixWidth(96).fixHeight(28),
).fixWidth(96).fixHeight(32),
).toAlign(Alignment.center).paddingTop(16);
}
}

View File

@@ -33,11 +33,12 @@ class _NovelReadingPageState extends LoadingState<NovelReadingPage, String> {
if (!isShowingSettings) {
_NovelReadingSettings.show(context, () {
setState(() {});
}).then((value) {
isShowingSettings = false;
});
isShowingSettings = true;
} else {
Navigator.of(context).pop();
isShowingSettings = false;
}
});
Future.delayed(const Duration(milliseconds: 200), () {
@@ -136,8 +137,8 @@ class _NovelReadingSettings extends StatefulWidget {
final void Function() callback;
static void show(BuildContext context, void Function() callback) {
Navigator.of(context).push(SideBarRoute(_NovelReadingSettings(callback)));
static Future show(BuildContext context, void Function() callback) {
return Navigator.of(context).push(SideBarRoute(_NovelReadingSettings(callback)));
}
@override

63
windows/build.iss Normal file
View File

@@ -0,0 +1,63 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "pixes"
#define MyAppVersion "1.0.5"
#define MyAppPublisher "Nyne"
#define MyAppURL "https://github.com/wgh136/pixes"
#define MyAppExeName "pixes.exe"
#define RootPath "C:\Users\wgh19\IdeaProjects\pixes"
[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{88521115-48B7-4AF3-BF49-2BC6AF90B8D3}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={autopf}\{#MyAppName}
DisableProgramGroupPage=yes
; Uncomment the following line to run in non administrative install mode (install for current user only.)
;PrivilegesRequired=lowest
PrivilegesRequiredOverridesAllowed=dialog
OutputDir=C:\Users\wgh19\IdeaProjects\pixes\build\windows
OutputBaseFilename=pixes-windows-installer
SetupIconFile={#RootPath}\windows\runner\resources\app_icon.ico
Compression=lzma
SolidCompression=yes
WizardStyle=modern
ArchitecturesInstallIn64BitMode=x64 arm64
ArchitecturesAllowed=x64 arm64
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
Name: "chinesesimplified"; MessagesFile: "compiler:Languages\ChineseSimplified.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "{#RootPath}\build\windows\x64\runner\Release\{#MyAppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#RootPath}\build\windows\x64\runner\Release\app_links_plugin.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#RootPath}\build\windows\x64\runner\Release\dynamic_color_plugin.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#RootPath}\build\windows\x64\runner\Release\file_selector_windows_plugin.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#RootPath}\build\windows\x64\runner\Release\flutter_windows.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#RootPath}\build\windows\x64\runner\Release\screen_retriever_plugin.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#RootPath}\build\windows\x64\runner\Release\share_plus_plugin.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#RootPath}\build\windows\x64\runner\Release\sqlite3.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#RootPath}\build\windows\x64\runner\Release\sqlite3_flutter_libs_plugin.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#RootPath}\build\windows\x64\runner\Release\url_launcher_windows_plugin.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#RootPath}\build\windows\x64\runner\Release\window_manager_plugin.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#RootPath}\build\windows\x64\runner\Release\data\*"; DestDir: "{app}\data"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall

View File

@@ -1,6 +1,8 @@
import subprocess
import os
os.chdir(os.path.dirname(os.path.dirname(os.path.abspath(__file__))))
fontUse = '''
fonts:
- family: font
@@ -26,4 +28,19 @@ if os.path.exists("build/app-windows.zip"):
subprocess.run(["tar", "-a", "-c", "-f", "build/windows/x64/app-windows.zip", "-C", "build/windows/x64/runner/Release", "."]
, shell=True)
subprocess.run(["iscc", "build/windows/build.iss"], shell=True)
version = str.split(str.split(content, 'version: ')[1], '+')[0]
issContent = ""
file = open('windows/build.iss', 'r')
issContent = file.read()
newContent = issContent
newContent = newContent.replace("{{version}}", version)
newContent = newContent.replace("{{root_path}}", os.getcwd())
file.close()
file = open('windows/build.iss', 'w')
file.write(newContent)
file.close()
subprocess.run(["iscc", "windows/build.iss"], shell=True)
with open('windows/build.iss', 'w') as file:
file.write(issContent)