PBProject - PB project manager - Ver. 1.0.0.370

Developed or developing a new product in PureBasic? Tell the world about it.
DevilDog
Enthusiast
Enthusiast
Posts: 210
Joined: Thu Aug 04, 2005 9:32 pm
Location: Houston, Tx.

PBProject - PB project manager - Ver. 1.0.0.370

Post 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
Last edited by DevilDog on Tue Oct 09, 2007 5:27 am, edited 13 times in total.
When all is said and done, more is said than done.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Re: PBProject - PB project manager - Ver. 1.0.0.196

Post 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.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
DevilDog
Enthusiast
Enthusiast
Posts: 210
Joined: Thu Aug 04, 2005 9:32 pm
Location: Houston, Tx.

Post 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
When all is said and done, more is said than done.
gnozal
PureBasic Expert
PureBasic Expert
Posts: 4229
Joined: Sat Apr 26, 2003 8:27 am
Location: Strasbourg / France
Contact:

Post 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.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
DevilDog
Enthusiast
Enthusiast
Posts: 210
Joined: Thu Aug 04, 2005 9:32 pm
Location: Houston, Tx.

Post by DevilDog »

Great!

Thanks alot Gnozal!

I've got work to do! :D

Devildog
When all is said and done, more is said than done.
DevilDog
Enthusiast
Enthusiast
Posts: 210
Joined: Thu Aug 04, 2005 9:32 pm
Location: Houston, Tx.

resource file...

Post 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
When all is said and done, more is said than done.
DevilDog
Enthusiast
Enthusiast
Posts: 210
Joined: Thu Aug 04, 2005 9:32 pm
Location: Houston, Tx.

Update

Post 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
When all is said and done, more is said than done.
DevilDog
Enthusiast
Enthusiast
Posts: 210
Joined: Thu Aug 04, 2005 9:32 pm
Location: Houston, Tx.

Post 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!
When all is said and done, more is said than done.
User avatar
Progi1984
Addict
Addict
Posts: 806
Joined: Fri Feb 25, 2005 1:01 am
Location: France > Rennes
Contact:

Post by Progi1984 »

Some screenshots will be interesting...
DevilDog
Enthusiast
Enthusiast
Posts: 210
Joined: Thu Aug 04, 2005 9:32 pm
Location: Houston, Tx.

Post by DevilDog »

Here's some screen shots..

Image

Image

Image
When all is said and done, more is said than done.
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 »

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
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
DevilDog
Enthusiast
Enthusiast
Posts: 210
Joined: Thu Aug 04, 2005 9:32 pm
Location: Houston, Tx.

Post 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?
When all is said and done, more is said than done.
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 »

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.
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
DevilDog
Enthusiast
Enthusiast
Posts: 210
Joined: Thu Aug 04, 2005 9:32 pm
Location: Houston, Tx.

Post 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
When all is said and done, more is said than done.
walker
Enthusiast
Enthusiast
Posts: 634
Joined: Wed May 05, 2004 4:04 pm
Location: Germany

Post 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?
Post Reply