Seite 9 von 13

Re: [PROJEKT] Patch Maker - erstellen Patch File für Anwendungen z.b.

Verfasst: 12.12.2024 06:43
von ChrigiGee
Hallo @all
Hallo H. Brill,

Ich habe etwas versucht mir Klarheit im Dschungel des Autoupdate zu verschaffen.
Die Thematik ist zeitweise, unübersichtlicher als gedacht.

* Leider ist das Deutsche Forum sehr spärlich, was das angeht oder ich habe mit falschen Parameter gesucht
* Im englischen Forum, bekomme ich etwas mehr Probleme mit dem Parameter Auto UpDate, es will bereits gar nichts anzeigen.

* Das, was ich im Deutschen Bereich gefunden habe, ist wiederum recht alt und würde schwierig werden zu übernehmen.
* Allgemein im Internet, "alternative Suchmaschine, Software resp. Dienstleister" gibt auch da NUR Spärliches zurück.
* GitHub gibt einiges, aber mit Windows Mitteln sehr oft nicht lösbar. (Doker lässt Grüßen)

Denke hier zum Beispiel an das UpDate System von Google resp. das UpDate System von Firefox.
Beide gibt es als eine Variante zum freien Gebrauch, aber ich stoße immer wieder auf mein ungeliebtes Doker.

Das eine Suche über den gesamten Tag verteilt.

Abgesehen von diversen Setup Geschichten welche AutoUpDate anbieten, wie easy Setup oder NSIS oder InnoSetup
und den ganzen kommerziellen und weitaus zu teuren Produkten in meinem Fall.

Für mich stehen mit Auto Update resp. Internet UpDate verschiedene Punkte im Weg.

* Kosten / Nutzen
* Hosting ^^ Kosten / Nutzen?
* Integrieren in die Software möglich anstelle ausschließlich SetUp Funktion.
* AutoUpdate losgelöst vom SetUp -> man verliert den Überblick GitHub, / Man sucht ins Leere "alternative to" Seite.
* Finden einer praktikablen Lösung ?!?

Vielleicht gibt es Ansätze, aber ich würde diese gerne übernehmen ohne den Doktor machen zu müssen,
es ist ausreichend, wenn ich mich an meinem Projekt die Zähne ausbeiße.

Sorry ich hoffe ich überborde nicht mit meiner Erkenntnis, es geht nicht NUR darum, selber zu machen,
sondern wenn es eine Lösung gibt, wie Praktikabel ist diese.

Herzliche Grüsse
Christian

Re: [PROJEKT] Patch Maker - erstellen Patch File für Anwendungen z.b.

Verfasst: 12.12.2024 15:19
von jacdelad
Ich hoffe, dass das hilfreich ist: Ich hatte für diverse Projekte automatische Updates bereitgestellt. Dazu hatte ich mir eine Webseite bei bplaced bzw. Square7 geholt (beide kostenlos) und dort 2 Dateien für jedes Programm gehostet: eine Zip-Datei mit dem Update und eine kleine Textdatei mit Infos über die aktuell gehostete Version. Beim Programmstart wurde die Textdatei geladen (100 Byte oder so) und ausgewertet. Im Falle eines Updates wurde das gesamte Update geladen und installiert. Wie du das dann programmiertechnisch umsetzt, ist natürlich dir überlassen...

Re: [PROJEKT] Patch Maker - erstellen Patch File für Anwendungen z.b.

Verfasst: 12.12.2024 18:34
von H.Brill
Hatte ich auch schon gemacht : bei bplaced hochgeladen (per FTP mit Filezilla oder auch vom Programm aus) und wieder
per FTP runtergeladen. FTP kann ja Purebasic auch, da dürfte es keine Probleme geben. Mußt halt die URL in deinem Programm
fest verankern. Und wie jacdelad schon schrieb, eine kleine Textdatei mit den Änderungen dazu legen.
Entweder machst du dir so eine Art Versionsverwaltung oder bietest deine Updates generell zum Download an. Dann kann der Anwender
deiner Software entscheiden, ob er das Update will oder nicht.

Re: [PROJEKT] Patch Maker - erstellen Patch File für Anwendungen z.b.

Verfasst: 13.12.2024 10:06
von ChrigiGee
Hallo H. Brill,

Ich bin betreffend Deiner DLL erst jetzt wieder etwas am Schauen, wie das ganze zu lösen wäre,
mit Patch oder dann doch Auto Update.

Und ich habe zum Spaß mal die besagte Datei, welche zufällig in einem anderen Post bereits
Deine Erwähnung ermächtigt wurde etwas anzuschauen.

https://www.purebasic.fr/german/viewtop ... 41#p366041

Bei mir ergibt sich mit der Listview.dll ein Problem, dass mich Stutzig macht und ich noch nicht Lösen
konnte.
Library nicht gefunden
Die DLL befindet sich im selben Verzeichnis wie die Beispieldateien.
Eigentlich müsste PB die dll im Programmverzeichnis sehen, in dem die Anwendung läuft.
Was hier nicht der Fall ist.

Ich bin am Überlegen, besteht die Möglichkeit meinen Patch Maker so zu ergänzen, dass sogar
ein Auto Update dabei herauskommt.

Ich müsste etwas an der GUI anpassen und im Hintergrund aber ich denke, dass es machbar wäre.

Herzliche Grüsse
Christian
H.Brill hat geschrieben: 08.11.2024 18:53
*** CUT ***
Beim Programmstart beim Anwender wurde die .DLL als Speicherblock ausgelesen und direkt in den Ordner
als Listview.dll gespeichert.
*** CUT ***

Achja, Nimm doch einfach eine DataSection und Data für irgendwelche Werte oder IncludeBinary für Dateien.
Damit hättest du doch volle Kontrolle. Sowohl bei Änderungen am Quellcode als auch bei irgendwelchen Dateien.
Zum Auslesen sind dann die Catch-Funktionen hilfreich. Dann brauchst ja nur noch die geänderte (neueste) .exe
deinem Kollegen zu schicken. Ist halt aus der PB-Hilfe nicht so direkt ersichtlich. Da steht auf der Eingangsseite
nur Data und bei den Includefunktionen findet man auch IncludeBinary.

Re: [PROJEKT] Patch Maker - erstellen Patch File für Anwendungen z.b.

Verfasst: 13.12.2024 12:48
von H.Brill

Die DLL befindet sich im selben Verzeichnis wie die Beispieldateien.
Eigentlich müsste PB die dll im Programmverzeichnis sehen, in dem die Anwendung läuft.
Was hier nicht der Fall ist.

Vielleicht wechselst du im laufenden Progamm mal den Ordner ?
Am besten die DLL mit Pfad

Code: Alles auswählen

 GetCurrentDirectory() 
laden, wenn sie immer im Programmverzeichnis ist, wo sich deine Anwendung befindet.
Wenn die DLL mit IncludeBinary eingebunden ist, mußt du sie auch erstmal neu schreiben,
also mit WriteData .... und dann erst laden.
Man könnte sie auch direkt als Speicherbereich in den Speicher laden, ohne den Umweg
des Schreibens der DLL zu nehmen. Schau mal nach MemoryModule hier im Forum.
Wenn nicht, kann ich sie dir auch schicken.

PS: Wenn du eine leere DLL brauchst, wo du Resourcen reinpacken kannst, hätte ich
da eine, die bei XProfan standardmäßig dabei ist. Die ist ganz leer und mit dem ResHacker
kannst du beliebig Resurcen drin spreichern.

Re: [PROJEKT] Patch Maker - erstellen Patch File für Anwendungen z.b.

Verfasst: 13.12.2024 13:06
von Kiffi
H.Brill hat geschrieben: 13.12.2024 12:48Am besten die DLL mit Pfad

Code: Alles auswählen

 GetCurrentDirectory() 
laden, wenn sie immer im Programmverzeichnis ist, wo sich deine Anwendung befindet.
das stimmt so nicht.

Hier ist eine Möglichkeit, das Verzeichnis der Anwendung zu bestimmen:

Code: Alles auswählen

GetPathPart(ProgramFilename())

Re: [PROJEKT] Patch Maker - erstellen Patch File für Anwendungen z.b.

Verfasst: 13.12.2024 13:22
von ChrigiGee
Hallo und einen schönen Abend,

Ich habe um ehrlich zu sein vorerst mal zum schauen wie ein "Endprodukt" aussehen könnte,
die Originalen Daten genommen.

Erwähnung hier:
https://www.purebasic.fr/german/viewtop ... 41#p366041

Resp, Profan dll Seite:
https://xprofan.net/intl/de/dlls/listview-1/

Geändert habe ich noch nichts.

in der Include wird die dll recht früh im Source eingebunden mittels:

Code: Alles auswählen

lview = OpenLibrary(#Library, "Listview.dll")
Syntax Check ergibt keine Fehler, compilieren der Anwendung
im selben Verzeichnis, dll nicht Vorhanden.

In der PB Hilfe wäre die Einbindung der dll noch konform ausgewiesen worden.
Ich versuche mal bei der Include Datei zu verstehen wo besagter Fehler entstehen könnte.

Anfänglich überlegte ich in der Main Anwendung, unterdessen vermute ich hingegen dass die
Include Datei bereits der Grund sein könnte.

Herzliche Grüsse
Christian

Listview1.pb

Code: Alles auswählen

IncludeFile "ListviewP.pbi"

Global flen.l, lhandle.l, bereich.l, fenster.l, fenster1.l, aicons.l, ilist.l, lvcount.l, Quit.l
Global hinstance.l
Global datei.s, root.s, sp1.s, sp2.s, sp3. s, fehler.s

Global Dim Spalten.s(3)
sp1 = "Artikel"
sp2 = "Menge"
sp3 = "Preis"


Declare DatenLesen()
Declare PrintLV()
 
Procedure PrintLV()
titel.s = "Liste"
PrintListview(lhandle, WindowID(0), 48, 60, 200, 200, 200, 200, 0, 0, @titel, 0, 1)
EndProcedure

Procedure DatenLesen()
 Spalten(0) = "Grafikkarte"
 Spalten(1) = "10"
 Spalten(2) = "30.00"     
 SItem(lhandle, @Spalten(), 3)
 Spalten(0) = "Mainboard"
 Spalten(1) = "5"
 Spalten(2) = "150.00"     
 SItem(lhandle, @Spalten(), 3)
EndProcedure
        
fenster1 = OpenWindow(0, 10, 10, 640, 480, "List - View",#PB_Window_SystemMenu | #PB_Window_MinimizeGadget|#PB_Window_ScreenCentered)
ButtonGadget(1, 10,  10 ,100, 20, "Info")
ButtonGadget(2, 120, 10, 100, 20, "Print")
ButtonGadget(3, 230, 10, 70, 20, "Ende")
TextGadget(4, 10, 35, 200, 20, "") 

lhandle = CreateListview(WindowID(0), 0, 0, RGB(255,255,255), -1, $31)
IColumn(lhandle, @sp1, 250, 0)
IColumn(lhandle, @sp2, 80, 0)
IColumn(lhandle, @sp3, 100, 0)
ShowListview(lhandle, 5, 60, 570, 320) 
EnableEdits(lhandle, 1)
; Messageverwaltung einschalten 
InitMessages(WindowID(0))
DatenLesen()
 
Quit = 0

Repeat
   EventID.l = WaitWindowEvent()
   If EventID = #PB_Event_Gadget And EventGadget() = 1
      MessageRequester("Datei - Lister", "Info", #PB_MessageRequester_Ok)                  
   EndIf                                             
   If EventID = #PB_Event_Gadget And EventGadget() = 2
      PrintLV()
   EndIf   
   If EventID = #PB_Event_Gadget And EventGadget() = 3
      ; Ende
      Quit = 1
   EndIf           
Until EventID = #PB_Event_CloseWindow Or Quit = 1
; Messageverwaltung wieder ausschalten
CloseMessages(WindowID(0))
DestroyWindow_(fenster1)

End

zusätzlich die Include Datei "ListviewP.pbi"

Code: Alles auswählen

; Funktionen für Listview.dll
; als Prototype deklariert

#Library = 0
Global lview.l, value.l, text.s

lview = OpenLibrary(#Library, "Listview.dll")

Prototype pCreateListview(f.l, i.l, t.l, h.l, g.l, s.l)
Prototype pIColumn(h.l, t.l, b.l, f.l)
Prototype pSItem(h.l, b.l, a.l)
Prototype pShowListview(ha.l, x.l, y.l, b.l, h.l)
Prototype pInitMessages(h.l)
Prototype pASortListview(h.l, b.l, a.l)
Prototype pAddItemValues(lv.l, s.l, b.l, a.l)
Prototype pCheckIfMarked(lv.l)
Prototype pMarkIfChecked(lv.l)
Prototype pReadFileQuick(s.l, b.l, o.l, a.l)
Prototype pWriteFileQuick(s.l, b.l, o.l, a.l)
Prototype pSwapLines(b.l, a.l, f.l)
Prototype pCsvToListview(h.l, b.l, a.l, s.l)
Prototype pListviewToCsv(h.l, b.l, a.l, f.l)
Prototype pSetItemsFromMem(h.l, b.l, a.l, s.l)
Prototype pGetColumns(h.l)
Prototype pGetColumnName(lv.l, b.l, s.l)
Prototype pGetLines(h.l)
Prototype pGetSelected(bt.l, bl.l)
Prototype pGetSelectedDbClk(bt.l, bl.l)
Prototype pGetAllSelected(bt.l, bl.l)
Prototype pGetNeededMemory(h.l, f.l)
Prototype pGetTabOffsets(bt.l, bo.l)
Prototype pGetNullOffset(b.l)
Prototype pGetOwnControlParas(b.l, h.l, s.l, z.l)
Prototype pGetRealColumnIndex(lv.l, s.l)
Prototype pCreateImageList(f.l, b.l)
Prototype pDestroyImageList(i.l)
Prototype pSetImageList(h.l, i.l)
Prototype pSetIcon(h.l, z.l, n.l)
Prototype pSetIconMode(f.l)
Prototype pSetIconColumn(s.l)
Prototype pSetIconsFromMem(h.l, z.l, b.l, a.l)
Prototype pSetIconsWith(h.l, z.l, n.l, a.l)
Prototype pSetIndex(i.l)
Prototype pGetSelectedLine(h.l)
Prototype pGetColumnWidth(h.l, i.l)
Prototype pCryptMem(b.l, a.l, s.l, l.l)
Prototype pSetColumnsFromMem(h.l, b.l, o.l)
Prototype pSetColumnName(lv.l, b.l, s.l)
Prototype pCloseMessages(f.l)
Prototype pDbfToCsv(b.l, a.l, s.l, z.l, f.l)
Prototype pSelectLine(h.l, i.l, f.l)
Prototype pSetAllCheckboxStates(lv.l, b.l)
Prototype pDeleteDoubleItems(lv.l, s.l)
Prototype pEnableEdits(lv.l, fl.l)
Prototype pListviewToDbf(lv.l, ber.l, vb.l, fl.l)
Prototype pSetCheckboxState(lv.l, index.l, mode.l)
Prototype pGetCheckboxState(lv.l, index.l)
Prototype pGetAllCheckboxStates(H.l, B.l)   
Prototype pGetChecked(p1.l, p2.l, p3.l)
Prototype pSearchText(lv.l, start.l, ende.l, spalte.l, sstr.l, flag.l, espalte.l)
Prototype pSelectColumnEdits(lv.l, b.l)
Prototype pExchangeSeparator(ber.l, anzb.l, ascz.l, ersatz.l, f.l)
Prototype pCopyLineTo(qlv.l, zlv.l, qindex.l, zindex.l)
Prototype pCopyColumnTo(qlv.l, zlv.l, qindex.l, zindex.l)
Prototype pSortManual(h.l, i.l, f.l)
Prototype pFilelistToCsv(n.l, b.l, s.l, z.l, f.l, i.l)
Prototype pSetItemText(h.l, t.l, s.l, i.l)
Prototype pGetItemText(h.l, b.l, s.l, i.l)
Prototype pGetItemTextsAsFloat(lv.l, s.l, b.l)
Prototype pGetItemTextsAsInteger(lv.l, s.l, b.l)
Prototype pExamineColumn(h.l, s.l)
Prototype pSetColumnSort(h.l, s.l, f.l)
Prototype pGetColumnUpdate(h.l, b.l)
Prototype pRaiseColumns(h.l, b.l, s.l, g.l)
Prototype pRaiseLine(lv.l, l.l, s.l, g.l)
Prototype pMixRGB(f1.l, f2.l)
Prototype pSetBackImage(h.l, n.l, f.l)
Prototype pPrintListview(h.l, w.l, i.l, s.l, l.l, o.l, r.l, u.l, ps.l, pz.l, us.l, n.l, f.l)
Prototype pPrintColumns(b.l)
Prototype pAreCheckboxesPresent(h.l)
Prototype pEraseListview(h.l)
Prototype pGetControlParas(b.l)
Prototype pRegister(k.l)
Prototype pSetFilelistFilter(s.l)
Prototype pSetFilelistNoFilter(s.l)
Prototype pEnableDragDrop(lv.l, f.l)
Prototype pGetDragDropParas(b.l)
Prototype pSetStyle(s.l)
Prototype pGetVar(f.l)
Prototype pGetEdgeIntegers(b.l, a.l, l.l, h.l)
Prototype pGetEdgeFloats(b.l, a.l, l.f, h.f)
Prototype pGetIcon(lv.l, s.l, z.l)
Prototype pAreIconsPresent(H.l)
Prototype pSetColumnAlignment(lv.l, s.l, a.l)
Prototype pSetLineNumbers(lv.l, a.l, s.l)
Prototype pGetDllVersion()
Prototype pDeleteSpaceLines(lv.l, f.l)
Prototype pGetIndex()
Prototype pConvertDatas(lv.l, s.l, f.l)
Prototype pForbidScrollMessage(lv.l)
Prototype pExchangeBytes(lv.l, s.l, q.l, z.l)
Prototype pSetPrintAttributes(F.l, p1.l, p2.l, p3.l, p4.l)
Prototype pSetColumnsWidthLimits(L.l, H.l) 
Prototype pSetLineHeight(lv.l, y.l)
Prototype pGetLastKey(L.l,T.l) 
Prototype pListviewToRaw(H.l,B.l) 
Prototype pRawToListview(H.l, B.l)
Prototype pSetItemTextEx(H.l,T.l,S.l,L.l,A.l)
Prototype pGetItemTextEx(H.l,B.l,S.l,L.l,A.l) 
Prototype pBuildListview(H.l,S.l,L.l,B.l,T.l) 
Prototype pClearListview(H.l) 
Prototype pEditManual(H.l,S.l,Z.l,F.l) 
Prototype pCsvToHeader(H.l, B.l, O.l)
Prototype pDeleteAllItems(H.l)
Prototype pDeleteColumn(H.l, I.l)
Prototype pDeleteItem(H.l, I.l)
Prototype pGetItemState(lv.l, index.l, status.l)
Prototype pGetSelectedCount(lv.l)
Prototype pUpdateListview(H.l)
Prototype pGetLineText(h.l, i.l, b.l)
Prototype pSetColumnUpdate(H.l, B.l)
Prototype pHeaderToCsv(H.l, B.l, A.l, F.l)
Prototype pSearchBlankItem(H.l, S.l, L.l)

If IsLibrary(#Library)
   Global CreateListview.pCreateListview = GetFunction(#Library, "CreateListview")
   Global IColumn.pIColumn = GetFunction(#Library, "IColumn")
   Global SItem.pSItem = GetFunction(#Library, "SItem")
   Global ShowListview.pShowListview = GetFunction(#Library, "ShowListview")  
   Global InitMessages.pInitMessages = GetFunction(#Library, "InitMessages")
   Global ASortListview.pASortListview = GetFunction(#Library, "ASortListview")
   Global AddItemValues.pAddItemValues = GetFunction(#Library, "AddItemValues")
   Global CheckIfMarked.pCheckIfMarked = GetFunction(#Library, "CheckIfMarked")
   Global MarkIfChecked.pMarkIfChecked = GetFunction(#Library, "MarkIfChecked")
   Global ReadFileQuick.pReadFileQuick = GetFunction(#Library, "ReadFileQuick")
   Global WriteFileQuick.pWriteFileQuick = GetFunction(#Library, "WriteFileQuick")
   Global SwapLines.pSwapLines = GetFunction(#Library, "SwapLines")
   Global CsvToListview.pCsvToListview = GetFunction(#Library, "CsvToListview")
   Global ListviewToCsv.pListviewToCsv = GetFunction(#Library, "ListviewToCsv")                
   Global SetItemsFromMem.pSetItemsFromMem = GetFunction(#Library, "SetItemsFromMem")
   Global GetColumns.pGetColumns = GetFunction(#Library, "GetColumns")
   Global GetColumnName.pGetColumnName = GetFunction(#Library, "GetColumnName")
   Global GetLines.pGetLines = GetFunction(#Library, "GetLines")
   Global GetSelected.pGetSelected = GetFunction(#Library, "GetSelected")
   Global GetSelectedDbClk.pGetSelectedDbClk = GetFunction(#Library, "GetSelectedDbClk")
   Global GetAllSelected.pGetAllSelected = GetFunction(#Library, "GetAllSelected")
   Global GetAllCheckboxStates.pGetAllCheckboxStates = GetFunction(#Library, "GetAllCheckboxStates")
   Global GetNeededMemory.pGetNeededMemory = GetFunction(#Library, "GetNeededMemory")
   Global GetTabOffsets.pGetTabOffsets = GetFunction(#Library, "GetTabOffsets")
   Global GetNullOffset.pGetNullOffset = GetFunction(#Library, "GetNullOffset")
   Global GetOwnControlParas.pGetOwnControlParas = GetFunction(#Library, "GetOwnControlParas")
   Global GetRealColumnIndex.pGetRealColumnIndex = GetFunction(#Library, "GetRealColumnIndex")
   Global CreateImageList.pCreateImageList = GetFunction(#Library, "CreateImageList")
   Global SetImageList.pSetImageList = GetFunction(#Library, "SetImageList")
   Global SetIcon.pSetIcon = GetFunction(#Library, "SetIcon")
   Global SetIconMode.pSetIconMode = GetFunction(#Library, "SetIconMode")
   Global SetIconColumn.pSetIconColumn = GetFunction(#Library, "SetIconColumn")
   Global SetIconsFromMem.pSetIconsFromMem = GetFunction(#Library, "SetIconsFromMem")
   Global SetIconsWith.pSetIconsWith = GetFunction(#Library, "SetIconsWith")
   Global SetIndex.pSetIndex = GetFunction(#Library, "SetIndex")
   Global SetColumnsWidthLimits.pSetColumnsWidthLimits = GetFunction(#Library, "SetColumnsWidthLimits")
   Global GetSelectedLine.pGetSelectedLine = GetFunction(#Library, "GetSelectedLine")
   Global GetColumnWidth.pGetColumnWidth = GetFunction(#Library, "GetColumnWidth")
   Global CryptMem.pCryptMem = GetFunction(#Library, "CryptMem")
   Global SetColumnsFromMem.pSetColumnsFromMem = GetFunction(#Library, "SetColumnsFromMem")
   Global SetColumnName.pSetColumnName = GetFunction(#Library, "SetColumnName")
   Global CloseMessages.pCloseMessages = GetFunction(#Library, "CloseMessages")
   Global DbfToCsv.pDbfToCsv = GetFunction(#Library, "DbfToCsv")
   Global SelectLine.pSelectLine = GetFunction(#Library, "SelectLine")
   Global SetAllCheckboxStates.pSetAllCheckboxStates = GetFunction(#Library, "SetAllCheckboxStates")
   Global DeleteDoubleItems.pDeleteDoubleItems = GetFunction(#Library, "DeleteDoubleItems")
   Global EnableEdits.pEnableEdits = GetFunction(#Library, "EnableEdits")
   Global ListviewToDbf.pListviewToDbf = GetFunction(#Library, "ListviewToDbf")
   Global SetCheckboxState.pSetCheckboxState = GetFunction(#Library, "SetCheckboxState")
   Global GetCheckboxState.pGetCheckboxState = GetFunction(#Library, "GetCheckboxState")
   Global GetChecked.pGetChecked = GetFunction(#Library, "GetChecked")
   Global SearchText.pSearchText = GetFunction(#Library, "SearchText")
   Global SelectColumnEdits.pSelectColumnEdits = GetFunction(#Library, "SelectColumnEdits") 
   Global ExchangeSeparator.pExchangeSeparator = GetFunction(#Library, "ExchangeSeparator")
   Global CopyLineTo.pCopyLineTo = GetFunction(#Library, "CopyLineTo")
   Global CopyColumnTo.pCopyColumnTo = GetFunction(#Library, "CopyColumnTo")
   Global GetIndex.pGetIndex = GetFunction(#Library, "GetIndex")
   Global SortManual.pSortManual = GetFunction(#Library, "SortManual")
   Global FilelistToCsv.pFilelistToCsv = GetFunction(#Library, "FilelistToCsv")
   Global SetItemText.pSetItemText = GetFunction(#Library, "SetItemText")
   Global GetItemText.pGetItemText = GetFunction(#Library, "GetItemText")
   Global GetItemTextsAsFloat.pGetItemTextsAsFloat = GetFunction(#Library, "GetItemTextsAsFloat")
   Global GetItemTextsAsInteger.pGetItemTextsAsInteger = GetFunction(#Library, "GetItemTextsAsInteger")
   Global ExamineColumn.pExamineColumn = GetFunction(#Library, "ExamineColumn")
   Global SetColumnSort.pSetColumnSort = GetFunction(#Library, "SetColumnSort")
   Global GetColumnUpdate.pGetColumnUpdate = GetFunction(#Library, "GetColumnUpdate")
   Global SetColumnUpdate.pSetColumnUpdate = GetFunction(#Library, "SetColumnUpdate")
   Global RaiseColumns.pRaiseColumns = GetFunction(#Library, "RaiseColumns")
   Global RaiseLine.pRaiseLine = GetFunction(#Library, "RaiseLine")
   Global MixRGB.pMixRGB = GetFunction(#Library, "MixRGB")
   Global SetBackImage.pSetBackImage = GetFunction(#Library, "SetBackImage")
   Global PrintListview.pPrintListview = GetFunction(#Library, "PrintListview")
   Global PrintColumns.pPrintColumns = GetFunction(#Library, "PrintColumns")
   Global AreCheckboxesPresent.pAreCheckboxesPresent = GetFunction(#Library, "AreCheckboxesPresent")
   Global AreIconsPresent.pAreIconsPresent = GetFunction(#Library, "AreIconsPresent")
   Global EraseListview.pEraseListview = GetFunction(#Library, "EraseListview")
   Global GetControlParas.pGetControlParas = GetFunction(#Library, "GetControlParas")
   Global Register.pRegister = GetFunction(#Library, "Register")
   Global SetFilelistFilter.pSetFilelistFilter = GetFunction(#Library, "SetFilelistFilter")
   Global SetFilelistNoFilter.pSetFilelistNoFilter = GetFunction(#Library, "SetFilelistNoFilter")
   Global EnableDragDrop.pEnableDragDrop = GetFunction(#Library, "EnableDragDrop")
   Global GetDragDropParas.pGetDragDropParas = GetFunction(#Library, "GetDragDropParas")       
   Global SetStyle.pSetStyle = GetFunction(#Library, "SetStyle")
   Global GetVar.pGetVar = GetFunction(#Library, "GetVar")
   Global GetEdgeIntegers.pGetEdgeIntegers = GetFunction(#Library, "GetEdgeIntegers")
   Global GetEdgeFloats.pGetEdgeFloats = GetFunction(#Library, "GetEdgeFloats")
   Global GetIcon.pGetIcon = GetFunction(#Library, "GetIcon")
   Global SetColumnAlignment.pSetColumnAlignment = GetFunction(#Library, "SetColumnAlignment")
   Global SetLineNumbers.pSetLineNumbers = GetFunction(#Library, "SetLineNumbers")
   Global GetDllVersion.pGetDllVersion = GetFunction(#Library, "GetDllVersion")
   Global DeleteSpaceLines.pDeleteSpaceLines = GetFunction(#Library, "DeleteSpaceLines")
   Global ConvertDatas.pConvertDatas = GetFunction(#Library, "ConvertDatas")
   Global ForbidScrollMessage.pForbidScrollMessage = GetFunction(#Library, "ForbidScrollMessage")
   Global ExchangeBytes.pExchangeBytes = GetFunction(#Library, "ExchangeBytes")
   Global SetPrintAttributes.pSetPrintAttributes = GetFunction(#Library, "SetPrintAttributes")
   Global SetLineHeight.pSetLineHeight = GetFunction(#Library, "SetLineHeight")
   Global GetLastKey.pGetLastKey = GetFunction(#Library, "GetLastKey")
   Global SetColumnsWidthLimits.pSetColumnsWidthLimits = GetFunction(#Library, "SetColumnsWidthLimits")
   Global ListviewToRaw.pListviewToRaw = GetFunction(#Library, "ListviewToRaw")
   Global RawToListview.pRawToListview = GetFunction(#Library, "RawToListview")
   Global SetItemTextEx.pSetItemTextEx = GetFunction(#Library, "SetItemTextEx")
   Global GetItemTextEx.pGetItemTextEx = GetFunction(#Library, "GetItemTextEx") 
   Global BuildListview.pBuildListview = GetFunction(#Library, "BuildListview")
   Global ClearListview.pClearListview = GetFunction(#Library, "ClearListview")
   Global EditManual.pEditManual = GetFunction(#Library, "EditManual")
   Global CsvToHeader.pCsvToHeader = GetFunction(#Library, "CsvToHeader")
   Global HeaderToCsv.pHeaderToCsv = GetFunction(#Library, "HeaderToCsv")
   Global DeleteAllItems.pDeleteAllItems = GetFunction(#Library, "DeleteAllItems")
   Global DeleteColumn.pDeleteColumn = GetFunction(#Library, "DeleteColumn")
   Global DeleteItem.pDeleteItem = GetFunction(#Library, "DeleteItem")
   Global GetItemState.pGetItemState = GetFunction(#Library, "GetItemState")
   Global GetSelectedCount.pGetSelectedCount = GetFunction(#Library, "GetSelectedCount")
   Global UpdateListview.pUpdateListview = GetFunction(#Library, "UpdateListview")
   Global HeaderToCsv.pHeaderToCsv = GetFunction(#Library, "HeaderToCsv")
   Global SearchBlankItem.pSearchBlankItem = GetFunction(#Library, "SearchBlankItem")
Else
  MessageRequester("Fehler", "Library nicht gefunden", 0)
  End
EndIf

Procedure DestroyImageList(i.l)
  ImageList_Destroy_(i)
EndProcedure  

Procedure.s GetLineText(h.l, i.l, b.l)
  value = GetFunction(#Library, "GetLineText")
  If value <> 0
     text = PeekS(b)
  Else
     text = ""
  EndIf
  ProcedureReturn text      
EndProcedure
    
Procedure.l GetLVTxtColor(lv.l)
  value = SendMessage_(lv, $1023, 0, 0)
  ProcedureReturn value
EndProcedure

Procedure.l GetLVTxtBKColor(lv.l)
   value = SendMessage_(lv, $1025, 0, 0)
   ProcedureReturn value
EndProcedure

Procedure.l GetLVBKColor(lv.l)
   value = SendMessage_(lv, $1000, 0, 0)
   ProcedureReturn value
EndProcedure

Re: [PROJEKT] Patch Maker - erstellen Patch File für Anwendungen z.b.

Verfasst: 13.12.2024 14:26
von Axolotl
Hallo und einen schönen Abend,
Hallo zurück,
und ich dachte immer Bern liegt in der gleichen Zeitzone wie Deutschland. (?!)

Spaß beiseite, eigenlich hatte ich mich auf Lesen zurückgezogen, da ich mich nicht immer wiederholen möchte und .....
Nur kurz zu aktuellen Pfaden.
Prüfe in deinem Program welcher Pfad aktuell ist durch einfügen von dieser Zeile.

Code: Alles auswählen

Debug "CurrentDirectory: " + GetCurrentDirectory() 
Oder setze in deinem Program den aktuellen Pfad mit:

Code: Alles auswählen

SetCurrentDirectory("<some valid path>") 
Oder (und das ist a.m.S. der beste Weg) verwende immer vollständige Pfade.

Klitzekleiner Tipp zum Vorschlag von Kiffi:
Wenn deine temporäre Executable "PureBasic_CompilationX.exe" (wobei X für eine Zahl von 0 bis N steht) im Temp Verzeichnis liegt und ausgeführt wird, sollte da auch deine Library liegen. Liegt sie aber im Source-Verzeichnis wäre der Pfad der Sourcedatei zu verwenden. Siehe hierzu auch

Code: Alles auswählen

#PB_Compiler_FilePath

Re: [PROJEKT] Patch Maker - erstellen Patch File für Anwendungen z.b.

Verfasst: 13.12.2024 14:47
von H.Brill
Am einfachsten legst du die DLL in den Ordner, wo du auch deinen Quellcode speicherst.
Dorthin compiliert der PB-Compiler auch deine fertige .exe.
Ansonsten kannst du bei OpenLibrary() die DLL auch mit Pfad angeben. Ist aber bei Weitergabe
deines Progamms nicht zu empfehlen.

Re: [PROJEKT] Patch Maker - erstellen Patch File für Anwendungen z.b.

Verfasst: 13.12.2024 15:22
von ChrigiGee
Hallo @all und Guten Abend,

die Schweiz wäre in der gleichen Zeit-Zone.
Nur befinde ich mich in einer 6 Stunden späteren Zeitzone.
Also für Europa in der Zukunft back to the Future ???

Sorry, und wegen meines Schreibstiles, auch wenn ich Urlaub mache,
habe ich gerade durch den Zonenwechsel gerade etwas mühe mit der
Aufmerksamkeit, bla bla bla.

Sehr interessant, axolotl, beim Ausführen des Source, befindet der sich
im Verzeichnis "C:\"

Die Frage nach dem Wechseln ist geklärt, was, aber wenn ich jetzt das Verzeichnis wechseln möchte
dorthin wo die "exe" sich befindet in der Annahme dort liegt auch die dll.

Und wie könnte es nicht anders sein, ich habe versucht zu verstehen, warum das falsche Verzeichnis.
Die ursprünglich Include Datei hat ein fixes Verzeichnis hinterlegt und wenn ich das lösche
bin ich siehe da im Verzeichnis zur dll.

Und wenn alle Märchen war wären, wäre ich bereits ein Schritt weiter.
Das Verzeichnis stimmt, aber, die Fehlermeldung bleibt.

Ich versuche noch zu erkennen, ob die Main Anwendung evtl. noch woanders hinzeigt.


Herliche Grüsse aus Thailand
Christian