summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Ierymenko <adam.ierymenko@zerotier.com>2017-03-17 20:01:58 -0700
committerAdam Ierymenko <adam.ierymenko@zerotier.com>2017-03-17 20:01:58 -0700
commit78ef2c5f16524684b4682ac2ef614abe1ed62dd7 (patch)
tree274fc13f79fa618018d561bc78a955af69fac23f
parentec8e1178e5cfbe9cd790928dd06562af734a2d48 (diff)
downloadinfinitytier-78ef2c5f16524684b4682ac2ef614abe1ed62dd7.tar.gz
infinitytier-78ef2c5f16524684b4682ac2ef614abe1ed62dd7.zip
Windows build fixes, app about text revisions.
-rw-r--r--node/Packet.cpp2
-rw-r--r--one.cpp3
-rw-r--r--osdep/OSUtils.cpp2
-rw-r--r--service/SoftwareUpdater.cpp4
-rw-r--r--windows/WinUI/AboutView.xaml120
5 files changed, 33 insertions, 98 deletions
diff --git a/node/Packet.cpp b/node/Packet.cpp
index b07f0bed..756f3140 100644
--- a/node/Packet.cpp
+++ b/node/Packet.cpp
@@ -273,7 +273,9 @@ union LZ4_streamDecode_u {
#endif /* _MSC_VER */
#endif
+#ifndef FORCE_INLINE
#define FORCE_INLINE static inline
+#endif
#if (defined(__GNUC__) && (__GNUC__ >= 3)) || (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 800)) || defined(__clang__)
# define expect(expr,value) (__builtin_expect ((expr),(value)) )
diff --git a/one.cpp b/one.cpp
index 25a50dbb..edefe82e 100644
--- a/one.cpp
+++ b/one.cpp
@@ -1479,7 +1479,6 @@ int main(int argc,char **argv)
#endif // __WINDOWS__
#ifdef __UNIX_LIKE__
-
#ifdef ZT_HAVE_DROP_PRIVILEGES
dropPrivileges(argv[0],homeDir);
#endif
@@ -1499,7 +1498,9 @@ int main(int argc,char **argv)
thr.threadMain();
//Thread::join(Thread::start(&thr));
+#ifdef __UNIX_LIKE__
OSUtils::rm(pidPath.c_str());
+#endif
return thr.returnValue;
}
diff --git a/osdep/OSUtils.cpp b/osdep/OSUtils.cpp
index aac6bdd8..33e143da 100644
--- a/osdep/OSUtils.cpp
+++ b/osdep/OSUtils.cpp
@@ -125,7 +125,7 @@ long OSUtils::cleanDirectory(const char *path,const uint64_t olderThan)
date.LowPart = ffd.ftLastWriteTime.dwLowDateTime;
if (date.QuadPart > 0) {
date.QuadPart -= adjust.QuadPart;
- if (((date.QuadPart / 10000000) * 1000) < olderThan) {
+ if ((uint64_t)((date.QuadPart / 10000000) * 1000) < olderThan) {
Utils::snprintf(tmp, sizeof(tmp), "%s\\%s", path, ffd.cFileName);
if (DeleteFileA(tmp))
++cleaned;
diff --git a/service/SoftwareUpdater.cpp b/service/SoftwareUpdater.cpp
index 2afbc776..7ecd42b1 100644
--- a/service/SoftwareUpdater.cpp
+++ b/service/SoftwareUpdater.cpp
@@ -148,9 +148,9 @@ void SoftwareUpdater::handleSoftwareUpdateUserMessage(uint64_t origin,const void
std::vector<unsigned int> dvArch;
if (dvArch2.is_array()) {
for(unsigned long i=0;i<dvArch2.size();++i)
- dvArch.push_back(OSUtils::jsonInt(dvArch2[i],0));
+ dvArch.push_back((unsigned int)OSUtils::jsonInt(dvArch2[i],0));
} else {
- dvArch.push_back(OSUtils::jsonInt(dvArch2,0));
+ dvArch.push_back((unsigned int)OSUtils::jsonInt(dvArch2,0));
}
if ((OSUtils::jsonInt(d->second.meta[ZT_SOFTWARE_UPDATE_JSON_PLATFORM],0) == rvPlatform)&&
diff --git a/windows/WinUI/AboutView.xaml b/windows/WinUI/AboutView.xaml
index 5def46a6..7f4151f9 100644
--- a/windows/WinUI/AboutView.xaml
+++ b/windows/WinUI/AboutView.xaml
@@ -5,99 +5,31 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WinUI"
mc:Ignorable="d"
- Title="AboutView" Height="460" Width="300" Icon="ZeroTierIcon.ico">
- <Grid>
- <Image x:Name="image" HorizontalAlignment="Center" Height="100" Margin="0,10,0,0" VerticalAlignment="Top" Width="100" Source="ZeroTierIcon.ico"/>
- <RichTextBox x:Name="richTextBox" HorizontalAlignment="Left" Height="307" Margin="10,115,0,0" VerticalAlignment="Top" Width="275" IsReadOnly="True" IsDocumentEnabled="True" BorderThickness="0">
- <RichTextBox.Resources>
- <Style TargetType="Hyperlink">
- <Setter Property="Cursor" Value="Hand" />
- </Style>
- </RichTextBox.Resources>
- <FlowDocument>
- <Paragraph>
- <Span FontWeight="Bold" FontSize="18" FontFamily="HelveticaNeue">
- <Run Text="Getting Started"/>
- </Span>
- <Span FontWeight="Bold" FontSize="12" FontFamily="HelveticaNeue">
- <LineBreak/>
- </Span>
- <Span FontSize="12" FontFamily="HelveticaNeue">
- <Run/>
- </Span>
- </Paragraph>
- <Paragraph>
- <Span FontSize="12" FontFamily="HelveticaNeue">
- <Run Text="Getting started is simple. Simply click "/>
- </Span>
- <Span FontSize="12" FontFamily="Menlo-Regular">
- <Run Text="Join Network"/>
- </Span>
- <Span FontSize="12" FontFamily="HelveticaNeue">
- <Run Text=" from the ZeroTier status bar menu. To join the public network &quot;Earth&quot;, enter "/>
- </Span>
- <Span FontSize="12" FontFamily="Menlo-Regular">
- <Run Text="8056c2e21c000001"/>
- </Span>
- <Span FontSize="12" FontFamily="HelveticaNeue">
- <Run Text=" and click the Join button. Once connected, you'll be able to navigate to "/>
- </Span>
- <Hyperlink NavigateUri="http://earth.zerotier.net/" RequestNavigate="Hyperlink_MouseLeftButtonDown">
- <Span Foreground="#FF0000E9" FontSize="12" FontFamily="HelveticaNeue">
- <Run Text="earth.zerotier.net"/>
- </Span>
- </Hyperlink>
- <Span FontSize="12" FontFamily="HelveticaNeue">
- <Run Text="."/>
- </Span>
- </Paragraph>
- <Paragraph>
- <Span FontSize="12" FontFamily="HelveticaNeue">
- <Run/>
- <LineBreak/>
- </Span>
- <Span FontWeight="Bold" FontSize="18" FontFamily="HelveticaNeue">
- <Run Text="Create a Network"/>
- </Span>
- <Span FontWeight="Bold" FontSize="12" FontFamily="HelveticaNeue">
- <LineBreak/>
- </Span>
- <Span FontSize="12" FontFamily="HelveticaNeue">
- <Run/>
- </Span>
- </Paragraph>
- <Paragraph>
- <Span FontSize="12" FontFamily="HelveticaNeue">
- <Run Text="Visit "/>
- </Span>
- <Hyperlink NavigateUri="http://my.zerotier.com/" RequestNavigate="Hyperlink_MouseLeftButtonDown">
- <Span Foreground="#FF0000E9" FontSize="12" FontFamily="HelveticaNeue">
- <Run Text="my.zerotier.com"/>
- </Span>
- </Hyperlink>
- <Span FontSize="12" FontFamily="HelveticaNeue">
- <Run Text=" to create and manage your own virtual networks."/>
- </Span>
- <Span FontSize="12" FontFamily="HelveticaNeue">
- <LineBreak/>
- <Run/>
- </Span>
- </Paragraph>
- <Paragraph>
- <Span FontSize="12" FontFamily="HelveticaNeue">
- <Run Text="For more information, visit "/>
- </Span>
- <Hyperlink NavigateUri="http://www.zerotier.com/" RequestNavigate="Hyperlink_MouseLeftButtonDown">
- <Span Foreground="#FF0000E9" FontSize="12" FontFamily="HelveticaNeue">
- <Run Text="zerotier.com"/>
- </Span>
- </Hyperlink>
- <Span FontSize="12" FontFamily="HelveticaNeue">
- <Run Text="."/>
- </Span>
- </Paragraph>
- </FlowDocument>
- </RichTextBox>
+ Title="AboutView" Height="368.267" Width="300" Icon="ZeroTierIcon.ico">
+ <Grid>
+ <Image x:Name="image" HorizontalAlignment="Center" Height="100" Margin="0,10,0,0" VerticalAlignment="Top" Width="100" Source="ZeroTierIcon.ico"/>
+ <RichTextBox x:Name="richTextBox" HorizontalAlignment="Left" Height="209" Margin="10,123,0,0" VerticalAlignment="Top" Width="275" IsReadOnly="True" IsDocumentEnabled="True" BorderThickness="0" TextChanged="richTextBox_TextChanged" FontSize="18" RenderTransformOrigin="0.506,0.63">
+ <RichTextBox.Resources>
+ <Style TargetType="Hyperlink">
+ <Setter Property="Cursor" Value="Hand" />
+ </Style>
+ </RichTextBox.Resources>
+ <FlowDocument>
+ <Paragraph TextAlignment="Center">
+ <Run Text="ZeroTier One"/>
+ </Paragraph>
+ <Paragraph TextAlignment="Center">
+ <Run FontSize="14" Text="Version 1.2.2"/>
+ <LineBreak/>
+ <Run FontSize="14" Text="(c) 2011-2017 ZeroTier, Inc."/>
+ <LineBreak/>
+ <Run FontSize="14" Text="www.zerotier.com"/>
+ </Paragraph>
+ <Paragraph TextAlignment="Center">
+ <Run FontSize="14" Text="ZeroTier One allows your computer to join virtual networks. Just select &quot;join&quot; and enter a network's 16-digit ID. Each network appears on your computer as a new network port."/>
+ </Paragraph>
+ </FlowDocument>
+ </RichTextBox>
- </Grid>
+ </Grid>
</Window>