japbe-1.3.12.7 - BETA

Developed or developing a new product in PureBasic? Tell the world about it.
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

japbe-1.3.12.7 - BETA

Post by GPI »

http://caosandkin.bei.t-online.de/pureb ... 7-BETA.zip

Not full tested, but you can now add resources to all (Windows,Console,DLL!)

ToDo:
* Save on Error doesn't save resources
* manual compile not tested with resources

misc
----
* Save Declare: Solve Probelms with "ProcedureDLL" and "ProcedeureCDLL"
* Manual Compile: Forgot a ReleaseDC_()
* Compiler-Options: Add a help-Button on the Compiler-Options-Advanced
* Smallest Front-Size change to 6
* "Start at beginn"-Button for Find/Replace

Project
-------
* File/New
- unnamed : open only a new tab
- project : create a new subdirectory in your default folder, save the main file, save a filelist and open the project option
- include : open a new tab, link it with the first main-file, open the save as dialog
- main-file : open a new tab and open the project-options
- resource : open a new tab. here can you type your resource.rc
* Compiler-menu renamed to project
* Set-Main-File removed, use now "Main File:"
the linked files are only linked in jaPBe. You must link this file with includeFile, or PureBasic will not add them.
* Debugger-Option is now in the Project Option
* Create Declare is now in the project option
* I patch now PBCompiler (and save it under new name! The old one is save and unchanged!)
for adding resources. So you can add resources to DLLs!
* Project-Options: Resources
When you add a *.Res Resource the Resource Name,Type and Language is taken from the res.

Resource
--------
When you have open a .rc, all styling, autocomplete are deaktivated. GoRC is used for compile. After compiling a .RC you found a .RES with the same name.
In the project options you can add own resources.

Syntax Highlight
----------------
* New Styles: Operators and Seperators
* jaPBe see now the Label-* as part of the name

Plugins/Tools
-------------
* Config-Tools/Plugins: You can now add a Menu Bar
* Plugins: Remove Entries, if the plugin doesn't exit any more
* Tools: Little Reload-Source Bug
* InBuild Tools can now be sorted in config-dialog
* Tools/Plugins/InBuild can be hidden in config-dialog
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Post by GPI »

About the PBCompiler-Patch:

I load the PBCompile.exe into the memory, search for "lcclnk.exe" and replace it with "fcclnk.exe" and save it under "PBCompiler-jaPBe.exe". Now this compiler start not the linker, he start my fake-linker. This faker collect all ProgramParameter() and a parameter, a resource and start then the original lcclnk.exe. This Resource doesn't contain something usefull, and it is instand deleted by Reshacker. But now everything has a valid resource, so ResHacker doesn't create invalid executes.
When jaPBe is finished, the fake-linker and the patched compiler is deleted. On every start of japbe, the patched compiler is created, so japbe use always the latest compiler.

I Could do the same thing with renaming the lcclnk.exe and so my fake-lcc can start, but then it could give problems, when japbe crash and can't unpatch or the IDE is used. My Patch-Methode is the only methode to add resource and don't change the installed PB complete.

I hope i don't get problems. But this is at the moment the only method that i know.
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Post by GPI »

A little Example, how to use Menu-Resources:

Menu.RC

Code: Select all

Test MENU
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
{
POPUP "Datei"
{
  MENUITEM "Beenden", 1
}
POPUP "Test"
{
  POPUP "SUB"
  {
    MENUITEM "SubText",2
  }
  MENUITEM "Test2",3
}
}

MenuPopup MENU
LANGUAGE LANG_GERMAN, SUBLANG_GERMAN
{
POPUP "Popup"
{
	MENUITEM "Popup1",  4
	MENUITEM "Popup2",  5
	MENUITEM SEPARATOR
	MENUITEM "Popup3",  6
	MENUITEM "Popup4",  7
}
}
Menutest.pb

Code: Select all

MainMenu=LoadMenu_(GetModuleHandle_(0),"Test")
MenuPopUp=LoadMenu_(GetModuleHandle_(0),"MenuPopup")

If OpenWindow(1,0,0,400,100,#PB_Window_ScreenCentered|#PB_Window_SystemMenu,"Resourece-Menu-Test")
  
  SetMenu_(WindowID(),MainMenu)
  
  quit=#False
  Repeat
    EventId=WaitWindowEvent()
    
    If EventId=#PB_Event_CloseWindow
      quit=#True
    ElseIf EventId=#PB_Event_Menu
      a=EventMenuID()
      Select a
        Case 1:quit=#True
        Case 2:MessageRequester("Main","SubText")
        Case 3:MessageRequester("Main","Test2")
        Default
          a-3
          MessageRequester("POPUP","popup"+Str(a))
          
      EndSelect
    ElseIf EventId=#WM_RBUTTONDOWN
      GetCursorPos_(mouse.POINT)
      Popup=GetSubMenu_(MenuPopUp,0)
      TrackPopupMenu_(Popup,#TPM_CENTERALIGN|#TPM_VCENTERALIGN|#TPM_NONOTIFY|#TPM_LEFTBUTTON,mouse\x,mouse\y,0,WindowID(),0)
      ;HiliteMenuItem_(WindowID(),MenuPopUp,4,#MF_BYCOMMAND|#MF_HILITE)
      
    EndIf

          
  Until quit
EndIf
   
    
DestroyMenu_(MainMenu)
DestroyMenu_(MenuPopUp)
GPI
PureBasic Expert
PureBasic Expert
Posts: 1394
Joined: Fri Apr 25, 2003 6:41 pm

Post by GPI »

New Beta

http://caosandkin.bei.t-online.de/pureb ... 2-Beta.zip

ToDo:
* Save on Error doesn't save resources
* manual compile not tested with resources

Test
----
* Start japbe and close it. now you found in the preferences a "test"-Section.
At the moment there is only a codepage-Option.
Try for example: 65001

misc
----
* Save Declare: Solve Probelms with "ProcedureDLL" and "ProcedeureCDLL"
* Manual Compile: Forgot a ReleaseDC_()
* Compiler-Options: Add a help-Button on the Compiler-Options-Advanced
* Smallest Front-Size change to 6
* "Start at beginn"-Button for Find/Replace and in End-Of-File-Box
* Compile/run, Compile/Debug and Create-Execute-Button
* Remove AutoIdentation-Bug with If-else-endif and select-endselect
* ToolBar-DropDown for new file

Project
-------
* File/New
- unnamed : open only a new tab
- project : create a new subdirectory in your default folder, save the main file, save a filelist and open the project option
- include : open a new tab, link it with the first main-file, open the save as dialog
- main-file : open a new tab and open the project-options
- resource : open a new tab. here can you type your resource.rc
* Compiler-menu renamed to project
* Set-Main-File removed, use now "Main File:"
the linked files are only linked in jaPBe. You must link this file with includeFile, or PureBasic will not add them.
* Debugger-Menu-Entry removed!
* Create Declare is now in the project option
* I patch now PBCompiler (and save it under new name! The old one is save and unchanged!)
for adding resources. So you can add resources to DLLs!
* Project-Options: Resources
When you add a *.Res Resource the Resource Name,Type and Language is taken from the res.

Resource
--------
When you have open a .rc, all styling, autocomplete are deaktivated. GoRC is used for compile. After compiling a .RC you found a .RES with the same name.
In the project options you can add own resources.
On Compile/run/Debug resources are added too!

Syntax Highlight
----------------
* New Styles: Operators and Seperators
* jaPBe see now the Label-* as part of the name

Plugins/Tools
-------------
* Config-Tools/Plugins: You can now add a Menu Bar
* Plugins: Remove Entries, if the plugin doesn't exit any more
* Tools: Little Reload-Source Bug
* InBuild Tools can now be sorted in config-dialog
* Tools/Plugins/InBuild can be hidden in config-dialog
Post Reply