Commit e061e231e44a0f538cd1c9123b692d168a576de0

Updated library bindings

* Completed install script
* Renamed some of the bindings
NEWS
(1 / 0)
  
77 * Use Debian packages as dependency sources
88 * visual-ldd: Pulled from Autopackage
99 * visual-ldd: Ported to Qt4, updated GUI and added few more features
10 * Pulled apbuild from Autopackage
1011
1112 Specifications:
1213 * Updated databse layout to new format
  
22set -e
33GEN="../build/util/makecbind"
44if [ -e $GEN ]; then
5 $GEN -i ../intf/appman.pas -o ./cbind/li-manager.h --template=./cbind/cheader.template
6 $GEN -i ../intf/installer.pas -o ./cbind/li-installer.h --template=./cbind/cheader.template
7 $GEN -i ../intf/appupdate.pas -o ./cbind/li-updater.h --template=./cbind/cheader.template
5 $GEN -i ../src/bind/liappmgr.pas -o ./cbind/li-manager.h --template=./cbind/cheader.template
6 $GEN -i ../src/bind/liinstaller.pas -o ./cbind/li-installer.h --template=./cbind/cheader.template
7 $GEN -i ../src/bind/liappupdate.pas -o ./cbind/li-updater.h --template=./cbind/cheader.template
88 $GEN -i ../src/litypes.pas -o ./cbind/li-types.h --template=./cbind/cheader.template
99else
10 echo "makecbind was not found!"
10 echo "MakeCBind was not found!"
1111 exit 1
1212fi
  
1{ Copyright (C) 2008-2010 Matthias Klumpp
2
3 Authors:
4 Matthias Klumpp
5
6 This unit is free software: you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free Software
8 Foundation, version 3.
9
10 This unit is distributed in the hope that it will be useful, but WITHOUT
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License v3
15 along with this unit. If not, see <http://www.gnu.org/licenses/>.}
16//** This unit contains libInstaller functions to manage applications
17unit appman;
18
19{$mode objfpc}{$H+}
20
21interface
22
23uses
24 Classes, SysUtils, glib2, liTypes;
25
26 function li_mgr_new: GPointer;cdecl;external libinst;
27 procedure li_mgr_free(mgr: GPointer);cdecl;external libinst;
28 function li_mgr_load_apps(mgr: GPointer): GBoolean;cdecl;external libinst;
29 function li_mgr_register_status_call(mgr: GPointer;call: TLiStatusChangeCall; user_data: GPointer): GBoolean;cdecl;external libinst;
30 function li_mgr_register_request_call(mgr: GPointer;call: TRequestCall;user_data: GPointer): TRqResult;cdecl;external libinst;
31 function li_mgr_register_app_call(mgr: GPointer;call: TAppEvent): GBoolean;cdecl;external libinst;
32 procedure li_mgr_set_sumode(mgr: GPointer;md: GBoolean);cdecl;external libinst;
33 function li_mgr_remove_app(mgr: GPointer;obj: TAppInfo): GBoolean;cdecl;external libinst;
34 function li_remove_ipk_installed_app(appname, appid: PChar;scall: TLiStatusChangeCall;fastmode: GBoolean): GBoolean; cdecl; external libinst;
35 function li_mgr_check_apps(mgr: GPointer;log: PStringList;root: GBoolean): GBoolean;cdecl;external libinst;
36 function li_mgr_fix_apps(mgr: GPointer;log: PStringList;root: GBoolean): GBoolean;cdecl;external libinst;
37
38implementation
39
40end.
  
1{ Copyright (C) 2010 Matthias Klumpp
2
3 Authors:
4 Matthias Klumpp
5
6 This unit is free software: you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free Software
8 Foundation, version 3.
9
10 This unit is distributed in the hope that it will be useful, but WITHOUT
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License v3
15 along with this unit. If not, see <http://www.gnu.org/licenses/>.}
16//** This unit contains libInstaller functions to perform software updates
17unit appupdate;
18
19{$mode objfpc}{$H+}
20
21interface
22
23uses
24 Classes, SysUtils, glib2, liTypes;
25
26 function li_updater_new: GPointer;cdecl;external libinst;
27 procedure li_updater_free(upd: GPointer);cdecl;external libinst;
28 procedure li_updater_set_sumode(upd: GPointer;val: GBoolean);cdecl;external libinst;
29 function li_updater_register_status_call(upd: GPointer;call: TLiStatusChangeCall;user_data: GPointer): GBoolean;cdecl;external libinst;
30 function li_updater_register_request_call(upd: GPointer;call: TRequestCall;user_data: GPointer): GBoolean;cdecl;external libinst;
31 function li_updater_register_newupdate_call(upd: GPointer;call: TNewUpdateEvent;user_data: GPointer): GBoolean;cdecl;external libinst;
32 function li_updater_search_updates(upd: GPointer): GBoolean;cdecl;external libinst;
33 function li_updater_updateid_oldversion(upd: GPointer;uid: GInt32): PGChar;cdecl;external libinst;
34 function li_updater_updateid_newversion(upd: GPointer;uid: GInt32): PGChar;cdecl;external libinst;
35 function li_updater_execute_update(upd: GPointer;uid: GInt32): GBoolean;cdecl;external libinst;
36
37implementation
38end.
  
1{ Copyright (C) 2008-2010 Matthias Klumpp
2
3 Authors:
4 Matthias Klumpp
5
6 This unit is free software: you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free Software
8 Foundation, version 3.
9
10 This unit is distributed in the hope that it will be useful, but WITHOUT
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License v3
15 along with this unit. If not, see <http://www.gnu.org/licenses/>.}
16//** This unit contains functions to use the installer part of libInstaller
17unit installer;
18
19{$MODE objfpc}{$H+}
20
21interface
22
23uses
24Classes, SysUtils, liTypes, GLib2;
25
26type
27
28TInstallPack = class
29private
30ins: Pointer;
31ForcedActn: String;
32procedure SetForced(s: String);
33public
34constructor Create;
35destructor Destroy;override;
36
37procedure Initialize(pkname: String);
38procedure SetStatusChangeCall(call: TLiStatusChangeCall;const userdata: Pointer=nil);
39procedure SetUserRequestCall(call: TRequestCall;const userdata: Pointer=nil);
40function PkType: TPkgType;
41procedure SetTestmode(b: Boolean);
42function GetDisallows: String;
43function GetSupDistris: String;
44function GetAppName: String;
45function GetAppVersion: String;
46function GetAppID: String;
47procedure ReadLongDescription(lst: TStringList);
48function GetWizardImagePath: String;
49procedure ReadLicense(lst: TStringList);
50procedure ReadProfiles(lst:TStringList);
51procedure ReadDeps(lst:TStringList);
52function GetAppIcon: String;
53function GetDesktopFiles: String;
54function GetAppCMD: String;
55function GetFileList: String;
56function StartInstallation: Boolean;
57function GetSignatureState: TPkgSigState;
58procedure EnableUSource(b: Boolean);
59procedure SetProfileID(i: Integer);
60procedure SetRootMode(b: Boolean);
61property Forced: String read ForcedActn write SetForced;
62property RemoteObject: GPointer read ins;
63end;
64
65function IsIPKAppInstalled(appname: String;appid: String;sumode: Boolean): Boolean;
66
67//Import library functions
68function li_setup_new: GPointer; cdecl;external libinst;
69procedure li_setup_free(setup: GPointer);external libinst;
70procedure li_setup_set_sumode(setup: GPointer;b: GBoolean);cdecl;external libinst;
71function li_setup_init(setup: GPointer;pkname: PGChar): PChar;cdecl;external libinst;
72function li_setup_get_pkgtype(setup: GPointer): TPkgType;cdecl;external libinst;
73function li_setup_get_disallows(setup: GPointer): PGChar;cdecl;external libinst;
74function li_setup_get_supported_distributions(setup: GPointer): PGChar; cdecl;external libinst;
75function li_setup_get_appname(setup: GPointer): PGChar;cdecl;external libinst;
76function li_setup_get_appversion(setup: GPointer): PGChar;cdecl;external libinst;
77function li_setup_get_pkgid(setup: GPointer): PGChar;cdecl;external libinst;
78function li_setup_get_long_description(setup: GPointer; list: GPointer): GBoolean;cdecl;external libinst;
79function li_setup_get_wizard_image_path(setup: GPointer): PGChar;cdecl;external libinst;
80function li_setup_get_license(setup: GPointer; list: GPointer): GBoolean;cdecl;external libinst;
81function li_setup_get_profiles_list(setup: GPointer; list: GPointer): GBoolean;cdecl;external libinst;
82function li_setup_get_appicon(setup: GPointer): PGChar;cdecl;external libinst;
83function li_setup_get_desktopfiles(setup: GPointer): PGChar;cdecl;external libinst;
84function li_setup_get_app_exec_command(setup: GPointer): PGChar;cdecl;external libinst;
85function li_setup_get_current_profile_filelist(setup: GPointer): PGChar;cdecl;external libinst;
86procedure li_setup_enable_usource_registering(setup: GPointer;b: GBoolean);cdecl;external libinst;
87function li_setup_register_status_call(setup: GPointer;call: TLiStatusChangeCall;user_data: GPointer): GBoolean;cdecl;external libinst;
88function li_setup_register_user_request_call(setup: GPointer;call: TRequestCall;user_data: GPointer): GBoolean;cdecl;external libinst;
89function li_setup_execute(setup: GPointer): GBoolean;cdecl;external libinst;
90procedure li_setup_set_forced(setup: GPointer;str: PGChar);cdecl;external libinst;
91function li_setup_get_dependencies(setup: GPointer; list: PStringList): GBoolean;cdecl;external libinst;
92function li_setup_set_profileid(setup: GPointer;id: GInt16): GBoolean;cdecl;external libinst;
93function li_setup_get_signature_state(setup: GPointer): TPkgSigState;cdecl;external libinst;
94function li_get_ipk_app_installed(appname: PGChar;appid: PGChar;sumode: GBoolean): GBoolean;cdecl;external libinst;
95procedure li_set_testmode(st: GBoolean);cdecl;external libinst;
96procedure li_setup_exec_by_daemon(setup: GPointer;b: Boolean);cdecl;external libinst;
97
98implementation
99
100{ TInstallPack }
101
102constructor TInstallPack.Create;
103begin
104inherited Create;
105ins := li_setup_new;
106end;
107
108destructor TInstallPack.Destroy;
109begin
110li_setup_free(@ins);
111inherited Destroy;
112end;
113
114procedure TInstallPack.Initialize(pkname: String);
115begin
116li_setup_init(@ins,PChar(pkname))
117end;
118
119procedure TInstallPack.SetStatusChangeCall(call: TLiStatusChangeCall;const userdata: GPointer=nil);
120begin
121li_setup_register_status_call(@ins,call,userdata)
122end;
123
124function TInstallPack.PkType: TPkgType;
125begin
126Result:=li_setup_get_pkgtype(@ins);
127end;
128
129procedure TInstallPack.SetTestmode(b: Boolean);
130begin
131li_set_testmode(b);
132end;
133
134function TInstallPack.GetDisallows: String;
135begin
136Result:=li_setup_get_disallows(@ins);
137end;
138
139function TInstallPack.GetSupDistris: String;
140begin
141Result:=li_setup_get_supported_distributions(@ins);
142end;
143
144function TInstallPack.GetAppName: String;
145begin
146Result:=li_setup_get_appname(@ins);
147end;
148
149function TInstallPack.GetAppVersion: String;
150begin
151Result:=li_setup_get_appversion(@ins);
152end;
153
154function TInstallPack.GetAppID: String;
155begin
156Result:=li_setup_get_pkgid(@ins);
157end;
158
159procedure TInstallPack.ReadLongDescription(lst: TStringList);
160begin
161li_setup_get_long_description(@ins,@lst)
162end;
163
164function TInstallPack.GetWizardImagePath: String;
165begin
166Result:=li_setup_get_wizard_image_path(@ins);
167end;
168
169procedure TInstallPack.ReadLicense(lst: TStringList);
170begin
171li_setup_get_license(@ins,@lst)
172end;
173
174procedure TInstallPack.ReadProfiles(lst: TStringList);
175begin
176li_setup_get_profiles_list(@ins,@lst);
177end;
178
179function TInstallPack.GetAppIcon: String;
180begin
181Result:=li_setup_get_appicon(@ins);
182end;
183
184function TInstallPack.GetDesktopFiles: String;
185begin
186Result:=li_setup_get_desktopfiles(@ins);
187end;
188
189function TInstallPack.GetAppCMD: String;
190begin
191Result:=li_setup_get_app_exec_command(@ins);
192end;
193
194function TInstallPack.GetFileList: String;
195begin
196Result:=li_setup_get_current_profile_filelist(@ins);
197end;
198
199procedure TInstallPack.SetUserRequestCall(call: TRequestCall;const userdata: GPointer=nil);
200begin
201li_setup_register_user_request_call(@ins,call,userdata)
202end;
203
204procedure TInstallPack.ReadDeps(lst: TStringList);
205begin
206li_setup_get_dependencies(@ins,@lst);
207end;
208
209function TInstallPack.StartInstallation: Boolean;
210begin
211Result:=li_setup_execute(@ins);
212end;
213
214procedure TInstallPack.SetRootMode(b: Boolean);
215begin
216li_setup_set_sumode(@ins,b);
217end;
218
219procedure TInstallPack.EnableUSource(b: Boolean);
220begin
221li_setup_enable_usource_registering(@ins,b);
222end;
223
224procedure TInstallPack.SetProfileID(i: Integer);
225begin
226li_setup_set_profileid(@ins,i);
227end;
228
229procedure TInstallPack.SetForced(s: String);
230begin
231ForcedActn:=s;
232li_setup_set_forced(@ins,PChar(s));
233end;
234
235function TInstallPack.GetSignatureState: TPkgSigState;
236begin
237 Result:=li_setup_get_signature_state(@ins);
238end;
239
240function IsIPKAppInstalled(appname: String;appid: String;sumode: Boolean): Boolean;
241begin
242Result:=li_get_ipk_app_installed(PChar(appname), PChar(appid),sumode);
243end;
244
245end.
  
1{ Copyright (C) 2008-2010 Matthias Klumpp
2
3 Authors:
4 Matthias Klumpp
5
6 This unit is free software: you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free Software
8 Foundation, version 3.
9
10 This unit is distributed in the hope that it will be useful, but WITHOUT
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License v3
15 along with this unit. If not, see <http://www.gnu.org/licenses/>.}
16//** LibInstaller functions to manage applications
17unit liappmgr;
18
19{$mode objfpc}{$H+}
20
21interface
22
23uses
24 Classes, SysUtils, glib2, liTypes;
25
26 function li_mgr_new: GPointer;cdecl;external libinst;
27 procedure li_mgr_free(mgr: GPointer);cdecl;external libinst;
28 function li_mgr_load_apps(mgr: GPointer): GBoolean;cdecl;external libinst;
29 function li_mgr_register_status_call(mgr: GPointer;call: TLiStatusChangeCall; user_data: GPointer): GBoolean;cdecl;external libinst;
30 function li_mgr_register_request_call(mgr: GPointer;call: TRequestCall;user_data: GPointer): TRqResult;cdecl;external libinst;
31 function li_mgr_register_app_call(mgr: GPointer;call: TAppEvent): GBoolean;cdecl;external libinst;
32 procedure li_mgr_set_sumode(mgr: GPointer;md: GBoolean);cdecl;external libinst;
33 function li_mgr_remove_app(mgr: GPointer;obj: TAppInfo): GBoolean;cdecl;external libinst;
34 function li_remove_ipk_installed_app(appname, appid: PChar;scall: TLiStatusChangeCall;fastmode: GBoolean): GBoolean; cdecl; external libinst;
35 function li_mgr_check_apps(mgr: GPointer;log: PStringList;root: GBoolean): GBoolean;cdecl;external libinst;
36 function li_mgr_fix_apps(mgr: GPointer;log: PStringList;root: GBoolean): GBoolean;cdecl;external libinst;
37
38implementation
39
40end.
  
1{ Copyright (C) 2010 Matthias Klumpp
2
3 Authors:
4 Matthias Klumpp
5
6 This unit is free software: you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free Software
8 Foundation, version 3.
9
10 This unit is distributed in the hope that it will be useful, but WITHOUT
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License v3
15 along with this unit. If not, see <http://www.gnu.org/licenses/>.}
16//** LibInstaller functions to perform software updates
17unit liappupdate;
18
19{$mode objfpc}{$H+}
20
21interface
22
23uses
24 Classes, SysUtils, glib2, liTypes;
25
26 function li_updater_new: GPointer;cdecl;external libinst;
27 procedure li_updater_free(upd: GPointer);cdecl;external libinst;
28 procedure li_updater_set_sumode(upd: GPointer;val: GBoolean);cdecl;external libinst;
29 function li_updater_register_status_call(upd: GPointer;call: TLiStatusChangeCall;user_data: GPointer): GBoolean;cdecl;external libinst;
30 function li_updater_register_request_call(upd: GPointer;call: TRequestCall;user_data: GPointer): GBoolean;cdecl;external libinst;
31 function li_updater_register_newupdate_call(upd: GPointer;call: TNewUpdateEvent;user_data: GPointer): GBoolean;cdecl;external libinst;
32 function li_updater_search_updates(upd: GPointer): GBoolean;cdecl;external libinst;
33 function li_updater_updateid_oldversion(upd: GPointer;uid: GInt32): PGChar;cdecl;external libinst;
34 function li_updater_updateid_newversion(upd: GPointer;uid: GInt32): PGChar;cdecl;external libinst;
35 function li_updater_execute_update(upd: GPointer;uid: GInt32): GBoolean;cdecl;external libinst;
36
37implementation
38end.
  
1{ Copyright (C) 2008-2010 Matthias Klumpp
2
3 Authors:
4 Matthias Klumpp
5
6 This unit is free software: you can redistribute it and/or modify it under
7 the terms of the GNU General Public License as published by the Free Software
8 Foundation, version 3.
9
10 This unit is distributed in the hope that it will be useful, but WITHOUT
11 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
12 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
13
14 You should have received a copy of the GNU General Public License v3
15 along with this unit. If not, see <http://www.gnu.org/licenses/>.}
16//** LibInstaller functions to perform software installations
17unit liinstaller;
18
19{$MODE objfpc}{$H+}
20
21interface
22
23uses
24Classes, SysUtils, liTypes, GLib2;
25
26type
27
28TInstallPack = class
29private
30ins: Pointer;
31ForcedActn: String;
32procedure SetForced(s: String);
33public
34constructor Create;
35destructor Destroy;override;
36
37procedure Initialize(pkname: String);
38procedure SetStatusChangeCall(call: TLiStatusChangeCall;const userdata: Pointer=nil);
39procedure SetUserRequestCall(call: TRequestCall;const userdata: Pointer=nil);
40function PkType: TPkgType;
41procedure SetTestmode(b: Boolean);
42function GetDisallows: String;
43function GetSupDistris: String;
44function GetAppName: String;
45function GetAppVersion: String;
46function GetAppID: String;
47procedure ReadLongDescription(lst: TStringList);
48function GetWizardImagePath: String;
49procedure ReadLicense(lst: TStringList);
50procedure ReadProfiles(lst:TStringList);
51procedure ReadDeps(lst:TStringList);
52function GetAppIcon: String;
53function GetDesktopFiles: String;
54function GetAppCMD: String;
55function GetFileList: String;
56function StartInstallation: Boolean;
57function GetSignatureState: TPkgSigState;
58procedure EnableUSource(b: Boolean);
59procedure SetProfileID(i: Integer);
60procedure SetRootMode(b: Boolean);
61property Forced: String read ForcedActn write SetForced;
62property RemoteObject: GPointer read ins;
63end;
64
65function IsIPKAppInstalled(appname: String;appid: String;sumode: Boolean): Boolean;
66
67//Import library functions
68function li_setup_new: GPointer; cdecl;external libinst;
69procedure li_setup_free(setup: GPointer);external libinst;
70procedure li_setup_set_sumode(setup: GPointer;b: GBoolean);cdecl;external libinst;
71function li_setup_init(setup: GPointer;pkname: PGChar): PChar;cdecl;external libinst;
72function li_setup_get_pkgtype(setup: GPointer): TPkgType;cdecl;external libinst;
73function li_setup_get_disallows(setup: GPointer): PGChar;cdecl;external libinst;
74function li_setup_get_supported_distributions(setup: GPointer): PGChar; cdecl;external libinst;
75function li_setup_get_appname(setup: GPointer): PGChar;cdecl;external libinst;
76function li_setup_get_appversion(setup: GPointer): PGChar;cdecl;external libinst;
77function li_setup_get_pkgid(setup: GPointer): PGChar;cdecl;external libinst;
78function li_setup_get_long_description(setup: GPointer; list: GPointer): GBoolean;cdecl;external libinst;
79function li_setup_get_wizard_image_path(setup: GPointer): PGChar;cdecl;external libinst;
80function li_setup_get_license(setup: GPointer; list: GPointer): GBoolean;cdecl;external libinst;
81function li_setup_get_profiles_list(setup: GPointer; list: GPointer): GBoolean;cdecl;external libinst;
82function li_setup_get_appicon(setup: GPointer): PGChar;cdecl;external libinst;
83function li_setup_get_desktopfiles(setup: GPointer): PGChar;cdecl;external libinst;
84function li_setup_get_app_exec_command(setup: GPointer): PGChar;cdecl;external libinst;
85function li_setup_get_current_profile_filelist(setup: GPointer): PGChar;cdecl;external libinst;
86procedure li_setup_enable_usource_registering(setup: GPointer;b: GBoolean);cdecl;external libinst;
87function li_setup_register_status_call(setup: GPointer;call: TLiStatusChangeCall;user_data: GPointer): GBoolean;cdecl;external libinst;
88function li_setup_register_user_request_call(setup: GPointer;call: TRequestCall;user_data: GPointer): GBoolean;cdecl;external libinst;
89function li_setup_execute(setup: GPointer): GBoolean;cdecl;external libinst;
90procedure li_setup_set_forced(setup: GPointer;str: PGChar);cdecl;external libinst;
91function li_setup_get_dependencies(setup: GPointer; list: PStringList): GBoolean;cdecl;external libinst;
92function li_setup_set_profileid(setup: GPointer;id: GInt16): GBoolean;cdecl;external libinst;
93function li_setup_get_signature_state(setup: GPointer): TPkgSigState;cdecl;external libinst;
94function li_get_ipk_app_installed(appname: PGChar;appid: PGChar;sumode: GBoolean): GBoolean;cdecl;external libinst;
95procedure li_set_testmode(st: GBoolean);cdecl;external libinst;
96procedure li_setup_exec_by_daemon(setup: GPointer;b: Boolean);cdecl;external libinst;
97
98implementation
99
100{ TInstallPack }
101
102constructor TInstallPack.Create;
103begin
104inherited Create;
105ins := li_setup_new;
106end;
107
108destructor TInstallPack.Destroy;
109begin
110li_setup_free(@ins);
111inherited Destroy;
112end;
113
114procedure TInstallPack.Initialize(pkname: String);
115begin
116li_setup_init(@ins,PChar(pkname))
117end;
118
119procedure TInstallPack.SetStatusChangeCall(call: TLiStatusChangeCall;const userdata: GPointer=nil);
120begin
121li_setup_register_status_call(@ins,call,userdata)
122end;
123
124function TInstallPack.PkType: TPkgType;
125begin
126Result:=li_setup_get_pkgtype(@ins);
127end;
128
129procedure TInstallPack.SetTestmode(b: Boolean);
130begin
131li_set_testmode(b);
132end;
133
134function TInstallPack.GetDisallows: String;
135begin
136Result:=li_setup_get_disallows(@ins);
137end;
138
139function TInstallPack.GetSupDistris: String;
140begin
141Result:=li_setup_get_supported_distributions(@ins);
142end;
143
144function TInstallPack.GetAppName: String;
145begin
146Result:=li_setup_get_appname(@ins);
147end;
148
149function TInstallPack.GetAppVersion: String;
150begin
151Result:=li_setup_get_appversion(@ins);
152end;
153
154function TInstallPack.GetAppID: String;
155begin
156Result:=li_setup_get_pkgid(@ins);
157end;
158
159procedure TInstallPack.ReadLongDescription(lst: TStringList);
160begin
161li_setup_get_long_description(@ins,@lst)
162end;
163
164function TInstallPack.GetWizardImagePath: String;
165begin
166Result:=li_setup_get_wizard_image_path(@ins);
167end;
168
169procedure TInstallPack.ReadLicense(lst: TStringList);
170begin
171li_setup_get_license(@ins,@lst)
172end;
173
174procedure TInstallPack.ReadProfiles(lst: TStringList);
175begin
176li_setup_get_profiles_list(@ins,@lst);
177end;
178
179function TInstallPack.GetAppIcon: String;
180begin
181Result:=li_setup_get_appicon(@ins);
182end;
183
184function TInstallPack.GetDesktopFiles: String;
185begin
186Result:=li_setup_get_desktopfiles(@ins);
187end;
188
189function TInstallPack.GetAppCMD: String;
190begin
191Result:=li_setup_get_app_exec_command(@ins);
192end;
193
194function TInstallPack.GetFileList: String;
195begin
196Result:=li_setup_get_current_profile_filelist(@ins);
197end;
198
199procedure TInstallPack.SetUserRequestCall(call: TRequestCall;const userdata: GPointer=nil);
200begin
201li_setup_register_user_request_call(@ins,call,userdata)
202end;
203
204procedure TInstallPack.ReadDeps(lst: TStringList);
205begin
206li_setup_get_dependencies(@ins,@lst);
207end;
208
209function TInstallPack.StartInstallation: Boolean;
210begin
211Result:=li_setup_execute(@ins);
212end;
213
214procedure TInstallPack.SetRootMode(b: Boolean);
215begin
216li_setup_set_sumode(@ins,b);
217end;
218
219procedure TInstallPack.EnableUSource(b: Boolean);
220begin
221li_setup_enable_usource_registering(@ins,b);
222end;
223
224procedure TInstallPack.SetProfileID(i: Integer);
225begin
226li_setup_set_profileid(@ins,i);
227end;
228
229procedure TInstallPack.SetForced(s: String);
230begin
231ForcedActn:=s;
232li_setup_set_forced(@ins,PChar(s));
233end;
234
235function TInstallPack.GetSignatureState: TPkgSigState;
236begin
237 Result:=li_setup_get_signature_state(@ins);
238end;
239
240function IsIPKAppInstalled(appname: String;appid: String;sumode: Boolean): Boolean;
241begin
242Result:=li_get_ipk_app_installed(PChar(appname), PChar(appid),sumode);
243end;
244
245end.
  
2424 {$ENDIF}
2525 Interfaces, //We use NoGUI widgetset
2626 Classes, SysUtils, CustApp,
27 Process, liUtils, Installer,
28 strLocale, IniFiles, Distri,
29 LiTranslator, ipkdef, gExt,
30 appman, liTypes, Forms;
27 Process, liUtils, LiInstaller,
28 StrLocale, IniFiles, Distri,
29 LiTranslator, IPKdef, GExt,
30 LiAppMgr, liTypes, Forms;
3131
3232type
3333
  
2727interface
2828
2929uses
30 Classes, SysUtils, dbus, PolKit, glib2, gExt, Installer, AppMan,
31 liUtils, liTypes, SimDBus, Contnrs, AppUpdate, SyncObjs;
30 Classes, SysUtils, DBus, PolKit, GLib2, gExt, LiInstaller, LiAppMgr,
31 LiUtils, LiTypes, SimDBus, Contnrs, LiAppUpdate, SyncObjs;
3232
3333type
3434 TAccessType = (AC_UNKNOWN, AC_AUTHORIZED, AC_NOT_AUTHORIZED);
  
1919{$mode objfpc}{$H+}
2020
2121uses
22 cthreads, Interfaces, Classes, SysUtils, CustApp, dbus, djobs,
23 Contnrs, SimDBus, liUtils, LCLIntf, SyncObjs, gExt;
22 cthreads, Interfaces, Classes, SysUtils, CustApp, dbus, DJobs,
23 Contnrs, SimDBus, LiUtils, LCLIntf, SyncObjs, GExt;
2424
2525type
2626
  
9999 TabOrder = 0
100100 object TabSheet1: TTabSheet
101101 Caption = 'Main'
102 ClientHeight = 214
103 ClientWidth = 622
102 ClientHeight = 210
103 ClientWidth = 620
104104 object Memo1: TMemo
105105 Left = 0
106 Height = 214
106 Height = 210
107107 Top = 0
108 Width = 622
108 Width = 620
109109 Align = alClient
110110 Lines.Strings = (
111111 '<no description given>'
115115 end
116116 object TabSheet2: TTabSheet
117117 Caption = 'Details'
118 ClientHeight = 214
119 ClientWidth = 622
118 ClientHeight = 210
119 ClientWidth = 620
120120 object Memo2: TMemo
121121 Left = 0
122122 Height = 214
132132 end
133133 object TabSheet3: TTabSheet
134134 Caption = 'Installation'
135 ClientHeight = 214
136 ClientWidth = 622
135 ClientHeight = 210
136 ClientWidth = 620
137137 object Memo3: TMemo
138138 Left = 6
139139 Height = 137
180180 TabOrder = 1
181181 end
182182 object FinBtn1: TBitBtn
183 Left = 583
184 Height = 22
185 Top = 296
186 Width = 43
183 Left = 585
184 Height = 24
185 Top = 294
186 Width = 41
187187 Anchors = [akRight, akBottom]
188188 AutoSize = True
189189 Caption = 'Finish'
  
2323
2424uses
2525 Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
26 Buttons, ComCtrls, LCLType, LCLIntf, igobase, ExtCtrls, process, liUtils,
27 strLocale, IconLoader;
26 Buttons, ComCtrls, LCLType, LCLIntf, IGoBase, ExtCtrls, Process, LiUtils,
27 StrLocale, IconLoader;
2828
2929type
3030
  
6060 TabOrder = 0
6161 object WPage: TPage
6262 Caption = 'Welcome'
63 ClientWidth = 647
64 ClientHeight = 353
63 ClientWidth = 645
64 ClientHeight = 349
6565 object LeftImg: TImage
6666 Left = 0
67 Height = 353
67 Height = 349
6868 Top = 0
6969 Width = 146
7070 Align = alLeft
134134 end
135135 object DPage: TPage
136136 Caption = 'Description'
137 ClientWidth = 647
138 ClientHeight = 353
137 ClientWidth = 645
138 ClientHeight = 349
139139 object Label4: TLabel
140140 Left = 12
141141 Height = 24
162162 end
163163 object LPage: TPage
164164 Caption = 'License'
165 ClientWidth = 647
166 ClientHeight = 353
165 ClientWidth = 645
166 ClientHeight = 349
167167 object Label5: TLabel
168168 Left = 12
169169 Height = 24
221221 end
222222 object IMPage: TPage
223223 Caption = 'Mode'
224 ClientWidth = 647
225 ClientHeight = 353
224 ClientWidth = 645
225 ClientHeight = 349
226226 object Label13: TLabel
227227 Left = 12
228228 Height = 24
265265 end
266266 object IPage: TPage
267267 Caption = 'Install'
268 ClientWidth = 647
269 ClientHeight = 353
268 ClientWidth = 645
269 ClientHeight = 349
270270 object Label6: TLabel
271271 Left = 4
272272 Height = 27
337337 end
338338 object FinPage: TPage
339339 Caption = 'Finish'
340 ClientWidth = 647
341 ClientHeight = 353
340 ClientWidth = 645
341 ClientHeight = 349
342342 object Label10: TLabel
343343 Left = 6
344344 Height = 27
388388 end
389389 object FailPage: TPage
390390 Caption = 'Failed'
391 ClientWidth = 647
392 ClientHeight = 353
391 ClientWidth = 645
392 ClientHeight = 349
393393 object Label15: TLabel
394394 Left = 6
395395 Height = 27
421421 ClientWidth = 651
422422 TabOrder = 1
423423 object FinBtn1: TBitBtn
424 Left = 601
425 Height = 22
426 Top = 17
427 Width = 43
424 Left = 603
425 Height = 24
426 Top = 15
427 Width = 41
428428 Anchors = [akRight, akBottom]
429429 AutoSize = True
430430 Caption = 'Finish'
434434 Visible = False
435435 end
436436 object AbortBtn1: TBitBtn
437 Left = 304
438 Height = 22
439 Top = 16
440 Width = 44
437 Left = 305
438 Height = 24
439 Top = 14
440 Width = 42
441441 Anchors = [akBottom]
442442 AutoSize = True
443443 Caption = 'Abort'
447447 end
448448 object Button5: TBitBtn
449449 Left = 8
450 Height = 22
451 Top = 16
452 Width = 40
450 Height = 24
451 Top = 14
452 Width = 38
453453 Anchors = [akLeft, akBottom]
454454 AutoSize = True
455455 Caption = 'Back'
459459 Visible = False
460460 end
461461 object Button1: TBitBtn
462 Left = 602
463 Height = 22
464 Top = 17
465 Width = 41
462 Left = 604
463 Height = 24
464 Top = 15
465 Width = 39
466466 Anchors = [akRight, akBottom]
467467 AutoSize = True
468468 Caption = 'Next'
  
2323uses
2424 Forms, distri, Buttons, Classes, Dialogs,
2525 LCLIntf, LCLType, liTypes, liUtils, Process, xTypeFm, ComCtrls, Controls, ExtCtrls,
26 FileUtil, Graphics, StdCtrls, SysUtils, Installer, strLocale, IconLoader, LResources;
26 FileUtil, Graphics, StdCtrls, SysUtils, LiInstaller, StrLocale, IconLoader, LResources;
2727
2828type
2929
  
2222
2323uses
2424 Classes, SysUtils, FileUtil, LResources, Forms, Controls, Graphics, Dialogs,
25 ExtCtrls, Menus, LiUtils, Process, strLocale, AppMan, LCLType, LiTranslator;
25 ExtCtrls, Menus, LiUtils, Process, StrLocale, LiAppMgr, LCLType, LiTranslator;
2626
2727type
2828
  
1919{$mode objfpc}{$H+}
2020
2121uses {$IFDEF UNIX}
22 cthreads, {$ENDIF}
22 CThreads, {$ENDIF}
2323 Interfaces, // this includes the LCL widgetset
24 gExt,
24 GExt,
2525 Forms,
26 igobase,
27 dgfrm,
28 strLocale,
26 IGoBase,
27 DGFrm,
28 StrLocale,
2929 SysUtils,
30 liUtils,
31 liTranslator,
32 liTypes,
33 xtypefm,
34 Installer,
30 LiUtils,
31 LiTranslator,
32 LiTypes,
33 XTypeFm,
34 LiInstaller,
3535 LCLType,
3636 Dialogs;
3737
  
2121interface
2222
2323uses
24 Spin, Forms, Menus, AppMan, Distri, AppItem, AppList, GLib2,
24 Spin, Forms, Menus, LiAppMgr, Distri, AppItem, AppList, GLib2,
2525 Buttons, Classes, Dialogs, LCLType, liTypes, liUtils, Process, AboutBox,
2626 CheckLst, ComCtrls, Controls, ExtCtrls, FileUtil, Graphics, Inifiles, StdCtrls,
27 SysUtils, strLocale, Uninstall, IconLoader, LResources, PackageKit, PkTypes;
27 SysUtils, StrLocale, Uninstall, IconLoader, LResources, PackageKit, PkTypes;
2828
2929type
3030
  
2222
2323uses
2424 Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs, StdCtrls,
25 Process, ExtCtrls, LiUtils, LCLType, Manager, strLocale, AppMan;
25 Process, ExtCtrls, LiUtils, LCLType, Manager, strLocale, LiAppMgr;
2626
2727type
2828
  
3838 ParentColor = False
3939 end
4040 object Button1: TButton
41 Left = 112
41 Left = 113
4242 Height = 28
4343 Top = 126
44 Width = 83
44 Width = 81
4545 Anchors = [akBottom]
4646 AutoSize = True
4747 Caption = 'I know the risk'
  
2121interface
2222
2323uses
24 Forms, Classes, Dialogs, Controls, FileUtil, Graphics, StdCtrls, SysUtils, strLocale, LResources;
24 Forms, Classes, Dialogs, Controls, FileUtil, Graphics, StdCtrls, SysUtils, StrLocale, LResources;
2525
2626type
2727
  
9191 TabOrder = 1
9292 end
9393 object BitBtn1: TBitBtn
94 Left = 420
94 Left = 422
9595 Height = 30
9696 Top = 231
97 Width = 44
97 Width = 42
9898 Anchors = [akRight, akBottom]
9999 AutoSize = True
100100 Caption = 'Close'
107107 Left = 8
108108 Height = 26
109109 Top = 72
110 Width = 69
110 Width = 67
111111 AutoSize = True
112112 Caption = 'Details >>'
113113 Constraints.MaxHeight = 26
  
2020interface
2121
2222uses
23 Forms, AppMan, Buttons, Classes, Dialogs, LCLType, LiUtils, liTypes, Process, ComCtrls,
24 Controls, ExtCtrls, FileUtil, Graphics, StdCtrls, SysUtils, strLocale, LResources;
23 Forms, LiAppMgr, Buttons, Classes, Dialogs, LCLType, LiUtils, liTypes, Process, ComCtrls,
24 Controls, ExtCtrls, FileUtil, Graphics, StdCtrls, SysUtils, StrLocale, LResources;
2525
2626type
2727
  
2424 TabOrder = 0
2525 end
2626 object BitBtn1: TBitBtn
27 Left = 510
28 Height = 22
29 Top = 448
30 Width = 87
27 Left = 512
28 Height = 24
29 Top = 446
30 Width = 85
3131 Anchors = [akRight, akBottom]
3232 AutoSize = True
3333 Caption = 'Install updates'
4949 end
5050 object BitBtn2: TBitBtn
5151 Left = 8
52 Height = 22
53 Top = 448
54 Width = 106
52 Height = 24
53 Top = 446
54 Width = 104
5555 Anchors = [akLeft, akBottom]
5656 AutoSize = True
5757 Caption = 'Check for updates'
6161 end
6262 object StatusBar1: TStatusBar
6363 Left = 0
64 Height = 16
65 Top = 578
64 Height = 20
65 Top = 574
6666 Width = 608
6767 Panels = <
6868 item
  
2323uses
2424 Forms, Menus, Buttons, Classes, Dialogs, LCLType, liTypes,
2525 LiUtils, Process, CheckLst, ComCtrls, Controls, ExtCtrls,
26 Graphics, StdCtrls, SysUtils, AppUpdate, strLocale, IconLoader,
27 LResources, updexecfrm;
26 Graphics, StdCtrls, SysUtils, StrLocale, IconLoader,
27 LResources, updexecfrm, LiAppUpdate;
2828
2929type
3030
104104 rqWarning:
105105 begin
106106 if Application.MessageBox(PAnsiChar(msg), PChar(rsWarning),
107 MB_YESNO + MB_IconWarning) <> idYes then
107 MB_YESNO + MB_IconWarning) <> idYes then
108108 begin
109109 ShowMessage(rsINClose);
110110 Result := rqsNo;
115115 rqQuestion:
116116 begin
117117 if Application.MessageBox(PAnsiChar(msg), PChar(rsQuestion),
118 MB_YESNO + MB_IconQuestion) <> idYes then
118 MB_YESNO + MB_IconQuestion) <> idYes then
119119 Result := rqsNo
120120 else
121121 Result := rqsYes;
  
2121interface
2222
2323uses
24 AppUpdate,
25 Classes, ComCtrls, Controls, Dialogs, FileUtil, Forms, Graphics,
26 LiUtils, liTypes, LResources, Process, StdCtrls,
27 SysUtils, strLocale;
24 LiAppUpdate, Classes, ComCtrls, Controls, Dialogs, FileUtil, Forms, Graphics,
25 LiUtils, LiTypes, LResources, Process, StdCtrls, SysUtils, StrLocale;
2826
2927type
3028
  
2121
2222echo "Installing development files..."
2323mkdir -p $DESTDIR$prefix/include/Listaller
24mkdir -p $DESTDIR$prefix/share/pascal/listaller
2425mkdir -p $DESTDIR$libdir/pkgconfig/
2526
2627#Copy C headers
2728cp ../lib/cbind/*.h $DESTDIR$prefix/include/Listaller/
28sed "s#%PREFIX%#$prefix#" ../lib/cbind/libinstaller.pc.in > ../lib/cbind/libinstaller.pc
2929cp ../lib/cbind/*.pc $DESTDIR$libdir/pkgconfig/
30#Link library
31CUR=$(pwd)
3032cd $DESTDIR$libdir
3133if [ ! -f libinstaller.so ]; then
3234ln -s $libdir/libinstaller.so.0.4 libinstaller.so
3335fi
36cd $CUR
37#Copy Pascal units
38cp ./bind/liappmgr.pas $DESTDIR$prefix/share/pascal/listaller
39cp ./bind/liappupdate.pas $DESTDIR$prefix/share/pascal/listaller
40cp ./bind/liinstaller.pas $DESTDIR$prefix/share/pascal/listaller
41cp ./litypes.pas $DESTDIR$prefix/share/pascal/listaller
3442
35echo "Devfiles installed."
43echo "Finished installation of development files."
  
3333
3434#Initialize build dirs
3535# Create necessary dirs
36mkdir -p ../build
3736mkdir -p ../build/locale
3837mkdir -p ../build/lib_$ARCH-$OS
3938mkdir -p ../build/$ARCH-$OS
5050 ln -s libinstaller.so.0.4 libinstaller.so
5151 cd ../src
5252fi
53#Write PC file
54sed "s#%PREFIX%#$prefix#" ../lib/cbind/libinstaller.pc.in > ../lib/cbind/libinstaller.pc
5355
5456echo "Compiling Listaller daemon..."
5557lazbuild -B --ws=nogui ./daemon/listallerd.lpr