Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve buildsystem #3586

Merged
merged 6 commits into from
Dec 10, 2024
Merged

Conversation

TheEvilSkeleton
Copy link
Member

@TheEvilSkeleton TheEvilSkeleton commented Dec 8, 2024

Description

Check commits

Related: #2921

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Please describe the tests that you ran to verify your changes.
Provide instructions so we can reproduce.

  • Test A
  • Test B

Copy link
Contributor

github-actions bot commented Dec 8, 2024

Pylint result on modfied files:
************* Module bottles.frontend.main
bottles/frontend/main.py:210:0: C0303: Trailing whitespace (trailing-whitespace)
bottles/frontend/main.py:32:0: C0413: Import "from gi.repository import Gtk, Gio, GLib, GObject, Adw" should be placed at the top of the module (wrong-import-position)
bottles/frontend/main.py:32:0: E0611: No name 'Adw' in module 'gi.repository' (no-name-in-module)
bottles/frontend/main.py:34:0: W0401: Wildcard import bottles.frontend.params (wildcard-import)
bottles/frontend/main.py:34:0: C0413: Import "from bottles.frontend.params import *" should be placed at the top of the module (wrong-import-position)
bottles/frontend/main.py:35:0: C0413: Import "from bottles.backend.logger import Logger" should be placed at the top of the module (wrong-import-position)
bottles/frontend/main.py:36:0: C0413: Import "from bottles.frontend.windows.main_window import MainWindow" should be placed at the top of the module (wrong-import-position)
bottles/frontend/main.py:37:0: C0413: Import "from bottles.frontend.views.preferences import PreferencesWindow" should be placed at the top of the module (wrong-import-position)
bottles/frontend/main.py:38:0: C0413: Import "from bottles.backend.health import HealthChecker" should be placed at the top of the module (wrong-import-position)
bottles/frontend/main.py:49:0: C0103: Constant name "base_dir" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/frontend/main.py:170:12: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/main.py:176:12: W0105: String statement has no effect (pointless-string-statement)
bottles/frontend/main.py:214:12: C0415: Import outside toplevel (subprocess) (import-outside-toplevel)
bottles/frontend/main.py:216:12: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/frontend/main.py:220:12: C0415: Import outside toplevel (bottles.frontend.windows.bottlepicker.BottlePickerDialog) (import-outside-toplevel)
bottles/frontend/main.py:266:8: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/main.py:257:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/main.py:269:15: W0613: Unused argument 'action' (unused-argument)
bottles/frontend/main.py:269:28: W0613: Unused argument 'param' (unused-argument)
bottles/frontend/main.py:279:24: W0613: Unused argument 'action' (unused-argument)
bottles/frontend/main.py:279:37: W0613: Unused argument 'param' (unused-argument)
bottles/frontend/main.py:289:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/main.py:293:4: W1113: Keyword argument before variable positional arguments list in the definition of __show_importer_view function (keyword-arg-before-vararg)
bottles/frontend/main.py:293:35: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/main.py:293:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/main.py:279:4: W0238: Unused private member `Bottles.__refresh(self, action=None, param=None)` (unused-private-member)
bottles/frontend/main.py:253:8: W0201: Attribute 'win' defined outside __init__ (attribute-defined-outside-init)
bottles/frontend/main.py:384:9: W0613: Unused argument 'version' (unused-argument)
bottles/frontend/main.py:20:0: C0411: standard import "os" should be placed before third party import "gi" (wrong-import-order)
bottles/frontend/main.py:21:0: C0411: standard import "gettext" should be placed before third party import "gi" (wrong-import-order)
bottles/frontend/main.py:22:0: C0411: standard import "locale" should be placed before third party import "gi" (wrong-import-order)
bottles/frontend/main.py:23:0: C0411: standard import "webbrowser" should be placed before third party import "gi" (wrong-import-order)
bottles/frontend/main.py:24:0: C0411: standard import "os.path" should be placed before third party import "gi" (wrong-import-order)
bottles/frontend/main.py:20:0: W0611: Unused import os (unused-import)
bottles/frontend/main.py:34:0: W0614: Unused import(s) APP_NAME_LOWER, BASE_ID, PROFILE, ANIM_DURATION, EXECUTABLE_EXTS and DOC_URL from wildcard import of bottles.frontend.params (unused-wildcard-import)
************* Module bottles.frontend.bottles
bottles/frontend/bottles.py:26:0: C0103: Constant name "pkgdatadir" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/frontend/bottles.py:27:0: C0103: Constant name "localedir" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/frontend/bottles.py:29:0: C0103: Constant name "data_gresource_path" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/frontend/bottles.py:30:0: C0103: Constant name "bottles_gresource_path" doesn't conform to UPPER_CASE naming style (invalid-name)
bottles/frontend/bottles.py:46:4: W0212: Access to a protected member _register of a client class (protected-access)
bottles/frontend/bottles.py:47:4: W0212: Access to a protected member _register of a client class (protected-access)
************* Module bottles.frontend.views.list
bottles/frontend/views/list.py:21:0: E0611: No name 'Adw' in module 'gi.repository' (no-name-in-module)
bottles/frontend/views/list.py:71:8: W0105: String statement has no effect (pointless-string-statement)
bottles/frontend/views/list.py:95:8: W0105: String statement has no effect (pointless-string-statement)
bottles/frontend/views/list.py:104:4: W0105: String statement has no effect (pointless-string-statement)
bottles/frontend/views/list.py:106:21: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/views/list.py:110:4: W0105: String statement has no effect (pointless-string-statement)
bottles/frontend/views/list.py:140:27: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/views/list.py:190:39: W0613: Unused argument 'event' (unused-argument)
bottles/frontend/views/list.py:190:51: W0613: Unused argument 'data' (unused-argument)
bottles/frontend/views/list.py:223:12: W0612: Unused variable 'name' (unused-variable)
************* Module bottles.frontend.views.loading
bottles/frontend/views/loading.py:20:0: E0611: No name 'Adw' in module 'gi.repository' (no-name-in-module)
************* Module bottles.frontend.windows.main_window
bottles/frontend/windows/main_window.py:24:0: E0611: No name 'Adw' in module 'gi.repository' (no-name-in-module)
bottles/frontend/windows/main_window.py:24:0: E0611: No name 'Xdp' in module 'gi.repository' (no-name-in-module)
bottles/frontend/windows/main_window.py:37:0: W0401: Wildcard import bottles.frontend.params (wildcard-import)
bottles/frontend/windows/main_window.py:103:20: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/windows/main_window.py:101:25: W0613: Unused argument 'dialog' (unused-argument)
bottles/frontend/windows/main_window.py:101:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/windows/main_window.py:156:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/windows/main_window.py:183:35: W0613: Unused argument 'status' (unused-argument)
bottles/frontend/windows/main_window.py:200:41: W0613: Unused argument 'error' (unused-argument)
bottles/frontend/windows/main_window.py:306:32: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:310:32: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:314:32: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:321:28: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:325:29: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:328:33: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:331:30: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:331:44: W0613: Unused argument 'view' (unused-argument)
bottles/frontend/windows/main_window.py:346:17: W1514: Using open without explicitly specifying an encoding (unspecified-encoding)
bottles/frontend/windows/main_window.py:370:4: R0913: Too many arguments (6/5) (too-many-arguments)
bottles/frontend/windows/main_window.py:370:4: R0917: Too many positional arguments (6/5) (too-many-positional-arguments)
bottles/frontend/windows/main_window.py:385:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/windows/main_window.py:401:0: W0613: Unused argument 'args' (unused-argument)
bottles/frontend/windows/main_window.py:408:8: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/windows/main_window.py:411:17: W0613: Unused argument 'widget' (unused-argument)
bottles/frontend/windows/main_window.py:210:12: W0201: Attribute 'page_details' defined outside __init__ (attribute-defined-outside-init)
bottles/frontend/windows/main_window.py:211:12: W0201: Attribute 'page_list' defined outside __init__ (attribute-defined-outside-init)
bottles/frontend/windows/main_window.py:212:12: W0201: Attribute 'page_importer' defined outside __init__ (attribute-defined-outside-init)
bottles/frontend/windows/main_window.py:213:12: W0201: Attribute 'page_library' defined outside __init__ (attribute-defined-outside-init)
bottles/frontend/windows/main_window.py:54:0: R0904: Too many public methods (25/20) (too-many-public-methods)
bottles/frontend/windows/main_window.py:37:0: W0614: Unused import(s) APP_NAME, APP_NAME_LOWER, APP_VERSION, APP_ICON, ANIM_DURATION, EXECUTABLE_EXTS and DOC_URL from wildcard import of bottles.frontend.params (unused-wildcard-import)
************* Module bottles.frontend.windows.bottlepicker
bottles/frontend/windows/bottlepicker.py:20:0: E0611: No name 'Adw' in module 'gi.repository' (no-name-in-module)
bottles/frontend/windows/bottlepicker.py:27:0: R0903: Too few public methods (0/2) (too-few-public-methods)
bottles/frontend/windows/bottlepicker.py:67:8: R1722: Consider using 'sys.exit' instead (consider-using-sys-exit)
bottles/frontend/windows/bottlepicker.py:73:12: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/frontend/windows/bottlepicker.py:86:8: R1732: Consider using 'with' for resource-allocating operations (consider-using-with)
bottles/frontend/windows/bottlepicker.py:35:0: R0903: Too few public methods (0/2) (too-few-public-methods)

@underlinejakez
Copy link
Contributor

There are missing icons
image

@TheEvilSkeleton
Copy link
Member Author

I'm not sure how to fix that

This addresses the following warning:
```
WARNING: You should add the boolean check kwarg to the run_command call.
         It currently defaults to false,
         but it will default to true in future releases of meson.
         See also: mesonbuild/meson#9300
```
The previous method was installing the `/.flatpak-info` file,
which was unnecessary. It's best to just check if the file exists
and exit if it doesn't.
Introduce `profile` option, which allows us to remove the
`.conf` files.
@TheEvilSkeleton TheEvilSkeleton force-pushed the improve-buildsystem branch 3 times, most recently from 494b29c to b362e87 Compare December 9, 2024 04:14
From this time onward, development flatpaks of Bottles will
be suffixed with `.Devel`. This allows us to test Bottles completely
separately from stable releases, making it easier to test without
affecting existing configurations.

Related: bottlesdevs#2921
GResource entries are split into two files:
- `bottles.gresource.xml` remains the GResource file for UI
  files and CSS, with everything else removed.
- `data.gresource.xml` is being introduced for anything related
  to data, such as icons, and in the future
  `Adw.AboutDialog.new_from_appdata ()`.

Most unneeded icons, for instance `data/icons/*/48`, have been
removed. They served no purpose whatsoever, so there's no
point in keeping them.

Every XML-like file runs through a preprocessor to make them
take less space.
Copy link
Member

@mirkobrombin mirkobrombin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, also the library icon

@mirkobrombin mirkobrombin merged commit 3e8c166 into bottlesdevs:main Dec 10, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants