-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
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
DEPRECATION: build_always is deprecated #202
Comments
Hi, wanted to know if this is being worked on or just added to todo and left there? |
I am currently no working on it. If you want to, please do :) It just must not require a newer version of meson (so it must still work with meson 0.37). |
@rom1v could you make it conditional, depending on the version of Meson? |
@eku yes that's probably the solution |
I tried to check the version: diff --git a/server/meson.build b/server/meson.build
index 202ec3a..3bf55e9 100644
--- a/server/meson.build
+++ b/server/meson.build
@@ -2,13 +2,28 @@
# to build. If the 'prebuilt_server' option is set, just copy the file as is.
prebuilt_server = get_option('prebuilt_server')
if prebuilt_server == ''
- custom_target('scrcpy-server',
- build_always: true, # gradle is responsible for tracking source changes
- input: '.',
- output: 'scrcpy-server.jar',
- command: [find_program('./scripts/build-wrapper.sh'), '@INPUT@', '@OUTPUT@', get_option('buildtype')],
- install: true,
- install_dir: 'share/scrcpy')
+ buildtype = get_option('buildtype')
+ command = [find_program('./scripts/build-wrapper.sh'), '@INPUT@', '@OUTPUT@', buildtype]
+
+ if meson.version().version_compare('>=0.40.0')
+ custom_target('scrcpy-server',
+ build_by_default: true, # gradle is responsible for tracking source changes
+ build_always_stale: true,
+ input: '.',
+ output: 'scrcpy-server.jar',
+ command: command,
+ install: true,
+ install_dir: 'share/scrcpy')
+ else
+ custom_target('scrcpy-server',
+ build_always: true, # gradle is responsible for tracking source changes
+ input: '.',
+ output: 'scrcpy-server.jar',
+ command: command,
+ install: true,
+ install_dir: 'share/scrcpy')
+ endif
+
else
custom_target('scrcpy-server-prebuilt',
input: prebuilt_server, While the documentation says that It seems it's not possible to check per-property, so we would have to copy many blocks for several properties appears at different meson versions. But anyway, even if I add those fields after checking the version, the warnings don't disappear:
So what should I do? |
Meson issue: mesonbuild/meson#3824. |
Appear that it still a thing.. sadly im not able to build due the same problem..
.. i dont know a thing at all about linux.. |
No, it's just a warning. After that, execute |
Hiho, as you can see here..
i did wipe de data do try again using ninja -Cx |
You need to fix this (a priori not related to scrcpy).
As an alternative, you can use the prebuilt server so you don't need to build the Android part. |
It's equivalent to:
|
I am not sure if that requirement is still valid, as building from current WARNING: Project targetting '>= 0.37' but tried to use feature introduced in '0.48.0': console arg
in custom_target
DEPRECATION: build_always is deprecated. Combine build_by_default and build_always_stale
instead.
WARNING: Project specifies a minimum meson_version '>= 0.37' but uses features which were
added in newer versions:
* 0.48.0: {'console arg in custom_target'} |
It just enables an option if v48, but it still works for earlier versions. See 20b3f10. |
Fixed since v1.13 by eb8f7a1. |
Environment: Fedora 28
Meson: 0.47.1
The text was updated successfully, but these errors were encountered: