Posted: Tue Nov 28, 2006 2:19 pm
Is there any chance of my request beeing realized?
http://www.purebasic.com
https://www.purebasic.fr/english/
There is, but it's not the only request I have, nor the only project ...Dummy wrote:Is there any chance of my request beeing realized?
Code: Select all
CodePage.l
ImportUsed.l
+ ShortFootprint.l
; gnozal
Code: Select all
If Sources()\SourceType=#SourceType_PureBasic
WriteStringN("")
+ If Sources()\ShortFootprint = 0
WriteStringN("; jaPBe Version="+jaPBeVer)
FoldInfo$=""
Code: Select all
WriteStringN("; FoldLines="+FoldInfo$)
EndIf
+ EndIf
For i=0 To 99
Code: Select all
If Sources()\Language : WriteStringN("; Language=" + Sources()\Language) : EndIf
If Sources()\compileThis$ : WriteStringN("; CompileThis=" + RelativName(File$,Sources()\compileThis$)) : EndIf
+ If Sources()\ShortFootprint = 0
WriteStringN("; FirstLine=" + Str(SCI_GetFirstVisibleLine()))
WriteStringN("; CursorPosition=" + Str(SCI_LineFromPosition(SCI_GetCurrentPos())))
+ Else
+ WriteStringN("; ShortFootprint")
+ EndIf
If Sources()\EnableASM : WriteStringN("; EnableAsm") : EndIf
If Sources()\EnableThreadSafe : WriteStringN("; EnableThread") : EndIf ; gnozal
Code: Select all
ElseIf line$ = "; EnableAsm" : Sources()\EnableASM = 1
ElseIf line$ = "; EnableXP" : Sources()\EnableXP = 1
+ ElseIf line$ = "; ShortFootprint" : Sources()\ShortFootprint = 1
ElseIf line$ = "; DisableDebugger" ; Ignore
ElseIf line$ = "; SaveDeclare" : Sources()\SaveDeclare= 1
I grabbed the sources and posted diffs needed to add basic support, but I won't create my custom project as it'd be too much work for me to keep my custom build in sync with your great work... or grab the sources and do your own custom version, like I did.
thanksgnozal wrote:Update
Changes :
- added 'Generate a short source footprint' in project options (version tab) ; see Dummy's posts.
Sorry, but I don't understand your post ?oryaaaaa wrote:3.6.11.594
I dont launch VisualDesigner
F:\Program Files\jaPBe
F:\Program Files\PureBasic\Visual Designer.exe
* stop
Visual Desinger
Code Explorer
Please fix
Thanks
Sorry, but I still don't understand ; small video, in japanese, and my old NT4/PC doesn't play it correctlyoryaaaaa wrote:Video 3min divx6 (20MB)
http://purebasic.multiply.com/video/item/1
no Error message
C drive is memory card drive
Code: Select all
Procedure.s GetPureBasicPath()
Buffer$=Space(10000):BufferSize=Len(Buffer$)-1
If GetVersion_() & $ff0000 ; Windows NT/XP
If RegOpenKeyEx_(#HKEY_CLASSES_ROOT, "Applications\PureBasic.exe\shell\open\command", 0, #KEY_ALL_ACCESS , @Key) = #ERROR_SUCCESS
If RegQueryValueEx_(Key, "", 0, @type, @Buffer$, @BufferSize) = #ERROR_SUCCESS
OutputDirectory$ = GetPathPart(Mid(Buffer$, 2, Len(Buffer$)-7))
EndIf
EndIf
Else ; The same for Win9x
If RegOpenKeyEx_(#HKEY_LOCAL_MACHINE, "Software\Classes\PureBasic.exe\shell\open\command", 0, #KEY_ALL_ACCESS , @Key) = #ERROR_SUCCESS
If RegQueryValueEx_(Key, "", 0, @Type, @Buffer$, @BufferSize) = #ERROR_SUCCESS
OutputDirectory$ = GetPathPart(Mid(Buffer$, 2, Len(Buffer$)-7))
EndIf
EndIf
EndIf
ProcedureReturn OutputDirectory$
EndProcedure
F:\Program Files\PureBasic\Does this code get the PB path ?
Yes, I can start %jaPBe%\Plugin\Visual Designer\Visual by explorer.do you have a "Visual Designer.exe" file in %jaPBe%\Plugin\Visual Designer\ ?
Yes, correct. Compile/Run is normal.are the path settings in jaPBe correct ?
Code: Select all
Procedure UpdateFile(File$)
If GetFileDate( VDPath+File$,#PB_Date_Modified) <> GetFileDate(Path+File$,#PB_Date_Modified)
CopyFile(VDPath+File$,Path+File$)
EndIf
EndProcedure
If OpenWindow(1,0,200,200,200,"jaPBe-Plugin",#PB_Window_Invisible)
SetWindowCallback(@Callback())
a$=ProgramParameter()
If a$="jaPBe"
jaPBe_Handle=Val(ProgramParameter())
jaPBe_Version$=ProgramParameter()
;Current Path
Path.s = Space(#MAX_PATH)
GetModuleFileName_(GetModuleHandle_(0), @Path, #MAX_PATH)
Path=GetPathPart(Path)+"Visual Designer\"
Debug Path
;MessageRequester("",Path)
VDPath.s=jaPBe_GetPBPath()
;MessageRequester("",VDPath)
If CreateFile(1,Path+"japbe.handle")
WriteLong(1,jaPBe_Handle)
CloseFile(1)
EndIf
If CreateFile(1,Path+"compilers\japbe.handle")
WriteLong(1,jaPBe_Handle)
CloseFile(1)
EndIf
If FileSize(Path+"Visual Designer.prefs")=-1
CopyFile(VDPath+"Visual Designer.prefs",Path+"Visual Designer.prefs")
EndIf
;UpdateFile("Visual Designer.chm")
;If GetFileDate( VDPath+"Visual Designer.exe",#PB_Date_Modified) <> GetFileDate(Path+"Visual Designer.exe",#PB_Date_Modified)
CopyFile(VDPath+"Visual Designer.exe",Path+"Visual Designer.exe")
CopyFile(VDPath+"Visual Designer Constants.prefs",Path+"Visual Designer Constants.prefs")
CopyFile(VDPath+"Visual Designer.exe.manifest",Path+"Visual Designer.exe.manifest")
CopyCatalog("")
CopyCatalog("Deutsch\")
CopyCatalog("Dutch\")
CopyCatalog("Francais\")
CopyCatalog("Greek\")
CopyCatalog("Italian\")
CopyCatalog("Portuguese\")
CopyCatalog("Spanish\")
;EndIf
; gnozal : to get the custom syntax coloring in the code window
CopyFile(VDPath+"Purebasic.prefs",Path+"Purebasic.prefs")
;
;MessageRequester("",Path)
RunProgram(Path+"Visual Designer.exe","",Path)
;MessageRequester("",Str(FileSize(Path+"Visual Designer.exe")))
;Important: Never delete the follow line!
PostMessage_(jaPBe_Handle,#mywm_Plugin_Cancel,0,WindowID(1))
Else
MessageRequester("Visual Designer starter","This is a jaPBe-Plugin"+Chr(10)+"You can't run it without jaPBe",0)
EndIf
CloseWindow(1)
Else
MessageRequester("Visual Designer starter","Can't open a window!",0)
EndIf
Code: Select all
Procedure FileTimeToDate(*FT.FILETIME); - Convert API-Time-Format to PB-Date() [FilePlus.pbi]
FileTimeToLocalFileTime_(*FT.FILETIME,FT2.FILETIME)
FileTimeToSystemTime_(FT2,st.SYSTEMTIME)
ProcedureReturn Date(st\wYear,st\wMonth,st\wDay,st\wHour,st\wMinute,st\wSecond)
EndProcedure
Procedure GetFileDate_chk(File$); - Get the time of a File [FilePlus.pbi]
Result=0
Handle=CreateFile_(@File$,#GENERIC_READ,#FILE_SHARE_READ|#FILE_SHARE_WRITE,0,#OPEN_EXISTING,#FILE_ATTRIBUTE_NORMAL,0)
If Handle<>#INVALID_HANDLE_VALUE
GetFileTime_(Handle,0,0,FT.FILETIME)
Result=FileTimeToDate(FT)
CloseHandle_(Handle)
EndIf
ProcedureReturn Result
EndProcedure
Procedure UpdateFile(File$)
If GetFileDate_chk(VDPath+File$) <> GetFileDate_chk(Path+File$)
CopyFile(VDPath+File$,Path+File$)
EndIf
EndProcedure
If OpenWindow(1,0,200,200,200,"jaPBe-Plugin",#PB_Window_Invisible)
SetWindowCallback(@Callback())
a$=ProgramParameter()
If a$="jaPBe"
jaPBe_Handle=Val(ProgramParameter())
jaPBe_Version$=ProgramParameter()
;Current Path
Path.s = Space(#MAX_PATH)
GetModuleFileName_(GetModuleHandle_(0), @Path, #MAX_PATH)
Path=GetPathPart(Path)+"Visual Designer\"
Debug Path
;MessageRequester("",Path)
VDPath.s=jaPBe_GetPBPath()
;MessageRequester("",VDPath)
If CreateFile(1,Path+"japbe.handle")
WriteLong(1,jaPBe_Handle)
CloseFile(1)
EndIf
If CreateFile(1,Path+"compilers\japbe.handle")
WriteLong(1,jaPBe_Handle)
CloseFile(1)
EndIf
If FileSize(Path+"Visual Designer.prefs")=-1
CopyFile(VDPath+"Visual Designer.prefs",Path+"Visual Designer.prefs")
EndIf
UpdateFile("Visual Designer.chm")
If GetFileDate_chk( VDPath+"Visual Designer.exe") <> GetFileDate_chk(Path+"Visual Designer.exe")
CopyFile(VDPath+"Visual Designer.exe",Path+"Visual Designer.exe")
CopyFile(VDPath+"Visual Designer Constants.prefs",Path+"Visual Designer Constants.prefs")
CopyFile(VDPath+"Visual Designer.exe.manifest",Path+"Visual Designer.exe.manifest")
CopyCatalog("")
CopyCatalog("Deutsch\")
CopyCatalog("Dutch\")
CopyCatalog("Francais\")
CopyCatalog("Greek\")
CopyCatalog("Italian\")
CopyCatalog("Portuguese\")
CopyCatalog("Spanish\")
EndIf
; gnozal : to get the custom syntax coloring in the code window
CopyFile(VDPath+"Purebasic.prefs",Path+"Purebasic.prefs")
;
;MessageRequester("",Path)
RunProgram(Path+"Visual Designer.exe","",Path)
;MessageRequester("",Str(FileSize(Path+"Visual Designer.exe")))
;Important: Never delete the follow line!
PostMessage_(jaPBe_Handle,#mywm_Plugin_Cancel,0,WindowID(1))
Else
MessageRequester("Visual Designer starter","This is a jaPBe-Plugin"+Chr(10)+"You can't run it without jaPBe",0)
EndIf
CloseWindow(1)
Else
MessageRequester("Visual Designer starter","Can't open a window!",0)
EndIf
Code: Select all
#jaPBe_CompilerVersion="4.01"
#jaPBe_IsDebuggerRunning=1
#jaPBe_IsExecute=0
#jaPBe_ExecuteBuild=1
#jaPBe_ExecuteType=0
#jaPBe_OnError=0
#jaPBe_SourcePath=""
#jaPBe_SourceFile=""
IncludePath "F:\Program Files\jaPBe\Include\"
IncludePath ""
IncludeFile "F:\Program Files\PureBasic\Compilers\PB_EditorOutput2.pb"
jaPBe is compiled with PB3.94.oryaaaaa wrote:Replace Fix Source (For PB4)
Are you saying that the modified code solves your problem ?oryaaaaa wrote:This code is normal run. GetFileTime is no check
Code: Select all
Procedure GetFileDate(File$); - Get the time of a File [FilePlus.pbi]
Result=0
Handle=CreateFile_(@File$,#GENERIC_READ,#FILE_SHARE_READ|#FILE_SHARE_WRITE,0,#OPEN_EXISTING,#FILE_ATTRIBUTE_NORMAL,0)
If Handle<>#INVALID_HANDLE_VALUE
GetFileTime_(Handle,0,0,FT.FILETIME)
Result=FileTimeToDate(FT)
CloseHandle_(Handle)
EndIf
ProcedureReturn Result
EndProcedure
Procedure GetFileTime(File$); - old one, use GetFileDate() [FilePlus.pbi]
ProcedureReturn GetFileDate(File$)
EndProcedure