[emoji19]
- Joined
- Apr 12, 2013
- Messages
- 897
- Reaction score
- 481
private void DOWNLOAD_VFILE_IF_NOT_EXIST()
{
try
{
if (!File.Exists(Application.StartupPath + "\\lversion.cfg"))
{
WebClient webClient = new WebClient();
webClient.DownloadFile("http://127.0.0.1/updates/launcher/SpaceWarriors.a", (Application.StartupPath + "\\SpaceWarriors.a"));
}
}
catch { }
}
private void DOWNLOAD_LAUNCHER_IF_NOT_EXIST()
{
try
{
if (!File.Exists(Application.StartupPath + "\\SpaceWarriors.a"))
{
WebClient webClient = new WebClient();
webClient.DownloadFile("http://127.0.0.1/updates/launcher/SpaceWarriors.a", (Application.StartupPath + "\\SpaceWarriors.a"));
}
}
catch { }
}
else if (iVersionLocal == iVersion)
{
START_LAUNCHER();
}
else if (iVersionLocal == iVersion)
{
DOWNLOAD_LAUNCHER_IF_NOT_EXIST();
START_LAUNCHER();
}
catch
{
DOWNLOAD_VFILE_IF_NOT_EXIST();
MessageBox.Show("lversion.cfg not found!", "ERR:FILE_OT_FOUND");
}
catch
{
DOWNLOAD_VFILE_IF_NOT_EXIST();
}
Real dev should think about all. Best method its treat user like idiot who use all options and have problem with this app.
Build source code with Visual Studio 2012.
Config autoupdate.
Copy lversion.cfg, Launcher.atm to YourWebServerFolder\htdocs or www\autoupdate\launcher and the client.
Copy AcePreLauncher.exe to the client and use.