-
Notifications
You must be signed in to change notification settings - Fork 1
/
uestc_wifi_helper.lpr
44 lines (39 loc) · 965 Bytes
/
uestc_wifi_helper.lpr
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
program uestc_wifi_helper;
{$mode objfpc}{$H+}
// s{$AppType CONSOLE}
uses
{$IFDEF UNIX}
cthreads,
{$ENDIF}
{$IFDEF HASAMIGA}
athreads,
{$ENDIF}
Interfaces, // this includes the LCL widgetset
Forms, ui, classes, sysutils,
uestc_wifi, uestc_wifi_config
{ you can add units after this };
// {$R *.res}
{$R template.rc}
var
load_config_success: Boolean;
log_file_path: String;
begin
Application.Initialize;
load_config_success := load_config();
if not load_config_success then
begin
Exit();
end;
init_uestc_wifi(username, password, network_operator);
if check_interval <= 0 then
begin
log_file_path := GetUserDir + 'uestc_wifi.log';
check_once(log_file_path);
Exit();
end;
RequireDerivedFormResource:=True;
Application.Scaled:=True;
Application.ShowMainForm:=False;
Application.CreateForm(TForm1, Form1);
Application.Run;
end.