Implement get_executable_path() for macOS by rom1v · Pull Request #5560 · Genymobile/scrcpy (original) (raw)

@Genxster1998 @rom1v

PR #5560 <#5560>

Signed-off-by: Romain Vimont rom@rom1v.com

@rom1v

Contrary to getenv(), sc_get_env() returns an allocated string that is guaranteed to be encoded in UTF-8 on all platforms (it uses _wgetenv() internally on Windows and converts the strings).

PR #5560 <#5560>

@rom1v

Contrary to getenv(), the result of sc_get_env() is encoded in UTF-8 on all platforms. Since it is allocated, it requires an explicit init() and destroy() functions.

PR #5560 <#5560>

@rom1v

For non-Windows portable builds, use the absolute path to the adb executable located in the same directory as scrcpy.

On Windows, just use "adb", which is sufficient to use the local one.

PR #5560 <#5560>

@rom1v

Log the ADB executable path (at the DEBUG level) if it is not the default one.

PR #5560 <#5560>

@rom1v

All portable builds now use the files located in the same directory as the scrcpy executable by default.

PR #5560 <#5560>

@rom1v rom1v mentioned this pull request

Dec 12, 2024

bartsaintgermain pushed a commit to bartsaintgermain/scrcpy that referenced this pull request

Apr 11, 2025

@Genxster1998

bartsaintgermain pushed a commit to bartsaintgermain/scrcpy that referenced this pull request

Apr 11, 2025

@rom1v

Contrary to getenv(), sc_get_env() returns an allocated string that is guaranteed to be encoded in UTF-8 on all platforms (it uses _wgetenv() internally on Windows and converts the strings).

PR Genymobile#5560 <Genymobile#5560>

bartsaintgermain pushed a commit to bartsaintgermain/scrcpy that referenced this pull request

Apr 11, 2025

@rom1v

Contrary to getenv(), the result of sc_get_env() is encoded in UTF-8 on all platforms. Since it is allocated, it requires an explicit init() and destroy() functions.

PR Genymobile#5560 <Genymobile#5560>

bartsaintgermain pushed a commit to bartsaintgermain/scrcpy that referenced this pull request

Apr 11, 2025

@rom1v

For non-Windows portable builds, use the absolute path to the adb executable located in the same directory as scrcpy.

On Windows, just use "adb", which is sufficient to use the local one.

PR Genymobile#5560 <Genymobile#5560>

bartsaintgermain pushed a commit to bartsaintgermain/scrcpy that referenced this pull request

Apr 11, 2025

@rom1v

bartsaintgermain pushed a commit to bartsaintgermain/scrcpy that referenced this pull request

Apr 11, 2025

@rom1v

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters

[ Show hidden characters]({{ revealButtonHref }})