Page 41 of 104

Posted: Tue Nov 28, 2006 2:19 pm
by Dummy
Is there any chance of my request beeing realized?

Posted: Tue Nov 28, 2006 2:32 pm
by gnozal
Dummy wrote:Is there any chance of my request beeing realized?
There is, but it's not the only request I have, nor the only project ...

I do this on my spare time, so please be patient.

... or grab the sources and do your own custom version, like I did.

Posted: Tue Nov 28, 2006 3:18 pm
by Dummy
I really need this feature for one of my Projects, so I decided to ease your work ;)

Needed changes to remove
-"jaPBe Version="
-"FoldLines="
-"FirstLine="
-"CursorPosition="
(not tested as I don't have PB 3.94 anymore)
(without adding a new checkbox in project settings):

common.pbi:
Line 217:

Code: Select all

  CodePage.l
  ImportUsed.l
+  ShortFootprint.l
  ; gnozal
  
Load_Save_Switch.pbi:
Line 1168:

Code: Select all

      If Sources()\SourceType=#SourceType_PureBasic
        WriteStringN("")
+        If Sources()\ShortFootprint = 0
          WriteStringN("; jaPBe Version="+jaPBeVer)
          FoldInfo$=""
Line 1194:

Code: Select all

            WriteStringN("; FoldLines="+FoldInfo$)
          EndIf
+        EndIf
        
        For i=0 To 99
Line 1239:

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
Line 1646:

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
edit:
... or grab the sources and do your own custom version, like I did.
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 ;)

Posted: Tue Nov 28, 2006 6:09 pm
by gnozal
Update

Changes :
- added 'Generate a short source footprint' in project options (version tab) ; see Dummy's posts.

Posted: Tue Nov 28, 2006 7:25 pm
by Dummy
gnozal wrote:Update

Changes :
- added 'Generate a short source footprint' in project options (version tab) ; see Dummy's posts.
thanks :)

Posted: Wed Nov 29, 2006 11:05 pm
by oryaaaaa
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

Posted: Thu Nov 30, 2006 8:32 am
by gnozal
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 don't understand your post ?

Posted: Thu Nov 30, 2006 11:17 am
by Flype
[FRENCH]
Je pense qu'il veut dire que depuis ta dernière update, Visual Designer et Code Explorer ne se lance plus depuis le menu outils de jaPBe 3.6.11.594
Il précise aussi que son dossier jaPBe est installé dans F:\

Posted: Thu Nov 30, 2006 11:36 am
by gnozal
Thanks Flype for the translation.

@oryaaaaa :

Tested with jaPBe 3.6.11.594 :
- no problem to start VD (3.95)
- no problem to start Code Explorer
but PB/jaPBe installed on C:

I did not change the VD plugin since a long time. The plugin searches for VD in the PB directory (read from registry).

Questions
- Could you be more precise than "*stop" ?
- Are there any error messages ?
- Does it work if you install PB/jaPBe on C: ?

Posted: Thu Nov 30, 2006 9:37 pm
by oryaaaaa
Video 3min divx6 (20MB)
http://purebasic.multiply.com/video/item/1

no Error message
C drive is memory card drive

Posted: Fri Dec 01, 2006 9:07 am
by gnozal
oryaaaaa wrote:Video 3min divx6 (20MB)
http://purebasic.multiply.com/video/item/1
no Error message
C drive is memory card drive
Sorry, but I still don't understand ; small video, in japanese, and my old NT4/PC doesn't play it correctly :cry:
I changed my PB dir from "C:\Purebasic400" to "C:\Program Files\Purebasic400" and it still works. I can't do much more (NT4, only one drive, one partition).

Maybe a problem in the registry settings ?
Does this code get the PB path ?

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 
Else : do you have a "Visual Designer.exe" file in %jaPBe%\Plugin\Visual Designer\ ?

Else : are the path settings in jaPBe correct ?

Posted: Sat Dec 02, 2006 1:05 am
by oryaaaaa
Does this code get the PB path ?
F:\Program Files\PureBasic\
do you have a "Visual Designer.exe" file in %jaPBe%\Plugin\Visual Designer\ ?
Yes, I can start %jaPBe%\Plugin\Visual Designer\Visual by explorer.
are the path settings in jaPBe correct ?
Yes, correct. Compile/Run is normal.

RunProgram("F:\Documents and Settings\hiroyuki\My Documents\DLsoftware\jaPBeForPB400\Plugin\Visual Designer\Visual Designer.exe") is normal.


ADD
Debugger dont launch.
no Problem to start Code Exploler.

Other Problem
(MultiMonitor)
jaPBe(-1280,0) , AutoCorrect Display (0,0).

Posted: Sat Dec 02, 2006 2:37 am
by oryaaaaa
Replace Fix Source (For PB4)

This code is normal run. GetFileTime is no check

Visual Designer Starter.pb

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

or, this code is normal too

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

Posted: Sat Dec 02, 2006 3:34 am
by oryaaaaa
About Dont launch Debugger
This code is created

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"
I didnt understand compiler.pb & compiler.pbi, sorry.

log
file save ... end
compile (Freeze)

Posted: Sat Dec 02, 2006 8:57 am
by gnozal
oryaaaaa wrote:Replace Fix Source (For PB4)
jaPBe is compiled with PB3.94.
oryaaaaa wrote:This code is normal run. GetFileTime is no check
Are you saying that the modified code solves your problem ?
Strange, because GetFileTime() and GetFileDate() are equivalent.
FilePlus.pbi

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