Page 1 of 3

PBProject - PB project manager - Ver. 1.0.0.370

Posted: Fri Nov 10, 2006 4:39 pm
by DevilDog
Hi everyone,
I'm developing a project manager for PB and I could use some help with the testing and feedback on the direction I should take it.

*** Update! 10/08/07 ***

Hi all!
I have updated PBProject with a new feature that allows you to insert some pre-defined code into the editor with a single click. I have also corrected a bug. It's all documented in the .chm below.

Download Ver. 1.0.0.370:
PBProjectSetup.zip
Image

What's new (from the PBProject.chm
Image):

Version - 1.0.0.370
- Fixed: A bug that didn't properly save the default editor setting in the project settings.
- Added: The "Scripts" feature that allows you to insert some pre-defined code into the editor with a single click.

Version - 1.0.0.344
- Fixed: Numerous bugs dealing with opening and closing projects, programs
- Fixed: Saving the last three recent project list didn't always save properly
- Fixed: Opening an image file did not work correctly
- Fixed: The "New Project" did not create the project file properly all the time
- Fixed: When opening a project file that was saved on a different drive, it did not prompt you to save it to the new path
- Added: The Capture utility
- Added: The contract/expand feature
- Added: The translations feature
- Added: The Status or Path string at the bottom of the screen
- Added: Integration with EasySetup

I offer it for free to anyone who wants to use it.
Here's a screen shot:
Image

Although PBProject is new, there should be no danger in using it as it does not make any changes to the source files managed by PBProject.

Notes:
Some of the compile features in particular are not implemented yet. Currently it can compile into a windows exe, console and dll but not with all of the various compile options (they're just place holders for now).

The setup comes with a chm help file but here's a brief breakdown of how it works:
  • 1. Create a new project
    2. Add the main program to the project (it scans it and finds all the "Include" programs and images and loads them into the project manager as well)
    3. Set some basic options like the compiler and editor you are using, the EXE format, icon, version info, etc.
    4. Compile it. (If the source code compiles cleanly, you should end up with an executable)
Note: Make sure you set an icon for the project which is necessary in order to compile.

When ever you need to modify one of the files in your project, just double-click it and it will open in the editor you defined in the settings.

Things I need help with:
  • 1. Debugging. New features, new bugs :-(
    2. Suggestions on other files types that should be found during the source code scan and that should be included in the display.
    3. Help with the compile command. When the compile fails, I cannot seem to catch the error description so I can display it. I'm using the "runprogram" command and have tried the various options (#PB_Program_Open|#PB_Program_Read with the ReadProgramString command) and I get no output.
    4. Suggestions for features.
Thanks in advance for any help!
Devildog

Re: PBProject - PB project manager - Ver. 1.0.0.196

Posted: Fri Nov 10, 2006 5:10 pm
by gnozal
DevilDog wrote:3. Help with the compile command. When the compile fails, I cannot seem to catch the error description so I can display it. I'm using the "runprogram" command and have tried the various options (#PB_Program_Open|#PB_Program_Read with the ReadProgramString command) and I get no output.
If you can't catch the output, an easy way is to examine the \Compilers directory :
If one of these files is present
- "Assembler.out" file => FASM error
- "Linker.out" file => POLINK error
- "Resource.out" => PORC error
else, examine "Communication.msg" and look for 'error:'. If present => COMPILER ERROR (look for 'line ' for the error decription). If there is no error "Communication.msg" contains the executable name.

Or you can start PBCOMPILER in a batch file and redirect the compiler output to a text file and then check this file for 'Error:' :

Code: Select all

...
        Stream = CreateFile(#PB_Any, ProjectCompileBAT)
        If Stream
          WriteStringN("PBCompiler.exe " + #g + ProjectFile + #g + " /EXE " + #g + ProjectFileEXE + #g + " > " + #g + ProjectCompileMSG + #g)
          CloseFile(Stream)
          If RunProgram(ProjectCompileBAT, "", GetPathPart(Compiler), 2)
            Repeat
              Delay(100)
              Stream = ReadFile(#PB_Any, ProjectCompileMSG)
              If Stream
                While Eof(Stream) = #False
                  Line = ReadString()
                  If Left(Line, 6) = "Error:"
                    ErrorMsg = Line
                  EndIf
                Wend
                CloseFile(Stream)
                Break
              EndIf
            ForEver
...
Another possibility is to start the compiler via the SDK and wait for the #PB_MSG_* messages like jaPBe does.

Posted: Fri Nov 10, 2006 5:26 pm
by DevilDog
Gnozal,
Thanks for the guidance, I will investigate these.

I have downloaded the japbe source but have not had a chance to look through it yet.

If it's not too much to try to explain, how do you start the compiler via the SDK? :shock:

If it is, I can look at the source code.

Thanks!
Devildog

Posted: Fri Nov 10, 2006 5:33 pm
by gnozal
DevilDog wrote:Gnozal,
Thanks for the guidance, I will investigate these.

I have downloaded the japbe source but have not had a chance to look through it yet.

If it's not too much to try to explain, how do you start the compiler via the SDK? :shock:

If it is, I can look at the source code.

Thanks!
Devildog
You start the compiler with PostThreadMessage_(CompilerThreadID, PB_MSG_ID, #PB_MSG_Start_Compilation, flags).
In the jaPBe sources, look in the "Compiler.pbi" and "jaPBe.pb" files and search for "PB_MSG_ID".
It's kind of complicated, because not documented and susceptible to change in the next PB version !

If you only want to know if there was a compilation error, the batch file solution is much easier.

Posted: Fri Nov 10, 2006 5:41 pm
by DevilDog
Great!

Thanks alot Gnozal!

I've got work to do! :D

Devildog

resource file...

Posted: Fri Nov 10, 2006 10:17 pm
by DevilDog
One thing I need help with is understanding the various items in the resource file PB's compiler uses.

PBProject creates a resource (.rc) file for a project in the root of the project file right before it compiles the project. It uses this .rc file which contains the version information for the executable.

Most of the version information is self-explanatory, but some aren't:

LANGUAGE 0x0, 0x0 (where can I find these values for language?)
FILEFLAGSMASK 41 (what's this and what values can it have?)
FILEFLAGS 0 (????)
FILEOS 0x00004 (How can I find these values?)
FILETYPE 0x1 (and these?)
BLOCK "000004E4" (???)
BLOCK "VarFileInfo" (???)
VALUE "Translation", 0x0000 0x04E4 (???)

I've looked on the net as well as the forum without much luck.

Does anyone know this?

Thanks
Devildog

Update

Posted: Fri Nov 10, 2006 11:04 pm
by DevilDog
I have made the changes so that if there is a problem in the compile of the project into an executable, it will detect it and inform the user.

Also, I'm a big fan of EasySetup, I used it for the setup of PBProject, and it occurred to me that I might be able to incorporate EasySetup with PBProject, so that once PBProject compiles successfully, it can call EasySetup with the name of the Project so that all you have to do is update the version number and click "Create".

I did a quick proof of concept and it works great!

I hope to release a new version late tonight (US central time) with both updates.

Devildog

Posted: Mon Apr 30, 2007 8:27 pm
by DevilDog
Hi everyone!
I have made a couple of changes to PRProject and I thought I would make the update available on PureStorage. So here's the link to the setup file:

[url]File:1->PBProjectSetup.zip
Image
[/url]

The two main changes I made (in addition to fixing bugs) was to add a "recent projects" menu list, listing the three most recent projects you worked on and a button to shrink PBProject to the size of a toolbar.

Let me know if you use it. I'll be glad to consider any feature suggestions. I use PBProject all the time and it's getting to be pretty useful!

Posted: Wed May 02, 2007 8:57 am
by Progi1984
Some screenshots will be interesting...

Posted: Wed May 02, 2007 4:20 pm
by DevilDog
Here's some screen shots..

Image

Image

Image

Posted: Wed May 02, 2007 5:16 pm
by ts-soft
Nice tool, but here some suggestion:

The position isn't saved, also width and height
The Setup doesn't support to unpack (use zlib, not jcalg in easysetup)
You should use images as Resource to reduce memoryusing!

Resizing have a bug:
Image

The rest, i will test it later, if i have a new project :wink:

greetings
Thomas

Posted: Wed May 02, 2007 6:11 pm
by DevilDog
Thomas, thanks for the feedback.

I know that button was working on the resize, so I must have made a change that broke it :-(

I will take a look at saving the width and height. It's supposed to save the position already so I'll make sure to check that out as well.

I'm all for reducing memory usage, but I'm not familiar with how to implement images as a resource. I did a quick search on the forum but I was not able to find a way to implement the use of resource files in PB.

Can you show us how to do that?

Posted: Wed May 02, 2007 6:33 pm
by ts-soft
DevilDog wrote: Can you show us how to do that?
You can write a resource-script with notepad like this:

Code: Select all

1      	ICON  "Icons\Application.ico"
// Toolbar
2	ICON  "Icons\New.ico"
3       ICON  "Icons\Open.ico"
4       ICON  "Icons\Save.ico"
5       ICON  "Icons\Redo.ico"
6       ICON  "Icons\Undo.ico"
7       ICON  "Icons\Cut.ico"
8       ICON  "Icons\Copy.ico"
9    	ICON  "Icons\Paste.ico"
10      ICON  "Icons\Find.ico"
11   	ICON  "Icons\FindNext.ico"
12  	ICON  "Icons\SelectAll.ico"
13  	ICON  "Icons\FontDialog.ico"
1	CURSOR "Icons\Margin.cur"
add always an empty line at end!
you can load the icons with the loadicon api
you can add the file in the compileroptions, but use absolute paths!
or you compile the script with porc (in your compilerpath from pb)
porc myscript.rc
porc create a myscript.res that you can easy import

Code: Select all

Import "myscript.res"
EndImport
Or simple use the UDRes lib:
http://www.purebasic.fr/english/viewtop ... ight=udres
The lib compiles like porc a *.res file for you, and work for all filetypes.

Posted: Thu May 03, 2007 11:27 pm
by DevilDog
I have updated PBProject to fix an issues mentioned by Thomas. In particular the paperclick button was not moving properly when resizing the window.

I was not able to reproduce the issue where PBProject does not open up in the same location it was last closed. For me it opens where ever I last closed it.

I also made the default minimum height of the main form smaller.

The new version is 1.0.0.223 and can be downloaded here:

File:1->PBProjectSetup.zip
Image

Posted: Thu May 03, 2007 11:39 pm
by walker
very nice :D indeed.... but I'd noticed a small issue...
When opening a window (preferences/default settings or the main window itself) i can watch the window build every single gadget.. you'd better should use the #PB_Window_Invisible flag and after creating the window do a HideWindow(id, #False)...

Is there a Linux version or is one planned?