Implement get_executable_path() for macOS by rom1v · Pull Request #5560 · Genymobile/scrcpy (original) (raw)
Signed-off-by: Romain Vimont rom@rom1v.com
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).
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.
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.
Log the ADB executable path (at the DEBUG level) if it is not the default one.
All portable builds now use the files located in the same directory as the scrcpy executable by default.
rom1v mentioned this pull request
bartsaintgermain pushed a commit to bartsaintgermain/scrcpy that referenced this pull request
bartsaintgermain pushed a commit to bartsaintgermain/scrcpy that referenced this pull request
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
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
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
bartsaintgermain pushed a commit to bartsaintgermain/scrcpy that referenced this pull request
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 }})