Windows build fixes, app about text revisions.

This commit is contained in:
Adam Ierymenko 2017-03-17 20:01:58 -07:00
parent ec8e1178e5
commit 78ef2c5f16
5 changed files with 33 additions and 98 deletions

View File

@ -273,7 +273,9 @@ union LZ4_streamDecode_u {
#endif /* _MSC_VER */ #endif /* _MSC_VER */
#endif #endif
#ifndef FORCE_INLINE
#define FORCE_INLINE static inline #define FORCE_INLINE static inline
#endif
#if (defined(__GNUC__) && (__GNUC__ >= 3)) || (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 800)) || defined(__clang__) #if (defined(__GNUC__) && (__GNUC__ >= 3)) || (defined(__INTEL_COMPILER) && (__INTEL_COMPILER >= 800)) || defined(__clang__)
# define expect(expr,value) (__builtin_expect ((expr),(value)) ) # define expect(expr,value) (__builtin_expect ((expr),(value)) )

View File

@ -1479,7 +1479,6 @@ int main(int argc,char **argv)
#endif // __WINDOWS__ #endif // __WINDOWS__
#ifdef __UNIX_LIKE__ #ifdef __UNIX_LIKE__
#ifdef ZT_HAVE_DROP_PRIVILEGES #ifdef ZT_HAVE_DROP_PRIVILEGES
dropPrivileges(argv[0],homeDir); dropPrivileges(argv[0],homeDir);
#endif #endif
@ -1499,7 +1498,9 @@ int main(int argc,char **argv)
thr.threadMain(); thr.threadMain();
//Thread::join(Thread::start(&thr)); //Thread::join(Thread::start(&thr));
#ifdef __UNIX_LIKE__
OSUtils::rm(pidPath.c_str()); OSUtils::rm(pidPath.c_str());
#endif
return thr.returnValue; return thr.returnValue;
} }

View File

@ -125,7 +125,7 @@ long OSUtils::cleanDirectory(const char *path,const uint64_t olderThan)
date.LowPart = ffd.ftLastWriteTime.dwLowDateTime; date.LowPart = ffd.ftLastWriteTime.dwLowDateTime;
if (date.QuadPart > 0) { if (date.QuadPart > 0) {
date.QuadPart -= adjust.QuadPart; 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); Utils::snprintf(tmp, sizeof(tmp), "%s\\%s", path, ffd.cFileName);
if (DeleteFileA(tmp)) if (DeleteFileA(tmp))
++cleaned; ++cleaned;

View File

@ -148,9 +148,9 @@ void SoftwareUpdater::handleSoftwareUpdateUserMessage(uint64_t origin,const void
std::vector<unsigned int> dvArch; std::vector<unsigned int> dvArch;
if (dvArch2.is_array()) { if (dvArch2.is_array()) {
for(unsigned long i=0;i<dvArch2.size();++i) 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 { } 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)&& if ((OSUtils::jsonInt(d->second.meta[ZT_SOFTWARE_UPDATE_JSON_PLATFORM],0) == rvPlatform)&&

View File

@ -5,99 +5,31 @@
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WinUI" xmlns:local="clr-namespace:WinUI"
mc:Ignorable="d" mc:Ignorable="d"
Title="AboutView" Height="460" Width="300" Icon="ZeroTierIcon.ico"> Title="AboutView" Height="368.267" Width="300" Icon="ZeroTierIcon.ico">
<Grid> <Grid>
<Image x:Name="image" HorizontalAlignment="Center" Height="100" Margin="0,10,0,0" VerticalAlignment="Top" Width="100" Source="ZeroTierIcon.ico"/> <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 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> <RichTextBox.Resources>
<Style TargetType="Hyperlink"> <Style TargetType="Hyperlink">
<Setter Property="Cursor" Value="Hand" /> <Setter Property="Cursor" Value="Hand" />
</Style> </Style>
</RichTextBox.Resources> </RichTextBox.Resources>
<FlowDocument> <FlowDocument>
<Paragraph> <Paragraph TextAlignment="Center">
<Span FontWeight="Bold" FontSize="18" FontFamily="HelveticaNeue"> <Run Text="ZeroTier One"/>
<Run Text="Getting Started"/> </Paragraph>
</Span> <Paragraph TextAlignment="Center">
<Span FontWeight="Bold" FontSize="12" FontFamily="HelveticaNeue"> <Run FontSize="14" Text="Version 1.2.2"/>
<LineBreak/> <LineBreak/>
</Span> <Run FontSize="14" Text="(c) 2011-2017 ZeroTier, Inc."/>
<Span FontSize="12" FontFamily="HelveticaNeue"> <LineBreak/>
<Run/> <Run FontSize="14" Text="www.zerotier.com"/>
</Span> </Paragraph>
</Paragraph> <Paragraph TextAlignment="Center">
<Paragraph> <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."/>
<Span FontSize="12" FontFamily="HelveticaNeue"> </Paragraph>
<Run Text="Getting started is simple. Simply click "/> </FlowDocument>
</Span> </RichTextBox>
<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>
</Grid> </Grid>
</Window> </Window>