UNAME_S := $(shell uname -s)
# Get git commit version and date
-GIT_DATE := $(firstword $(shell git --no-pager show --date=short --format="%ai" --name-only))
GIT_VERSION := $(shell git describe --abbrev=0 --tags --always)
# uncomment the following line to force 480x320 screen
#include "button_text.h"
#include "new_menu.h"
#include "radio.h"
-#include "version.h"
#include "wdsp.h"
#ifdef I2C
#include "i2c.h"
#include "radio.h"
#include "wdsp.h"
#include "radio.h"
-#include "version.h"
#include "mode.h"
#include "vox.h"
#include "new_menu.h"
+++ /dev/null
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-#include <dirent.h>
-#include <errno.h>
-
-#include "update.h"
-#include "version.h"
-
-char new_version[128];
-
-int check_update() {
-
- int rc=system("/usr/bin/wget -N https://github.com/g0orx/pihpsdr/raw/master/release/pihpsdr/latest");
- fprintf(stderr,"rc=%d\n", rc);
- if(rc==-1) {
- fprintf(stderr,"wget: errno=%d\n", errno);
- }
-
- fprintf(stderr,"check_version: current version is %s\n",version);
- strcpy(new_version,"");
-
- FILE* f=fopen("latest","r");
- if(f) {
- char *c=fgets(new_version,sizeof(new_version),f);
- if (c == NULL) {
- return -1;
- }
- fclose(f);
- } else {
- fprintf(stderr,"check_update: could not read latest version\n");
- return -1;
- }
-
- if(strlen(new_version)==0) {
- return -2;
- }
-
- if(strlen(new_version)>0) {
- if(new_version[strlen(new_version)-1]=='\n') {
- new_version[strlen(new_version)-1]='\0';
- }
- }
-
- fprintf(stderr,"check_version: latest version is %s\n",new_version);
-
- fprintf(stderr,"check_version: length of version=%ld length of new_version=%ld\n", (long)strlen(version), (long)strlen(new_version));
- rc=strcmp(version,new_version);
-
- return rc;
-}
-
-int load_update() {
- char command[1024];
- sprintf(command,"cd ..; /usr/bin/wget -N https://github.com/g0orx/pihpsdr/raw/master/release/pihpsdr_%s.tar",new_version);
-
-fprintf(stderr,"load_update: %s\n",command);
- int rc=system(command);
- fprintf(stderr,"rc=%d\n", rc);
- if(rc==-1) {
- fprintf(stderr,"wget: errnoc=%d\n", errno);
- } else {
- fprintf(stderr,"load_update: %s loaded\n", new_version);
- }
- return rc;
-}
+++ /dev/null
-extern char new_version[];
-
-extern int check_update();
-extern int load_update();
+++ /dev/null
-/* Copyright (C)
-* 2015 - John Melton, G0ORX/N6LYT
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*
-*/
-
-char build_date[]=GIT_DATE;
-char build_version[]=GIT_VERSION;
-
-char version[]=GIT_VERSION
-#if defined(GPIO) || defined(PURESIGNAL) || defined(MIDI)
-" includes"
-#endif
-#ifdef GPIO
-" GPIO"
-#endif
-#ifdef PURESIGNAL
-" PURESIGNAL"
-#endif
-#ifdef MIDI
-" MIDI"
-#endif
-#ifdef LOCALCW
-" LOCALCW"
-#endif
-
-;
+++ /dev/null
-/* Copyright (C)
-* 2015 - John Melton, G0ORX/N6LYT
-*
-* This program is free software; you can redistribute it and/or
-* modify it under the terms of the GNU General Public License
-* as published by the Free Software Foundation; either version 2
-* of the License, or (at your option) any later version.
-*
-* This program is distributed in the hope that it will be useful,
-* but WITHOUT ANY WARRANTY; without even the implied warranty of
-* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-* GNU General Public License for more details.
-*
-* You should have received a copy of the GNU General Public License
-* along with this program; if not, write to the Free Software
-* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-*
-*/
-
-#ifndef _VERSION_H
-#define _VERSION_H
-
-extern char build_version[];
-extern char build_date[];
-extern char version[];
-
-#endif