Pelles C forum

Pelles C => Feature requests => Topic started by: CommonTater on April 30, 2012, 05:24:41 PM

Title: Add non-compiling files to workspaces....
Post by: CommonTater on April 30, 2012, 05:24:41 PM
It would be nice if we could list non-compiling files --text, pdf, html, etc.-- in workspaces.
 
For example: I have a big project just beginning with 6 projects in the workspace.  All of these have to follow a set of prewritten guidelines giving me two pdf files (Project description and Contract) that are common to all 6 projects.  If I could list them in the workspace under some separate heading (Say "Documents") and open them by clicking on them in the IDE...  it would be really helpful.
 
 
 
Title: Re: Add non-compiling files to workspaces....
Post by: czerny on April 30, 2012, 10:31:19 PM
This works with text files (*.txt). Don't know what else.
Title: Re: Add non-compiling files to workspaces....
Post by: CommonTater on May 01, 2012, 12:15:12 AM
Yes I can add them in a project. 

I have a workspace with 6 projects in it... I can add the documents to *every* project or I can add them once to the workspace...
Title: Re: Add non-compiling files to workspaces....
Post by: AlexN on May 01, 2012, 10:17:23 AM
I would suggest that you create in your workspace a project for documentation or/and guidelines, where you store all the non-compiling items.
Title: Re: Add non-compiling files to workspaces....
Post by: TimoVJL on May 01, 2012, 10:58:38 AM
Quote
I would suggest that you create in your workspace a project for documentation or/and guidelines, where you store all the non-compiling items.
Something like this ?
Code: [Select]
#
# PROJECT FILE generated by "Pelles C for Windows, version 6.00".
# WARNING! DO NOT EDIT THIS FILE.
#

POC_PROJECT_VERSION = 6.00#
POC_PROJECT_TYPE = -1#
POC_PROJECT_OUTPUTDIR = .#
POC_PROJECT_RESULTDIR = .#

test-doc.lib:
cmd /c $**

.OTHERFILES: \
test1.txt \
test.pdf \
test1.pdf

.SILENT:

.EXCLUDEDFILES:
Title: Re: Add non-compiling files to workspaces....
Post by: AlexN on May 01, 2012, 04:30:02 PM
Yes, this looks good!

But as I can see now, it's not so easy as I thought to add and remove item's to such a project.

So if somebody will use it reelly, we need an addin to handle such projects and a wizard to create them.
Is somebody able and willing to do this?
Title: Re: Add non-compiling files to workspaces....
Post by: CommonTater on May 01, 2012, 05:10:33 PM
Yes, this looks good!
But as I can see now, it's not so easy as I thought to add and remove item's to such a project.
So if somebody will use it reelly, we need an addin to handle such projects and a wizard to create them.
Is somebody able and willing to do this?

This is why I posted it as a feature request...  It would probably be far easier for Pelle to change the workspace file format to allow them... and a lot cleaner.

In the mean time I'll see if I can get a Wizard and Addin going... No promises.
 
 

Update: 
 
Try adding a .pdf file to a dead project... then try to open it...  OOPS! 
It appears that POIDE only opens these files internally...

Also... if I add FILE=whatever.pdf  to the workspace file POIDE removes them.
 
Still working on it...
 
Title: Re: Add non-compiling files to workspaces....
Post by: TimoVJL on May 01, 2012, 07:31:02 PM
Quote
Try adding a .pdf file to a dead project... then try to open it...  OOPS! 
It appears that POIDE only opens these files internally...
Maybe we want to open file with ShellExecute() ?
Example AddIn PrjOpenFile attached.
Title: Re: Add non-compiling files to workspaces....
Post by: CommonTater on May 01, 2012, 08:05:35 PM
Quote
Try adding a .pdf file to a dead project... then try to open it...  OOPS! 
It appears that POIDE only opens these files internally...
Maybe we want to open file with ShellExecute() ?
Example AddIn PrjOpenFile attached.

Yes that's part of it ... In fact I was just experimenting with something like that...

Thing is... I know how to add extra lines to the workspace (.ppw) file that will stay added and I think I know how to display them...  but there's no way to parse the raw workspace file from inside the IDE without opening it separately (as I did with WSEdit)...
 
The problem is simple... When a project or workspace is opened by clicking on it in Windows Explorer, the OS sets the working path to that of the file; I can catch this and parse the workspace file very nicely.  But when I use the internal File->Open the path is not set and shows the path of the previous project or PellesC\Bin; which is useless to me ... Try both methods with the ExtraButtons AddIn loaded, click on the Open Project Folder icon and you'll see the problem.

I suppose I could add an "alternative file open" to set the path, somehow but what I really need here is a couple of new macros... AddIn_GetWorkspaceFilename() and AddIn_GetProjectFilename() With them I'd be off to the races on this... but they don't exist.