1
0
Fork 0
mirror of https://github.com/opentx/opentx.git synced 2025-07-12 19:10:19 +03:00

Lua export fixes ported from master

Cmake Horus font dependencies fixed
Jenkins build scripts added and fixed
This commit is contained in:
Damjan Adamic 2015-12-06 11:26:07 +01:00
parent 75c1f9f3f7
commit 9d29b483c5
33 changed files with 700 additions and 28 deletions

View file

@ -36,7 +36,7 @@ macro(add_truetype_font_target radio name font size)
COMMAND ../util/font2png.py ${font} ${size} False ${target}
WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY}
)
add_custom_target(ttf_${radio}_${name})
add_custom_target(ttf_${radio}_${name} DEPENDS ${target}.png ${target}.specs)
endmacro(add_truetype_font_target)
add_truetype_font_target(Horus tinsize "DejaVu Sans" 9)
@ -75,18 +75,18 @@ GIT_ID(GIT_STR)
configure_file(${RADIO_SRC_DIRECTORY}/stamp.h.in ${RADIO_SRC_DIRECTORY}/stamp.h @ONLY)
macro(add_lua_export_target target)
string(TOUPPER ${target} pcbdefine)
add_custom_command(
OUTPUT ${RADIO_SRC_DIRECTORY}/lua/lua_exports_${target}.inc
COMMAND ${CMAKE_C_COMPILER} -E -DPCB${pcbdefine} -DCPUARM -DCPUSTM32 -DLUA -DEXPORT ${INTTYPES_INCLUDE_OPTION} myeeprom.h | grep LEXP > lua/lua_exports_${target}.txt
COMMAND ${CMAKE_C_COMPILER} -E ${ARGN} -DEXPORT ${INTTYPES_INCLUDE_OPTION} myeeprom.h | grep LEXP > lua/lua_exports_${target}.txt
COMMAND python ../util/luaexport.py ${VERSION} lua/lua_exports_${target}.txt lua/lua_exports_${target}.inc lua/lua_fields_${target}.txt
WORKING_DIRECTORY ${RADIO_SRC_DIRECTORY}
)
add_custom_target(lua_export_${target} DEPENDS ${RADIO_SRC_DIRECTORY}/lua/lua_exports_${target}.inc)
endmacro(add_lua_export_target)
add_lua_export_target(taranis)
add_lua_export_target(horus)
add_lua_export_target(taranis -DPCBTARANIS -DLUA)
add_lua_export_target(taranis_x9e -DPCBTARANIS -DREVPLUS -DREV9E -DLUA)
add_lua_export_target(horus -DPCBHORUS -DLUA)
set(OPENTX_SRC_FILES
opentxsimulator.cpp
@ -159,10 +159,10 @@ add_dependencies(opentx-mega2560${SUFFIX}-simulator ${dependencies_9x})
add_dependencies(opentx-sky9x${SUFFIX}-simulator ${dependencies_9x})
add_dependencies(opentx-9xrpro${SUFFIX}-simulator ${dependencies_9x})
add_dependencies(opentx-ar9x${SUFFIX}-simulator ${dependencies_9x})
set(dependencies_taranis lbm_taranis_bitmaps lua_export_taranis firmware_translations stamp)
add_dependencies(opentx-taranis${SUFFIX}-simulator ${dependencies_taranis})
add_dependencies(opentx-taranisplus${SUFFIX}-simulator ${dependencies_taranis})
add_dependencies(opentx-taranisx9e${SUFFIX}-simulator ${dependencies_taranis})
set(dependencies_taranis lbm_taranis_bitmaps firmware_translations stamp)
add_dependencies(opentx-taranis${SUFFIX}-simulator ${dependencies_taranis} lua_export_taranis)
add_dependencies(opentx-taranisplus${SUFFIX}-simulator ${dependencies_taranis} lua_export_taranis)
add_dependencies(opentx-taranisx9e${SUFFIX}-simulator ${dependencies_taranis} lua_export_taranis_x9e)
add_dependencies(opentx-horus${SUFFIX}-simulator lbm_horus_bitmaps lbm_horus_fonts firmware_translations lua_export_horus)

1
jenkins/.gitignore vendored Normal file
View file

@ -0,0 +1 @@
/settings.sh

19
jenkins/get-from-server.sh Executable file
View file

@ -0,0 +1,19 @@
#!/bin/bash
set -e
set -x
# in this file define ssh options (like private key)
source ./settings.sh
function download() {
# $1 is release directory name
mkdir -p ${1}
scp ${SCP_OPT} ${USERNAME}@jenkins.open-tx.org:/home/opentx/${1}/*.sh ${1}/
#chmod 774 ${1}/*.sh
}
download release-20
download nightly-21
download release-21
download nightly-22

View file

@ -0,0 +1,17 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd $DIR
source ./version.sh
# release all components
./release-companion.sh
#./release-voices.sh
#./release-lua.sh
./release-firmware.sh

View file

@ -0,0 +1,39 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd $DIR
source ./version.sh
# pull the latest changes
./update-repo.sh
DESTDIR=/var/www/html/downloads-${version}/nightly/companion
# clean radio source
cd opentx/radio/src
make clean
# create companion rpm
rm -rf $DIR/companion-build/
mkdir -p $DIR/companion-build/
cd $DIR/companion-build/
cmake ../opentx/companion/src
make package
cp ./companion${version}-${release}${OPENTX_VERSION_SUFFIX}-i686.rpm ${DESTDIR}
make stamp
chmod -Rf g+w . || true
# request companion compilation on Windows
cd ${DESTDIR}
wget -qO- http://winbox.open-tx.org/companion-builds/compile.php?branch=${branch}\&suffix=${OPENTX_VERSION_SUFFIX}
wget -O companion-windows-${release}${OPENTX_VERSION_SUFFIX}.exe http://winbox.open-tx.org/companion-builds/companion-windows-${release}${OPENTX_VERSION_SUFFIX}.exe
mv $DIR/opentx/companion/companion.stamp ./companion-windows.stamp
chmod -Rf g+w . || true

View file

@ -0,0 +1,42 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd $DIR
source ./version.sh
# pull the latest changes
./update-repo.sh
# make the stamp
cd opentx/radio/src
make clean
make opentx-stamp
# create the sources tgz in the release directory
cd ../../..
tar czf ./opentx.tgz opentx/radio/src opentx/radio/util
# make lua fields for all radio variants
cd opentx/radio/src
make lua_exports_taranis.inc lua_exports_taranis_x9e.inc
# copy the stamp and the release-notes to the http server
cd $DIR
cp opentx/radio/src/stamp-opentx.txt /var/www/html/downloads-$version/nightly/firmware/
cp opentx/radio/releasenotes.txt /var/www/html/downloads-$version/nightly/firmware/
cp opentx/radio/src/lua_fields_*.txt /var/www/html/downloads-$version/nightly/firmware/
echo ${OPENTX_VERSION_SUFFIX} > /var/www/html/downloads-$version/nightly/firmware/suffix.txt
# erase all previous builds
rm -f /var/www/html/downloads-$version/nightly/firmware/binaries/opentx*.hex
rm -f /var/www/html/downloads-$version/nightly/firmware/binaries/opentx*.bin
# clean the sources
cd opentx/radio/src
make clean

View file

@ -0,0 +1,17 @@
#!/bin/bash
# stops on first error
set -e
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd $DIR
source ./version.sh
# pull the latest changes
./update-repo.sh
# make the stamp
cd opentx/radio/wizard/
zip -r /var/www/html/lua-$version/wizard.zip *.lua *.bmp

View file

@ -0,0 +1,20 @@
#!/bin/bash
# stops on first error
set -e
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
source $DIR/version.sh
# get voice packs
wget -O /dev/null $winboxurl/compile.php?branch=$branch
cd /var/www/html/voices-$version/opentx-taranis/en/
wget -O english-irish-taranis.zip $winboxurl/english-irish-taranis.zip
wget -O english-scottish-taranis.zip $winboxurl/english-scottish-taranis.zip
wget -O english-american-taranis.zip $winboxurl/english-american-taranis.zip
wget -O english-australian-taranis.zip $winboxurl/english-australian-taranis.zip
wget -O english-taranis.csv $winboxurl/english-irish-taranis.csv
cd /var/www/html/voices-$version/opentx-taranis/fr/
wget -O french-taranis.zip $winboxurl/french-taranis.zip
wget -O french-taranis.csv $winboxurl/french-taranis.csv

View file

@ -0,0 +1,18 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd $DIR
source ./version.sh
# pull the latest changes
cd opentx
git fetch
git checkout $branch
git reset --hard origin/$branch
chmod -Rf g+w . || true

12
jenkins/nightly-21/version.sh Executable file
View file

@ -0,0 +1,12 @@
#!/bin/bash
# make stamp header and extract OpenTX version (ie 2.1.2)
make -C opentx/radio/src stamp_header
rel=`grep "VERS_STR" opentx/radio/src/stamp-opentx.h | cut -d' ' -f3 | tr -d '"'`
release=${rel%$OPENTX_VERSION_SUFFIX}
echo ${release}
version=21
branch=master
winboxurl=http://winbox.open-tx.org/voice-builds

View file

@ -0,0 +1,17 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd $DIR
source ./version.sh
# release all components
./release-companion.sh
#./release-voices.sh
#./release-lua.sh
./release-firmware.sh

View file

@ -0,0 +1,39 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd $DIR
source ./version.sh
# pull the latest changes
./update-repo.sh
DESTDIR=/var/www/html/downloads-${version}/nightly/companion
# clean radio source
cd opentx/radio/src
make clean
# create companion rpm
rm -rf $DIR/companion-build/
mkdir -p $DIR/companion-build/
cd $DIR/companion-build/
cmake ../opentx/companion/src
make package
cp ./companion${version}-${release}${OPENTX_VERSION_SUFFIX}-i686.rpm ${DESTDIR}
make stamp
chmod -Rf g+w . || true
# request companion compilation on Windows
cd ${DESTDIR}
wget -qO- http://winbox.open-tx.org/companion-builds/compile.php?branch=${branch}\&suffix=${OPENTX_VERSION_SUFFIX}
wget -O companion-windows-${release}${OPENTX_VERSION_SUFFIX}.exe http://winbox.open-tx.org/companion-builds/companion-windows-${release}${OPENTX_VERSION_SUFFIX}.exe
mv $DIR/opentx/companion/companion.stamp ./companion-windows.stamp
chmod -Rf g+w . || true

View file

@ -0,0 +1,42 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd $DIR
source ./version.sh
# pull the latest changes
./update-repo.sh
# make the stamp
cd opentx/radio/src
make clean
make stamp.h
# create the sources tgz in the release directory
cd ../../..
tar czf ./opentx.tgz opentx/radio/src opentx/radio/util
# make lua fields for all radio variants
cd opentx/radio/src
make lua/lua_exports_taranis.inc lua/lua_exports_taranis_x9e.inc lua/lua_exports_horus.inc lua/lua_exports_flamenco.inc
# copy the stamp and the release-notes to the http server
cd $DIR
cp opentx/radio/src/stamp.h /var/www/html/downloads-$version/nightly/firmware/stamp-opentx.txt
cp opentx/radio/releasenotes.txt /var/www/html/downloads-$version/nightly/firmware/
cp opentx/radio/src/lua/lua_fields_*.txt /var/www/html/downloads-$version/nightly/firmware/
echo ${OPENTX_VERSION_SUFFIX} > /var/www/html/downloads-$version/nightly/firmware/suffix.txt
# erase all previous builds
rm -f /var/www/html/downloads-$version/nightly/firmware/binaries/opentx*.hex
rm -f /var/www/html/downloads-$version/nightly/firmware/binaries/opentx*.bin
# clean the sources
cd opentx/radio/src
make clean

View file

@ -0,0 +1,17 @@
#!/bin/bash
# stops on first error
set -e
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd $DIR
source ./version.sh
# pull the latest changes
./update-repo.sh
# make the stamp
cd opentx/radio/wizard/
zip -r /var/www/html/lua-$version/wizard.zip *.lua *.bmp

View file

@ -0,0 +1,20 @@
#!/bin/bash
# stops on first error
set -e
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
source $DIR/version.sh
# get voice packs
wget -O /dev/null $winboxurl/compile.php?branch=$branch
cd /var/www/html/voices-$version/opentx-taranis/en/
wget -O english-irish-taranis.zip $winboxurl/english-irish-taranis.zip
wget -O english-scottish-taranis.zip $winboxurl/english-scottish-taranis.zip
wget -O english-american-taranis.zip $winboxurl/english-american-taranis.zip
wget -O english-australian-taranis.zip $winboxurl/english-australian-taranis.zip
wget -O english-taranis.csv $winboxurl/english-irish-taranis.csv
cd /var/www/html/voices-$version/opentx-taranis/fr/
wget -O french-taranis.zip $winboxurl/french-taranis.zip
wget -O french-taranis.csv $winboxurl/french-taranis.csv

View file

@ -0,0 +1,18 @@
#!/bin/bash
# stops on first error
set -e
set -x
# make sure we are in the good directory
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
cd $DIR
source ./version.sh
# pull the latest changes
cd opentx
git fetch
git checkout $branch
git reset --hard origin/$branch
chmod -Rf g+w . || true

12
jenkins/nightly-22/version.sh Executable file
View file

@ -0,0 +1,12 @@
#!/bin/bash
# make stamp header and extract OpenTX version (ie 2.1.2)
make -C opentx/radio/src stamp.h
rel=`grep "VERSION" opentx/radio/src/stamp.h | cut -d' ' -f3 | tr -d '"'`
release=${rel%$OPENTX_VERSION_SUFFIX}
echo ${release}
version=22
branch=next
winboxurl=http://winbox.open-tx.org/voice-builds

View file

@ -0,0 +1,14 @@
#!/bin/bash
# stops on first error
set -e
# make sure we are in the good directory
cd ~opentx/release/
# release all components
./release-companion.sh
#./release-voices.sh
#./release-lua.sh
./release-firmware.sh

View file

@ -0,0 +1,31 @@
#!/bin/bash
# stops on first error
set -e
# make sure we are in the good directory
cd ~opentx/release/
# pull the latest changes
./update-repo.sh
# retrieve the version number
cd opentx/radio/src
line=`grep "VERSION = " Makefile`
version=`expr "$line" : 'VERSION = \([0-9]\..*\)'`
# create companion rpm
cd ~opentx/release/companion-build/
make package
cp ./companion-$version-i686.rpm /var/www/html/downloads-20/companion/
make stamp
chmod -Rf g+w . || true
# request companion compilation on Windows
cd /var/www/html/downloads-20/companion/
wget -qO- http://winbox.open-tx.org/companion-builds/compile.php?branch=2.0
wget -O companionInstall_$version.exe http://winbox.open-tx.org/companion-builds/companionInstall_$version.exe
mv ~opentx/release/opentx/companion/companion.stamp ./companion-windows.stamp
chmod -Rf g+w . || true

View file

@ -0,0 +1,35 @@
#!/bin/bash
# stops on first error
set -e
# make sure we are in the good directory
cd ~opentx/release/
# pull the latest changes
./update-repo.sh
# make the stamp
cd opentx/radio/src
make clean
make opentx-stamp
make lua_exports.cpp
# create the sources tgz in the release directory
cd ../../..
tar czf ./opentx.tgz opentx/radio/src opentx/radio/util
# copy the stamp and the release-notes to the http server
cd ~opentx/release/
cp opentx/radio/src/stamp-opentx.txt /var/www/html/downloads-20/firmware/
cp opentx/radio/releasenotes.txt /var/www/html/downloads-20/firmware/
cp opentx/radio/src/lua_fields.txt /var/www/html/downloads-20/firmware/
# erase all previous builds
rm -f /var/www/html/downloads-20/firmware/binaries/opentx*.hex
rm -f /var/www/html/downloads-20/firmware/binaries/opentx*.bin
# clean the sources
cd opentx/radio/src
make clean

View file

@ -0,0 +1,15 @@
#!/bin/bash
# stops on first error
set -e
# make sure we are in the good directory
cd ~opentx/release/
# pull the latest changes
./update-repo.sh
# make the stamp
cd opentx/radio/wizard/
zip -r /var/www/html/lua-20/wizard.zip *.lua *.bmp

View file

@ -0,0 +1,17 @@
#!/bin/bash
# stops on first error
set -e
# get voice packs
wget -O /dev/null http://winbox.open-tx.org/voice-packs/compile.php
cd /var/www/html/voices-20/opentx-taranis/en/
wget -O english-irish-taranis.zip http://winbox.open-tx.org/voice-packs/english-irish-taranis.zip
wget -O english-scottish-taranis.zip http://winbox.open-tx.org/voice-packs/english-scottish-taranis.zip
wget -O english-american-taranis.zip http://winbox.open-tx.org/voice-packs/english-american-taranis.zip
wget -O english-australian-taranis.zip http://winbox.open-tx.org/voice-packs/english-australian-taranis.zip
# wget -O english-taranis.csv http://winbox.open-tx.org/voice-packs/english-irish-taranis.csv
cd /var/www/html/voices-20/opentx-taranis/fr/
wget -O french-taranis.zip http://winbox.open-tx.org/voice-packs/french-taranis.zip
# wget -O french-taranis.csv http://winbox.open-tx.org/voice-packs/french-taranis.csv

View file

@ -0,0 +1,15 @@
#!/bin/bash
# stops on first error
set -e
# make sure we are in the good directory
cd ~opentx/release/
# pull the latest changes
cd opentx
git fetch
git checkout 2.0
git reset --hard origin/2.0
chmod -Rf g+w . || true

View file

@ -0,0 +1,17 @@
#!/bin/bash
# stops on first error
set -e
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
source $DIR/version.sh
# make sure we are in the good directory
cd ~opentx/release-$version/
# release all components
./release-companion.sh
./release-voices.sh
./release-lua.sh
./release-firmware.sh

View file

@ -0,0 +1,36 @@
#!/bin/bash
# stops on first error
set -e
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
source $DIR/version.sh
# make sure we are in the good directory
cd ~opentx/release-$version/
# pull the latest changes
./update-repo.sh
# clean radio source
cd opentx/radio/src
make clean
# create companion rpm
rm -rf ~opentx/release-$version/companion-build/
mkdir -p ~opentx/release-$version/companion-build/
cd ~opentx/release-$version/companion-build/
cmake ../opentx/companion/src
make package
cp ./companion${version}-$release-i686.rpm /var/www/html/downloads-$version/companion/
make stamp
chmod -Rf g+w . || true
# request companion compilation on Windows
cd /var/www/html/downloads-$version/companion/
wget -qO- http://winbox.open-tx.org/companion-builds/compile.php?branch=$branch
wget -O companion-windows-$release.exe http://winbox.open-tx.org/companion-builds/companion-windows-$release.exe
mv ~opentx/release-$version/opentx/companion/companion.stamp ./companion-windows.stamp
chmod -Rf g+w . || true

View file

@ -0,0 +1,41 @@
#!/bin/bash
# stops on first error
set -e
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
source $DIR/version.sh
# make sure we are in the good directory
cd ~opentx/release-$version/
# pull the latest changes
./update-repo.sh
# make the stamp
cd opentx/radio/src
make clean
make opentx-stamp
# create the sources tgz in the release directory
cd ../../..
tar czf ./opentx.tgz opentx/radio/src opentx/radio/util
# make lua fields for all radio variants
cd opentx/radio/src
make lua_exports_taranis.inc lua_exports_taranis_x9e.inc
# copy the stamp and the release-notes to the http server
cd ~opentx/release-$version/
cp opentx/radio/src/stamp-opentx.txt /var/www/html/downloads-$version/firmware/
cp opentx/radio/releasenotes.txt /var/www/html/downloads-$version/firmware/
cp opentx/radio/src/lua_fields_*.txt /var/www/html/downloads-$version/firmware/
# erase all previous builds
rm -f /var/www/html/downloads-$version/firmware/binaries/opentx*.hex
rm -f /var/www/html/downloads-$version/firmware/binaries/opentx*.bin
# clean the sources
cd opentx/radio/src
make clean

View file

@ -0,0 +1,18 @@
#!/bin/bash
# stops on first error
set -e
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
source $DIR/version.sh
# make sure we are in the good directory
cd ~opentx/release-$version/
# pull the latest changes
./update-repo.sh
# make the stamp
cd opentx/radio/wizard/
zip -r /var/www/html/lua-$version/wizard.zip *.lua *.bmp

View file

@ -0,0 +1,20 @@
#!/bin/bash
# stops on first error
set -e
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
source $DIR/version.sh
# get voice packs
wget -O /dev/null $winboxurl/compile.php?branch=$branch
cd /var/www/html/voices-$version/opentx-taranis/en/
wget -O english-irish-taranis.zip $winboxurl/english-irish-taranis.zip
wget -O english-scottish-taranis.zip $winboxurl/english-scottish-taranis.zip
wget -O english-american-taranis.zip $winboxurl/english-american-taranis.zip
wget -O english-australian-taranis.zip $winboxurl/english-australian-taranis.zip
# wget -O english-taranis.csv $winboxurl/english-irish-taranis.csv # doesn't seem to work
cd /var/www/html/voices-$version/opentx-taranis/fr/
wget -O french-taranis.zip $winboxurl/french-taranis.zip
# wget -O french-taranis.csv $winboxurl/french-taranis.csv #outdated

View file

@ -0,0 +1,18 @@
#!/bin/bash
# stops on first error
set -e
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
source $DIR/version.sh
# make sure we are in the good directory
cd ~opentx/release-$version/
# pull the latest changes
cd opentx
git fetch
git checkout $branch
git reset --hard origin/$branch
chmod -Rf g+w . || true

12
jenkins/release-21/version.sh Executable file
View file

@ -0,0 +1,12 @@
#!/bin/bash
# make stamp header and extract OpenTX version (ie 2.1.2)
make -C opentx/radio/src stamp_header
rel=`grep "VERS_STR" opentx/radio/src/stamp-opentx.h | cut -d' ' -f3 | tr -d '"'`
release=${rel%$OPENTX_VERSION_SUFFIX}
echo ${release}
version=21
branch=master
winboxurl=http://winbox.open-tx.org/voice-builds

18
jenkins/upload-to-server.sh Executable file
View file

@ -0,0 +1,18 @@
#!/bin/bash
set -e
set -x
# in this file define ssh options (like private key)
source ./settings.sh
function upload() {
# $1 is release directory name
# copy scripts to server
scp ${SCP_OPT} ${1}/*.sh ${USERNAME}@jenkins.open-tx.org:/home/opentx/${1}/
}
upload release-20
upload nightly-21
upload release-21
upload nightly-22

View file

@ -1042,7 +1042,11 @@ ifeq ($(PCB), TARANIS)
$(LUADIR)/lobject.c $(LUADIR)/lopcodes.c $(LUADIR)/lparser.c $(LUADIR)/lstate.c $(LUADIR)/lstring.c $(LUADIR)/ltable.c $(LUADIR)/lrotable.c $(LUADIR)/ltm.c $(LUADIR)/lundump.c $(LUADIR)/lvm.c $(LUADIR)/lzio.c \
$(LUADIR)/lbaselib.c $(LUADIR)/linit.c $(LUADIR)/lmathlib.c $(LUADIR)/lbitlib.c $(LUADIR)/loadlib.c $(LUADIR)/lauxlib.c $(LUADIR)/ltablib.c $(LUADIR)/lcorolib.c $(LUADIR)/liolib.c $(LUADIR)/lstrlib.c
SRC += $(LUASRC)
ifeq ($(PCBREV), REV9E)
LUADEP = lua/lua_exports_taranis_x9e.inc
else
LUADEP = lua/lua_exports_taranis.inc
endif
ifeq ($(USE_BIN_ALLOCATOR), YES)
CPPDEFS += -DUSE_BIN_ALLOCATOR
CPPSRC += bin_allocator.cpp
@ -1290,7 +1294,7 @@ ifeq ($(PCB), HORUS)
endif
CPPDEFS += -DLUA
INCDIRS += $(LUADIR)
CPPSRC += lua/interface.cpp lua/api_general.cpp lua/api_lcd.cpp lua/api_model.cpp
CPPSRC += lua/interface.cpp lua/api_general.cpp lua/api_lcd.cpp lua/api_model.cpp
LUASRC = $(LUADIR)/lapi.c $(LUADIR)/lcode.c $(LUADIR)/lctype.c $(LUADIR)/ldebug.c $(LUADIR)/ldo.c $(LUADIR)/ldump.c $(LUADIR)/lfunc.c $(LUADIR)/lgc.c $(LUADIR)/llex.c $(LUADIR)/lmem.c \
$(LUADIR)/lobject.c $(LUADIR)/lopcodes.c $(LUADIR)/lparser.c $(LUADIR)/lstate.c $(LUADIR)/lstring.c $(LUADIR)/ltable.c $(LUADIR)/lrotable.c $(LUADIR)/ltm.c $(LUADIR)/lundump.c $(LUADIR)/lvm.c $(LUADIR)/lzio.c \
$(LUADIR)/lbaselib.c $(LUADIR)/linit.c $(LUADIR)/lmathlib.c $(LUADIR)/lbitlib.c $(LUADIR)/loadlib.c $(LUADIR)/lauxlib.c $(LUADIR)/ltablib.c $(LUADIR)/lcorolib.c $(LUADIR)/liolib.c
@ -1755,7 +1759,7 @@ ifeq ($(ARCH), AVR)
else ifeq ($(PCB), $(filter $(PCB), SKY9X 9XRPRO AR9X TARANIS))
build: stamp.h tra lbm bootloader.lbm $(LUADEP) allsrc.cpp elf remallsrc bin
else
build: stamp.h tra lbm allsrc.cpp elf remallsrc bin
build: stamp.h tra lbm $(LUADEP) allsrc.cpp elf remallsrc bin
endif
# build bootloader
@ -1944,25 +1948,32 @@ else
endif
lua/lua_exports_taranis.inc: myeeprom.h ../util/luaexport.py
@echo "Generating a list of Lua exported constants in lua_exports_taranis.txt"
@$(PARSER) -DEXPORT $(CPPDEFS) myeeprom.h | grep LEXP > lua_exports_taranis.txt
@echo "Generating a list of Lua exported constants in lua/lua_exports_taranis.txt"
@$(PARSER) -DEXPORT -DPCBTARANIS -DLUA myeeprom.h | grep LEXP > lua/lua_exports_taranis.txt
@echo "Parsing and generating C Lua exports in lua/lua_exports_taranis.inc"
@$(PYTHON) ../util/luaexport.py $(VERSION) lua_exports_taranis.txt lua/lua_exports_taranis.inc lua_fields_taranis.txt
@rm lua_exports_taranis.txt
@$(PYTHON) ../util/luaexport.py $(VERSION) lua/lua_exports_taranis.txt lua/lua_exports_taranis.inc lua/lua_fields_taranis.txt
@rm lua/lua_exports_taranis.txt
lua/lua_exports_taranis_x9e.inc: myeeprom.h ../util/luaexport.py
@echo "Generating a list of Lua exported constants in lua/lua_exports_taranis_x9e.txt"
@$(PARSER) -DEXPORT -DPCBTARANIS -DREVPLUS -DREV9E -DLUA myeeprom.h | grep LEXP > lua/lua_exports_taranis_x9e.txt
@echo "Parsing and generating C Lua exports in lua/lua_exports_taranis_x9e.inc"
@$(PYTHON) ../util/luaexport.py $(VERSION) lua/lua_exports_taranis_x9e.txt lua/lua_exports_taranis_x9e.inc lua/lua_fields_taranis_x9e.txt
@rm lua/lua_exports_taranis_x9e.txt
lua/lua_exports_horus.inc: myeeprom.h ../util/luaexport.py
@echo "Generating a list of Lua exported constants in lua_exports_horus.txt"
@$(PARSER) -DEXPORT $(CPPDEFS) myeeprom.h | grep LEXP > lua_exports_horus.txt
@echo "Generating a list of Lua exported constants in lua/lua_exports_horus.txt"
@$(PARSER) -DEXPORT -DPCBHORUS -DLUA myeeprom.h | grep LEXP > lua/lua_exports_horus.txt
@echo "Parsing and generating C Lua exports in lua/lua_exports_horus.inc"
@$(PYTHON) ../util/luaexport.py $(VERSION) lua_exports_horus.txt lua/lua_exports_horus.inc lua_fields_horus.txt
@rm lua_exports_horus.txt
@$(PYTHON) ../util/luaexport.py $(VERSION) lua/lua_exports_horus.txt lua/lua_exports_horus.inc lua/lua_fields_horus.txt
@rm lua/lua_exports_horus.txt
lua/lua_exports_flamenco.inc: myeeprom.h ../util/luaexport.py
@echo "Generating a list of Lua exported constants in lua_exports_flamenco.txt"
@$(PARSER) -DEXPORT $(CPPDEFS) myeeprom.h | grep LEXP > lua_exports_flamenco.txt
@echo "Generating a list of Lua exported constants in lua/lua_exports_flamenco.txt"
@$(PARSER) -DEXPORT -DPCBFLAMENCO -DLUA myeeprom.h | grep LEXP > lua/lua_exports_flamenco.txt
@echo "Parsing and generating C Lua exports in lua/lua_exports_flamenco.inc"
@$(PYTHON) ../util/luaexport.py $(VERSION) lua_exports_flamenco.txt lua/lua_exports_flamenco.inc lua_fields_flamenco.txt
@rm lua_exports_flamenco.txt
@$(PYTHON) ../util/luaexport.py $(VERSION) lua/lua_exports_flamenco.txt lua/lua_exports_flamenco.inc lua/lua_fields_flamenco.txt
@rm lua/lua_exports_flamenco.txt
# Eye candy.
# AVR Studio 3.x does not check make's exit code but relies on
@ -2122,7 +2133,7 @@ clean_list :
$(REMOVE) bitmaps/*/*.lbm
$(REMOVE) fonts/*/*.lbm
$(REMOVE) translations/*.h
$(REMOVE) lua_exports*.txt lua_fields*.txt lua/lua_exports*.inc
$(REMOVE) lua/lua_exports*.txt lua/lua_fields*.txt lua/lua_exports*.inc
$(MAKE) -C targets/Taranis/bootloader clean
#### Install

View file

@ -41,11 +41,13 @@
#include "lua/lua_api.h"
#if defined(PCBHORUS)
#include "lua/lua_exports_horus.inc" // this line must be after lua headers
#include "lua/lua_exports_horus.inc" // this line must be after lua headers
#elif defined(PCBFLAMENCO)
#include "lua/lua_exports_flamenco.inc"
#include "lua/lua_exports_flamenco.inc"
#elif defined(PCBTARANIS) && defined(REV9E)
#include "lua/lua_exports_taranis_x9e.inc"
#elif defined(PCBTARANIS)
#include "lua/lua_exports_taranis.inc"
#include "lua/lua_exports_taranis.inc"
#endif
#if defined(PCBTARANIS) && defined(REV9E)
@ -336,7 +338,9 @@ Return detailed information about field (source)
The list of valid sources is available:
* for OpenTX 2.0.x at http://downloads-20.open-tx.org/firmware/lua_fields.txt
* for OpenTX 2.1.x at http://downloads-21.open-tx.org/firmware/lua_fields.txt
* for OpenTX 2.1.x at http://downloads-21.open-tx.org/firmware/lua_fields.txt (depreciated)
* for OpenTX 2.1.x Taranis and Taranis Plus at http://downloads-21.open-tx.org/firmware/lua_fields_taranis.txt
* for OpenTX 2.1.x Taranis X9E at http://downloads-21.open-tx.org/firmware/lua_fields_taranis_x9e.txt
@param name (string) name of the field