Commit 96d9d8fe1fce9a403a986b4e0394883cc93d10d2
1 parent
2fc2bf65
Exists in
Au-ghub/master
Tratamento do download da lista de sinais
O download da lista, agora, antecede o download e a extração dos pacotes de sinais.
Showing
5 changed files
with
34 additions
and
17 deletions
Show diff stats
.gitignore
AU.csproj
... | ... | @@ -12,7 +12,7 @@ |
12 | 12 | <TargetFrameworkVersion>v4.5</TargetFrameworkVersion> |
13 | 13 | <FileAlignment>512</FileAlignment> |
14 | 14 | <IsWebBootstrapper>true</IsWebBootstrapper> |
15 | - <PublishUrl>C:\Users\Caio Moraes\Documents\AU\release\</PublishUrl> | |
15 | + <PublishUrl>C:\Users\CaioMoraes\Documents\AU\release\</PublishUrl> | |
16 | 16 | <Install>true</Install> |
17 | 17 | <InstallFrom>Web</InstallFrom> |
18 | 18 | <UpdateEnabled>true</UpdateEnabled> |
... | ... | @@ -22,14 +22,14 @@ |
22 | 22 | <UpdatePeriodically>false</UpdatePeriodically> |
23 | 23 | <UpdateRequired>true</UpdateRequired> |
24 | 24 | <MapFileExtensions>false</MapFileExtensions> |
25 | - <InstallUrl>http://atualizacao.vlibras.lavid.ufpb.br/windows/</InstallUrl> | |
26 | - <UpdateUrl>http://atualizacao.vlibras.lavid.ufpb.br/windows/</UpdateUrl> | |
25 | + <InstallUrl>http://150.165.205.193:8080/</InstallUrl> | |
26 | + <UpdateUrl>http://150.165.205.193:8080/</UpdateUrl> | |
27 | 27 | <ProductName>Atualizador VLibras</ProductName> |
28 | 28 | <PublisherName>LAVID-UFPB</PublisherName> |
29 | 29 | <MinimumRequiredVersion>5.0.0.0</MinimumRequiredVersion> |
30 | 30 | <OpenBrowserOnPublish>false</OpenBrowserOnPublish> |
31 | 31 | <TrustUrlParameters>true</TrustUrlParameters> |
32 | - <ApplicationRevision>3</ApplicationRevision> | |
32 | + <ApplicationRevision>20</ApplicationRevision> | |
33 | 33 | <ApplicationVersion>5.0.0.%2a</ApplicationVersion> |
34 | 34 | <UseApplicationTrust>true</UseApplicationTrust> |
35 | 35 | <CreateDesktopShortcut>true</CreateDesktopShortcut> |
... | ... | @@ -99,7 +99,9 @@ |
99 | 99 | <Reference Include="System.Xml" /> |
100 | 100 | </ItemGroup> |
101 | 101 | <ItemGroup> |
102 | - <Compile Include="BundlesManager.cs" /> | |
102 | + <Compile Include="BundlesManager.cs"> | |
103 | + <SubType>Component</SubType> | |
104 | + </Compile> | |
103 | 105 | <Compile Include="Form1.cs"> |
104 | 106 | <SubType>Form</SubType> |
105 | 107 | </Compile> |
... | ... | @@ -154,10 +156,10 @@ |
154 | 156 | <Link>%(RecursiveDir)%(Filename)%(Extension)</Link> |
155 | 157 | <Visible>false</Visible> |
156 | 158 | </Content> |
157 | - <Content Include="$(SolutionDir)requisitos\**\*"> | |
159 | + <!-- <Content Include="$(SolutionDir)requisitos\**\*"> | |
158 | 160 | <Link>%(RecursiveDir)%(Filename)%(Extension)</Link> |
159 | 161 | <Visible>false</Visible> |
160 | - </Content> | |
162 | + </Content> --> | |
161 | 163 | <Content Include="icon_vlibras.ico" /> |
162 | 164 | </ItemGroup> |
163 | 165 | <ItemGroup> | ... | ... |
AU.csproj.user
1 | 1 | <?xml version="1.0" encoding="Windows-1252"?> |
2 | 2 | <Project ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
3 | 3 | <PropertyGroup> |
4 | - <PublishUrlHistory>C:\Users\Caio Moraes\Documents\AU\release\|http://150.165.205.137:8000/|\\localhost\testeDeAU\|System.Deployment.Application.SystemNetDownloader.DownloadSingleFile%28DownloadQueueItem next%29\|C:\Users\Caio Moraes\Documents\AU\release\publish.htm\</PublishUrlHistory> | |
5 | - <InstallUrlHistory>http://atualizacao.vlibras.lavid.ufpb.br/windows/|http://150.165.205.37/windows/|http://179.185.184.75:8080/|http://179.185.184.75:8080/163.172./|http://150.165.205.137:8080/</InstallUrlHistory> | |
4 | + <PublishUrlHistory>C:\Users\CaioMoraes\Documents\AU\release\|C:\Users\Rebecca\Documents\AU\release\|C:\Users\Caio Moraes\Documents\AU\release\|http://150.165.205.137:8000/|\\localhost\testeDeAU\</PublishUrlHistory> | |
5 | + <InstallUrlHistory>http://150.165.205.193:8080/|http://177.133.106.152:8089/|http://177.133.106.152:8080/|http://192.168.25.121:8089/|http://192.168.26.121:8089/</InstallUrlHistory> | |
6 | 6 | <SupportUrlHistory /> |
7 | - <UpdateUrlHistory>http://150.165.205.37/windows/|http://179.185.184.75:8080/|http://150.165.205.137:8080/|http://150.165.205.101:8080/|http://179.185.189.177:8080/</UpdateUrlHistory> | |
7 | + <UpdateUrlHistory>http://150.165.205.193:8080/|http://177.133.106.152:8089/|http://192.168.25.121:8089/|http://192.168.26.121:8089/|http://127.0.0.1:8000/</UpdateUrlHistory> | |
8 | 8 | <BootstrapperUrlHistory /> |
9 | 9 | <ErrorReportUrlHistory /> |
10 | 10 | <FallbackCulture>pt-BR</FallbackCulture> | ... | ... |
BundlesManager.cs
... | ... | @@ -159,11 +159,16 @@ namespace AtualizadorVLibras{ |
159 | 159 | }*/ |
160 | 160 | |
161 | 161 | public static void DownloadFileIfNewer(string remote, string local, string fileName){ |
162 | - if(RemoteFileExists(remote+fileName) && (!File.Exists(local+fileName) || RemoteIsNewerThanLocal(remote+fileName, local+fileName))){ | |
163 | - DownloadFileToPath(remote+fileName, local+fileName); | |
164 | - if(File.Exists(local+fileName.Remove(fileName.Length-4))){ | |
165 | - File.Delete(local+fileName.Remove(fileName.Length-4)); | |
162 | + try{ | |
163 | + if(RemoteFileExists(remote+fileName) && (!File.Exists(local+fileName) || RemoteIsNewerThanLocal(remote+fileName, local+fileName))){ | |
164 | + DownloadFileToPath(remote+fileName, local+fileName); | |
165 | + if(File.Exists(local+fileName.Remove(fileName.Length-4))){ | |
166 | + File.Delete(local+fileName.Remove(fileName.Length-4)); | |
167 | + } | |
166 | 168 | } |
169 | + }catch(Exception e){ | |
170 | + Console.WriteLine("Aconteceu um erro no download: "+e); | |
171 | + Console.ReadKey(); | |
167 | 172 | } |
168 | 173 | } |
169 | 174 | public static void ExtractZip(string remote, string local, string extractPath, string fileName){ | ... | ... |
Program.cs
... | ... | @@ -37,8 +37,10 @@ namespace AtualizadorVLibras |
37 | 37 | { |
38 | 38 | //ENDEREÇO DE ONDE SERÃO BAIXADOS OS PACOTES (.ZIP) DE SINAIS (1.ZIP, 2.ZIP E ETC...) |
39 | 39 | //string url = @"http://atualizacao.vlibras.lavid.ufpb.br/windows/"; |
40 | - //string url = @"http://127.0.0.1:8000/"; | |
41 | - string url = @"http://192.168.25.121:8089/"; | |
40 | + //string url = @"http://127.0.0.1:8000/"; //localhost | |
41 | + //string url = @"http://192.168.25.121:8089/"; //local: notebook bk | |
42 | + string url = @"http://150.165.205.148:8080/"; | |
43 | + //string url = @"http://177.133.106.152:8089/"; | |
42 | 44 | //string url = @"http://179.185.184.75:8080/"; |
43 | 45 | |
44 | 46 | string dirAtual = Directory.GetCurrentDirectory(); |
... | ... | @@ -234,6 +236,14 @@ namespace AtualizadorVLibras |
234 | 236 | |
235 | 237 | |
236 | 238 | //DOWNLOAD DOS SINAIS |
239 | + Console.WriteLine("Baixando lista de sinais"); | |
240 | + try{ | |
241 | + BundlesManager.DownloadListaSinais(url); | |
242 | + }catch(Exception e){ | |
243 | + Console.WriteLine("Erro no download da lista de sinais.\n{0}\nAperte alguma tecla para continuar.",e); | |
244 | + Console.ReadKey(); | |
245 | + } | |
246 | + | |
237 | 247 | //BAIXA OS ZIPS DOS SINAIS (1.ZIP, 2.ZIP E ETC...) |
238 | 248 | extractPath = @"..\Bundles\"; |
239 | 249 | int qtdDeBundles = 0; |
... | ... | @@ -251,7 +261,6 @@ namespace AtualizadorVLibras |
251 | 261 | Console.WriteLine("Extraindo pacote de sinais."); |
252 | 262 | //try{ |
253 | 263 | BundlesManager.ExtractBundlesPackagesOverWrite(url, rootPath, extractPath, qtdDeBundles); |
254 | - BundlesManager.DownloadListaSinais(url); | |
255 | 264 | /*}catch(Exception e){ |
256 | 265 | Console.WriteLine("Erro na extração: {0}", e); |
257 | 266 | Console.ReadKey(); | ... | ... |