Browse code

Repomaker added

Lorenz Glaser authored onWed/Sep/2020 18:0:nd
Showing202 changed files
1 1
new file mode 100755
2 2
Binary files /dev/null and b/repomaker/64bit/Repomaker differ
3 3
new file mode 100755
4 4
Binary files /dev/null and b/repomaker/Repomaker differ
5 5
new file mode 100644
... ...
@@ -0,0 +1,1997 @@
1
+#!/boot/home/config/bin/yab
2
+
3
+//programmvariablen
4
+
5
+WorkDirectory()
6
+PRGMenu=1
7
+start=1
8
+grafikverzeichnis$=WorkDir$+"/gfx/"
9
+bin_Verzeichnis$=WorkDir$+"/bin/"
10
+settings_dir$="/boot/home/config/settings/repomaker"
11
+mountvolume$=bin_Verzeichnis$+"mountvolume"
12
+diskfree$=bin_Verzeichnis$+"df "
13
+listdir$=bin_Verzeichnis$+"listdir  "
14
+
15
+daten_dir$="/boot/home/.besly/repomaker/data"
16
+local_directory$="/boot/home/Desktop/repomaker"
17
+if (start=1) then
18
+	repodaten$="repodaten.info"
19
+	settings_program$="program_settings"
20
+	config_verzeichnis_auslesen()
21
+
22
+endif
23
+
24
+rem ###### Ueberpruefungen #########
25
+if(IfExists(daten_dir$)) then
26
+	start=1
27
+	if(IfExists(local_directory$)) then
28
+	else
29
+		output$=system$("mkdir -p "+local_directory$)
30
+	endif
31
+	if(IfExists(daten_dir$+"/"+settings_datei$)) then
32
+	else
33
+    	schreiben_settingsdatei(start)	
34
+    endif
35
+    start=0
36
+else
37
+	
38
+	output$=system$("mkdir -p "+daten_dir$)
39
+	output$=system$("mkdir -p "+local_directory$)
40
+
41
+	start=1
42
+    schreiben_settingsdatei(start)	
43
+endif
44
+	  
45
+if(IfExists(settings_dir$+"/"+settings_program$)) then
46
+	
47
+else
48
+	output$=system$("mkdir -p "+settings_dir$)
49
+   	 save_prefs()
50
+   	 start=1
51
+endif
52
+
53
+   
54
+
55
+
56
+//print dir_re$
57
+dir_li$ = "/boot/home"
58
+dir_re$ = local_directory$
59
+
60
+REM ###### Ueberpruefungen Ende #########	
61
+
62
+
63
+StartWindow(PRGMenu,TLB)
64
+
65
+
66
+
67
+sub WorkDirectory()
68
+REM ######Verzeichnis bestimmen######
69
+
70
+if(ready_to_compile=1)then
71
+	if (peek("isbound")) then
72
+		ProgramFolder$ = peek$("directory")
73
+	else
74
+		ProgramFolder$ = system$("pwd")
75
+		ProgramFolder$ = left$(ProgramFolder$, len(ProgramFolder$)-1)
76
+	fi
77
+else
78
+		ProgramFolder$="/Share/yab_hpkg/repomaker"
79
+endif
80
+
81
+end sub
82
+
83
+REM ######Verzeichnis bestimmen ENDE######
84
+
85
+
86
+main()
87
+REM ######Tastatur / Maus abfragen######
88
+sub main()
89
+	
90
+	dim part$(1)
91
+	dim mouse$(1)
92
+	dim ViewMouse$(1)
93
+	inloop = true
94
+	first=1
95
+while(inloop)
96
+	
97
+	if (first=1) then
98
+		dateibrowserLinks(dir_li$, first)
99
+		dateibrowserRechts(dir_re$)	
100
+		laufwerke_li(first)	
101
+		first=0
102
+	else
103
+		
104
+	endif
105
+		mmsg$ = MOUSE MESSAGE$
106
+	if (mmsg$<>"" and mmsg$<>old_mmsg$) then
107
+		print mmsg$
108
+		//old_mmsg$= mmsg$ 
109
+		nx = split(mmsg$, mouse$(), ":")
110
+		Viewname$=mouse$(1)
111
+		//print Viewname$
112
+		Xmouse	= val(mouse$(2))
113
+		Ymouse	= val(mouse$(3))
114
+		BLmouse= val(mouse$(4))
115
+		BCmouse= val(mouse$(5))
116
+		BRmouse= val(mouse$(6))
117
+		casestring$=Viewname$+":"+mouse$(4)+":"+mouse$(5)+":"+mouse$(6)
118
+		//print "casestring:: "+casestring$
119
+	endif
120
+	
121
+	switch (casestring$)
122
+		case Viewname$+":1:0:0"
123
+			
124
+			if(left$(casestring$,1)="R") then
125
+				print "VIEWNAME::::"+Viewname$
126
+				auslesen_settingsdatei(Viewname$,"repodaten.info")
127
+				dir_re$=local_directory$+"/"+Viewname$
128
+				print dir_re$
129
+				readfolder_re(dir_re$)
130
+			endif
131
+		break
132
+		
133
+		case "Exit:0:0:1"
134
+				//button_setzen(Xmouse,Ymouse)				
135
+		break
136
+		case "browserLi:0:0:1"
137
+			Selected_li$ = POPUPMENU Xmouse ,Ymouse, "copy|copy as|copy with correct filename||move" , "vertikal1" //move as
138
+			//print Selected_li$
139
+			if (Selected_li$="copy") then
140
+				name1$ = columnbox get$ "browserLi", 2, val(PartThree$)	
141
+				correct$="no"
142
+				if (instr(name1$,".hpkg")) then
143
+					copy_file(name1$,correct$)
144
+				else
145
+					alert "Only .hpkg files allowed", "Ok", "warning"
146
+				endif
147
+			elseif (Selected_li$="copy as") then
148
+				name1$ = columnbox get$ "browserLi", 2, val(PartThree$)	
149
+				if (instr(name1$,".hpkg")) then
150
+					copyas(name1$)
151
+				else
152
+					alert "Only .hpkg files allowed", "Ok", "warning"
153
+				endif
154
+			elseif (Selected_li$="copy with correct filename") then
155
+				name1$ = columnbox get$ "browserLi", 2, val(PartThree$)	
156
+				correct$="yes"
157
+				if (instr(name1$,".hpkg")) then
158
+					copy_file(name1$,correct$)
159
+				else
160
+					alert "Only .hpkg files allowed", "Ok", "warning"
161
+				endif
162
+				
163
+
164
+			elseif (Selected_li$="move") then
165
+				name1$ = columnbox get$ "browserLi", 2, val(PartThree$)	
166
+				if (instr(name1$,".hpkg")) then
167
+					move_file(name1$)
168
+				else
169
+					alert "Only .hpkg files allowed", "Ok", "warning"
170
+				endif
171
+			elseif (Selected_li$="move as") then
172
+				name1$ = columnbox get$ "browserLi", 2, val(PartThree$)	
173
+				move_file_as(name1$)
174
+			endif
175
+		break
176
+		case "browserRe:0:0:1"
177
+			Selected_re$ = POPUPMENU Xmouse,Ymouse,"Attribute|Make Folder|Rename||Delete" , "vertikal2"
178
+			if (Selected_re$="Make Folder") then
179
+				makedir()
180
+			elseif (Selected_re$="Rename") then
181
+				name$ = columnbox get$ "browserRe", 2, val(PartThree$)	
182
+				rename(name$)
183
+			elseif (Selected_re$="Delete") then
184
+				name$ = columnbox get$ "browserRe", 2, val(PartThree$)	
185
+				rm(name$)
186
+			elseif (Selected_re$="Attribute") then
187
+				name$ = columnbox get$ "browserRe", 2, val(PartThree$)	
188
+				attributes(name$)
189
+			endif			
190
+		break
191
+		
192
+		case "Settings:1:0:0"			
193
+				options=0
194
+				STACKVIEW SET "Stackview", 2				
195
+		break
196
+		case "Refresh:1:0:0"			
197
+			dir_li$=dir_li$
198
+			readfolder_li(dir_li$)
199
+		break
200
+		case "save:1:0:0"
201
+			if NOT(settingsdatei$ ="") then
202
+				schreiben_settingsdatei()
203
+			else
204
+				alert "Please insert a Name for your settingsfile", "OK", "info"
205
+				
206
+			endif	
207
+		break
208
+		default:
209
+		
210
+		break
211
+	end switch
212
+	keymsg$ = keyboard message$(Start_FensterName$)
213
+	if(keymsg$<>"" and keymsg$<>old_keymsg$) then
214
+		print keymsg$
215
+		old_keymsg$ = keymsg$
216
+	fi
217
+	switch(keymsg$)
218
+		default:
219
+		break
220
+	end switch
221
+	
222
+	msg$ = message$
223
+	print msg$
224
+	if (split(msg$, part$(), ":|") > 2) then
225
+		PartOne$=part$(1)
226
+		PartTwo$ = part$(2)
227
+		PartThree$ = part$(3)
228
+	endif
229
+	if (split(msg$, part$(), ":|") > 3) then
230
+		PartFour$ = part$(4)
231
+	endif
232
+	
233
+	switch(msg$)
234
+		
235
+		case Start_FensterName$+":_QuitRequested|"
236
+		case Start_FensterName$+":App:Quit|"				 
237
+			Window close Start_FensterName$
238
+		break
239
+		case Start_FensterName$+":App:About|"
240
+			about()
241
+		break
242
+		case "AboutClose|"
243
+			window close "View_About"
244
+		break
245
+		case "Settings|"
246
+		case Start_FensterName$+":App:Settings|"
247
+			options=0
248
+			STACKVIEW SET "Stackview", 2
249
+			//auslesen_settingsdatei(repodaten$)
250
+			//settings()
251
+			//	
252
+		break
253
+		
254
+		case Start_FensterName$+":App:Settingsfiles:"+PartFour$+"|"
255
+			print PartFour$
256
+			options=0
257
+			
258
+			auslesen_settingsdatei(PartFour$,"repodaten.info")
259
+			STACKVIEW set "Stackview" , 2
260
+			//settings()
261
+			//	
262
+		break
263
+		case Start_FensterName$+":Help:Online Documentation|"
264
+			launch "http://www.besly.de/menu/search/archiv/sys/repomaker.html"		
265
+		break
266
+		case Start_FensterName$+":Help:BeSly - Knowledge Base|"
267
+			launch "http://www.besly.de"
268
+		break
269
+		case "edit|"			
270
+			OPTION SET "settingsdatei", "Enabled", 1
271
+			OPTION SET "namerepo", "Enabled", 1
272
+			OPTION SET "vendor", "Enabled", 1 
273
+			OPTION SET "summary", "Enabled", 1 
274
+			OPTION SET "url", "Enabled", 1
275
+			OPTION SET "priority", "Enabled", 1 
276
+			OPTION SET "architecture", "Enabled", 1 
277
+			OPTION SET "repositorydirectory", "Enabled", 0 
278
+			OPTION SET "local_directory", "Enabled", 0 
279
+			OPTION SET "save", "Enabled", 1
280
+		break
281
+		case "save|"
282
+			if NOT(settingsdatei$ ="") then
283
+				schreiben_settingsdatei()
284
+				OPTION SET "settingsdatei", "Enabled", 0
285
+				OPTION SET "namerepo", "Enabled", 0
286
+				OPTION SET "vendor", "Enabled", 0 
287
+				OPTION SET "summary", "Enabled", 0 
288
+				OPTION SET "url", "Enabled", 0
289
+				OPTION SET "priority", "Enabled", 0 
290
+				OPTION SET "architecture", "Enabled", 0 
291
+				OPTION SET "repositorydirectory", "Enabled", 0 
292
+				OPTION SET "local_directory", "Enabled", 0 
293
+			else
294
+				alert "Please insert a Name for your settingsfile", "OK", "info"
295
+				
296
+			endif	
297
+			//schreiben_settingsdatei()
298
+			wait 0.2
299
+			//STACKVIEW SET "Stackview", 1	
300
+		break
301
+		case "close|"
302
+			OPTION SET "settingsdatei", "Enabled", 0
303
+			OPTION SET "namerepo", "Enabled", 0
304
+			OPTION SET "vendor", "Enabled", 0 
305
+			OPTION SET "summary", "Enabled", 0 
306
+			OPTION SET "url", "Enabled", 0
307
+			OPTION SET "priority", "Enabled", 0 
308
+			OPTION SET "architecture", "Enabled", 0 
309
+			OPTION SET "repositorydirectory", "Enabled", 0 
310
+			OPTION SET "local_directory", "Enabled", 0 
311
+			OPTION SET "save", "Enabled", 0
312
+			STACKVIEW SET "Stackview", 1
313
+		break
314
+		case "getonlineinfo|"
315
+			get_online_information()
316
+		break
317
+		case "generateRepo|"
318
+			dir_re$=local_directory$
319
+			readfolder_re(dir_re$)
320
+			status=false
321
+			deaktivierte_Button(status)
322
+			generate_repo()
323
+			status=true
324
+			deaktivierte_Button(status)
325
+		break
326
+		case "updateRepomakerfolder|"
327
+			if (instr(namerepo$,"here") or instr(vendor$,"please") or instr(summary$,"please") or instr(priority$,"please") or instr(url$,"please") or instr(architecture$,"please")) then
328
+				alert "Please edit your config, otherwise the program doesn't work", "OK", "stop"
329
+			else
330
+				Selected = alert "Do you want delete all *.hpkg files in the Desktop/repomaker directory and then get the lastest *hpkg files from your/our Repo", "yes","no","", "Warning"
331
+				//print Selected					
332
+				if (Selected=1) then
333
+					status=false
334
+					deaktivierte_Button(status)
335
+					updateRepomakerfolder()
336
+					status=true
337
+					deaktivierte_Button(status)
338
+				elseif (Selected=2 or Selected=3) then
339
+				else
340
+				endif
341
+			endif
342
+		break
343
+		case "copy_to_repo_information|"
344
+			namerepo$ = TEXTCONTROL GET$ "onlinenamerepo"
345
+			vendor$= TEXTCONTROL GET$  "onlinevendor"	
346
+			summary$= TEXTCONTROL GET$ "onlinesummary"
347
+			priority$= TEXTCONTROL GET$ "onlinepriority" 
348
+			url$=TEXTCONTROL GET$ "onlineurl"
349
+			architecture$=TEXTCONTROL GET$ "onlinearchitecture"
350
+			//local_directory$=TEXTCONTROL GET$ "local_directory"
351
+			repositorydirectory$="repo"  //TEXTCONTROL GET$ "repositorydirectory"
352
+		 	TEXTCONTROL set "namerepo",namerepo$
353
+			TEXTCONTROL set  "summary",summary$
354
+			TEXTCONTROL set "url",url$
355
+			TEXTCONTROL set "vendor",vendor$
356
+			TEXTCONTROL set "priority",priority$
357
+			TEXTCONTROL set "architecture",architecture$
358
+			OPTION SET "save", "Enabled",1
359
+		break
360
+		//case "updateRepo|"
361
+			//update_repo()
362
+		//break
363
+		case"repomakerfolder|"
364
+			dir_re$=local_directory$
365
+			readfolder_re(dir_re$)
366
+		break
367
+		case "yourrepofolder|"
368
+			if (instr(repositorydirectory$,"please")) then
369
+				ALERT "Please edit your settings", "ok", "warning"
370
+			else
371
+				dir_re$=local_directory$+"/"+repositorydirectory$
372
+				readfolder_re(dir_re$)
373
+			endif
374
+		break	
375
+		case "OpenR|"
376
+			if (instr(repositorydirectory$,"please")) then
377
+				ALERT "Please edit your settings", "ok", "warning"
378
+			else
379
+				dir_re$=local_directory$+"/"+repositorydirectory$
380
+				launch dir_re$
381
+			endif
382
+		break			
383
+		case "browserLi:_Select:"+PartThree$+"|"
384
+			name$ = COLUMNBOX GET$ "browserLi", 2, val(PartThree$)					
385
+		break
386
+		case "browserLi:_Invoke:"+PartThree$+"|"
387
+			name$ = columnbox get$ "browserLi", 2, val(PartThree$)					
388
+			directory1$ = columnbox get$ "browserLi", 9, val(PartThree$)
389
+			//print directory1$
390
+			if (directory1$="d") then
391
+				if (name$=".")then
392
+					dir_li$="/boot"
393
+					readfolder_li(dir_li$)
394
+				elseif (name$="..")then
395
+					for cf = len(dir_li$) to 1 step -1
396
+						if(mid$(dir_li$,cf,1) = "/") then
397
+							dir_back$ = left$(dir_li$,cf-1)
398
+						break
399
+						fi
400
+					next cf
401
+					if (dir_back$="")then
402
+						dir_li$="/"
403
+						readfolder_li(dir_li$)
404
+					else
405
+						//print "hier1: "+dir_back$
406
+						dir_li$=dir_back$
407
+						readfolder_li(dir_li$)
408
+					fi
409
+				else
410
+					dir_li$=dir_li$+"/"+name$
411
+					readfolder_li(dir_li$)
412
+				endif
413
+			else
414
+				name$="\""+name$+"\""
415
+			endif
416
+		break
417
+		case "left_folders:Folder|"
418
+			dir_li$="/boot/home"
419
+			readfolder_li(dir_li$)
420
+		break
421
+		case "left_folders:Home|"
422
+			dir_li$="/boot/home"
423
+			readfolder_li(dir_li$)
424
+		break
425
+		case "left_folders:Desktop|"
426
+			dir_li$="/boot/home/Desktop"
427
+			readfolder_li(dir_li$)
428
+		break
429
+		case "left_folders:Config|"
430
+			dir_li$="/boot/home/config"
431
+			readfolder_li(dir_li$)
432
+		break
433
+		case "left_folders:Trash|"
434
+			dir_li$="/boot/trash"
435
+			readfolder_li(dir_li$)
436
+		break
437
+		case "left_drives:"+PartTwo$+"|"
438
+			tli = dropbox get "left_drives"
439
+			name2_li$ = dropbox get$ "left_drives", tli+1
440
+			if (tli=position_boot_li) then
441
+			else
442
+				name4_li$=system$("unmount \"/"+name3_li$+"\"")
443
+			endif					
444
+			if (name2_li$=name3_li$) then					
445
+			else 						
446
+				name3_li$=name2_li$							
447
+				name_li$=system$("mountvolume \""+name2_li$+"\"")							
448
+			//	print name_li$								
449
+			endif				
450
+			laufwerk_neu_li$=system$("cd /\""+name2_li$+"\"")
451
+			//print laufwerk_neu_li$
452
+			dir_li$="/"+name2_li$					
453
+			if (dir_li$="/Volumes") then
454
+			else
455
+				wait 2
456
+				readfolder_li(dir_li$)
457
+			endif
458
+		break
459
+		case "QuellLaufwerk_links:"+PartTwo$+"|"
460
+			QuellLaufwerk_links = dropbox get "QuellLaufwerk_links"
461
+			name20_li$ = dropbox get$ "QuellLaufwerk_links", QuellLaufwerk_links+1
462
+			if (Quelllaufwerk_links=position_boot_li) then
463
+			else
464
+				name21_li$=system$("unmount \"/"+name23_li$+"\"")
465
+			endif					
466
+			if (name20_li$=name23_li$) then					
467
+			else 						
468
+				name23_li$=name20_li$							
469
+				readfolder_li(dir_li$)
470
+				name_li$=system$("mountvolume \""+name20_li$+"\"")							
471
+			endif				
472
+			laufwerk_neu_li$=system$("cd /\""+name20_li$+"\"")
473
+			dir_li$="/\""+name20_li$+"\""
474
+			//print "dir_li$"	+dir_li$				
475
+			if (dir_li$="/Volumes") then
476
+			else
477
+				wait 2
478
+				readfolder_li(dir_li$)
479
+			endif
480
+		break
481
+		case "Quelllaufwerk:"+PartTwo$+"|"
482
+			Quelllaufwerk_li = dropbox get "left_drives"
483
+			name2_li$ = dropbox get$ "left_drives", Quelllaufwerk_li+1
484
+			if (Quelllaufwerk_li=position_boot_li) then
485
+			else
486
+				name4_li$=system$("unmount \"/"+name3_li$+"\"")
487
+			endif					
488
+			if (name2_li$=name3_li$) then					
489
+			else 						
490
+				name3_li$=name2_li$							
491
+				readfolder_li(dir_li$)
492
+				name_li$=system$("mountvolume \""+name2_li$+"\"")							
493
+				//print name_li$								
494
+			endif				
495
+			laufwerk_neu_li$=system$("cd /\""+name2_li$+"\"")
496
+			//print laufwerk_neu_li$
497
+			dir_li$="/"+name2_li$					
498
+			if (dir_li$="/Volumes") then
499
+			else
500
+				wait 2
501
+				readfolder_li(dir_li$)
502
+			endif
503
+		break
504
+		case "browserRe:_Select:"+PartThree$+"|"
505
+			name$ = columnbox get$ "browserRe", 2, val(PartThree$)
506
+		break
507
+		case "browserRe:_Invoke:"+PartThree$+"|"
508
+			name$ = COLUMNBOX GET$ "browserRe", 2, val(PartThree$)
509
+			directory1$ = columnbox get$ "browserRe", 9, val(PartThree$)
510
+			if (directory1$="d") then
511
+				if (name$=".")then
512
+					dir_re$="/boot"
513
+					readfolder_re(dir_re$)
514
+				elseif (name$="..")then
515
+					for cf = len(dir_re$) to 1 step -1
516
+						if(mid$(dir_re$,cf,1) = "/") then
517
+							dir_back$ = left$(dir_re$,cf-1)
518
+							break
519
+						fi
520
+					next cf
521
+					if (dir_back$="")then
522
+						dir_re$="/"
523
+						readfolder_re(dir_re$)
524
+					else
525
+						//print "hier1: "+dir_back$
526
+						dir_re$=dir_back$
527
+						readfolder_re(dir_re$)
528
+					fi
529
+				else
530
+					dir_re$=dir_re$+"/"+name$
531
+					readfolder_re(dir_re$)
532
+				fi
533
+			else
534
+				name$="\""+name$+"\""
535
+			fi
536
+		break
537
+		case "makedir|"
538
+        	makefolder$=textcontrol get$ "dirname"
539
+        	if (PartOneMakeDir$="browserLi") then
540
+				mkdir$=system$("mkdir "+"\""+dir_li$+"/"+makefolder$+"\"")
541
+            	if (dir_re$=dir_li$) then
542
+                   	readfolder_li(dir_li$)
543
+                	readfolder_re(dir_re$)
544
+ 				else
545
+                	readfolder_li(dir_li$)
546
+                endif
547
+            elseif (PartOneMakeDir$="browserRe") then
548
+                mkdir$=system$("mkdir "+"\""+dir_re$+"/"+makefolder$+"\"")
549
+                if (dir_li$=dir_re$) then
550
+                	readfolder_li(dir_li$)
551
+                 	readfolder_re(dir_re$)
552
+                else
553
+                	readfolder_re(dir_re$)
554
+           		endif
555
+            endif
556
+            window close "makefolder"
557
+        break
558
+        case "makefolder:_QuitRequested|"
559
+        	window close "makefolder"
560
+       	break
561
+        case "copyas|"
562
+          	copyname$=textcontrol get$ "copyname"
563
+           	print right$(copyname$,5)
564
+           	if (right$(copyname$,5)=".hpkg") then
565
+           		copy_as(copyname$)
566
+           	else            		
567
+           		ALERT "your given filename isn't allow, please choose a filename which contains .hpkg", "ok","warning"
568
+           	endif
569
+		break
570
+		case "copyas:_QuitRequested|"
571
+			window close "copyas"
572
+		break
573
+		case "rename|"
574
+			renamename$=textcontrol get$ "renamename"
575
+			//print PartOneRename$
576
+			if (PartOneRename$="browserLi") then
577
+            	found=instr(renamename$,">")
578
+                if(found)then
579
+                  	found=instr(renamename$,">")
580
+					renamename$=left$(renamename$,found-2)
581
+					found=instr(name$,">")
582
+					name$=left$(name$,found-2)
583
+					renameas$=system$("mv "+"\""+dir_li$+"/"+name$+"\""+" "+"\""+dir_li$+"/"+renamename$+"\"")
584
+				else
585
+					renameas$=system$("mv "+"\""+dir_li$+"/"+name$+"\""+" "+"\""+dir_li$+"/"+renamename$+"\"")
586
+				endif
587
+				if (dir_re$=dir_li$) then
588
+                   	readfolder_li(dir_li$)
589
+                   	readfolder_re(dir_re$)
590
+				else
591
+					readfolder_li(dir_li$)
592
+				endif 
593
+			elseif (PartOneRename$="browserRe") then
594
+            	found=instr(renamename$,">")
595
+               	if(found)then
596
+            	   	found=instr(renamename$,">")
597
+					renamename$=left$(renamename$,found-2)
598
+					found=instr(name$,">")
599
+					name$=left$(name$,found-2)
600
+					renameas$=system$("mv "+dir_re$+"/"+"\""+name$+"\""+" "+dir_re$+"/"+"\""+renamename$+"\"")
601
+				else
602
+                   	renameas$=system$("mv "+dir_re$+"/"+"\""+name$+"\""+" "+dir_re$+"/"+"\""+renamename$+"\"")
603
+				endif
604
+				if (dir_re$=dir_li$) then
605
+					readfolder_li(dir_li$)
606
+					readfolder_re(dir_re$)
607
+				else
608
+					readfolder_re(dir_re$)
609
+				endif
610
+			endif
611
+			window close "rename"
612
+		break
613
+        case "rename:_QuitRequested|"
614
+			window close "rename"
615
+		break
616
+		case "attribute:_QuitRequested|"
617
+			window close "attribute"
618
+		break
619
+		case "read1:ON|"
620
+			nummer1=400
621
+		break
622
+		case "write1:ON|"
623
+			nummer2=200
624
+		break
625
+		case "run1:ON|"
626
+			nummer3=100
627
+		break
628
+		case "read2:ON|"
629
+			nummer4=40
630
+		break
631
+		case "write2:ON|"
632
+			nummer5=20
633
+		break
634
+		case "run2:ON|"
635
+			nummer6=10
636
+		break
637
+		case "read3:ON|"
638
+			nummer7=4
639
+		break
640
+		case "write3:ON|"
641
+			nummer8=2
642
+		break
643
+		case "run3:ON|"
644
+			nummer9=1
645
+		break
646
+		case "read1:OFF|"
647
+			nummer1=0
648
+		break
649
+		case "write1:OFF|"
650
+			nummer2=0
651
+		break
652
+		case "run1:OFF|"
653
+			nummer3=0
654
+		break
655
+		case "read2:OFF|"
656
+			nummer4=0
657
+		break
658
+		case "write2:OFF|"
659
+			nummer5=0
660
+		break
661
+		case "run2:OFF|"
662
+			nummer6=0
663
+		break
664
+		case "read3:OFF|"
665
+			nummer7=0
666
+		break
667
+		case "write3:OFF|"
668
+			nummer8=0
669
+		break
670
+		case "run3:OFF|"
671
+			nummer9=0
672
+		break
673
+		case "attributeOK|"
674
+        	nummer=nummer1+nummer2+nummer3+nummer4+nummer5+nummer6+nummer7+nummer8+nummer9
675
+			if (PartOneATTR$="browserLi")then
676
+            	Output$=system$("chmod "+str$(nummer)+" "+dir_li$+"/"+"\""+name$+"\"")
677
+				readfolder_li(dir_li$)
678
+			elseif (PartOneATTR$="browserRe")then
679
+				Output$=system$("chmod -c "+str$(nummer)+" "+dir_re$+"/"+"\""+name$+"\"")
680
+				readfolder_re(dir_re$)
681
+			fi
682
+			window close "attribute"
683
+		break
684
+		case "rm_ja|"
685
+			if (PartOneRM$="browserLi") then
686
+				if(rmname_typ$="l")then
687
+					found=instr(rmname$,">")
688
+					rmname$=left$(rmname$,found-2)
689
+					rm$=system$("unlink "+"\""+dir_li$+"/"+rmname$+"\"")
690
+				else
691
+					//print "cd "+"\""+dir_li$+"\""+"; rm -r "+"\""+rmname$+"\""
692
+					rm$=system$("cd "+"\""+dir_li$+"\""+"; rm -r "+"\""+rmname$+"\"") 
693
+				endif
694
+				readfolder_li(dir_li$)
695
+				readfolder_re(dir_re$)
696
+			elseif (PartOneRM$="browserRe") then
697
+				if(rmname_typ$="l")then
698
+					found=instr(rmname$,">")
699
+					rmname$=left$(rmname$,found-2)
700
+					rm$=system$("unlink "+"\""+dir_re$+"/"+rmname$+"\"")
701
+				else
702
+					rm$=system$("cd "+"\""+dir_re$+"\""+"; rm -r "+"\""+rmname$+"\"")  //cd "+dir_li$+";
703
+				endif
704
+				readfolder_re(dir_re$)
705
+				readfolder_li(dir_li$)
706
+			endif
707
+			window close "remove"
708
+		break
709
+		case "rm_nein|"
710
+			window close "remove"
711
+		break
712
+		case "remove:_QuitRequested|"
713
+			window close "remove"
714
+		break   
715
+        // case "Quelllaufwerk:"+PartTwo$+"|"
716
+        case "settings:_Invoke:"+PartThree$+"|"
717
+          	repodaten$ = LISTBOX GET$ "settings", val(PartThree$)
718
+           	print repodaten$
719
+           	auslesen_settingsdatei(repodaten$)
720
+           	
721
+           	settings_view()
722
+        break    
723
+        case "load|"            
724
+           	
725
+           	if ((LISTBOX GET$ "settings", val(PartThree$))="") then
726
+           	else
727
+           		repodaten$ = LISTBOX GET$ "settings", val(PartThree$)
728
+           		auslesen_settingsdatei(repodaten$)
729
+           	     print repodaten$
730
+           		settings_view()
731
+           	endif            	
732
+		break                    
733
+		default:	
734
+		break
735
+	end switch
736
+	
737
+	x=WINDOW GET Start_FensterName$, "Width"
738
+	//print "breite"+str$(x)
739
+	y=WINDOW GET Start_FensterName$, "Height"
740
+	//print "breite"+str$(y)
741
+	
742
+
743
+	
744
+	
745
+	if(window count<1) inloop = false
746
+		sleep 0.001
747
+
748
+
749
+	wait 0.1
750
+wend
751
+end sub
752
+REM ######Tastatur / Maus abfragen ENDE######
753
+
754
+
755
+Sub StartWindow(PRGMenu,TLB)
756
+REM ######Fensteraufbau######
757
+
758
+	
759
+	ProgrammName$="Repomaker"
760
+	Start_FensterName$="Repomaker"
761
+	NameView$="Programme"
762
+	
763
+	screenWidth = peek("desktopwidth")
764
+	screenHeight = peek("desktopheight")
765
+	
766
+	WindowSize_x=800
767
+	WindowSize_y=650
768
+
769
+	
770
+	
771
+	window open ((screenWidth/2)-(WindowSize_x/2)), ((screenHeight/2)-(WindowSize_y/2)) to ((screenWidth/2)+(WindowSize_x/2)), ((screenHeight/2)+(WindowSize_y/2)), Start_FensterName$,ProgrammName$
772
+	//window set  Start_FensterName$, "MinimumTo", WindowSize_x,WindowSize_y
773
+	window set  Start_FensterName$, "MaximumTo", screenWidth,screenHeight
774
+	
775
+	if (PRGMenu=1) then
776
+		menu "App", "About", "",Start_FensterName$	
777
+		menu "App", "Settings", "", Start_FensterName$
778
+		menu "App", "Settingsfiles", "", Start_FensterName$
779
+		menu "App", "Quit", "", Start_FensterName$
780
+		//submenu "App","Settingsfiles","besly","", Start_FensterName$
781
+		//print Verzeichnisse_numElements
782
+		//print settingsdatei$(1)
783
+		for u=1 to Verzeichnisse_numElements-1
784
+			submenu "App","Settingsfiles",settingsdatei$(u),"", Start_FensterName$
785
+		next u	
786
+		//settingsdatei$(Verzeichnisse_numElements)
787
+		
788
+		menu "Help", "Online Documentation", "",Start_FensterName$		
789
+		menu "Help", "BeSly - Knowledge Base", "", Start_FensterName$
790
+		//menu "App", "Quit", "", Start_FensterName$
791
+	else
792
+	endif	
793
+	
794
+	STACKVIEW 0,20 TO WindowSize_x,WindowSize_y, "Stackview" ,3, Start_FensterName$
795
+	STACKVIEW set "Stackview" , 1
796
+	layout "left,right",Start_FensterName$
797
+	
798
+	settings()	
799
+	
800
+	File_lister_View()
801
+	//info_user()
802
+End sub
803
+
804
+sub settings()
805
+	
806
+	//print "OPTIONS"+str$(options)
807
+	viewbreite_fuer_settings = VIEW GET "Stackview2", "width"
808
+	viewhoehe_fuer_settings = VIEW GET "Stackview2", "height"
809
+	layout "left,right","Stackview2"
810
+	
811
+	onlinerepobox$= "onlinerepoinformationen"
812
+	repobox$="repoinformationen"
813
+	
814
+	repobox=VIEW GET repobox$, "Exists"
815
+    onlinerepobox=View GET onlinerepobox$,"Exists"
816
+	print repobox:print onlinerepobox
817
+//	if (repobox=1  ) then
818
+//		print "yese"
819
+//		view remove repobox$
820
+//		view remove onlinerepobox$
821
+//		Settings_view()
822
+//	elseif(repobox=0) then
823
+		Settings_view()
824
+//	endif
825
+end sub		
826
+sub Settings_view()
827
+	//Draw TEXT
828
+	local abstand_x
829
+	local abstand_y
830
+	//abstand_x=16
831
+	abstand_x=16
832
+	abstand_y=30
833
+	BOXVIEW 10,10 TO viewbreite_fuer_settings -10,330, "repoboxff", "Repo-Settings", 2,"Stackview2"
834
+	view 0,0 to viewbreite_fuer_settings -10,330,repobox$, "repoboxff"
835
+	//DRAW SET "bgColor", 144,112,144,repobox$
836
+	layout "left,right",repobox$
837
+	viewbreite_fuer_settings_inhalte =( VIEW GET repobox$, "width")-10
838
+	viewhoehe_fuer_listbox1 = VIEW GET repobox$, "height"
839
+	draw text abstand_x,abstand_y*1, "Name of Settingsfile", repobox$
840
+	draw text abstand_x,abstand_y*2, "Name from your Repo:", repobox$
841
+	draw text abstand_x,abstand_y*3, "Vendor:", repobox$
842
+	draw text abstand_x,abstand_y*4, "Summary:", repobox$	
843
+	draw text abstand_x,abstand_y*5, "priority:", repobox$
844
+	draw text abstand_x,abstand_y*6, "URL to the repo:", repobox$
845
+	draw text abstand_x,abstand_y*7, "Arichitecture:", repobox$
846
+	draw text abstand_x,abstand_y*8, "local directory:", repobox$
847
+	draw text abstand_x,abstand_y*9, "Repository directory:", repobox$
848
+	rechter_Abstand=200
849
+	TEXTCONTROL 170,15 to viewbreite_fuer_settings_inhalte-rechter_Abstand ,35, "settingsdatei","",settingsdatei$, repobox$
850
+	TEXTCONTROL 170,45 TO viewbreite_fuer_settings_inhalte-rechter_Abstand ,65, "namerepo" , "", namerepo$, repobox$
851
+	TEXTCONTROL 170,75 TO viewbreite_fuer_settings_inhalte-rechter_Abstand ,95, "vendor" , "", vendor$, repobox$
852
+	TEXTCONTROL 170,105 TO viewbreite_fuer_settings_inhalte-rechter_Abstand ,125, "summary" , "", summary$, repobox$	
853
+	TEXTCONTROL 170,135 TO viewbreite_fuer_settings_inhalte-rechter_Abstand ,155, "priority" , "",priority$, repobox$
854
+	TEXTCONTROL 170,165 TO viewbreite_fuer_settings_inhalte-rechter_Abstand ,185, "url" , "", url$, repobox$
855
+	TEXTCONTROL 170,195 TO viewbreite_fuer_settings_inhalte-rechter_Abstand ,215, "architecture" , "", architecture$, repobox$
856
+	TEXTCONTROL 170,225 TO viewbreite_fuer_settings_inhalte-rechter_Abstand ,245, "local_directory" , "", local_directory$, repobox$
857
+	TEXTCONTROL 170,255 TO viewbreite_fuer_settings_inhalte-rechter_Abstand ,275, "repositorydirectory" , "", repositorydirectory$, repobox$
858
+	tooltip "namerepo", "Must be the same name as you given in your hpkg, otherwise you the nothing in Haiku Paketmanager"
859
+	tooltip "url","the Url must contain the repository directory"
860
+	tooltip "repositorydirectory", "This directory must be the same name after your url <http://www.domain.xyz/>, in this example it was repo"
861
+	//view viewbreite_fuer_settings_inhalte-140,0 to viewbreite_fuer_settings_inhalte,280, "Buttonview", repobox$
862
+	//boxview viewbreite_fuer_settings_inhalte-140,0 to viewbreite_fuer_settings_inhalte,280, "Buttonview","",2,repobox$
863
+	layout "right",repobox$
864
+	//BUTTON viewbreite_fuer_settings_inhalte-160,15 TO viewbreite_fuer_settings_inhalte-30,35,  "load" , "Load", repobox$
865
+	BUTTON viewbreite_fuer_settings_inhalte-160,45 TO viewbreite_fuer_settings_inhalte-30,65,  "edit" , "Edit", repobox$
866
+	BUTTON viewbreite_fuer_settings_inhalte-160,75 TO viewbreite_fuer_settings_inhalte-30,95,  "save" , "Save", repobox$
867
+	BUTTON viewbreite_fuer_settings_inhalte-160,105 TO viewbreite_fuer_settings_inhalte-30,125,  "close" , "Close", repobox$
868
+	
869
+	//LISTBOX viewbreite_fuer_settings_inhalte-130,135 TO viewbreite_fuer_settings_inhalte,viewhoehe_fuer_listbox1-22, "settings", 1, repobox$
870
+	//auslesen_settingsordner()
871
+	TEXTCONTROL SET "settingsdatei", "exclude", " "
872
+	OPTION SET "settingsdatei", "Enabled", options
873
+	OPTION SET "namerepo", "Enabled", options 
874
+	OPTION SET "vendor", "Enabled", options 
875
+	OPTION SET "summary", "Enabled", options 
876
+	OPTION SET "url", "Enabled", options 
877
+	OPTION SET "priority", "Enabled", options 
878
+	OPTION SET "architecture", "Enabled", options 
879
+	OPTION SET "local_directory", "Enabled", options 
880
+	OPTION SET "repositorydirectory", "Enabled", options 
881
+	OPTION SET "save", "Enabled", options
882
+	
883
+
884
+	layout "left,right", repobox$
885
+	BOXVIEW 10,330 TO viewbreite_fuer_settings -10,viewhoehe_fuer_settings-10, onlinerepobox$ , "Online-Repo-Information", 2, "Stackview2"
886
+	//layout "left",onlinerepobox$
887
+	viewhoehe_fuer_listbox = VIEW GET onlinerepobox$, "height"
888
+	
889
+	draw text 16,30, "current url to your repo:", onlinerepobox$
890
+	draw text 16,60, "Name from your Repo:", onlinerepobox$
891
+	draw text 16,90, "Vendor:", onlinerepobox$
892
+	draw text 16,120, "Summary:", onlinerepobox$	
893
+	draw text 16,150, "priority:", onlinerepobox$
894
+	draw text 16,180, "URL to the repo:", onlinerepobox$
895
+	draw text 16,210, "Arichitecture:", onlinerepobox$
896
+	TEXTCONTROL 170,15 TO viewbreite_fuer_settings_inhalte-rechter_Abstand ,35, "repourl" , "", repourl$, onlinerepobox$
897
+	TEXTCONTROL 170,45 TO viewbreite_fuer_settings_inhalte-rechter_Abstand ,65, "onlinenamerepo" , "", onlinenamerepo$, onlinerepobox$
898
+	TEXTCONTROL 170,75 TO viewbreite_fuer_settings_inhalte-rechter_Abstand ,95, "onlinevendor" , "", onlinevendor$, onlinerepobox$
899
+	TEXTCONTROL 170,105 TO viewbreite_fuer_settings_inhalte-rechter_Abstand ,125, "onlinesummary" , "", onlinesummary$, onlinerepobox$	
900
+	TEXTCONTROL 170,135 TO viewbreite_fuer_settings_inhalte-rechter_Abstand ,155, "onlinepriority" , "",onlinepriority$, onlinerepobox$
901
+	TEXTCONTROL 170,165 TO viewbreite_fuer_settings_inhalte-rechter_Abstand ,185, "onlineurl" , "", onlineurl$, onlinerepobox$
902
+	TEXTCONTROL 170,195 TO viewbreite_fuer_settings_inhalte-rechter_Abstand ,215, "onlinearchitecture" , "", onlinearchitecture$, onlinerepobox$
903
+	
904
+	layout "right",onlinerepobox$
905
+	BUTTON viewbreite_fuer_settings_inhalte-160,15 TO (viewbreite_fuer_settings_inhalte-30),35,  "getonlineinfo" , "get online data", onlinerepobox$
906
+	BUTTON viewbreite_fuer_settings_inhalte-160,45 TO (viewbreite_fuer_settings_inhalte-30),65,  "copy_to_repo_information" , "copy to settings", onlinerepobox$
907
+	tooltip "repourl","The Url must contain http://hereyourdomain.xyz with the directory wehre your repo file is\n this means http://hereyourdomain.xyz/repo/repo"
908
+	LISTBOX viewbreite_fuer_settings_inhalte-160,75 TO viewbreite_fuer_settings_inhalte-30,viewhoehe_fuer_listbox-22, "onlinefiles", 1, onlinerepobox$
909
+	OPTION SET "onlinenamerepo", "Enabled", 0 
910
+	OPTION SET "onlinevendor", "Enabled", 0 
911
+	OPTION SET "onlinesummary", "Enabled", 0 
912
+	OPTION SET "onlineurl", "Enabled", 0 
913
+	OPTION SET "onlinepriority", "Enabled", 0
914
+	OPTION SET "onlinearchitecture", "Enabled", 0 
915
+
916
+
917
+end sub
918
+
919
+
920
+
921
+sub statusanzeige(status,anzahl, first)
922
+	if (first=1) then
923
+		window open ((screenWidth/2)-250), ((screenHeight/2)-150) to ((screenWidth/2)+250), ((screenHeight/2)+150), "Statusanzeige", "Status"
924
+		window set  "Statusanzeige", "MinimumTo", 500,300
925
+		window set  "Statusanzeige", "MaximumTo", 500,300		
926
+		STATUSBAR 10, 110 TO 490, 140, "Converting", "Converting", "Audio files...", "Statusanzeige"
927
+	elseif (first=0) then	
928
+		berechung=(100*status)/anzahl
929
+		if (status>1 and anzahl=0) then
930
+			window close "Statusanzeige"					
931
+		else
932
+			Statusbar Set "Converting", "Converting "+str$(status), " from "+str$(anzahl)+" Audio files", berechung
933
+		endif
934
+	else
935
+	endif
936
+end sub
937
+sub status_blank(first, arbeite)
938
+	if (first=1) then
939
+		window open ((screenWidth/2)-250), ((screenHeight/2)-150) to ((screenWidth/2)+250), ((screenHeight/2)+150), "Statusanzeige_blank", "Status"
940
+		window set  "Statusanzeige_blank", "MinimumTo", 500,300
941
+		window set  "Statusanzeige_blank", "MaximumTo", 500,300
942
+		STATUSBAR 10, 110 TO 490, 140, "Blank", "Blanking", "", "Statusanzeige_blank"
943
+	elseif (first=0) then
944
+		Statusbar Set "Blank", "Blanking ","", arbeite
945
+		
946
+	endif
947
+end sub
948
+
949
+sub rm(name$)
950
+	window open ((screenWidth/2)-170), ((screenHeight/2)-80) to ((screenWidth/2)+170), ((screenHeight/2)+80), "remove", "Delete"
951
+	window set  "remove", "MinimumTo", 340,160
952
+	window set  "remove", "MaximumTo", 340,160
953
+	//err = draw image 0,0, grafikverzeichnis$+"themes/marble/backgrounds/top.png", "remove"
954
+	draw text 20, 40, "Do you realy want to delete File, Link or Directory ", "remove"
955
+	draw text 20, 60, ""+name$+" ?", "remove"
956
+	button 60,110 to 160,130, "rm_ja", "yes", "remove"
957
+	button 180,110 to 280,130, "rm_nein", "no", "remove"
958
+	PartOneRM$=PartOne$
959
+	rmname$=name$
960
+end sub
961
+sub attributes(name$)
962
+	//print PartOne$
963
+	window open ((screenWidth/2)-225), ((screenHeight/2)-80) to ((screenWidth/2)+225), ((screenHeight/2)+80), "attribute", "Change Permission"
964
+	window set  "attribute", "MinimumTo", 450,160
965
+	window set  "attribute", "MaximumTo", 450,160
966
+	//err = draw image 0,0, grafikverzeichnis$+"themes/marble/backgrounds/top.png", "attribute"
967
+	benutzer$="root"
968
+	gruppe$="0"
969
+	draw text 20, 20, "Please set the permission for "+name$, "attribute"
970
+	draw text 100, 40, "User", "attribute"
971
+	draw text 160, 40, "Group", "attribute"
972
+	draw text 220, 40, "Other", "attribute"
973
+	draw text 300, 40, "Username", "attribute"
974
+	textcontrol 290,45 to 420,60, "benutzer", "",benutzer$,"attribute"
975
+	draw text 300, 85, "Groupname", "attribute"
976
+	textcontrol 290,90 to 420,105, "gruppe", "",gruppe$,"attribute"
977
+	draw text 20, 70, "read", "attribute"
978
+	draw text 20, 90, "write", "attribute"
979
+	draw text 20, 110, "execute", "attribute"
980
+	checkbox 120,50, "read1", "", read1, "attribute"
981
+	checkbox 120,70, "write1", "", write1, "attribute"
982
+	checkbox 120,90, "run1", "", run1, "attribute"
983
+	checkbox 180,50, "read2", "", read2, "attribute"
984
+	checkbox 180,70, "write2", "", write2, "attribute"
985
+	checkbox 180,90, "run2", "", run2, "attribute"
986
+	checkbox 240,50, "read3", "", read3, "attribute"
987
+	checkbox 240,70, "write3", "", write3, "attribute"
988
+	checkbox 240,90, "run3", "", run3, "attribute"
989
+	attribute1$ = columnbox get$ PartOne$, 10, val(PartThree$)
990
+	
991
+	if (mid$(attribute1$,1,1)="r") then
992
+		CHECKBOX SET "read1", 1
993
+		nummer1=400
994
+	else
995
+		CHECKBOX SET "read1", 0
996
+	fi
997
+	if (mid$(attribute1$,2,1)="w") then
998
+		CHECKBOX SET "write1", 1
999
+		nummer2=200
1000
+	else
1001
+		CHECKBOX SET "write1", 0
1002
+	fi
1003
+	if (mid$(attribute1$,3,1)="x") then
1004
+		nummer3=100
1005
+		CHECKBOX SET "run1", 1
1006
+	else
1007
+		CHECKBOX SET "run1", 0
1008
+	fi
1009
+	if (mid$(attribute1$,4,1)="r") then
1010
+		CHECKBOX SET "read2", 1
1011
+		nummer4=40
1012
+	else
1013
+		CHECKBOX SET "read2", 0
1014
+	fi
1015
+	if (mid$(attribute1$,5,1)="w") then
1016
+		CHECKBOX SET "write2", 1
1017
+		nummer5=20
1018
+	else
1019
+		CHECKBOX SET "write2", 0
1020
+	fi
1021
+	if (mid$(attribute1$,6,1)="x") then
1022
+		nummer6=10
1023
+		CHECKBOX SET "run2", 1
1024
+	else
1025
+		CHECKBOX SET "run2", 0
1026
+	fi
1027
+	if (mid$(attribute1$,7,1)="r") then
1028
+		nummer7=4
1029
+		CHECKBOX SET "read3", 1
1030
+	else
1031
+		CHECKBOX SET "read3", 0
1032
+	fi
1033
+	if (mid$(attribute1$,8,1)="w") then
1034
+		nummer8=2
1035
+		CHECKBOX SET "write3", 1
1036
+	else
1037
+		CHECKBOX SET "write3", 0
1038
+	fi
1039
+	if (mid$(attribute1$,9,1)="x") then
1040
+		nummer9=1
1041
+		CHECKBOX SET "run3", 1
1042
+	else
1043
+		CHECKBOX SET "run3", 0
1044
+	fi
1045
+
1046
+	button 180,120 to 260,140, "attributeOK|", "OK", "attribute"
1047
+	PartOneATTR$=PartOne$
1048
+end sub
1049
+sub makedir(name$)
1050
+	window open ((screenWidth/2)-170), ((screenHeight/2)-80) to ((screenWidth/2)+170), ((screenHeight/2)+80), "makefolder", "Create Folder"
1051
+	window set  "makefolder", "MinimumTo", 340,160
1052
+	window set  "makefolder", "MaximumTo", 340,160
1053
+	//err = draw image 0,0, grafikverzeichnis$+"themes/marble/backgrounds/top.png", "makefolder"
1054
+	draw text 20, 40, "Type a name for folder:", "makefolder"
1055
+	textcontrol 15,55 to 310,65, "dirname", "","","makefolder"
1056
+	button 120,110 to 220,130, "makedir", "Create", "makefolder"
1057
+	PartOneMakeDir$=PartOne$
1058
+end sub
1059
+sub copyas(name1$)
1060
+	window open ((screenWidth/2)-170), ((screenHeight/2)-80) to ((screenWidth/2)+170), ((screenHeight/2)+80), "copyas", "Copy as..."
1061
+	window set  "copyas", "MinimumTo", 340,160
1062
+	window set  "copyas", "MaximumTo", 340,160
1063
+	//err = draw image 0,0, grafikverzeichnis$+"themes/marble/backgrounds/top.png", "copyas"
1064
+	draw text 20, 40, "Type a name for the new copy:", "copyas"
1065
+	textcontrol 15,55 to 310,65, "copyname", "",name1$,"copyas"
1066
+	button 120,110 to 220,130, "copyas", "Create", "copyas"
1067
+	PartOneCopyAs$=PartOne$
1068
+end sub
1069
+sub copy_file(name1$,correct$)
1070
+	if (correct$="no") then
1071
+	    dir_re$=dir_re$+"/"                                             
1072
+    	kopieren$=system$("cp -r "+"\""+dir_li$+"/"+name1$+"\""+" "+"\""+dir_re$+"\"")                                          
1073
+    elseif(correct$="yes") then
1074
+    	new_filename$=system$("package info -f \"%fileName%\" "+dir_li$+"/"+name1$) 
1075
+    	print new_filename$
1076
+		copyascorrect$=system$("cp -r "+"\""+dir_li$+"/"+name1$+"\""+" "+"\""+dir_re$+"/"+new_filename$+"\"")
1077
+    	//kopieren$=system$("cp -r "+"\""+dir_li$+"/"+name1$+"\""+" "+"\""+dir_re$+"\"")
1078
+    endif
1079
+    	readfolder_re(dir_re$)
1080
+    		
1081
+end sub
1082
+sub copy_as(copyname$)
1083
+	
1084
+    //print PartOneCopyAs$
1085
+    //print "name"+copyname$
1086
+    if (PartOneCopyAs$="browserLi") then
1087
+    copyas$=system$("cd "+"\""+dir_li$+"\""+"; cp -r "+"\""+dir_li$+"/"+name$+"\""+" "+"\""+dir_re$+"/"+copyname$+"\"")
1088
+    	if (dir_re$=dir_li$) then
1089
+    		readfolder_li(dir_li$)
1090
+    	    readfolder_re(dir_re$)
1091
+    	else
1092
+    	    readfolder_li(dir_li$)
1093
+    		readfolder_re(dir_re$)
1094
+    	endif
1095
+	elseif (PartOneCopyAs$="browserRe") then
1096
+		copyas$=system$("cd "+"\""+dir_re$+"\""+"; cp -r "+"\""+dir_re$+"/"+name$+"\""+" "+"\""+dir_li$+"/"+copyname$+"\"")
1097
+		if (dir_li$=dir_re$) then
1098
+       		readfolder_li(dir_li$)
1099
+       		readfolder_re(dir_re$)
1100
+        else
1101
+ 	    	readfolder_re(dir_re$)
1102
+    	    readfolder_li(dir_li$)
1103
+        endif
1104
+	endif
1105
+    window close "copyas"
1106
+end sub
1107
+sub rename(name$)
1108
+	window open ((screenWidth/2)-170), ((screenHeight/2)-80) to ((screenWidth/2)+170), ((screenHeight/2)+80), "rename", "Rename"
1109
+	window set  "rename", "MinimumTo", 340,160
1110
+	window set  "rename", "MaximumTo", 340,160
1111
+	//err = draw image 0,0, grafikverzeichnis$+"themes/marble/backgrounds/top.png", "rename"
1112
+	draw text 20, 40, "Type a new name:", "rename"
1113
+	textcontrol 15,55 to 310,65, "renamename", "",name$,"rename"
1114
+	button 120,110 to 220,130, "rename", "Rename", "rename"
1115
+	PartOneRename$=PartOne$
1116
+end sub
1117
+sub move_file(name1$)
1118
+	if (PartOne$="browserLi") then
1119
+		name1$ = columnbox get$ "browserLi", 2, val(PartThree$)
1120
+		dir_re$=dir_re$+"/"
1121
+		kopieren$=system$("mv "+"\""+dir_li$+"/"+name1$+"\""+" "+"\""+dir_re$+"\"")
1122
+		readfolder_li(dir_li$)
1123
+		readfolder_re(dir_re$)
1124
+	elseif (PartOne$="browserRe") then
1125
+		name1$ = columnbox get$ "browserRe", 2, val(PartThree$)
1126
+		dir_li$=dir_li$+"/"
1127
+		kopieren$=system$("mv "+"\""+dir_re$+"/"+name1$+"\""+" "+"\""+dir_li$+"\"")
1128
+		readfolder_re(dir_re$)
1129
+		readfolder_li(dir_li$)
1130
+	endif
1131
+end sub
1132
+sub move_file_as(name1$)
1133
+	window open ((screenWidth/2)-170), ((screenHeight/2)-80) to ((screenWidth/2)+170), ((screenHeight/2)+80), "Moveas", "Move as..."
1134
+	window set  "Moveas", "MinimumTo", 340,160
1135
+	window set  "Moveas", "MaximumTo", 340,160
1136
+	//err = draw image 0,0, grafikverzeichnis$+"themes/marble/backgrounds/top.png", "Moveas"
1137
+	draw text 20, 40, "Type a name for the new copy:", "Moveas"
1138
+	textcontrol 15,55 to 310,65, "movename", "",name1$,"Moveas"
1139
+	button 120,110 to 220,130, "moveas", "Create", "Moveas"
1140
+	PartOneMoveAs$=PartOne$
1141
+end sub
1142
+sub File_lister_View()	
1143
+	
1144
+	WindowSize_x=WINDOW GET ProgrammName$, "width"
1145
+	layout "left,right","Stackview1"
1146
+	VIEW 0,0 TO WindowSize_x,40,"generate", "Stackview1"
1147
+	layout "left","generate"
1148
+	//BUTTON IMAGE 5,5, "Settings", grafikverzeichnis$+"Zahnraeder1_64.png", grafikverzeichnis$+"Zahnraeder1_64.png", grafikverzeichnis$+"Zahnraeder3_64.png", "generate"
1149
+	//BUTTON IMAGE 120,5, "Download", grafikverzeichnis$+"download_64.png", grafikverzeichnis$+"download_64.png", grafikverzeichnis$+"download_64.png", "generate"
1150
+	//BUTTON IMAGE 180,5, "Download", grafikverzeichnis$+"download_64.png", grafikverzeichnis$+"download_64.png", grafikverzeichnis$+"download_64.png", "generate"
1151
+	
1152
+	BUTTON 10,15 TO 140,35, "Settings", "Settings", "generate"
1153
+	BUTTON WindowSize_x-500,15 TO  WindowSize_x-310,35, "updateRepomakerfolder", "Update your Desktop Repomaker folder", "generate"
1154
+	BUTTON WindowSize_x-200,15 TO WindowSize_x-10,35, "generateRepo", "Generate", "generate"
1155
+	
1156
+	VIEW 10,45 to WindowSize_x-10,70,"aktive_repos", "Stackview1"
1157
+	SCROLLBAR "test", 2, "aktive_repos"
1158
+	SCROLLBAR SET "test", "no-border"
1159
+	//BUTTON 0,0 TO 90,20, "Settings", "repo1", "aktive_repos"
1160
+	//BUTTON 100,0 TO 190,20, "Settings", "repo1", "aktive_repos"
1161
+	//BUTTON 200,0 TO 290,20, "Settings", "repo2", "aktive_repos"
1162
+	//BUTTON 300,0 TO 390,20, "Settings", "repo3", "aktive_repos"
1163
+	//BUTTON 400,0 TO 490,20, "Settings", "repo4", "aktive_repos"
1164
+	//BUTTON 500,0 TO 590,20, "Settings", "repo5", "aktive_repos"
1165
+	//BUTTON 600,0 TO 690,20, "Settings", "repo6", "aktive_repos"
1166
+	//BUTTON 700,0 TO 790,20, "Settings", "repo7", "aktive_repos"
1167
+	//BUTTON 800,0 TO 890,20, "Settings", "repo8", "aktive_repos"
1168
+	breite_button=90
1169
+	x=0
1170
+	for u=1 to Verzeichnisse_numElements-1			
1171
+		BUTTON x,0 TO x+breite_button,20,trim$(settingsdatei$(u)), trim$(settingsdatei$(u)), "aktive_repos"
1172
+		x=x+100
1173
+	next u	
1174
+		
1175
+	
1176
+	layout "all","Stackview1"
1177
+	innenbreite=(VIEW GET Start_FensterName$, "width")-10
1178
+	innenhoehe=(VIEW GET Start_FensterName$, "height")-30
1179
+	SPLITVIEW 0,80 TO innenbreite,innenhoehe, "vertikal", true, false, "Stackview1"	
1180
+	
1181
+end sub
1182
+
1183
+
1184
+sub dateibrowserLinks(dir_li$, first)
1185
+	innenbreiteBrowser_li=(VIEW GET "vertikal1", "width")-5
1186
+	innenhoeheBrowser_li=(VIEW GET "vertikal1", "height")
1187
+	dateibrowser_li$="Dateibrowser_Li"
1188
+	browserLi$="browserLi"
1189
+		
1190
+	BOXVIEW 5,10 TO innenbreiteBrowser_li,innenhoeheBrowser_li, dateibrowser_li$, "Choose your files", 2 , "vertikal1"
1191
+	innenhoehe_dateibrowser_li=(VIEW GET dateibrowser_li$, "height")
1192
+	innenbreite_dateibrowser_li=(VIEW GET  dateibrowser_li$, "width")
1193
+	//err = draw image 0,4, grafikverzeichnis$+"themes/marble/backgrounds/top.png", dateibrowser_li$
1194
+	dropbox_hoehe=35
1195
+	Y_Dropbox_li=10
1196
+	Y_Dropbox_ende_li=dropbox_hoehe
1197
+	Y_Columnbox_start_li=Y_Dropbox_ende_li+20
1198
+	X_Drives_ende_li=115	
1199
+	layout "left-top", dateibrowser_li$
1200
+	
1201
+	dropbox 5,Y_Dropbox_li to X_Drives_ende_li,dropbox_hoehe, "left_drives", "", dateibrowser_li$
1202
+	dropbox X_Drives_ende_li+20,Y_Dropbox_li to X_Drives_ende_li+120,Y_Dropbox_ende_li, "left_folders", "", dateibrowser_li$
1203
+	dropbox add "left_folders", "Folder"
1204
+//	dropbox add "left_folders", "Apps"
1205
+	dropbox add "left_folders", "Home"
1206
+	dropbox add "left_folders", "Desktop"
1207
+//	dropbox add "left_folders", "Downloads
1208
+	dropbox add "left_folders", "Config"
1209
+	button innenbreite_dateibrowser_li-90,10 to innenbreite_dateibrowser_li-20,35, "Refresh", "Refresh", dateibrowser_li$
1210
+
1211
+
1212
+	layout "default", dateibrowser_li$
1213
+	spalten_option$="align-left" 
1214
+	
1215
+	COLUMNBOX 10,Y_Columnbox_start_li TO 372,innenhoehe_dateibrowser_li-60, browserLi$, true, "resizable, movable, popup, removable", dateibrowser_li$
1216
+	COLUMNBOX COLUMN browserLi$, "", 1, 32, 32, 32,spalten_option$
1217
+	COLUMNBOX COLUMN browserLi$, "Name", 2, 200, 150, 150,spalten_option$
1218
+	COLUMNBOX COLUMN browserLi$, "Permissions", 3, 50, 50, 50,spalten_option$
1219
+	COLUMNBOX COLUMN browserLi$, "M.D (ddmmyyyy)", 4, 120, 120, 120, spalten_option$
1220
+	COLUMNBOX COLUMN browserLi$, "M.T (hhmmss)", 5, 105, 105, 105, spalten_option$
1221
+	COLUMNBOX COLUMN browserLi$, "Size / Items", 6, 200, 100, 200, spalten_option$	
1222
+	COLUMNBOX COLUMN browserLi$, "C.D (ddmmyyyy)", 7, 100, 100, 100, spalten_option$
1223
+	COLUMNBOX COLUMN browserLi$, "C.T (hhmmss)", 8, 100, 100, 100, spalten_option$
1224
+	COLUMNBOX COLUMN browserLi$, "Directory", 9, 20, 20, 20, spalten_option$
1225
+	COLUMNBOX COLUMN browserLi$, "Attributes", 10, 80, 80, 80, spalten_option$
1226
+	columnbox color browserLi$, "Selection-Active", 220,220,250
1227
+	columnbox color browserLi$, "Row-Divider", 255,255,255
1228
+	layout "left-bottom-right",dateibrowser_li$
1229
+	textcontrol 5,innenhoehe_dateibrowser_li-50 to innenbreite_dateibrowser_li-10,innenhoehe_dateibrowser_li-30, "pfad_li", "","",dateibrowser_li$
1230
+	OPTION SET "pfad_li", "Enabled", false	
1231
+	layout "left-top",dateibrowser_li$
1232
+	
1233
+	//STATUSBAR WindowSize_x_result/2-130, 10 to WindowSize_x_result/2-30,Y_Dropbox_ende_li+10, "Full_li", "","", dateibrowser_li$
1234
+	readfolder_li(dir_li$)
1235
+	layout "all", dateibrowser_li$
1236
+end sub
1237
+
1238
+sub dateibrowserRechts(dir_re$)
1239
+		
1240
+	innenbreiteBrowser_re=(VIEW GET "vertikal2", "width")
1241
+	innenhoeheBrowser_re=(VIEW GET "vertikal2", "height")
1242
+	dateibrowser_re$="Dateibrowser_Re"
1243
+	
1244
+	browserRe$="browserRe"
1245
+	BOXVIEw 5,10 TO innenbreiteBrowser_re,innenhoeheBrowser_re, dateibrowser_re$ , "copy your files here", 2 , "vertikal2"
1246
+	layout "all", dateibrowser_re$
1247
+	innenhoehe_dateibrowser_re=(VIEW GET dateibrowser_re$, "height")
1248
+	innenbreite_dateibrowser_re=(VIEW GET  dateibrowser_re$, "width")
1249
+
1250
+	//err = draw image 0,4, grafikverzeichnis$+"themes/marble/backgrounds/top.png", dateibrowser_re$	
1251
+	Y_Dropbox_re=10
1252
+	Y_Dropbox_ende_re=Y_Dropbox_re+10
1253
+	Y_Columnbox_start_re=Y_Dropbox_ende_re+30
1254
+	layout "left-top", dateibrowser_re$	
1255
+	Button_hoehe=35
1256
+	button innenbreite_dateibrowser_re-380,10 to innenbreite_dateibrowser_re-230,Button_hoehe, "repomakerfolder", "Desktop/repomaker", dateibrowser_re$
1257
+	button innenbreite_dateibrowser_re-220,10 to innenbreite_dateibrowser_re-70,Button_hoehe, "yourrepofolder", "your repo folder", dateibrowser_re$
1258
+	button innenbreite_dateibrowser_re-60,10 to innenbreite_dateibrowser_re-20,Button_hoehe, "OpenR", "O R", dateibrowser_re$
1259
+
1260
+	//err = draw image 0,4, grafikverzeichnis$+"themes/marble/backgrounds/top.png", dateibrowser_re$
1261
+		
1262
+	layout "default", dateibrowser_re$
1263
+	spalten_option$="align-left"
1264
+	COLUMNBOX 10,Y_Columnbox_start_re TO 372,innenhoehe_dateibrowser_re-60, browserRe$, true, "resizable, movable, popup, removable", dateibrowser_re$
1265
+	COLUMNBOX COLUMN browserRe$, "", 1, 32, 32, 32,spalten_option$
1266
+	COLUMNBOX COLUMN browserRe$, "Name", 2, 200, 150, 150,spalten_option$
1267
+	COLUMNBOX COLUMN browserRe$, "Permissions", 3, 50, 50, 50,spalten_option$
1268
+	COLUMNBOX COLUMN browserRe$, "M.D (ddmmyyyy)", 4, 120, 120, 120, spalten_option$
1269
+	COLUMNBOX COLUMN browserRe$, "M.T (hhmmss)", 5, 105, 105, 105, spalten_option$
1270
+	COLUMNBOX COLUMN browserRe$, "Size / Items", 6, 200, 100, 200, spalten_option$	
1271
+	COLUMNBOX COLUMN browserRe$, "C.D (ddmmyyyy)", 7, 100, 100, 100, spalten_option$
1272
+	COLUMNBOX COLUMN browserRe$, "C.T (hhmmss)", 8, 100, 100, 100, spalten_option$
1273
+	COLUMNBOX COLUMN browserRe$, "Directory", 9, 20, 20, 20, spalten_option$
1274
+	COLUMNBOX COLUMN browserRe$, "Attributes", 10, 80, 80, 80, spalten_option$
1275
+	
1276
+	columnbox color browserRe$, "Selection-Active", 220,220,250
1277
+	columnbox color browserRe$, "Row-Divider", 255,255,255		
1278
+	
1279
+	layout "left-bottom-right",dateibrowser_re$
1280
+	textcontrol 5,innenhoehe_dateibrowser_re-50 to innenbreite_dateibrowser_re-10,innenhoehe_dateibrowser_re-30, "pfad_re", "","",dateibrowser_re$
1281
+	OPTION SET "pfad_re", "Enabled", false	
1282
+	layout "right-top", dateibrowser_re$
1283
+	//layout "default", dateibrowser_re$
1284
+	readfolder_re(dir_re$)
1285
+end sub
1286
+
1287
+sub readfolder_li(dir_li$)
1288
+			
1289
+	laufwerk_fuelle_LI(dir_li$)
1290
+	
1291
+	//STATUSBAR SET "Full_li", "0",inuse_li$+" "+gesamt_li$, belegt_li
1292
+	//tooltip "Full_li", frei_li$+" free\n"+gesamt_li$+" max"
1293
+//  Sets Statusbar ID$ to State and changes the Labels to specified ones.
1294
+	PartOne$=""			 
1295
+	TEXTCONTROL CLEAR "pfad_li"
1296
+	TEXTCONTROL SET "pfad_li", dir_li$	
1297
+	COLUMNBOX CLEAR browserLi$
1298
+	
1299
+	verzeichnisinhalt_li$=system$(listdir$+" \""+dir_li$+"\"")
1300
+	
1301
+	i=0
1302
+	b_li$="\""
1303
+	dim splitdir_li$(1)
1304
+	n = split(verzeichnisinhalt_li$, splitdir_li$(), "\n")
1305
+	for i = 1 to n-1
1306
+	
1307
+		posname_li=instr(splitdir_li$(i),b_li$,0)
1308
+		posname_ende_li=instr(splitdir_li$(i),b_li$,2)
1309
+		dateiname_ohne_li$=mid$(splitdir_li$(i),posname_li+1,posname_ende_li-2)
1310
+			
1311
+		if (instr(splitdir_li$(i),"B",posname_ende_li+2)) then
1312
+			attribute_li$=trim$(mid$(splitdir_li$(i),instr(splitdir_li$(i),"B",posname_ende_li+3)+3,3))
1313
+		elseif(instr(splitdir_li$(i),"s",posname_ende_li+2)) then
1314
+			attribute_li$=trim$(mid$(splitdir_li$(i),instr(splitdir_li$(i),"s",posname_ende_li+2)+3,4))
1315
+		endif
1316
+		
1317
+		directory_li$=mid$(splitdir_li$(i),instr(splitdir_li$(i),"d",len(splitdir_li$(i))-10),1)
1318
+		permission_long_li$=trim$(right$(splitdir_li$(i),9))
1319
+				
1320
+		if (instr(splitdir_li$(i),"B",posname_ende_li+2)) then
1321
+			groesse_pos_li_start=instr(splitdir_li$(i),"B",posname_ende_li+2)
1322
+			dateigroesse_li$=trim$(mid$(splitdir_li$(i),posname_ende_li+2,groesse_pos_li_start-posname_ende_li))
1323
+		else
1324
+			groesse_pos_li_start=instr(splitdir_li$(i),"items",posname_ende_li)	
1325
+			dateigroesse_li$=trim$(mid$(splitdir_li$(i),posname_ende_li+2,groesse_pos_li_start-posname_ende_li+3))	
1326
+		endif
1327
+		
1328
+		datei_lastchange_datum_li$=trim$(mid$(splitdir_li$(i),instr(splitdir_li$(i),"@",1)-10,10))
1329
+		datei_lastchange_time_li$=trim$(mid$(splitdir_li$(i),instr(splitdir_li$(i),"@",1)+1,10))
1330
+		
1331
+		if (mid$(splitdir_li$(i),instr(splitdir_li$(i),"d",len(splitdir_li$(i))-10),1)="d") then
1332
+			datei_creation_date_li$=trim$(mid$(splitdir_li$(i),instr(splitdir_li$(i),"d",len(splitdir_li$(i))-20)-22,10))
1333
+		//	print datei_creation_date_li$
1334
+			datei_creation_time_li$=trim$(mid$(splitdir_li$(i),instr(splitdir_li$(i),"d",len(splitdir_li$(i))-10)-11,10))
1335
+		elseif (mid$(splitdir_li$(i),instr(splitdir_li$(i),"f",len(splitdir_li$(i))-10),1)="f") then
1336
+			datei_creation_date_li$=trim$(mid$(splitdir_li$(i),instr(splitdir_li$(i),"f",len(splitdir_li$(i))-20)-22,10))
1337
+			//print datei_creation_date_li$
1338
+			datei_creation_time_li$=trim$(mid$(splitdir_li$(i),instr(splitdir_li$(i),"f",len(splitdir_li$(i))-10)-11,10))
1339
+		endif
1340
+		
1341
+		//lastchange_pos_li=len(datei_datum_li$)
1342
+				
1343
+		columnbox add browserLi$, 1, i, 32, "__Path__="+dir_li$+"/"+dateiname_ohne_li$
1344
+		columnbox add browserLi$, 2, i, 15, dateiname_ohne_li$
1345
+		columnbox add browserLi$, 3, i, 15, attribute_li$
1346
+		columnbox add browserLi$, 4, i, 15, datei_lastchange_datum_li$
1347
+		columnbox add browserLi$, 5, i, 15, datei_lastchange_time_li$
1348
+		columnbox add browserLi$, 6, i, 15,  dateigroesse_li$
1349
+		columnbox add browserLi$, 7, i, 10, datei_creation_date_li$
1350
+		columnbox add browserLi$, 8, i, 10, datei_creation_time_li$
1351
+		columnbox add browserLi$, 9, i, 10, directory_li$
1352
+		columnbox add browserLi$, 10, i, 10, permission_long_li$
1353
+	next i
1354
+	if (dir_li$="/Volumes") then
1355
+	else
1356
+	//	COLUMNBOX REMOVE browserLi$, 1
1357
+	fi
1358
+end sub
1359
+
1360
+sub readfolder_re(dir_re$)
1361
+	
1362
+	
1363
+	laufwerk_fuelle_RE(dir_re$)
1364
+	
1365
+//Creates a statusbar with ID$ and label(s) on View$.
1366
+//Label1$ is on the left side above the actual bar and so is Label2$ on the right.
1367
+
1368
+	
1369
+//  Sets Statusbar ID$ to State and changes the Labels to specified ones.
1370
+	PartOne$=""			 
1371
+	TEXTCONTROL CLEAR "pfad_re"
1372
+	TEXTCONTROL SET "pfad_re", dir_re$	
1373
+	COLUMNBOX CLEAR browserRe$
1374
+	
1375
+	verzeichnisinhalt_re$=system$(listdir$+" \""+dir_re$+"\"")
1376
+	//verzeichnisinhalt_re$=system$("ls -allQ "+"\""+dir_li$+"\"")
1377
+	ii=0
1378
+	b_re$="\""
1379
+	dim splitdir_re$(1)
1380
+	nn = split(verzeichnisinhalt_re$, splitdir_re$(), "\n")
1381
+	for ii = 1 to nn-1
1382
+	
1383
+		posname_re=instr(splitdir_re$(ii),b_re$,0)
1384
+		posname_ende_re=instr(splitdir_re$(ii),b_re$,2)
1385
+		dateiname_ohne_re$=mid$(splitdir_re$(ii),posname_re+1,posname_ende_re-2)
1386
+			
1387
+		if (instr(splitdir_re$(ii),"B",posname_ende_re+2)) then
1388
+			attribute_re$=trim$(mid$(splitdir_re$(ii),instr(splitdir_re$(ii),"B",posname_ende_re+3)+3,3))
1389
+		elseif(instr(splitdir_re$(ii),"s",posname_ende_re+2)) then
1390
+			attribute_re$=trim$(mid$(splitdir_re$(ii),instr(splitdir_re$(ii),"s",posname_ende_re+2)+3,4))
1391
+		endif
1392
+		
1393
+		directory_re$=mid$(splitdir_re$(ii),instr(splitdir_re$(ii),"d",len(splitdir_re$(ii))-10),1)
1394
+		permission_long_re$=trim$(right$(splitdir_re$(ii),9))
1395
+				
1396
+		if (instr(splitdir_re$(ii),"B",posname_ende_re+2)) then
1397
+			groesse_pos_re_start=instr(splitdir_re$(ii),"B",posname_ende_re+2)
1398
+			dateigroesse_re$=trim$(mid$(splitdir_re$(ii),posname_ende_re+2,groesse_pos_re_start-posname_ende_re))
1399
+		else
1400
+			groesse_pos_re_start=instr(splitdir_re$(ii),"items",posname_ende_re)	
1401
+			dateigroesse_re$=trim$(mid$(splitdir_re$(ii),posname_ende_re+2,groesse_pos_re_start-posname_ende_re+3))	
1402
+		endif
1403
+		
1404
+		datei_lastchange_datum_re$=trim$(mid$(splitdir_re$(ii),instr(splitdir_re$(ii),"@",1)-10,10))
1405
+		datei_lastchange_time_re$=trim$(mid$(splitdir_re$(ii),instr(splitdir_re$(ii),"@",1)+1,10))
1406
+		
1407
+		if (mid$(splitdir_re$(ii),instr(splitdir_re$(ii),"d",len(splitdir_re$(ii))-10),1)="d") then
1408
+			datei_creation_date_re$=trim$(mid$(splitdir_re$(ii),instr(splitdir_re$(ii),"d",len(splitdir_re$(ii))-20)-22,10))
1409
+			//print datei_creation_date_re$
1410
+			datei_creation_time_re$=trim$(mid$(splitdir_re$(ii),instr(splitdir_re$(ii),"d",len(splitdir_re$(ii))-10)-11,10))
1411
+		elseif (mid$(splitdir_re$(ii),instr(splitdir_re$(ii),"f",len(splitdir_re$(ii))-10),1)="f") then
1412
+			datei_creation_date_re$=trim$(mid$(splitdir_re$(ii),instr(splitdir_re$(ii),"f",len(splitdir_re$(ii))-20)-22,10))
1413
+			//print datei_creation_date_re$
1414
+			datei_creation_time_re$=trim$(mid$(splitdir_re$(ii),instr(splitdir_re$(ii),"f",len(splitdir_re$(ii))-10)-11,10))
1415
+		endif
1416
+		
1417
+		//lastchange_pos_li=len(datei_datum_li$)
1418
+				
1419
+		columnbox add browserRe$, 1, ii, 32, "__Path__="+dir_re$+"/"+dateiname_ohne_re$
1420
+		columnbox add browserRe$, 2, ii, 15, dateiname_ohne_re$
1421
+		columnbox add browserRe$, 3, ii, 15, attribute_re$
1422
+		columnbox add browserRe$, 4, ii, 15, datei_lastchange_datum_re$
1423
+		columnbox add browserRe$, 5, ii, 15, datei_lastchange_time_re$
1424
+		columnbox add browserRe$, 6, ii, 15,  dateigroesse_re$
1425
+		columnbox add browserRe$, 7, ii, 10, datei_creation_date_re$
1426
+		columnbox add browserRe$, 8, ii, 10, datei_creation_time_re$
1427
+		columnbox add browserRe$, 9, ii, 10, directory_re$
1428
+		columnbox add browserRe$, 10, ii, 10, permission_long_re$
1429
+	next ii
1430
+	if (dir_re$="/Volumes") then
1431
+	else
1432
+	//	COLUMNBOX REMOVE browserRe$, 1
1433
+	fi
1434
+end sub
1435
+sub laufwerk_fuelle_RE(dir_re$)
1436
+				
1437
+	s=instr(dir_re$,"/",2)	
1438
+	dir_RE$=mid$(dir_re$,0,s-1)	
1439
+	//print dir_RE$
1440
+	full_re$=system$(diskfree$+" "+dir_re$)
1441
+	dim platten_re$(1)
1442
+	pre = split(full_re$, platten_re$(), "\n")	
1443
+
1444
+	for DH_re = 1 to pre 	
1445
+		DH_posname_re1=instr(platten_re$(DH_re),"(",0)					
1446
+		DH_posname_re2=instr(platten_re$(DH_re),")",0)	
1447
+		DH_doppelpunkt_re=instr(platten_re$(DH_re),":",0)
1448
+		Kurztext_re$=trim$(mid$(platten_re$(DH_re),instr(platten_re$(DH_re),":",0)+1,DH_posname_re1-DH_doppelpunkt_re-1))
1449
+		//print gesamt_re$	
1450
+		Laufwerk_re$=ltrim$(mid$(platten_re$(DH_re),DH_posname_re1+1,200))		
1451
+		Laufwerk_re$=left$(Laufwerk_re$,len(Laufwerk_re$)-8)			
1452
+		if (DH_re = 1) then				
1453
+			gesamt_re=val(Laufwerk_re$)	
1454
+			gesamt_re$=Kurztext_re$			
1455
+		elseif(DH_re=2) then	
1456
+			frei_re=val(Laufwerk_re$)
1457
+			frei_re$=Kurztext_re$				
1458
+		endif	
1459
+	next DH_re
1460
+	
1461
+	belegt_re=(frei_re*100)/gesamt_re			
1462
+	//inuse_re$=str$(val(trim$(left$(gesamt_re$,len(gesamt_re$)-1)))-val(trim$(left$(frei_re$,len(frei_re$)-1))))+"G"
1463
+	//print inuse_re$
1464
+	return frei_re
1465
+	return belegt_re
1466
+end sub
1467
+sub laufwerk_fuelle_LI(dir_li$)
1468
+	local s			
1469
+	s=instr(dir_li$,"/",2)	
1470
+	dir_LI$=mid$(dir_li$,0,s-1)	
1471
+	//print dir_RE$
1472
+	full_li$=system$(diskfree$+" -b "+dir_li$)
1473
+	dim platten_li$(1)
1474
+	pli = split(full_li$, platten_li$(), "\n")	
1475
+
1476
+	for DH_li = 1 to pli 	
1477
+		DH_posname_li1=instr(platten_li$(DH_li),"(",0)				
1478
+		DH_posname_li2=instr(platten_li$(DH_li),")",0)	
1479
+		DH_doppelpunkt_li=instr(platten_li$(DH_li),":",0)
1480
+		Kurztext_li$=trim$(mid$(platten_li$(DH_li),instr(platten_li$(DH_li),":",0)+1,DH_posname_li1-DH_doppelpunkt_li-1))
1481
+			Laufwerk_li$=ltrim$(mid$(platten_li$(DH_li),DH_posname_li1+1,200))		
1482
+		Laufwerk_li$=left$(Laufwerk_li$,len(Laufwerk_li$)-8)			
1483
+		if (DH_li = 1) then				
1484
+			gesamt_li=val(Laufwerk_li$)	
1485
+			gesamt_li$=Kurztext_li$			
1486
+		elseif(DH_li=2) then	
1487
+			frei_li=val(Laufwerk_li$)
1488
+			frei_li$=Kurztext_li$					
1489
+		endif	
1490
+	next DH_li			
1491
+	//print gesamt_re	
1492
+	//print frei_re
1493
+	belegt_li=(frei_li*100)/gesamt_li	
1494
+	//print belegt_re	
1495
+	return belegt_li
1496
+end sub
1497
+sub laufwerke_li(first)
1498
+	if (first=1) then	
1499
+	
1500
+	laufwerk_li$=system$("ls -Q1p / | grep /")
1501
+	i=0
1502
+	dim laufwerksliste_li$(1)
1503
+	nli = split(laufwerk_li$, laufwerksliste_li$(), "\n")	
1504
+	layout "all", "vertikal1"	
1505
+	dropbox add "left_drives", "Volumes"		
1506
+	HDli=0
1507
+	volumes_li$=system$(mountvolume$+" -lh")	
1508
+	dim festplatten_li$(1)
1509
+	dim HDS_li$(1)		
1510
+	fli = split(volumes_li$, festplatten_li$(), "\n")	
1511
+
1512
+	for HDli = 1 to fli 			
1513
+		HD_posname_li=instr(festplatten_li$(HDli),":",3)		
1514
+		//print HD_posname_li
1515
+		Laufwerkliste_li$=trim$(mid$(festplatten_li$(HDli),0,HD_posname_li))
1516
+		if (right$(festplatten_li$(HDli),7)="(/boot)") then
1517
+			Laufwerkliste_li$="/boot"
1518
+		endif			
1519
+		if(Laufwerkliste_li$="") then
1520
+		else				
1521
+			dropbox add "left_drives", Laufwerkliste_li$	 
1522
+		endif
1523
+	next HDli	
1524
+	endif
1525
+	layout "default", "vertikal1"	
1526
+end sub
1527
+
1528
+sub about()
1529
+ 	window open ((screenWidth/2)-200), ((screenHeight/2)-150) to ((screenWidth/2)+250), ((screenHeight/2)+150), "View_About", "About"
1530
+  	window set  "View_About", "MinimumTo", 400,300
1531
+  	window set  "View_About", "MaximumTo", 400,300
1532
+  	window set "View_About", "flags", "not-resizable, Not-Zoomable"  	
1533
+	window set "View_About", "look", "Bordered"		
1534
+	//draw set  "Bgcolor",0,0,0,"View_About"	
1535
+	//DRAW SET "HighColor",222,222,222,  "View_About"
1536
+	//Draw Set "lowColor",0,0,0, "View_About"	
1537
+  	
1538
+  	DRAW SET "system-bold", "View_About"
1539
+  	DRAW TEXT 10,30, "BeSly Software Solutions", "View_About"
1540
+  	VIEW 0,50 TO 400,300, "View_About_Info", "View_About"
1541
+  	DRAW LINE 0,1 TO 400,1, "View_About_Info" 
1542
+  	 
1543
+ 	VIEW 0,2 TO 150,195, "View_About_Title", "View_About_Info"
1544
+  	//DRAW SET "BGColor", 255,255,255, "View_About_Title"
1545
+  	
1546
+  	//draw set  "Bgcolor",150,150,150,"View_About_Title"	
1547
+	//DRAW SET "HighColor",222,222,222,  "View_About_Title"
1548
+	//Draw Set "lowColor",0,0,0, "View_About_Title"	
1549
+  	DRAW TEXT 10,30, "Name:", "View_About_Title"
1550
+  	DRAW TEXT 10,50, "Version / Build:", "View_About_Title"
1551
+  	DRAW TEXT 10,70, "Version Status:", "View_About_Title"
1552
+  	DRAW TEXT 10,90, "Developers:", "View_About_Title"
1553
+  	DRAW TEXT 10,110, "Team:", "View_About_Title"
1554
+  	//DRAW TEXT 10,110, "Levels:", "View_About_Title"
1555
+  	DRAW TEXT 10,130, "Contact:", "View_About_Title"
1556
+  	DRAW TEXT 10,150, "Website:", "View_About_Title"
1557
+  	DRAW Text 10,170, "Software:", "View_About_Title"
1558
+  	//DRAW Text 10,190, "Thanks", "View_About_Title"
1559
+  	//draw set  "Bgcolor",0,0,0,"View_About_Info"	
1560
+	//DRAW SET "HighColor",222,222,222,  "View_About_Info"
1561
+	//Draw Set "lowColor",0,0,0, "View_About_Info"	
1562
+	
1563
+  	VIEW 170,2 TO 400,195, "View_About_Entry", "View_About_Info"
1564
+  	//DRAW SET "BGColor", 255,255,255, "View_About_Entry"
1565
+  	//draw set  "Bgcolor",0,0,0,"View_About_Entry"	
1566
+	//DRAW SET "HighColor",222,222,222,  "View_About_Entry"
1567
+	//Draw Set "lowColor",0,0,0, "View_About_Entry"	
1568
+  	DRAW TEXT 10,30, ProgrammName$, "View_About_Entry"
1569
+  	DRAW TEXT 10,50, "0.4.2/ 26.04.2017", "View_About_Entry"
1570
+  	DRAW TEXT 10,70, "Alpha", "View_About_Entry"
1571
+  	DRAW TEXT 10,90, "Lorglas", "View_About_Entry"
1572
+  	
1573
+  	DRAW TEXT 10,110, "BeSly Software Solutions",  "View_About_Entry"
1574
+  	TEXTURL 10,122, "email", "webmaster@besly.de", "webmaster@besly.de", "View_About_Entry"  	
1575
+  	TEXTURL 10,142, "website", "http://www.besly.de", "http://www.besly.de", "View_About_Entry"   
1576
+  	TEXTURL 10,162, "website", "http://software.besly.de", "http://software.besly.de", "View_About_Entry"  	
1577
+  	BUTTON 150,220 TO 250,240, "AboutClose", "OK", "View_About_Info"
1578
+end sub
1579
+
1580
+sub auslesen_settingsordner()
1581
+	repoinfo_dateien$=system$("cd "+daten_dir$+"/ && ls -F *.info*")
1582
+	//print repoinfo_dateien$
1583
+	dim repo_settings_dateien$(1)
1584
+	numElements = split(repoinfo_dateien$, repo_settings_dateien$(),"\n")
1585
+	for i = 1 to numElements
1586
+		listbox add "settings", repo_settings_dateien$(i)
1587
+	next i
1588
+end sub
1589
+
1590
+sub auslesen_settingsdatei(settingsdatei$,repodaten$)
1591
+	numElements=0
1592
+	x=0
1593
+	u=0
1594
+	//print settingsdatei$
1595
+	//print repodaten$
1596
+	//print daten_dir$+"/"+settingsdatei$+"/"+repodaten$
1597
+	
1598
+	if(IfExists(daten_dir$+"/"+settingsdatei$+"/"+repodaten$)) then
1599
+		auslesen=open(daten_dir$+"/"+settingsdatei$+"/"+repodaten$, "r")
1600
+		while (not EOF(auslesen))
1601
+			line input #auslesen b$
1602
+			dim elements$(1)
1603
+			numElements = split(b$, elements$(),"\n")
1604
+			for i = 1 to numElements
1605
+				x=x+1
1606
+				dim e$(x)
1607
+				e$(x) = trim$(elements$(i))	
1608
+				//print e$(x)
1609
+			next i
1610
+		wend
1611
+		close(auslesen)
1612
+		anzahlzeilen=x
1613
+		
1614
+		//print "anzahlzeilen"+str$(anzahlzeilen)
1615
+	
1616
+		for d=1 to anzahlzeilen
1617
+			u=u+1		
1618
+			settingsdatei$=settingsdatei$ 
1619
+			if (instr(e$(u),"name")) then
1620
+				namerepo$=""
1621
+				namerepo$=mid$(e$(u),instr(e$(u)," ")+2,len(e$(u))-(instr(e$(u)," ")+2))
1622
+			endif
1623
+			if(instr(e$(u),"vendor")) then
1624
+			 	vendor$=""
1625
+			 	vendor$=mid$(e$(u),instr(e$(u)," ")+2,len(e$(u))-(instr(e$(u)," ")+2))
1626
+			elseif(instr(left$(e$(u),10),"summary")) then
1627
+				summary$=""
1628
+				summary$=mid$(e$(u),instr(e$(u)," ")+2,len(e$(u))-(instr(e$(u)," ")+2))
1629
+			elseif(instr(e$(u),"priority")) then
1630
+				priority$=""
1631
+				priority$= mid$(e$(u),instr(e$(u)," ")+1,len(e$(u))-(instr(e$(u)," ")))
1632
+			elseif(instr(e$(u),"url")) then
1633
+				url$=""
1634
+				url$= mid$(e$(u),instr(e$(u)," ")+2,len(e$(u))-(instr(e$(u)," ")+2))
1635
+			elseif(instr(e$(u),"architecture")) then
1636
+				architecture$=""
1637
+				architecture$=mid$(e$(u),instr(e$(u)," ")+1,len(e$(u))-(instr(e$(u)," ")))	
1638
+		//	elseif(instr(e$(u),"repositorydirectory")) then
1639
+		//		local_directory$=mid$(e$(u),instr(e$(u)," ")+2,len(e$(u))-(instr(e$(u)," ")+2))
1640
+		//		dir_re$=local_directory$
1641
+			elseif(instr(e$(u),"repositorydirectory")) then
1642
+				repositorydirectory$=""
1643
+				repositorydirectory$=mid$(e$(u),instr(e$(u)," ")+2,len(e$(u))-(instr(e$(u)," ")+2))
1644
+			endif
1645
+		next d
1646
+	
1647
+		TEXTCONTROL CLEAR "settingsdatei"
1648
+		TEXTCONTROL CLEAR "namerepo"
1649
+		TEXTCONTROL CLEAR "vendor"
1650
+		TEXTCONTROL CLEAR "summary"
1651
+		TEXTCONTROL CLEAR "priority" 
1652
+		TEXTCONTROL CLEAR "url"
1653
+		TEXTCONTROL CLEAR "architecture"
1654
+		TEXTCONTROL CLEAR "local_directory"	
1655
+		TEXTCONTROL CLEAR "repositorydirectory"
1656
+		TEXTCONTROL SET "settingsdatei",settingsdatei$
1657
+		TEXTCONTROL SET "namerepo", namerepo$
1658
+		TEXTCONTROL SET "vendor" , vendor$
1659
+		TEXTCONTROL SET "summary" ,summary$	
1660
+		TEXTCONTROL SET "priority" ,priority$
1661
+		TEXTCONTROL SET "url" ,url$
1662
+		TEXTCONTROL SET "architecture" , architecture$
1663
+		TEXTCONTROL SET "local_directory", local_directory$
1664
+		TEXTCONTROL SET "repositorydirectory", repositorydirectory$
1665
+	else
1666
+		print "fehler"
1667
+		STACKVIEW SET "Stackview", 2
1668
+		//settingsdatei$=""
1669
+		namerepo$="ERROR / EDIT"
1670
+		vendor$="ERROR / EDIT"
1671
+		summary$="ERROR / EDIT"
1672
+		priority$="ERROR / EDIT"
1673
+		url$="ERROR / EDIT"
1674
+		architecture$="ERROR / EDIT"
1675
+		repositorydirectory$="ERROR / EDIT"
1676
+	endif
1677
+end sub
1678
+sub schreiben_settingsdatei(start)
1679
+	if (start=1) then
1680
+		settingsdatei$="here you write your Name of your settingsfile"
1681
+		namerepo$="here you write your company name"
1682
+		vendor$="please type here your vendor"
1683
+		summary$="please type here <name> <architecture> and <package repository>"
1684
+		priority$="please type here the number 2"	
1685
+		url$="please type here the url of your repo, ex.: http://www.domain.xyz"
1686
+		repositorydirectory$="repo"
1687
+		architecture$="please type here your architecture of your hpkg file"
1688
+		//local_directory$="/boot/home/Desktop/repomaker"
1689
+	else
1690
+		settingsdatei$= TEXTCONTROL GET$ "settingsdatei"
1691
+		namerepo$ = TEXTCONTROL GET$ "namerepo"
1692
+		vendor$= TEXTCONTROL GET$  "vendor"
1693
+		summary$= TEXTCONTROL GET$ "summary"
1694
+		priority$= TEXTCONTROL GET$ "priority"	
1695
+		url$=TEXTCONTROL GET$ "url"
1696
+		architecture$=TEXTCONTROL GET$ "architecture"
1697
+		//local_directory$=TEXTCONTROL GET$ "local_directory"
1698
+		repositorydirectory$=TEXTCONTROL GET$ "repositorydirectory"
1699
+	endif
1700
+	erstelle_config_dir$=system$("mkdir \""+daten_dir$+"/"+settingsdatei$+"\"")
1701
+	wait 0.5
1702
+	print "\""+daten_dir$+"/"+settingsdatei$+"/repodaten.info\""
1703
+	handle=open(daten_dir$+"/"+settingsdatei$+"/repodaten.info", "w")
1704
+		///Repoonline start
1705
+		print #handle "name \""+namerepo$+"\""		
1706
+		print #handle "vendor \""+vendor$+"\""	
1707
+		print #handle "summary \""+summary$+"\""	
1708
+		print #handle "priority "+priority$	
1709
+		print #handle "url <"+url$+">"	
1710
+		print #handle "architecture "+architecture$
1711
+		///Repoonline ende
1712
+		print #handle "local_directory \""+local_directory$+"\""
1713
+		print #handle "repositorydirectory \""+repositorydirectory$+"\""
1714
+	close(handle)
1715
+end sub
1716
+sub schreiben_repoinfo_datei()
1717
+	handle1=open(local_directory$+"/"+repositorydirectory$+"/repo.info", "w")
1718
+		///Repoonline start
1719
+		print #handle1 "name \""+namerepo$+"\""		
1720
+		print #handle1 "vendor \""+vendor$+"\""	
1721
+		print #handle1 "summary \""+summary$+"\""	
1722
+		print #handle1 "priority "+priority$	
1723
+		print #handle1 "url <"+url$+">"	
1724
+		print #handle1 "architecture "+architecture$
1725
+	close(handle1)
1726
+end sub
1727
+sub IfExists(filename$)
1728
+	return not system("test -e "+filename$)
1729
+end sub
1730
+sub generate_repo()
1731
+	anzahl_dateien = COLUMNBOX COUNT "browserRe"
1732
+	//print anzahl_dateien
1733
+	for ii=1 to anzahl_dateien
1734
+		hpkgfiles$ = COLUMNBOX GET$ "browserRe", 2, ii
1735
+		//print "hpkgfiles:"+ hpkgfiles$
1736
+	next ii
1737
+	//print "\""+local_directory$+repositorydirectory$+"/packages\""
1738
+	if (instr(namerepo$,"here") or instr(vendor$,"please") or instr(summary$,"please") or instr(priority$,"please") or instr(url$,"please") or instr(architecture$,"please")) then
1739
+		alert "Please edit your config, otherwise the program doesn't work", "OK", "stop"
1740
+	else	
1741
+		output$=system$("rm -rf \""+local_directory$+"/"+repositorydirectory$+"/packages\"")
1742
+		output$=system$("mkdir -p \""+local_directory$+"/"+repositorydirectory$+"/packages\"")
1743
+		output$=system$("rm "+local_directory$+"/"+repositorydirectory$+"/packages.info")
1744
+		for i= 2 to anzahl_dateien
1745
+			hpkgfiles$ = COLUMNBOX GET$ "browserRe", 2, i
1746
+			if (rinstr(hpkgfiles$,".hpkg")) then			
1747
+				//print "hpkgfiles:"+ hpkgfiles$
1748
+				packagefilename$=system$("package info -f \"%fileName%\" \""+local_directory$+"/"+hpkgfiles$+"\"")
1749
+				
1750
+				schreibe_info_datei(url$,hpkgfiles$)		
1751
+			//	print "packagefilename:" +packagefilename$
1752
+				copyHPKGtorepodir$=system$("cp "+local_directory$+"/"+packagefilename$ +" "+local_directory$+"/"+repositorydirectory$+"/packages/"+packagefilename$)
1753
+			//print copyHPKGtorepodir$
1754
+			endif
1755
+		next i
1756
+		schreiben_repoinfo_datei()
1757
+		//print local_directory$+"/"+repositorydirectory$+"/repo.info "+local_directory$+"/"+repositorydirectory$+"/packages/*.hpkg"
1758
+		generate_REPO$=system$("package_repo create "+local_directory$+"/"+repositorydirectory$+"/repo.info "+local_directory$+"/"+repositorydirectory$+"/packages/*.hpkg")
1759
+		generate_REPO_sha$=system$("sha256sum "+local_directory$+"/"+repositorydirectory$+"/repo \ | sed -r 's,([^[:space:]]*).*,\1,' > "+local_directory$+"/"+repositorydirectory$+"/repo.sha256")
1760
+		//The sed part is only necessary for sha256sum, but it doesn't harm for sha256 either.
1761
+		dir_re$=local_directory$+"/"+repositorydirectory$
1762
+		readfolder_re(dir_re$)
1763
+		//launch local_directory$+"/repo"
1764
+	endif	
1765
+end sub 	
1766
+//
1767
+
1768
+sub schreibe_info_datei(url$,hpkgfiles$)
1769
+	handle=open(local_directory$+"/"+repositorydirectory$+"/packages.info", "a")
1770
+		print #handle url$+"/packages/"+hpkgfiles$
1771
+	close(handle)
1772
+end sub
1773
+
1774
+sub get_online_information()
1775
+	local i
1776
+	local u
1777
+	repourl$=textcontrol get$ "repourl"
1778
+	if (repourl$="") then
1779
+		ALERT "Please, type here the url to your repo.\n An example:\n http://www.domain.xyz/repo/repo", "Ok", "Info"
1780
+	else
1781
+		//	print repourl$
1782
+		delete_all_repo$=system$("ls -1 "+daten_dir$)
1783
+		dim cleanup_files$(1)
1784
+		
1785
+		numElementsfiles = split(delete_all_repo$, cleanup_files$(),"\n")
1786
+		for u=1 to numElementsfiles-1
1787
+			if (cleanup_files$(u)="repodaten.info") then
1788
+			else
1789
+				cleanup_dir$=system$("rm \""+daten_dir$+"/"+cleanup_files$(u)+"\"")
1790
+			endif
1791
+		next u
1792
+		onlineinfos$=system$("wget -P "+daten_dir$+" "+repourl$)
1793
+		
1794
+		test=IfExists(daten_dir$+"/repo")
1795
+		print test
1796
+		if (IfExists(daten_dir$+"/repo")=false) then
1797
+			ALERT "Please, type here the url to your repo.\n An example:\n http://www.domain.xyz/repo/repo", "Ok", "Info"
1798
+		else
1799
+			informationen$=system$("package_repo list "+daten_dir$+"/repo")
1800
+			//print informationen$
1801
+			//ALERT informationen$, "ok", "info"
1802
+			dim onlinerepo_informationen$(1)
1803
+				
1804
+			numElements = split(informationen$, onlinerepo_informationen$(),"\n")
1805
+			for i = 8 to numElements-1
1806
+				listbox add "onlinefiles", onlinerepo_informationen$(i)
1807
+			next i
1808
+			onlinenamerepo$=mid$(onlinerepo_informationen$(2),instr(onlinerepo_informationen$(2)," ")+1,len(onlinerepo_informationen$(2)))
1809
+			onlinesummary$=mid$(onlinerepo_informationen$(3),instr(onlinerepo_informationen$(3)," ")+1,len(onlinerepo_informationen$(3)))
1810
+			onlineurl$= mid$(onlinerepo_informationen$(4),instr(onlinerepo_informationen$(4)," ")+2,len(onlinerepo_informationen$(4))-(instr(onlinerepo_informationen$(4)," ")+2))
1811
+			onlinevendor$=mid$(onlinerepo_informationen$(5),instr(onlinerepo_informationen$(5)," ")+1,len(onlinerepo_informationen$(5)))
1812
+			onlinepriority$= mid$(onlinerepo_informationen$(6),instr(onlinerepo_informationen$(6)," ")+1,len(onlinerepo_informationen$(6))-(instr(onlinerepo_informationen$(6)," ")))
1813
+			onlinearchitecture$=mid$(onlinerepo_informationen$(7),instr(onlinerepo_informationen$(7)," ")+1,len(onlinerepo_informationen$(7))-(instr(onlinerepo_informationen$(7)," ")))
1814
+			TEXTCONTROL set "onlinenamerepo",onlinenamerepo$
1815
+			TEXTCONTROL set "onlinesummary", onlinesummary$
1816
+			TEXTCONTROL set "onlineurl", onlineurl$
1817
+			TEXTCONTROL set "onlinevendor", onlinevendor$	
1818
+			TEXTCONTROL set "onlinepriority",  onlinepriority$
1819
+			TEXTCONTROL set "onlinearchitecture", onlinearchitecture$
1820
+		endif
1821
+	endif
1822
+end sub
1823
+
1824
+sub updateRepomakerfolder()
1825
+	local a
1826
+	local b
1827
+	local c
1828
+	local d
1829
+	local e
1830
+	local f
1831
+	local g
1832
+	g=10
1833
+	dim output_getdateien$(1)
1834
+	//local_directory$="/boot/home/Desktop/repomaker"
1835
+	test$=system$("rm "+local_directory$+"/*.hpkg")
1836
+	//outputext$=system$("curl -s "+url$+"/packages.info") 
1837
+	outputext$=system$("curl -s "+url$+"/packages.info") 
1838
+	//print outputext$
1839
+	
1840
+	if (instr(output$,"Internal Server Error")) then
1841
+		alert "You doesn't have a packages.info file in your Repo "+url$, "ok", "warning"	
1842
+	else
1843
+		
1844
+		output1$=system$("notify --type information --group \"Repomaker\" --title \"Update Files\"  \"Downloading\"")
1845
+		pre = split(outputext$,output_getdateien$(), "\n")	
1846
+		for e = 1 to pre 
1847
+			f=f+1
1848
+		next e
1849
+		
1850
+		STACKVIEW SET "Stackview", 3
1851
+		layout "left,right","Stackview2"
1852
+		STATUSBAR 10, 10 to WindowSize_x-10, 50, "downloadstatus", "0", str$(f), "Stackview3"
1853
+		draw text 10,80, "Please wait, downloading in Desktop/Repomaker", "Stackview3"	
1854
+		view 0,100 to WindowSize_x-20,WindowSize_y-30, "status" , "Stackview3"
1855
+		SCROLLBAR "status_download", 1, "status"
1856
+		//listbox 10,10 to WindowSize_x-10,WindowSize_y,
1857
+		for c = 1 to pre 
1858
+			//draw flush "status"
1859
+			d=d+1
1860
+			g=g+15
1861
+			datei$=right$(output_getdateien$(d),len(output_getdateien$(d))-rinstr(output_getdateien$(d),"/"))
1862
+			//orignal output
1863
+			//output2$=system$("wget -nv -e robots=off -NP "+local_directory$+" -i "+url$+"/packages.info")	
1864
+			output2$=system$("wget -nv -e robots=off  -NP -c --show-progress "+local_directory$+" -i "+url$+"/packages/"+datei$+" 2>&1")
1865
+			draw text 10,g, str$(c)+": "+output2$, "status"
1866
+			//if (option$="long-output") then
1867
+				//output3$=system$("notify --type information --icon "+grafikverzeichnis$+"download_64.png --group \"Repomaker\" --title \"Update Files\" --timeout 3 "+datei$)