mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2024-12-19 13:07:55 +00:00
Fix update URL stuff, fix main build, add update dummy for testing updates on OSX and Linux and such.
This commit is contained in:
parent
bf0da9f2f7
commit
d3bcc58074
6
attic/update-dummy/update-dummy.nfo
Normal file
6
attic/update-dummy/update-dummy.nfo
Normal file
@ -0,0 +1,6 @@
|
||||
vMajor=999
|
||||
vMinor=999
|
||||
vRevision=999
|
||||
signedBy=e9bc3707b5
|
||||
ed25519=ca7b943ace5451f420f1f599822d7013534a7cb7997096141e6a1aa6398c5f260c19dc5eecb297c922950f26dee7f9db787f8dbf85bc422baf3bff94c1131e086a7fc85c26dbb8c1b0a9cae63acc34998d9e1ce553156ea5638f9c99a50f6e2e
|
||||
url=http://download.zerotier.com/update/update-dummy.sh
|
4
attic/update-dummy/update-dummy.sh
Normal file
4
attic/update-dummy/update-dummy.sh
Normal file
@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
|
||||
echo "Dummy updater -- run with opts: $*"
|
||||
exit 0
|
2
main.cpp
2
main.cpp
@ -475,7 +475,7 @@ int main(int argc,char **argv)
|
||||
try {
|
||||
node = new Node(homeDir,port,controlPort);
|
||||
switch(node->run()) {
|
||||
case Node::NODE_NODE_RESTART_FOR_UPGRADE: {
|
||||
case Node::NODE_RESTART_FOR_UPGRADE: {
|
||||
#ifdef __UNIX_LIKE__
|
||||
const char *upgPath = node->reasonForTermination();
|
||||
if (upgPath)
|
||||
|
@ -122,8 +122,26 @@ static inline std::map< Address,Identity > _mkUpdateAuth()
|
||||
return ua;
|
||||
}
|
||||
|
||||
static inline std::string _mkUpdateUrl()
|
||||
static inline const char *_mkUpdateUrl()
|
||||
{
|
||||
#if defined(__LINUX__) && ( defined(__i386__) || defined(__x86_64) || defined(__x86_64__) || defined(__amd64) || defined(__i386) )
|
||||
if (sizeof(void *) == 8)
|
||||
return "http://download.zerotier.com/update/linux/x64/latest.nfo";
|
||||
else return "http://download.zerotier.com/update/linux/x86/latest.nfo";
|
||||
#define GOT_UPDATE_URL
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
// TODO: iOS?
|
||||
return "http://download.zerotier.com/update/mac/combined/latest.nfo";
|
||||
#define GOT_UPDATE_URL
|
||||
#endif
|
||||
|
||||
// TODO: Windows
|
||||
|
||||
#ifndef GOT_UPDATE_URL
|
||||
return "";
|
||||
#endif
|
||||
}
|
||||
|
||||
Defaults::Defaults() :
|
||||
|
Loading…
Reference in New Issue
Block a user