├── .gitignore
├── .metadata
├── .vscode
├── launch.json
└── settings.json
├── LICENSE
├── README.md
├── README
└── screenshots
│ ├── downgrade.png
│ ├── installed.png
│ ├── installer.png
│ ├── installing.png
│ ├── main_screen.png
│ └── settings_screen.png
├── analysis_options.yaml
├── assets
├── icons
│ ├── missing_icon_background.si
│ ├── missing_icon_background.xml
│ ├── missing_icon_foreground.si
│ ├── missing_icon_foreground.xml
│ ├── missing_icon_legacy.si
│ └── missing_icon_legacy.svg
└── images
│ └── logo.png
├── embedded-tools
├── AdbWinApi.dll
├── AdbWinUsbApi.dll
├── aapt.exe
├── aapt2.exe
├── adb.exe
└── axmldec.exe
├── installer
├── installer.iss
└── redist
│ └── VC_redist.x64.exe
├── l10n.yaml
├── lib
├── android
│ ├── android_utils.dart
│ ├── permissions.dart
│ ├── reader_apk.dart
│ └── reader_xapk.dart
├── apk_installer.dart
├── global_state.dart
├── io
│ ├── aapt_input_parse.dart
│ └── isolate_runner.dart
├── main.dart
├── proto
│ ├── manifest_xapk.pb.dart
│ ├── manifest_xapk.pbenum.dart
│ ├── manifest_xapk.pbjson.dart
│ ├── manifest_xapk.pbserver.dart
│ ├── options.pb.dart
│ ├── options.pbenum.dart
│ ├── options.pbjson.dart
│ └── options.pbserver.dart
├── screens
│ ├── settings.dart
│ └── wsa.dart
├── theme.dart
├── utils
│ ├── future_utils.dart
│ ├── int_utils.dart
│ ├── locale_utils.dart
│ ├── misc_utils.dart
│ ├── regexp_utils.dart
│ ├── string_utils.dart
│ └── wsa_utils.dart
├── widget
│ ├── adaptive_icon.dart
│ ├── flexible_info_bar.dart
│ ├── fluent_card.dart
│ ├── fluent_combo_box.dart
│ ├── fluent_expander.dart
│ ├── fluent_info_bar.dart
│ ├── fluent_text_box.dart
│ ├── move_window_nomax.dart
│ ├── smooth_list_view.dart
│ └── themed_pane_item.dart
└── windows
│ ├── nt_io.dart
│ ├── win_info.dart
│ ├── win_io.dart
│ ├── win_path.dart
│ ├── win_pkg.dart
│ ├── win_reg.dart
│ ├── win_wmi.dart
│ └── wsa_status.dart
├── locale
├── ar.arb
├── ca.arb
├── de.arb
├── en.arb
├── es.arb
├── fa.arb
├── fr.arb
├── he.arb
├── id.arb
├── it.arb
├── ja.arb
├── ko.arb
├── ku.arb
├── pl.arb
├── pt.arb
├── ru.arb
├── vi.arb
├── zh-Hant.arb
└── zh.arb
├── proto
├── manifest_xapk.proto
├── options.proto
└── protoc-generate.bat
├── pubspec.lock
├── pubspec.yaml
├── test
└── widget_test.dart
├── windows
├── .gitignore
├── CMakeLists.txt
├── flutter
│ ├── CMakeLists.txt
│ ├── generated_plugin_registrant.cc
│ ├── generated_plugin_registrant.h
│ └── generated_plugins.cmake
└── runner
│ ├── CMakeLists.txt
│ ├── Runner.rc
│ ├── flutter_window.cpp
│ ├── flutter_window.h
│ ├── main.cpp
│ ├── resource.h
│ ├── resources
│ └── app_icon.ico
│ ├── run_loop.cpp
│ ├── run_loop.h
│ ├── runner.exe.manifest
│ ├── utils.cpp
│ ├── utils.h
│ ├── win32_window.cpp
│ └── win32_window.h
└── winuwp
├── .gitignore
├── CMakeLists.txt
├── flutter
├── CMakeLists.txt
├── generated_plugin_registrant.cc
├── generated_plugin_registrant.h
└── generated_plugins.cmake
├── project_version
└── runner_uwp
├── Assets
├── LargeTile.scale-100.png
├── LargeTile.scale-125.png
├── LargeTile.scale-150.png
├── LargeTile.scale-200.png
├── LargeTile.scale-400.png
├── LockScreenLogo.scale-200.png
├── SmallTile.scale-100.png
├── SmallTile.scale-125.png
├── SmallTile.scale-150.png
├── SmallTile.scale-200.png
├── SmallTile.scale-400.png
├── SplashScreen.scale-100.png
├── SplashScreen.scale-125.png
├── SplashScreen.scale-150.png
├── SplashScreen.scale-200.png
├── SplashScreen.scale-400.png
├── Square150x150Logo.scale-100.png
├── Square150x150Logo.scale-125.png
├── Square150x150Logo.scale-150.png
├── Square150x150Logo.scale-200.png
├── Square150x150Logo.scale-400.png
├── Square44x44Logo.altform-unplated_targetsize-16.png
├── Square44x44Logo.altform-unplated_targetsize-256.png
├── Square44x44Logo.altform-unplated_targetsize-32.png
├── Square44x44Logo.altform-unplated_targetsize-48.png
├── Square44x44Logo.scale-100.png
├── Square44x44Logo.scale-125.png
├── Square44x44Logo.scale-150.png
├── Square44x44Logo.scale-200.png
├── Square44x44Logo.scale-400.png
├── Square44x44Logo.targetsize-16.png
├── Square44x44Logo.targetsize-24.png
├── Square44x44Logo.targetsize-24_altform-unplated.png
├── Square44x44Logo.targetsize-256.png
├── Square44x44Logo.targetsize-32.png
├── Square44x44Logo.targetsize-48.png
├── StoreLogo.png
├── StoreLogo.scale-100.png
├── StoreLogo.scale-125.png
├── StoreLogo.scale-150.png
├── StoreLogo.scale-200.png
├── StoreLogo.scale-400.png
├── Wide310x150Logo.scale-200.png
├── WideTile.scale-100.png
├── WideTile.scale-125.png
├── WideTile.scale-150.png
├── WideTile.scale-200.png
└── WideTile.scale-400.png
├── CMakeLists.txt
├── CMakeSettings.json
├── Windows_TemporaryKey.pfx
├── appxmanifest.in
├── flutter_frameworkview.cpp
├── main.cpp
└── resources.pri
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | **/ios/Flutter/.last_build_id
26 | .dart_tool/
27 | .flutter-plugins
28 | .flutter-plugins-dependencies
29 | .packages
30 | .pub-cache/
31 | .pub/
32 | /build/
33 |
34 | # Web related
35 | lib/generated_plugin_registrant.dart
36 |
37 | # Symbolication related
38 | app.*.symbols
39 |
40 | # Obfuscation related
41 | app.*.map.json
42 |
43 | /android/
44 | ios/
45 | linux/
46 | macos/
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 78910062997c3a836feee883712c241a5fd22983
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/.vscode/launch.json:
--------------------------------------------------------------------------------
1 | {
2 | "configurations": [
3 | {
4 | "name": "Disable null-safety",
5 | "type": "dart",
6 | "request": "launch",
7 | "program": "lib/main.dart",
8 | // Any custom environment variables to set when running the app with this
9 | // launch config.
10 | "env": {
11 | "RELEASE_MODE": false
12 | },
13 | // Arguments to be passed to the Dart or Flutter app.
14 | "args": [
15 | "--no-sound-null-safety"
16 | ],
17 | // "debugConsole" or "terminal". If set to "terminal", will run in the built-in
18 | // terminal and will support reading from `stdin`. However some other debug
19 | // features may be limited.
20 | "console": "debugConsole",
21 |
22 | // Set to run a Flutter app on a specific device, ignoring the device selected
23 | // in the status bar.
24 | "deviceId": "windows",
25 |
26 | // "debug", "profile" or "release".
27 | "flutterMode": "profile",
28 |
29 | // Allows running Flutter tests on a real device instead of the default headless
30 | // flutter-tester device.
31 | "runTestsOnDevice": false,
32 |
33 | // If codeLens is defined, this launch configuration can be launched from custom
34 | // CodeLens links in the editor (see the page linked above for more info).
35 | "codeLens": {
36 |
37 | // This array sets where custom CodeLens links will be rendered:
38 | // - run-test: Above test functions as a Run link
39 | // - debug-test: Above test functions as a Debug link
40 | // - run-test-file: Above main functions in test files as a Run link
41 | // - debug-test-file: Above main functions in test files as a Debug link
42 | // - run-file: Above main functions in bin/tool/lib files as a Run link
43 | // - debug-file: Above main functions in bin/tool/lib files as a Debug link
44 | "for": [ "run-test", "run-test-file", "debug-test", "debug-test-file" ],
45 |
46 | // If specificed, the custom CodeLens will only appear for files that begin
47 | // with this path.
48 | "path": "test/integration_tests",
49 |
50 | // Text for the custom CodeLens. If not specified, will use the name field
51 | // from the parent launch configuration. The string "${debugType}" here will
52 | // be replaced with "run" or "debug" depending on the rendered position
53 | // (see the for field above).
54 | "title": "${debugType} (release)"
55 | },
56 | },
57 | {
58 | "name": "Release build",
59 | "type": "dart",
60 | "request": "launch",
61 | "program": "lib/main.dart",
62 | // Any custom environment variables to set when running the app with this
63 | // launch config.
64 | "env": {
65 | "RELEASE_MODE": true
66 | },
67 | // Arguments to be passed to the Dart or Flutter app.
68 | "args": [
69 | //"--no-sound-null-safety"
70 | ],
71 | // "debugConsole" or "terminal". If set to "terminal", will run in the built-in
72 | // terminal and will support reading from `stdin`. However some other debug
73 | // features may be limited.
74 | "console": "debugConsole",
75 |
76 | // Set to run a Flutter app on a specific device, ignoring the device selected
77 | // in the status bar.
78 | "deviceId": "windows",
79 |
80 | // "debug", "profile" or "release".
81 | "flutterMode": "release",
82 |
83 | // Allows running Flutter tests on a real device instead of the default headless
84 | // flutter-tester device.
85 | "runTestsOnDevice": false,
86 |
87 | // If codeLens is defined, this launch configuration can be launched from custom
88 | // CodeLens links in the editor (see the page linked above for more info).
89 | "codeLens": {
90 |
91 | // This array sets where custom CodeLens links will be rendered:
92 | // - run-test: Above test functions as a Run link
93 | // - debug-test: Above test functions as a Debug link
94 | // - run-test-file: Above main functions in test files as a Run link
95 | // - debug-test-file: Above main functions in test files as a Debug link
96 | // - run-file: Above main functions in bin/tool/lib files as a Run link
97 | // - debug-file: Above main functions in bin/tool/lib files as a Debug link
98 | "for": [ "run-test", "run-test-file", "debug-test", "debug-test-file" ],
99 |
100 | // If specificed, the custom CodeLens will only appear for files that begin
101 | // with this path.
102 | "path": "test/integration_tests",
103 |
104 | // Text for the custom CodeLens. If not specified, will use the name field
105 | // from the parent launch configuration. The string "${debugType}" here will
106 | // be replaced with "run" or "debug" depending on the rendered position
107 | // (see the for field above).
108 | "title": "${debugType} (release)"
109 | },
110 | }
111 | ]
112 | }
--------------------------------------------------------------------------------
/.vscode/settings.json:
--------------------------------------------------------------------------------
1 | {
2 | "files.associations": {
3 | "*.arb": "json",
4 | "xstring": "cpp",
5 | "string": "cpp",
6 | "algorithm": "cpp",
7 | "any": "cpp",
8 | "array": "cpp",
9 | "atomic": "cpp",
10 | "cctype": "cpp",
11 | "chrono": "cpp",
12 | "clocale": "cpp",
13 | "cmath": "cpp",
14 | "compare": "cpp",
15 | "concepts": "cpp",
16 | "condition_variable": "cpp",
17 | "cstddef": "cpp",
18 | "cstdint": "cpp",
19 | "cstdio": "cpp",
20 | "cstdlib": "cpp",
21 | "cstring": "cpp",
22 | "cwchar": "cpp",
23 | "exception": "cpp",
24 | "functional": "cpp",
25 | "initializer_list": "cpp",
26 | "ios": "cpp",
27 | "iosfwd": "cpp",
28 | "iostream": "cpp",
29 | "istream": "cpp",
30 | "iterator": "cpp",
31 | "limits": "cpp",
32 | "list": "cpp",
33 | "map": "cpp",
34 | "memory": "cpp",
35 | "mutex": "cpp",
36 | "new": "cpp",
37 | "optional": "cpp",
38 | "ostream": "cpp",
39 | "ratio": "cpp",
40 | "set": "cpp",
41 | "shared_mutex": "cpp",
42 | "sstream": "cpp",
43 | "stdexcept": "cpp",
44 | "streambuf": "cpp",
45 | "system_error": "cpp",
46 | "thread": "cpp",
47 | "tuple": "cpp",
48 | "type_traits": "cpp",
49 | "typeinfo": "cpp",
50 | "unordered_map": "cpp",
51 | "utility": "cpp",
52 | "variant": "cpp",
53 | "vector": "cpp",
54 | "xfacet": "cpp",
55 | "xhash": "cpp",
56 | "xiosbase": "cpp",
57 | "xlocale": "cpp",
58 | "xlocinfo": "cpp",
59 | "xlocnum": "cpp",
60 | "xmemory": "cpp",
61 | "xstddef": "cpp",
62 | "xtr1common": "cpp",
63 | "xtree": "cpp",
64 | "xutility": "cpp"
65 | },
66 | "cmake.configureOnOpen": false
67 | }
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # wsa_pacman
2 |
3 | 
4 |
5 | A GUI package manager and package installer for Windows Subsystem for Android (WSA).
6 |
7 | Currently provides a double-click GUI installer for .apk and .xapk files that shows app information (package, icon, version and permissions), allows normal installations as well as upgrades and downgrades.
8 |
9 | The app additionally provides a button to open Android settings and one to open the "Manage Applications" Android settings page, from which you can uninstall or disable applications and grant or revoke permissions
10 |
11 | ## Settings
12 |
13 | - Autostart WSA
14 | - on/off
15 | - Android port
16 | - Default: 58526
17 | - Language
18 | - [All options](./locale/)
19 | - Theme mode
20 | - System
21 | - Dark
22 | - Light
23 | - Window transparency (mica)
24 | - Full
25 | - Partial
26 | - Disabled
27 | - Adaptive icon shape
28 | - Squircle
29 | - Circle
30 | - Rounded square
31 | - Disabled
32 |
33 |
34 |
35 | ## FAQ
36 |
37 |
38 | **Q:** WSA PacMan is always showing the Offline status, why is that?
39 |
40 | **A:** First things first make sure WSA is installed (duh); Open the 'Windows Subsystem for Android™ Settings' app, in the Developer tab and make sure the 'Developer mode' switch is enabled; inside manage developer settings, make sure the 'USB debugging' option is enabled.
41 |
42 | Should all of the above fail, [try following this procedure](https://github.com/alesimula/wsa_pacman/issues/99#issuecomment-1288141314); make sure to check the 'always allow' option.
43 | ##
44 |
45 | **Q:** Can I use WSA PacMan on older versions of Windows (eg. Windows 10)?
46 |
47 | **A:** WSA PacMan depends on Windows Subsystem for Linux, which is only ***officially*** supported on Windows 11.
48 |
49 | However, you may be able to install WSA on Windows 10 [using this project](https://github.com/JimDude7404/WSA-Windows-10) by JimDude7404 and following the step-by-step guide on the GitHub page.
50 | ##
51 |
52 | **Q:** Can i install the Play Store?
53 |
54 | **A:** The play store is not _officially_ supported on WSA, and at the moment it is only possible to install it using an unofficial WSA build. I recommend installing the [Aurora Store](https://auroraoss.com/) instead, which is an unofficial Play Store client; but if you really want the Play Store and other Google apps, [check out this project](https://github.com/LSPosed/MagiskOnWSALocal).
55 |
56 |
57 |
58 |
59 |
60 | ## More screenshots
61 |
62 |
63 | 
64 | 
65 | 
66 | 
67 | 
68 |
69 |
--------------------------------------------------------------------------------
/README/screenshots/downgrade.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alesimula/wsa_pacman/5f5bc79a45b081879db794ce7253c36a5ec868c8/README/screenshots/downgrade.png
--------------------------------------------------------------------------------
/README/screenshots/installed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alesimula/wsa_pacman/5f5bc79a45b081879db794ce7253c36a5ec868c8/README/screenshots/installed.png
--------------------------------------------------------------------------------
/README/screenshots/installer.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alesimula/wsa_pacman/5f5bc79a45b081879db794ce7253c36a5ec868c8/README/screenshots/installer.png
--------------------------------------------------------------------------------
/README/screenshots/installing.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alesimula/wsa_pacman/5f5bc79a45b081879db794ce7253c36a5ec868c8/README/screenshots/installing.png
--------------------------------------------------------------------------------
/README/screenshots/main_screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alesimula/wsa_pacman/5f5bc79a45b081879db794ce7253c36a5ec868c8/README/screenshots/main_screen.png
--------------------------------------------------------------------------------
/README/screenshots/settings_screen.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alesimula/wsa_pacman/5f5bc79a45b081879db794ce7253c36a5ec868c8/README/screenshots/settings_screen.png
--------------------------------------------------------------------------------
/analysis_options.yaml:
--------------------------------------------------------------------------------
1 | include: package:flutter_lints/flutter.yaml
--------------------------------------------------------------------------------
/assets/icons/missing_icon_background.si:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alesimula/wsa_pacman/5f5bc79a45b081879db794ce7253c36a5ec868c8/assets/icons/missing_icon_background.si
--------------------------------------------------------------------------------
/assets/icons/missing_icon_foreground.si:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alesimula/wsa_pacman/5f5bc79a45b081879db794ce7253c36a5ec868c8/assets/icons/missing_icon_foreground.si
--------------------------------------------------------------------------------
/assets/icons/missing_icon_foreground.xml:
--------------------------------------------------------------------------------
1 |
5 |
6 |
7 |
13 |
16 |
19 |
20 |
21 |
22 |
28 |
--------------------------------------------------------------------------------
/assets/icons/missing_icon_legacy.si:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alesimula/wsa_pacman/5f5bc79a45b081879db794ce7253c36a5ec868c8/assets/icons/missing_icon_legacy.si
--------------------------------------------------------------------------------
/assets/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alesimula/wsa_pacman/5f5bc79a45b081879db794ce7253c36a5ec868c8/assets/images/logo.png
--------------------------------------------------------------------------------
/embedded-tools/AdbWinApi.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alesimula/wsa_pacman/5f5bc79a45b081879db794ce7253c36a5ec868c8/embedded-tools/AdbWinApi.dll
--------------------------------------------------------------------------------
/embedded-tools/AdbWinUsbApi.dll:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alesimula/wsa_pacman/5f5bc79a45b081879db794ce7253c36a5ec868c8/embedded-tools/AdbWinUsbApi.dll
--------------------------------------------------------------------------------
/embedded-tools/aapt.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alesimula/wsa_pacman/5f5bc79a45b081879db794ce7253c36a5ec868c8/embedded-tools/aapt.exe
--------------------------------------------------------------------------------
/embedded-tools/aapt2.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alesimula/wsa_pacman/5f5bc79a45b081879db794ce7253c36a5ec868c8/embedded-tools/aapt2.exe
--------------------------------------------------------------------------------
/embedded-tools/adb.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alesimula/wsa_pacman/5f5bc79a45b081879db794ce7253c36a5ec868c8/embedded-tools/adb.exe
--------------------------------------------------------------------------------
/embedded-tools/axmldec.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alesimula/wsa_pacman/5f5bc79a45b081879db794ce7253c36a5ec868c8/embedded-tools/axmldec.exe
--------------------------------------------------------------------------------
/installer/installer.iss:
--------------------------------------------------------------------------------
1 | ; -- installer.iss --
2 | ; Generates an installer with Inno Setup.
3 |
4 | #define tools_dir_name "embedded-tools"
5 | #define releasedir "..\build\windows\runner\Release\"
6 | #define instbuilddir "..\build\installer"
7 | #define toolsdir "..\"+tools_dir_name
8 |
9 | #define vcredist_version "14.31.31103.00"
10 |
11 | #define executable "WSA-pacman.exe"
12 | #define app_name "WSA Package Manager"
13 | #define dist_appname "WSA-pacman"
14 | #define reg_appname "wsa-pacman"
15 | #define reg_name_installer "Package installer"
16 |
17 | #define reg_assoc_xapk reg_appname + ".xapk"
18 | #define reg_assoc_apk reg_appname + ".apk"
19 |
20 | #define path_classes "SOFTWARE\Classes\"
21 | #define path_assoc_user "Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\"
22 | #define path_assoc_default ".DEFAULT\"+path_assoc_user
23 |
24 | [Setup]
25 | AppVersion=1.5.0
26 | PrivilegesRequired=admin
27 | AppName=WSA PacMan
28 | AppPublisher=alesimula
29 | ArchitecturesInstallIn64BitMode=x64
30 | WizardStyle=modern
31 | DefaultDirName={autopf}\WSA PacMan
32 | DefaultGroupName=WSA PacMan
33 | UninstallDisplayIcon={app}\{#executable}
34 | Compression=lzma2
35 | SolidCompression=yes
36 | ChangesAssociations=yes
37 | ChangesEnvironment=yes
38 | OutputBaseFilename={#dist_appname}-v{#SetupSetting("AppVersion")}-installer
39 | OutputDir={#instbuilddir}
40 |
41 | [Tasks]
42 | Name: fileassoc_apk; Description: "{cm:AssocFileExtension,{#app_name},.apk}";
43 | Name: fileassoc_xapk; Description: "{cm:AssocFileExtension,{#app_name},.xapk}";
44 |
45 | [Registry]
46 | Root: HKA; Subkey: "SYSTEM\CurrentControlSet\Control\Session Manager\Environment"; ValueType: string; ValueName: "WSA_PACMAN_HOME"; ValueData: "{app}"; Flags: createvalueifdoesntexist preservestringtype uninsdeletevalue
47 | ; File association: apk
48 | Root: HKA; Subkey: "{#path_classes}\.apk"; ValueData: "{#reg_assoc_apk}"; Flags: uninsdeletevalue; ValueType: string; ValueName: ""
49 | Root: HKA; Subkey: "{#path_classes}\.apk\OpenWithProgids"; ValueType: string; ValueName: "{#reg_assoc_apk}"; ValueData: ""; Flags: uninsdeletevalue
50 | Root: HKA; Subkey: "{#path_classes}\{#reg_assoc_apk}"; ValueData: "{#reg_name_installer}"; Flags: uninsdeletekey; ValueType: string; ValueName: ""
51 | Root: HKA; Subkey: "{#path_classes}\{#reg_assoc_apk}\DefaultIcon"; ValueData: "%WSA_PACMAN_HOME%\{#executable},0"; ValueType: expandsz; ValueName: ""
52 | Root: HKA; Subkey: "{#path_classes}\{#reg_assoc_apk}\shell\open\command"; ValueData: """%WSA_PACMAN_HOME%\{#executable}"" ""%1"""; ValueType: expandsz; ValueName: ""
53 | Root: HKU; Subkey: "{#path_assoc_default}\.apk\UserChoice"; ValueType: none; Flags: deletekey; Tasks: fileassoc_apk
54 | Root: HKCU; Subkey: "{#path_assoc_user}\.apk\UserChoice"; ValueType: none; Flags: deletekey; Tasks: fileassoc_apk
55 | ; File association: xapk
56 | Root: HKA; Subkey: "{#path_classes}\.xapk"; ValueData: "{#reg_assoc_xapk}"; Flags: uninsdeletevalue; ValueType: string; ValueName: ""
57 | Root: HKA; Subkey: "{#path_classes}\.xapk\OpenWithProgids"; ValueType: string; ValueName: "{#reg_assoc_xapk}"; ValueData: ""; Flags: uninsdeletevalue
58 | Root: HKA; Subkey: "{#path_classes}\{#reg_assoc_xapk}"; ValueData: "{#reg_name_installer}"; Flags: uninsdeletekey; ValueType: string; ValueName: ""
59 | Root: HKA; Subkey: "{#path_classes}\{#reg_assoc_xapk}\DefaultIcon"; ValueData: "%WSA_PACMAN_HOME%\{#executable},0"; ValueType: expandsz; ValueName: ""
60 | Root: HKA; Subkey: "{#path_classes}\{#reg_assoc_xapk}\shell\open\command"; ValueData: """%WSA_PACMAN_HOME%\{#executable}"" ""%1"""; ValueType: expandsz; ValueName: ""
61 | Root: HKU; Subkey: "{#path_assoc_default}\.xapk\UserChoice"; ValueType: none; Flags: deletekey; Tasks: fileassoc_xapk
62 | Root: HKCU; Subkey: "{#path_assoc_user}\.xapk\UserChoice"; ValueType: none; Flags: deletekey; Tasks: fileassoc_xapk
63 |
64 | [Files]
65 | Source: "{#releasedir}\*"; Excludes: "\*.lib,\*.exp,\{#tools_dir_name}"; DestDir: "{app}"; Flags: recursesubdirs
66 | Source: "{#toolsdir}\*"; DestDir: "{app}\{#tools_dir_name}"; Flags: recursesubdirs
67 | Source: ".\redist\VC_redist.x64.exe"; DestDir: {tmp}; Flags: dontcopy
68 |
69 | [Run]
70 | Filename: "{tmp}\VC_redist.x64.exe"; StatusMsg: "Installing Visual C++ Redistributable..."; \
71 | Parameters: "/quiet /norestart /install"; Check: ShouldInstallVCRedist; Flags: waituntilterminated
72 |
73 | [Icons]
74 | Name: "{group}\WSA PacMan"; Filename: "{app}\{#executable}"
75 |
76 | [Code]
77 | function ShouldInstallVCRedist: Boolean;
78 | var
79 | Version: String;
80 | begin
81 | if RegQueryStringValue(HKEY_LOCAL_MACHINE, 'SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64', 'Version', Version) then
82 | begin
83 | Log('VC Redist Version check : found ' + Version);
84 | //Check if the installed version is lower than the version included in the installer
85 | Result := (CompareStr(Version, 'v{#vcredist_version}')<0);
86 | end
87 | else
88 | begin
89 | // Not even an old version installed
90 | Result := True;
91 | end;
92 | if (Result) then
93 | begin
94 | ExtractTemporaryFile('VC_redist.x64.exe');
95 | end;
96 | end;
97 |
--------------------------------------------------------------------------------
/installer/redist/VC_redist.x64.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/alesimula/wsa_pacman/5f5bc79a45b081879db794ce7253c36a5ec868c8/installer/redist/VC_redist.x64.exe
--------------------------------------------------------------------------------
/l10n.yaml:
--------------------------------------------------------------------------------
1 | arb-dir: locale
2 | template-arb-file: en.arb
3 | output-class: AppLocalizations
4 | output-localization-file: app_localizations.dart
--------------------------------------------------------------------------------
/lib/android/android_utils.dart:
--------------------------------------------------------------------------------
1 | // ignore_for_file: constant_identifier_names
2 |
3 | import 'package:wsa_pacman/android/reader_apk.dart';
4 | import 'package:wsa_pacman/android/reader_xapk.dart';
5 | import 'package:wsa_pacman/io/isolate_runner.dart';
6 | import 'package:wsa_pacman/utils/locale_utils.dart';
7 |
8 | class Resource {
9 | ResType type;
10 | Iterable values;
11 | Resource(this.values, [this.type = ResType.FILE]);
12 | }
13 |
14 | /// Flags passed to the apk reader isolates
15 | enum APK_READER_FLAGS {
16 | UI_LOADED, LEGACY_ICON
17 | }
18 |
19 | enum InstallState {
20 | PROMPT, INSTALLING, SUCCESS, ERROR, TIMEOUT
21 | }
22 | enum InstallType {
23 | UNKNOWN, INSTALL, REINSTALL, UPDATE, DOWNGRADE
24 | }
25 | enum ResType {
26 | COLOR, POINTER, FILE
27 | }
28 | enum AppPackage {
29 | NONE, APK, XAPK
30 | }
31 |
32 | extension AppPackageType on AppPackage {
33 | static AppPackage fromArguments(List args) => args.isEmpty ? AppPackage.NONE : fromFilename(args.first);
34 | static AppPackage fromFilename(String? name) => name == null || name.isEmpty ? AppPackage.NONE :
35 | name.endsWith(".xapk") ? AppPackage.XAPK : AppPackage.APK;
36 | IsolateRef? Function(String) get read { switch (this) {
37 | case AppPackage.APK: return ApkReader().start;
38 | case AppPackage.XAPK: return XapkReader().start;
39 | case AppPackage.NONE: return (_)=>null;
40 | }}
41 | bool get directInstall => this == AppPackage.APK;
42 | }
43 |
44 | extension InstallTypeExt on InstallType {
45 | String buttonText(AppLocalizations locale) {switch (this) {
46 | case InstallType.UNKNOWN: return locale.installer_btn_install;
47 | case InstallType.INSTALL: return locale.installer_btn_install;
48 | case InstallType.REINSTALL: return locale.installer_btn_reinstall;
49 | case InstallType.UPDATE: return locale.installer_btn_update;
50 | case InstallType.DOWNGRADE: return locale.installer_btn_downgrade;
51 | }}
52 | }
53 | ResType getResType(String typeId) {switch (typeId) {
54 | case "1d": return ResType.COLOR;
55 | case "1c": return ResType.COLOR;
56 | case "1": return ResType.POINTER;
57 | default: return ResType.FILE;
58 | }}
59 | Map fillType = {
60 | "0": "winding",
61 | "1": "evenOdd",
62 | "2": "inverseWinding",
63 | "3": "inverseEvenOdd",
64 | };
65 | Map gradientType = {
66 | "0": "linear",
67 | "1": "radial",
68 | "2": "sweep"
69 | };
--------------------------------------------------------------------------------
/lib/io/aapt_input_parse.dart:
--------------------------------------------------------------------------------
1 |
2 | // ignore_for_file: curly_braces_in_flow_control_structures
3 |
4 | class Node {
5 | int _hIndex;
6 | Node? parent;
7 | final List values;
8 | final Map children = {};
9 |
10 | bool get hasValues => values.isNotEmpty;
11 | bool get hasChildren => children.isNotEmpty;
12 | String? get value => values.isNotEmpty ? values[0] : null;
13 |
14 | Node(this._hIndex, this.values, {this.parent});
15 | Node.single(String value) : this(0, [value]);
16 | Node.empty() : this(0, []);
17 | }
18 |
19 | //Missing grouping and kind of janky
20 | //Using regular expressions for now
21 | Map read(String output) {
22 | bool inThisNode = true;
23 | int? substrIndex = 0;
24 | int? lastNodePos = 0;
25 | Node? lastNode;
26 | Node? newNode;
27 | Map map = {};
28 | for (var e in output.split('\n')) {
29 | substrIndex = e.indexOf(':');
30 | if (substrIndex == -1) {newNode = null; continue;}
31 | inThisNode = true;
32 | int nodePos = e.indexOf(RegExp(r'[^\s]'));
33 | int _lastPos = (lastNodePos ?? nodePos);
34 |
35 | String key = e.substring(0,substrIndex).trim();
36 | String value = e.substring(substrIndex+1).trim();
37 |
38 | var parent = lastNode?.parent;
39 | if (_lastPos != nodePos || parent != null) {
40 | inThisNode = false;
41 | if (_lastPos < nodePos) {
42 | newNode = Node(nodePos, [value], parent: lastNode);
43 | lastNode!.children[key] = newNode;
44 | lastNode = newNode;
45 | }
46 | else {
47 | while (lastNode!._hIndex != nodePos) lastNode = lastNode.parent;
48 | var parent = lastNode.parent;
49 | if (parent == null) inThisNode = true;
50 | else parent.children[key] = (lastNode = Node(nodePos, [value], parent: parent));
51 | }
52 | }
53 | lastNodePos = nodePos;
54 | //log("NODE: ${nodePos}");
55 | if (inThisNode) lastNode = (newNode = Node(nodePos, [value]));
56 | if(key.isNotEmpty && inThisNode) map[key] = newNode!;
57 | }
58 | return map;
59 | }
60 |
--------------------------------------------------------------------------------
/lib/io/isolate_runner.dart:
--------------------------------------------------------------------------------
1 | // ignore_for_file: curly_braces_in_flow_control_structures
2 |
3 | import 'dart:async';
4 | import 'dart:isolate';
5 |
6 | import 'package:flutter/foundation.dart';
7 | import 'package:synchronized/synchronized.dart';
8 | import 'package:meta/meta.dart';
9 |
10 | class _IsolateMessage {
11 | final E flag;
12 | final bool value;
13 | _IsolateMessage(this.flag, this.value);
14 | }
15 |
16 | class _IsolateData {
17 | O? data;
18 | final Completer _uiToIsolatePortCompleter;
19 | SendPort? _uiToIsolatePort;
20 | final SendPort _isolateToUiPort;
21 |
22 | _IsolateData._withCompleter(this.data, final Completer portCompleter) : _uiToIsolatePortCompleter = portCompleter, _isolateToUiPort = (ReceivePort()..listen((message) {
23 | if (message is VoidCallback) {message();}
24 | else if (message is SendPort) {portCompleter.complete(message);}
25 | })).sendPort;
26 |
27 | _IsolateData(O data) : this._withCompleter(data, Completer());
28 |
29 | //Listener has to execute this in the main thread
30 | void _executeInUi(VoidCallback callback) {
31 | _isolateToUiPort.send(callback);
32 | }
33 | void _sendToIsolate(_IsolateMessage a) async {
34 | (_uiToIsolatePort ?? (_uiToIsolatePort = await _uiToIsolatePortCompleter.future)).send(a);
35 | }
36 | }
37 |
38 | class IsolateRef {
39 | final _IsolateData _data;
40 | IsolateRef._(this._data);
41 |
42 | void sendFlag(FLAGS flag, bool value) => _data._sendToIsolate(_IsolateMessage(flag, value));
43 | }
44 |
45 | /// Simplifies running an isolate
46 | /// Allows running a callback in the UI thread
47 | /// Allows waiting for a signal from the UI thread
48 | /// Most fields are static not to be caught up in the executeInUi method
49 | abstract class IsolateRunner {
50 | static late final _flags = >{};
51 | static late final _flagsLock = Lock();
52 | static late final dynamic _data;
53 | static late final _IsolateData _pData;
54 |
55 | /// Data passed to the start method
56 | @nonVirtual O get data => _data;
57 | /// Main runner, must be overridden
58 | @visibleForOverriding FutureOr run();
59 | /// Executed in the UI thread after starting the isolate
60 | FutureOr postStartCallback(IsolateRef isolate) {}
61 | /// Waits for a flag from the UI thread, may stay locked indefinitely
62 | @nonVirtual Future waitFlag(FLAGS flag) async => await (await _flagsLock.synchronized(()=>_flags.putIfAbsent(flag, ()=>Completer()))).future;
63 | /// Executes a callback in the UI thread
64 | /// Will load all local variables in the current scope if one is referenced, therefore use carefully
65 | @nonVirtual void executeInUi(VoidCallback callback) => _pData._executeInUi(callback);
66 |
67 | void _runInitIsolate(_IsolateData pData) async {
68 | (_pData = pData)._isolateToUiPort.send((ReceivePort()..listen((message) {
69 | if (message is _IsolateMessage) _flagsLock.synchronized(() {
70 | _flags.putIfAbsent(message.flag, ()=>Completer()).complete(message.value);
71 | });
72 | })).sendPort);
73 | _data = pData.data;
74 | // Should prevent this data from beins sent when launching executeInUi
75 | pData.data = null;
76 | await run();
77 | }
78 |
79 | @nonVirtual
80 | IsolateRef start(O data) => IsolateRunner._start(this, data);
81 |
82 | /// Starts a process to read apk data
83 | static IsolateRef _start(IsolateRunner runner, O data) {
84 | //APK_FILE = fileName;
85 | //Recheck installation type when connected
86 | final isolateRef = IsolateRef._(_IsolateData(data));
87 | compute(runner._runInitIsolate, isolateRef._data);
88 | runner.postStartCallback(isolateRef);
89 | return isolateRef;
90 | }
91 | }
--------------------------------------------------------------------------------
/lib/proto/manifest_xapk.pbenum.dart:
--------------------------------------------------------------------------------
1 | ///
2 | // Generated code. Do not modify.
3 | // source: manifest_xapk.proto
4 | //
5 | // @dart = 2.12
6 | // ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields
7 |
8 | // ignore_for_file: UNDEFINED_SHOWN_NAME
9 | import 'dart:core' as $core;
10 | import 'package:protobuf/protobuf.dart' as $pb;
11 |
12 | class ManifestXapk_InstallDir extends $pb.ProtobufEnum {
13 | static const ManifestXapk_InstallDir EXTERNAL_STORAGE = ManifestXapk_InstallDir._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'EXTERNAL_STORAGE');
14 | static const ManifestXapk_InstallDir INTERNAL_STORAGE = ManifestXapk_InstallDir._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'INTERNAL_STORAGE');
15 |
16 | static const $core.List values = [
17 | EXTERNAL_STORAGE,
18 | INTERNAL_STORAGE,
19 | ];
20 |
21 | static final $core.Map<$core.int, ManifestXapk_InstallDir> _byValue = $pb.ProtobufEnum.initByValue(values);
22 | static ManifestXapk_InstallDir? valueOf($core.int value) => _byValue[value];
23 |
24 | const ManifestXapk_InstallDir._($core.int v, $core.String n) : super(v, n);
25 | }
26 |
27 |
--------------------------------------------------------------------------------
/lib/proto/manifest_xapk.pbjson.dart:
--------------------------------------------------------------------------------
1 | ///
2 | // Generated code. Do not modify.
3 | // source: manifest_xapk.proto
4 | //
5 | // @dart = 2.12
6 | // ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package
7 |
8 | import 'dart:core' as $core;
9 | import 'dart:convert' as $convert;
10 | import 'dart:typed_data' as $typed_data;
11 | @$core.Deprecated('Use manifestXapkDescriptor instead')
12 | const ManifestXapk$json = const {
13 | '1': 'ManifestXapk',
14 | '2': const [
15 | const {'1': 'xapk_version', '3': 1, '4': 1, '5': 13, '7': '1', '10': 'xapkVersion'},
16 | const {'1': 'package_name', '3': 2, '4': 1, '5': 9, '10': 'packageName'},
17 | const {'1': 'name', '3': 3, '4': 1, '5': 9, '10': 'name'},
18 | const {'1': 'locales_name', '3': 4, '4': 3, '5': 11, '6': '.proto.ManifestXapk.LocalesNameEntry', '10': 'localesName'},
19 | const {'1': 'version_code', '3': 5, '4': 1, '5': 13, '10': 'versionCode'},
20 | const {'1': 'version_name', '3': 6, '4': 1, '5': 9, '10': 'versionName'},
21 | const {'1': 'min_sdk_version', '3': 7, '4': 1, '5': 13, '10': 'minSdkVersion'},
22 | const {'1': 'target_sdk_version', '3': 8, '4': 1, '5': 13, '10': 'targetSdkVersion'},
23 | const {'1': 'permissions', '3': 9, '4': 3, '5': 9, '10': 'permissions'},
24 | const {'1': 'split_configs', '3': 10, '4': 3, '5': 9, '10': 'splitConfigs'},
25 | const {'1': 'total_size', '3': 11, '4': 1, '5': 13, '10': 'totalSize'},
26 | const {'1': 'icon', '3': 12, '4': 1, '5': 9, '10': 'icon'},
27 | const {'1': 'split_apks', '3': 13, '4': 3, '5': 11, '6': '.proto.ManifestXapk.ApkFile', '10': 'splitApks'},
28 | const {'1': 'expansions', '3': 14, '4': 3, '5': 11, '6': '.proto.ManifestXapk.ApkExpansion', '10': 'expansions'},
29 | ],
30 | '3': const [ManifestXapk_LocalesNameEntry$json, ManifestXapk_ApkFile$json, ManifestXapk_ApkExpansion$json],
31 | '4': const [ManifestXapk_InstallDir$json],
32 | };
33 |
34 | @$core.Deprecated('Use manifestXapkDescriptor instead')
35 | const ManifestXapk_LocalesNameEntry$json = const {
36 | '1': 'LocalesNameEntry',
37 | '2': const [
38 | const {'1': 'key', '3': 1, '4': 1, '5': 9, '10': 'key'},
39 | const {'1': 'value', '3': 2, '4': 1, '5': 9, '10': 'value'},
40 | ],
41 | '7': const {'7': true},
42 | };
43 |
44 | @$core.Deprecated('Use manifestXapkDescriptor instead')
45 | const ManifestXapk_ApkFile$json = const {
46 | '1': 'ApkFile',
47 | '2': const [
48 | const {'1': 'id', '3': 1, '4': 1, '5': 9, '10': 'id'},
49 | const {'1': 'file', '3': 2, '4': 1, '5': 9, '10': 'file'},
50 | ],
51 | };
52 |
53 | @$core.Deprecated('Use manifestXapkDescriptor instead')
54 | const ManifestXapk_ApkExpansion$json = const {
55 | '1': 'ApkExpansion',
56 | '2': const [
57 | const {'1': 'install_location', '3': 1, '4': 1, '5': 14, '6': '.proto.ManifestXapk.InstallDir', '10': 'installLocation'},
58 | const {'1': 'file', '3': 2, '4': 1, '5': 9, '10': 'file'},
59 | const {'1': 'install_path', '3': 3, '4': 1, '5': 9, '10': 'installPath'},
60 | ],
61 | };
62 |
63 | @$core.Deprecated('Use manifestXapkDescriptor instead')
64 | const ManifestXapk_InstallDir$json = const {
65 | '1': 'InstallDir',
66 | '2': const [
67 | const {'1': 'EXTERNAL_STORAGE', '2': 0},
68 | const {'1': 'INTERNAL_STORAGE', '2': 1},
69 | ],
70 | };
71 |
72 | /// Descriptor for `ManifestXapk`. Decode as a `google.protobuf.DescriptorProto`.
73 | final $typed_data.Uint8List manifestXapkDescriptor = $convert.base64Decode('CgxNYW5pZmVzdFhhcGsSJAoMeGFwa192ZXJzaW9uGAEgASgNOgExUgt4YXBrVmVyc2lvbhIhCgxwYWNrYWdlX25hbWUYAiABKAlSC3BhY2thZ2VOYW1lEhIKBG5hbWUYAyABKAlSBG5hbWUSRwoMbG9jYWxlc19uYW1lGAQgAygLMiQucHJvdG8uTWFuaWZlc3RYYXBrLkxvY2FsZXNOYW1lRW50cnlSC2xvY2FsZXNOYW1lEiEKDHZlcnNpb25fY29kZRgFIAEoDVILdmVyc2lvbkNvZGUSIQoMdmVyc2lvbl9uYW1lGAYgASgJUgt2ZXJzaW9uTmFtZRImCg9taW5fc2RrX3ZlcnNpb24YByABKA1SDW1pblNka1ZlcnNpb24SLAoSdGFyZ2V0X3Nka192ZXJzaW9uGAggASgNUhB0YXJnZXRTZGtWZXJzaW9uEiAKC3Blcm1pc3Npb25zGAkgAygJUgtwZXJtaXNzaW9ucxIjCg1zcGxpdF9jb25maWdzGAogAygJUgxzcGxpdENvbmZpZ3MSHQoKdG90YWxfc2l6ZRgLIAEoDVIJdG90YWxTaXplEhIKBGljb24YDCABKAlSBGljb24SOgoKc3BsaXRfYXBrcxgNIAMoCzIbLnByb3RvLk1hbmlmZXN0WGFway5BcGtGaWxlUglzcGxpdEFwa3MSQAoKZXhwYW5zaW9ucxgOIAMoCzIgLnByb3RvLk1hbmlmZXN0WGFway5BcGtFeHBhbnNpb25SCmV4cGFuc2lvbnMaPgoQTG9jYWxlc05hbWVFbnRyeRIQCgNrZXkYASABKAlSA2tleRIUCgV2YWx1ZRgCIAEoCVIFdmFsdWU6AjgBGi0KB0Fwa0ZpbGUSDgoCaWQYASABKAlSAmlkEhIKBGZpbGUYAiABKAlSBGZpbGUakAEKDEFwa0V4cGFuc2lvbhJJChBpbnN0YWxsX2xvY2F0aW9uGAEgASgOMh4ucHJvdG8uTWFuaWZlc3RYYXBrLkluc3RhbGxEaXJSD2luc3RhbGxMb2NhdGlvbhISCgRmaWxlGAIgASgJUgRmaWxlEiEKDGluc3RhbGxfcGF0aBgDIAEoCVILaW5zdGFsbFBhdGgiOAoKSW5zdGFsbERpchIUChBFWFRFUk5BTF9TVE9SQUdFEAASFAoQSU5URVJOQUxfU1RPUkFHRRAB');
74 |
--------------------------------------------------------------------------------
/lib/proto/manifest_xapk.pbserver.dart:
--------------------------------------------------------------------------------
1 | ///
2 | // Generated code. Do not modify.
3 | // source: manifest_xapk.proto
4 | //
5 | // @dart = 2.12
6 | // ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package
7 |
8 | export 'manifest_xapk.pb.dart';
9 |
10 |
--------------------------------------------------------------------------------
/lib/proto/options.pbenum.dart:
--------------------------------------------------------------------------------
1 | ///
2 | // Generated code. Do not modify.
3 | // source: options.proto
4 | //
5 | // @dart = 2.12
6 | // ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields
7 |
8 | // ignore_for_file: UNDEFINED_SHOWN_NAME
9 | import 'dart:core' as $core;
10 | import 'package:protobuf/protobuf.dart' as $pb;
11 |
12 | class Options_Theme extends $pb.ProtobufEnum {
13 | static const Options_Theme SYSTEM = Options_Theme._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'SYSTEM');
14 | static const Options_Theme LIGHT = Options_Theme._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'LIGHT');
15 | static const Options_Theme DARK = Options_Theme._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DARK');
16 |
17 | static const $core.List values = [
18 | SYSTEM,
19 | LIGHT,
20 | DARK,
21 | ];
22 |
23 | static final $core.Map<$core.int, Options_Theme> _byValue = $pb.ProtobufEnum.initByValue(values);
24 | static Options_Theme? valueOf($core.int value) => _byValue[value];
25 |
26 | const Options_Theme._($core.int v, $core.String n) : super(v, n);
27 | }
28 |
29 | class Options_IconShape extends $pb.ProtobufEnum {
30 | static const Options_IconShape SQUIRCLE = Options_IconShape._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'SQUIRCLE');
31 | static const Options_IconShape CIRCLE = Options_IconShape._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'CIRCLE');
32 | static const Options_IconShape ROUNDED_SQUARE = Options_IconShape._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'ROUNDED_SQUARE');
33 |
34 | static const $core.List values = [
35 | SQUIRCLE,
36 | CIRCLE,
37 | ROUNDED_SQUARE,
38 | ];
39 |
40 | static final $core.Map<$core.int, Options_IconShape> _byValue = $pb.ProtobufEnum.initByValue(values);
41 | static Options_IconShape? valueOf($core.int value) => _byValue[value];
42 |
43 | const Options_IconShape._($core.int v, $core.String n) : super(v, n);
44 | }
45 |
46 | class Options_Mica extends $pb.ProtobufEnum {
47 | static const Options_Mica FULL = Options_Mica._(0, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'FULL');
48 | static const Options_Mica PARTIAL = Options_Mica._(1, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'PARTIAL');
49 | static const Options_Mica DISABLED = Options_Mica._(2, const $core.bool.fromEnvironment('protobuf.omit_enum_names') ? '' : 'DISABLED');
50 |
51 | static const $core.List values = [
52 | FULL,
53 | PARTIAL,
54 | DISABLED,
55 | ];
56 |
57 | static final $core.Map<$core.int, Options_Mica> _byValue = $pb.ProtobufEnum.initByValue(values);
58 | static Options_Mica? valueOf($core.int value) => _byValue[value];
59 |
60 | const Options_Mica._($core.int v, $core.String n) : super(v, n);
61 | }
62 |
63 |
--------------------------------------------------------------------------------
/lib/proto/options.pbjson.dart:
--------------------------------------------------------------------------------
1 | ///
2 | // Generated code. Do not modify.
3 | // source: options.proto
4 | //
5 | // @dart = 2.12
6 | // ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package
7 |
8 | import 'dart:core' as $core;
9 | import 'dart:convert' as $convert;
10 | import 'dart:typed_data' as $typed_data;
11 | @$core.Deprecated('Use optionsDescriptor instead')
12 | const Options$json = const {
13 | '1': 'Options',
14 | '2': const [
15 | const {'1': 'ipAddress', '3': 1, '4': 1, '5': 13, '7': '2130706433', '10': 'ipAddress'},
16 | const {'1': 'port', '3': 2, '4': 1, '5': 13, '7': '58526', '10': 'port'},
17 | const {'1': 'autostart', '3': 8, '4': 1, '5': 8, '10': 'autostart'},
18 | const {'1': 'timeout', '3': 10, '4': 1, '5': 13, '7': '30', '10': 'timeout'},
19 | const {'1': 'locale', '3': 9, '4': 1, '5': 13, '10': 'locale'},
20 | const {'1': 'theme', '3': 3, '4': 1, '5': 14, '6': '.proto.Options.Theme', '10': 'theme'},
21 | const {'1': 'legacyIcons', '3': 4, '4': 1, '5': 8, '10': 'legacyIcons'},
22 | const {'1': 'systemAccent', '3': 5, '4': 1, '5': 8, '10': 'systemAccent'},
23 | const {'1': 'iconShape', '3': 6, '4': 1, '5': 14, '6': '.proto.Options.IconShape', '10': 'iconShape'},
24 | const {'1': 'mica', '3': 7, '4': 1, '5': 14, '6': '.proto.Options.Mica', '7': 'FULL', '10': 'mica'},
25 | ],
26 | '4': const [Options_Theme$json, Options_IconShape$json, Options_Mica$json],
27 | };
28 |
29 | @$core.Deprecated('Use optionsDescriptor instead')
30 | const Options_Theme$json = const {
31 | '1': 'Theme',
32 | '2': const [
33 | const {'1': 'SYSTEM', '2': 0},
34 | const {'1': 'LIGHT', '2': 1},
35 | const {'1': 'DARK', '2': 2},
36 | ],
37 | };
38 |
39 | @$core.Deprecated('Use optionsDescriptor instead')
40 | const Options_IconShape$json = const {
41 | '1': 'IconShape',
42 | '2': const [
43 | const {'1': 'SQUIRCLE', '2': 0},
44 | const {'1': 'CIRCLE', '2': 1},
45 | const {'1': 'ROUNDED_SQUARE', '2': 2},
46 | ],
47 | };
48 |
49 | @$core.Deprecated('Use optionsDescriptor instead')
50 | const Options_Mica$json = const {
51 | '1': 'Mica',
52 | '2': const [
53 | const {'1': 'FULL', '2': 0},
54 | const {'1': 'PARTIAL', '2': 1},
55 | const {'1': 'DISABLED', '2': 2},
56 | ],
57 | };
58 |
59 | /// Descriptor for `Options`. Decode as a `google.protobuf.DescriptorProto`.
60 | final $typed_data.Uint8List optionsDescriptor = $convert.base64Decode('CgdPcHRpb25zEigKCWlwQWRkcmVzcxgBIAEoDToKMjEzMDcwNjQzM1IJaXBBZGRyZXNzEhkKBHBvcnQYAiABKA06BTU4NTI2UgRwb3J0EhwKCWF1dG9zdGFydBgIIAEoCFIJYXV0b3N0YXJ0EhwKB3RpbWVvdXQYCiABKA06AjMwUgd0aW1lb3V0EhYKBmxvY2FsZRgJIAEoDVIGbG9jYWxlEioKBXRoZW1lGAMgASgOMhQucHJvdG8uT3B0aW9ucy5UaGVtZVIFdGhlbWUSIAoLbGVnYWN5SWNvbnMYBCABKAhSC2xlZ2FjeUljb25zEiIKDHN5c3RlbUFjY2VudBgFIAEoCFIMc3lzdGVtQWNjZW50EjYKCWljb25TaGFwZRgGIAEoDjIYLnByb3RvLk9wdGlvbnMuSWNvblNoYXBlUglpY29uU2hhcGUSLQoEbWljYRgHIAEoDjITLnByb3RvLk9wdGlvbnMuTWljYToERlVMTFIEbWljYSIoCgVUaGVtZRIKCgZTWVNURU0QABIJCgVMSUdIVBABEggKBERBUksQAiI5CglJY29uU2hhcGUSDAoIU1FVSVJDTEUQABIKCgZDSVJDTEUQARISCg5ST1VOREVEX1NRVUFSRRACIisKBE1pY2ESCAoERlVMTBAAEgsKB1BBUlRJQUwQARIMCghESVNBQkxFRBAC');
61 |
--------------------------------------------------------------------------------
/lib/proto/options.pbserver.dart:
--------------------------------------------------------------------------------
1 | ///
2 | // Generated code. Do not modify.
3 | // source: options.proto
4 | //
5 | // @dart = 2.12
6 | // ignore_for_file: annotate_overrides,camel_case_types,unnecessary_const,non_constant_identifier_names,library_prefixes,unused_import,unused_shown_name,return_of_invalid_type,unnecessary_this,prefer_final_fields,deprecated_member_use_from_same_package
7 |
8 | export 'options.pb.dart';
9 |
10 |
--------------------------------------------------------------------------------
/lib/screens/wsa.dart:
--------------------------------------------------------------------------------
1 | // ignore_for_file: avoid_print
2 |
3 | import 'dart:io';
4 |
5 | import 'package:fluent_ui/fluent_ui.dart';
6 | import 'package:mdi/mdi.dart';
7 | import 'package:wsa_pacman/utils/wsa_utils.dart';
8 | import 'package:wsa_pacman/widget/fluent_card.dart';
9 | import 'package:wsa_pacman/widget/fluent_info_bar.dart';
10 | import 'package:wsa_pacman/widget/smooth_list_view.dart';
11 | import '../main.dart';
12 | import '../global_state.dart';
13 |
14 | class ScreenWSA extends StatefulWidget {
15 | const ScreenWSA({Key? key}) : super(key: key);
16 |
17 | @override
18 | _ScreenWSAState createState() => _ScreenWSAState();
19 | }
20 |
21 | class EmptyElement extends Element {
22 | EmptyElement(Empty widget) : super(widget);
23 | @override
24 | void performRebuild() {}
25 | @override
26 | bool get debugDoingBuild => false;
27 | @override
28 | Empty get widget => super.widget as Empty;
29 | }
30 | class Empty extends Widget {
31 | const Empty();
32 |
33 | @override
34 | Element createElement() => EmptyElement(this);
35 | }
36 | Expanded EMPTY = Expanded(child: Column());
37 |
38 | class _ScreenWSAState extends State {
39 | //_FormsState(this.gsmap);
40 |
41 | //final GSMap