Für ein zukünftiges Spiel. Bei dem ich halt nur Erweiterungen anbieten möchte.
Hab estern um 1 Uhr noch schnell einen "Patch-"Maker geproggt. So sieht das Resultat des "Patch"-Installers aus(Oder von mir aus Updater):
http://ultimative.ul.ohost.de/Products/ ... -Patch.exe
Wer den Maker will, bitte bescheid sagen.
>Kannst ja mal sagen für welches Programm Du Dein Update-Zeugs benötigst...
Einen eigenen Updater über das NEtz habe ich schon geproggt.
Hier, der Source code meines updaters(Vielleicht kanns ja jemand gebrauchen):
Code: Alles auswählen
Enumeration
#Window_1n
EndEnumeration
Enumeration
#Text_7n
#ProgressBar_0n
EndEnumeration
SetCurrentDirectory(GetPathPart(ProgramFilename()))
Global product$="Wizard Compressor"
Global update
Procedure Open_Window_update()
If OpenWindow(#Window_1n, 258, 151, 397,200, "Update", #PB_Window_SystemMenu | #PB_Window_TitleBar | #PB_Window_WindowCentered | #PB_Window_ScreenCentered)
If CreateGadgetList(WindowID(#Window_1n))
TextGadget(#Text_7n, 10, 10, 380, 40, "Checking for update..")
EditorGadget(70,10,55,375,110,#PB_Editor_ReadOnly)
ProgressBarGadget(#ProgressBar_0n, 10, 175, 380, 20, 0, 10)
EndIf
EndIf
EndProcedure
Procedure updateprogbar(a.f)
SetGadgetState(#ProgressBar_0n,a)
EndProcedure
Procedure addtitem(pos,text$)
AddGadgetItem(70,pos,text$)
EndProcedure
Procedure setttext(text$)
SetGadgetText(#Text_7n,text$)
EndProcedure
Procedure settext(text$)
SetGadgetText(70,text$)
EndProcedure
Procedure updates()
SetGadgetText(#Text_7n,""+product$+" was updated successfully.")
EndProcedure
Procedure update()
settext("")
If URLDownloadToFile_(0,"http://ultimative.ul.ohost.de/Products/Wizard Compressor/update_number.ini","C:/update_number.ini",0,0)= #S_OK
If ReadFile(0,"C:/update_number.ini")
number$=ReadString(0)
CloseFile(0)
DeleteFile("C:/update_number.ini")
If URLDownloadToFile_(0,"http://ultimative.ul.ohost.de/Products/Wizard Compressor/update_files.ini","C:/update_files.ini",0,0)= #S_OK
If ReadFile(0,"C:/update_files.ini")
While Not Eof(0)
num=num+1
file$=ReadString(0)
path$=ReadString(0)
If path$=""
DeleteFile(file$)
URLDownloadToFile_(0,"http://ultimative.ul.ohost.de/Products/Wizard Compressor/Updates/"+file$+"",file$,0,0)
Else
DeleteFile(path$+"/"+file$)
URLDownloadToFile_(0,"http://ultimative.ul.ohost.de/Products/Wizard Compressor/Updates/"+file$+"",path$+"/"+file$,0,0)
EndIf
progress.f=progress.f+(10/Val(number$))
updateprogbar(progress.f)
addtitem(num,"Updated.."+file$)
Wend
CloseFile(0)
DeleteFile("C:/update_files.ini")
updates()
addtitem(num+1,"")
addtitem(num+2,""+product$+" was updated successfully.")
num=0
progress.f=0
update=2
updateprogbar(0)
Else
setttext("Could not update.")
update=2
EndIf
Else
setttext("Could not update.")
update=2
EndIf
Else
SetGadgetText(#Text_7n,"Could not update.")
update=2
EndIf
Else
SetGadgetText(#Text_7n,"Could not update.")
update=2
EndIf
KillThread(thread)
EndProcedure
If ReadFile(0,"cv.ini")
version$=ReadString(0)
CloseFile(0)
Else
MessageRequester(product$+" Update","Could not initialize product version.")
End
EndIf
open_window_update()
URLDownloadToFile_(0,"http://ultimative.ul.ohost.de/Products/Wizard Compressor/currentversion.ini","C:/currentversion.ini",0,0)
If ReadFile(0,"C:/currentversion.ini")
vers$=ReadString(0)
CloseFile(0)
DeleteFile("C:/currentversion.ini")
Else
vers$=version$
EndIf
If vers$<>version$
update=1
Else
SetGadgetText(#Text_7n,"No new update is available.")
EndIf
Repeat
event=WaitWindowEvent()
winev=EventWindow()
If update=1
SetGadgetText(#Text_7n,"New update is available."+Chr(10)+Chr(10)+"Latest version: "+vers$+"")
If CreateGadgetList(WindowID(#Window_1n))
ResizeGadget(70,10,55,375,90)
ButtonGadget(20,10,150,100,20,"Update")
ButtonGadget(21,120,150,100,20,"Close")
EndIf
update=2
ElseIf update=0
SetGadgetText(#Text_7n,"No new update is available.")
EndIf
If update=2
If event=#PB_Event_Gadget
Select EventGadget()
Case 20
update=7
SetGadgetText(#Text_7n,"Updating..")
thread=CreateThread(@update(),0)
Case 21
End
EndSelect
EndIf
EndIf
If event=#PB_Event_CloseWindow
End
EndIf
ForEver
JA ICH WEIß! Er ist unsauber. Hatte keine Lust es zu verbessern. Klappt aber alles wunderbar.