|
1 | 1 | Class extends _core |
2 | 2 |
|
3 | 3 | property _target : Text |
| 4 | +property _hasLicenses : Boolean |
4 | 5 |
|
5 | 6 |
|
6 | 7 | //MARK:- |
@@ -49,36 +50,49 @@ Class constructor($customSettings : Object) |
49 | 50 | This.settings.packedProject:=True |
50 | 51 | End if |
51 | 52 |
|
52 | | - //Checking license |
53 | | - |
54 | | - If (This._hasLicenses()) |
55 | | - |
56 | | - Else |
57 | | - This._log(New object(\ |
58 | | - "function"; "License file checking"; \ |
59 | | - "message"; "License file doesn't exist"; \ |
60 | | - "severity"; Error message; \ |
61 | | - "path"; This.settings.license.path)) |
62 | | - |
63 | | - End if |
64 | | - |
65 | | - |
66 | | - //If ((This.settings.license=Null) || (Not(OB Instance of(This.settings.license; 4D.File)))) |
67 | | - //This._log(New object(\ |
68 | | - "function"; "License file checking"; \ |
69 | | - "message"; "License file is not defined"; \ |
70 | | - "severity"; Information message)) |
71 | | - //Else |
72 | | - //If (Not(This.settings.license.exists)) |
73 | | - ////This._validInstance:=False |
74 | | - //This._log(New object(\ |
75 | | - "function"; "License file checking"; \ |
76 | | - "message"; "License file doesn't exist"; \ |
77 | | - "severity"; Error message; \ |
78 | | - "path"; This.settings.license.path)) |
79 | | - //End if |
80 | | - //End if |
81 | | - |
| 53 | + // Checking license |
| 54 | + // Fix ACI0105672 |
| 55 | + This._hasLicenses:=False |
| 56 | + Case of |
| 57 | + |
| 58 | + : ((Value type(This.settings.license)=Is text) && (This.settings.license=License Automatic mode)) |
| 59 | + This._hasLicenses:=True |
| 60 | + This._log(New object(\ |
| 61 | + "function"; "License file checking"; \ |
| 62 | + "message"; "Automatic license integration"; \ |
| 63 | + "severity"; Information message)) |
| 64 | + |
| 65 | + : (Value type(This.settings.license)=Is object) && (OB Instance of(This.settings.license; 4D.File) && OB Instance of(This.settings.xmlKeyLicense; 4D.File)) |
| 66 | + |
| 67 | + If (Not(This.settings.license.exists && This.settings.xmlKeyLicense.exists)) |
| 68 | + If (Not(This.settings.license.exists)) |
| 69 | + This._log(New object(\ |
| 70 | + "function"; "License file checking"; \ |
| 71 | + "message"; "License file doesn't exist"; \ |
| 72 | + "severity"; Error message; \ |
| 73 | + "path"; This.settings.license.path)) |
| 74 | + End if |
| 75 | + If (Not(This.settings.xmlKeyLicense.exists)) |
| 76 | + This._log(New object(\ |
| 77 | + "function"; "License file checking"; \ |
| 78 | + "message"; "XML Key license file doesn't exist"; \ |
| 79 | + "severity"; Error message; \ |
| 80 | + "path"; This.settings.xmlKeyLicense.path)) |
| 81 | + End if |
| 82 | + Else |
| 83 | + This._hasLicenses:=True |
| 84 | + This._log(New object(\ |
| 85 | + "function"; "License file checking"; \ |
| 86 | + "message"; "License files are correctly defined"; \ |
| 87 | + "severity"; Information message)) |
| 88 | + End if |
| 89 | + |
| 90 | + Else |
| 91 | + This._log(New object(\ |
| 92 | + "function"; "License file checking"; \ |
| 93 | + "message"; "License file is not defined"; \ |
| 94 | + "severity"; Information message)) |
| 95 | + End case |
82 | 96 |
|
83 | 97 | //Checking source app |
84 | 98 | If ((This.settings.sourceAppFolder=Null) || (Not(OB Instance of(This.settings.sourceAppFolder; 4D.Folder)))) |
@@ -372,45 +386,9 @@ Function _setAppOptions() : Boolean |
372 | 386 |
|
373 | 387 | End if |
374 | 388 |
|
375 | | - |
376 | 389 | return False |
377 | 390 |
|
378 | 391 |
|
379 | | - |
380 | | - //MARK:- Add embedded database in client app |
381 | | - |
382 | | -/* |
383 | | - |
384 | | -Function _hasLicenses() -> $status : Boolean |
385 | | -.................................................................................... |
386 | | -Parameter Type in/out Description |
387 | | -.................................................................................... |
388 | | -$status Boolean out True if licenses are associated in the settings. |
389 | | -.................................................................................... |
390 | | - |
391 | | -*/ |
392 | | - |
393 | | -Function _hasLicenses : Boolean |
394 | | - |
395 | | - Case of |
396 | | - |
397 | | - : ((Value type(This.settings.license)=Is text) && (This.settings.license=License Automatic mode)) |
398 | | - return True |
399 | | - |
400 | | - |
401 | | - : (Value type(This.settings.license)=Is object) && (OB Instance of(This.settings.license; 4D.File) && OB Instance of(This.settings.xmlKeyLicense; 4D.File)) |
402 | | - |
403 | | - return This.settings.license.exists && This.settings.xmlKeyLicense.exists |
404 | | - |
405 | | - |
406 | | - Else |
407 | | - |
408 | | - return False |
409 | | - |
410 | | - End case |
411 | | - |
412 | | - |
413 | | - |
414 | 392 | //MARK:- fix from bugbase |
415 | 393 |
|
416 | 394 | Function _fix_settings : Boolean |
@@ -1063,7 +1041,7 @@ $infos.OtherIconFolder": "DarkMode", |
1063 | 1041 |
|
1064 | 1042 | End if |
1065 | 1043 |
|
1066 | | - If (This._hasLicenses()) |
| 1044 | + If (This._hasLicenses) |
1067 | 1045 |
|
1068 | 1046 | $success:=($success) ? This._generateLicense(4D Server) : False |
1069 | 1047 |
|
|
0 commit comments