PureDataConverter

Applications, Games, Tools, User libs and useful stuff coded in PureBasic
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

for example, you can use LoadDllMemory from PBOSL:

Code: Select all

hModule = LoadLibraryM(PBData_Get(1))
address = GetProcAddressM(hModule,FunctionName.s)
Or save the DLL
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

Updates: Version 1.6

supports more than 256 entries in projectfile
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
Psychophanta
Always Here
Always Here
Posts: 5153
Joined: Wed Jun 11, 2003 9:33 pm
Location: Anare
Contact:

Post by Psychophanta »

Thank you for it 8)
http://www.zeitgeistmovie.com

while (world==business) world+=mafia;
User avatar
mback2k
Enthusiast
Enthusiast
Posts: 257
Joined: Sun Dec 02, 2007 12:11 pm
Location: Germany

Post by mback2k »

I have created 2 more util functions, you probably want to include them. ;-)

Code: Select all

Procedure UDRes_WriteFile(File$, ResNumber, hModule = 0)
  Protected *Mem = UDRes_Get(ResNumber, hModule)
  Protected File

  If *Mem
    If CRC32FileFingerprint(File$) <> CRC32Fingerprint(*Mem, MemorySize(*Mem))
      File = CreateFile(#PB_Any, File$)
      If File
        WriteData(File, *Mem, MemorySize(*Mem))
        CloseFile(File)
      EndIf
    EndIf
    FreeMemory(*Mem)

    ProcedureReturn File
  EndIf

EndProcedure

Procedure UDRes_CatchXML(XML, ResNumber, Flag = 0, hModule = 0)
  Protected *Mem = UDRes_Get(ResNumber, hModule)
  Protected Result

  If *Mem
    Result = CatchXML(XML, *Mem, MemorySize(*Mem), Flag)
    FreeMemory(*Mem)

    ProcedureReturn Result
  EndIf

EndProcedure
User avatar
mback2k
Enthusiast
Enthusiast
Posts: 257
Joined: Sun Dec 02, 2007 12:11 pm
Location: Germany

Post by mback2k »

Feature request:

I would like to use the program as a compiler tool. Would it be possible to make it use a parameters like /PROJECT "C:/blabla/MyProject.pb" /OUTPUT res which would make it read MyProject.pbdc and write to MyProject.res?
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

mback2k wrote:Feature request:

I would like to use the program as a compiler tool. Would it be possible to make it use a parameters like /PROJECT "C:/blabla/MyProject.pb" /OUTPUT res which would make it read MyProject.pbdc and write to MyProject.res?
There is a parameter /CREATESILENT = "outputfile with path"
This is to combine with projectfile and should do the trick.

and for WriteFile there is UDRes_Save(FileName.s, ResNumber, hModule)
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
mback2k
Enthusiast
Enthusiast
Posts: 257
Joined: Sun Dec 02, 2007 12:11 pm
Location: Germany

Post by mback2k »

I tried the following parameters, but it does not work for me:

Code: Select all

"%FILEdc" /CREATESILENT="%FILE.res"
The application starts and quits right away, without creating the res file.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

Have you saved the project with output res selected?

My batchfile with absolute paths works fine here, i have it never tested in
PB IDE.
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
mback2k
Enthusiast
Enthusiast
Posts: 257
Joined: Sun Dec 02, 2007 12:11 pm
Location: Germany

Post by mback2k »

Yes, I did save it with res selected as output. Does not work for me through the IDE.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

should work :roll:
use a batchfile to solve the problem.

here my code for ProgramParameters

Code: Select all

  ; Programmparameter einlesen
  If j
    For i = 0 To j - 1
      Parameter = ProgramParameter(i)
      uParameter = Left(UCase(Parameter), 13)
      Select uParameter
        Case "/PORTABLE"
          Prefs\portable = #True
        Case "/IGNOREPOS"
          Prefs\ignorepos = #True
        Case "/CREATESILENT"
          SilentName = RemoveString(Parameter, "/CREATESILENT=", #PB_String_NoCase)
          SilentName = RemoveString(SilentName, #DQUOTE$)
        Default
          If FileSize(Parameter) > 0
            If UCase(GetExtensionPart(Parameter)) = "PBDC"
              Prefs\projectdir = GetPathPart(Parameter)
              Prefs\projectfile = GetFilePart(Parameter)
            EndIf
          EndIf
      EndSelect
    Next
  EndIf
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Post by ts-soft »

Update
1.6.007
Updated romanian language
Added Helpfile for romanian (thanks to Inf0Byt3)
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: PureDataConverter

Post by IdeasVacuum »

Hello Thomas

Is PureDataConverter compatible with PB4.51?
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
User avatar
ts-soft
Always Here
Always Here
Posts: 5756
Joined: Thu Jun 24, 2004 2:44 pm
Location: Berlin - Germany

Re: PureDataConverter

Post by ts-soft »

IdeasVacuum wrote:Hello Thomas

Is PureDataConverter compatible with PB4.51?
Should work with every PB version since 4.0
PureBasic 5.73 | SpiderBasic 2.30 | Windows 10 Pro (x64) | Linux Mint 20.1 (x64)
Old bugs good, new bugs bad! Updates are evil: might fix old bugs and introduce no new ones.
Image
IdeasVacuum
Always Here
Always Here
Posts: 6426
Joined: Fri Oct 23, 2009 2:33 am
Location: Wales, UK
Contact:

Re: PureDataConverter

Post by IdeasVacuum »

Cool! :mrgreen:
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
Damion12
User
User
Posts: 81
Joined: Tue Oct 30, 2012 1:39 am

Re: PureDataConverter

Post by Damion12 »

I was using this in large file data, and am having problems compiling -- reading docs, says that I should be using the .res format - but then how do I add this to my PB project file so I can access it?
Post Reply