kopia lustrzana https://github.com/meshtastic/firmware
Use a custom platformio py file to always set build version
rodzic
a0076eb394
commit
b1c30f0650
|
@ -2,7 +2,7 @@
|
|||
|
||||
set -e
|
||||
|
||||
source bin/version.sh
|
||||
VERSION=`bin/buildinfo.py`
|
||||
|
||||
COUNTRIES="US EU433 EU865 CN JP ANZ KR"
|
||||
#COUNTRIES=US
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env python3
|
||||
import configparser
|
||||
|
||||
config = configparser.RawConfigParser()
|
||||
config.read('version.properties')
|
||||
|
||||
version = dict(config.items('VERSION'))
|
||||
|
||||
verStr = "{}.{}.{}".format(version["major"], version["minor"], version["build"])
|
||||
|
||||
print(f"{verStr}")
|
|
@ -0,0 +1,17 @@
|
|||
import configparser
|
||||
|
||||
config = configparser.RawConfigParser()
|
||||
config.read('version.properties')
|
||||
|
||||
version = dict(config.items('VERSION'))
|
||||
|
||||
verStr = "{}.{}.{}".format(version["major"], version["minor"], version["build"])
|
||||
|
||||
print(f"Using meshtastic platform-custom.py, firmare version {verStr}")
|
||||
|
||||
Import("env", "projenv")
|
||||
|
||||
# General options that are passed to the C and C++ compilers
|
||||
projenv.Append(CCFLAGS=[
|
||||
f"-DAPP_VERSION={verStr}"
|
||||
])
|
|
@ -1,3 +0,0 @@
|
|||
|
||||
|
||||
export VERSION=1.1.9
|
|
@ -4,11 +4,13 @@ You probably don't care about this section - skip to the next one.
|
|||
|
||||
For app cleanup:
|
||||
|
||||
* do fixed position bug https://github.com/meshtastic/Meshtastic-device/issues/536
|
||||
* make device build always have a valid version
|
||||
* DONE do fixed position bug https://github.com/meshtastic/Meshtastic-device/issues/536
|
||||
* check build guide
|
||||
* generate autodocs
|
||||
* write user guide
|
||||
* DONE update android code: https://developer.android.com/topic/libraries/view-binding/migration
|
||||
* only do wantReplies once per packet type, if we change network settings force it again
|
||||
* make gpio watch work, use thread and setup
|
||||
* make hello world example service
|
||||
* make python ping command
|
||||
|
|
|
@ -19,16 +19,17 @@ default_envs = tbeam # lora-relay-v1 # nrf52840dk-geeksville # linux # or if you
|
|||
; The following environment variables must be set in the shell if you'd like to override them.
|
||||
; They are used in this ini file as systenv.VARNAME, so in your shell do export "VARNAME=fish"
|
||||
; COUNTRY (default US), i.e. "export COUNTRY=EU865"
|
||||
; APP_VERSION (default emptystring)
|
||||
; HW_VERSION (default emptystring)
|
||||
|
||||
[env]
|
||||
|
||||
; note: APP_VERSION now comes from bin/version.json
|
||||
extra_scripts = bin/platformio-custom.py
|
||||
|
||||
; note: we add src to our include search path so that lmic_project_config can override
|
||||
; FIXME: fix lib/BluetoothOTA dependency back on src/ so we can remove -Isrc
|
||||
build_flags = -Wno-missing-field-initializers -Isrc -Isrc/mesh -Isrc/gps -Ilib/nanopb/include -Wl,-Map,.pio/build/output.map
|
||||
-DHW_VERSION_${sysenv.COUNTRY}
|
||||
-DAPP_VERSION=${sysenv.APP_VERSION}
|
||||
-DHW_VERSION=${sysenv.HW_VERSION}
|
||||
-DUSE_THREAD_NAMES
|
||||
-DTINYGPSPLUS_OPTION_NO_CUSTOM_FIELDS
|
||||
|
|
|
@ -31,9 +31,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
|
||||
// If app version is not specified we assume we are not being invoked by the build script
|
||||
#ifndef APP_VERSION
|
||||
#error APP_VERSION, HW_VERSION, and HW_VERSION_countryname must be set by the build environment
|
||||
//#define APP_VERSION 0.0.0 // this def normally comes from build-all.sh
|
||||
//#define HW_VERSION 1.0 - US // normally comes from build-all.sh and contains the region code
|
||||
#error APP_VERSION must be set by the build environment
|
||||
#endif
|
||||
|
||||
// If app version is not specified we assume we are not being invoked by the build script
|
||||
#ifndef HW_VERSION
|
||||
#error HW_VERSION, and HW_VERSION_countryname must be set by the build environment
|
||||
#endif
|
||||
|
||||
// -----------------------------------------------------------------------------
|
||||
|
|
Ładowanie…
Reference in New Issue