mirror of
https://github.com/sle118/squeezelite-esp32.git
synced 2025-12-08 04:27:12 +03:00
Merge branch 'master-v4.3' of https://github.com/sle118/squeezelite-esp32 into master-v4.3
This commit is contained in:
2
.github/workflows/esp-idf-v4.3-build.yml
vendored
2
.github/workflows/esp-idf-v4.3-build.yml
vendored
@@ -52,6 +52,8 @@ jobs:
|
|||||||
git update-index --chmod=+x ./components/spotify/cspot/bell/nanopb/generator/protoc-gen-nanopb
|
git update-index --chmod=+x ./components/spotify/cspot/bell/nanopb/generator/protoc-gen-nanopb
|
||||||
git update-index --chmod=+x ./components/spotify/cspot/bell/nanopb/generator/*.py
|
git update-index --chmod=+x ./components/spotify/cspot/bell/nanopb/generator/*.py
|
||||||
git update-index --chmod=+x ./components/spotify/cspot/bell/nanopb/generator/*.py2
|
git update-index --chmod=+x ./components/spotify/cspot/bell/nanopb/generator/*.py2
|
||||||
|
git update-index --chmod=+x ./components/spotify/cspot/bell/nanopb/generator/proto/*.py
|
||||||
|
|
||||||
|
|
||||||
cd server_certs;./getcert.sh;cat github.pem;cd ..
|
cd server_certs;./getcert.sh;cat github.pem;cd ..
|
||||||
shopt -s nocasematch
|
shopt -s nocasematch
|
||||||
|
|||||||
@@ -30,7 +30,9 @@ if os.path.isfile(protosrc):
|
|||||||
|
|
||||||
cmd.append("-I={}".format(_builtin_proto_include))
|
cmd.append("-I={}".format(_builtin_proto_include))
|
||||||
try:
|
try:
|
||||||
|
sys.stdout.write("Invoking:" + ' '.join(cmd) + "\n")
|
||||||
invoke_protoc(argv=cmd)
|
invoke_protoc(argv=cmd)
|
||||||
except:
|
except:
|
||||||
|
sys.stdout.write("Failed to build nanopb_pb2.py: " + ' '.join(cmd) + "\n")
|
||||||
sys.stderr.write("Failed to build nanopb_pb2.py: " + ' '.join(cmd) + "\n")
|
sys.stderr.write("Failed to build nanopb_pb2.py: " + ' '.join(cmd) + "\n")
|
||||||
raise
|
raise
|
||||||
|
|||||||
@@ -7,22 +7,25 @@ from nanopb_generator import invoke_protoc
|
|||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
# Add argument so that protoc-gen-nanopb gets found
|
# Add argument so that protoc-gen-nanopb gets found
|
||||||
|
print("Getting path to protoc-gen-nanopb")
|
||||||
if getattr(sys, 'frozen', False):
|
if getattr(sys, 'frozen', False):
|
||||||
mypath = os.path.dirname(sys.executable) # For pyInstaller
|
mypath = os.path.dirname(sys.executable) # For pyInstaller
|
||||||
else:
|
else:
|
||||||
mypath = os.path.dirname(__file__)
|
mypath = os.path.dirname(__file__)
|
||||||
|
print("Looking for executable file name")
|
||||||
if os.path.isfile(os.path.join(mypath, "protoc-gen-nanopb.exe")):
|
if os.path.isfile(os.path.join(mypath, "protoc-gen-nanopb.exe")):
|
||||||
protoc_gen_nanopb = os.path.join(mypath, "protoc-gen-nanopb.exe")
|
protoc_gen_nanopb = os.path.join(mypath, "protoc-gen-nanopb.exe")
|
||||||
elif os.name == 'nt':
|
elif os.name == 'nt':
|
||||||
protoc_gen_nanopb = os.path.join(mypath, "protoc-gen-nanopb.bat")
|
protoc_gen_nanopb = os.path.join(mypath, "protoc-gen-nanopb.bat")
|
||||||
else:
|
else:
|
||||||
protoc_gen_nanopb = os.path.join(mypath, "protoc-gen-nanopb")
|
protoc_gen_nanopb = os.path.join(mypath, "protoc-gen-nanopb")
|
||||||
|
print("Found executable file name: " + protoc_gen_nanopb)
|
||||||
args = sys.argv[1:]
|
args = sys.argv[1:]
|
||||||
|
|
||||||
if os.path.isfile(protoc_gen_nanopb):
|
if os.path.isfile(protoc_gen_nanopb):
|
||||||
args = ['--plugin=protoc-gen-nanopb=%s' % protoc_gen_nanopb] + args
|
args = ['--plugin=protoc-gen-nanopb=%s' % protoc_gen_nanopb] + args
|
||||||
|
|
||||||
|
# print the command line that we are about to execute
|
||||||
|
print("invoking protoc with parameters: ".join(args))
|
||||||
status = invoke_protoc(['protoc'] + args)
|
status = invoke_protoc(['protoc'] + args)
|
||||||
sys.exit(status)
|
sys.exit(status)
|
||||||
|
|||||||
@@ -10,4 +10,5 @@
|
|||||||
# --plugin= on the command line.
|
# --plugin= on the command line.
|
||||||
|
|
||||||
MYPATH=$(dirname "$0")
|
MYPATH=$(dirname "$0")
|
||||||
|
echo "Executing $MYPATH/nanopb_generator.py "
|
||||||
exec "$MYPATH/nanopb_generator.py" --protoc-plugin
|
exec "$MYPATH/nanopb_generator.py" --protoc-plugin
|
||||||
|
|||||||
Reference in New Issue
Block a user