NO

Author Topic: Add non-compiling files to workspaces....  (Read 2764 times)

CommonTater

  • Guest
Add non-compiling files to workspaces....
« 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.
 
 
 

czerny

  • Guest
Re: Add non-compiling files to workspaces....
« Reply #1 on: April 30, 2012, 10:31:19 pm »
This works with text files (*.txt). Don't know what else.

CommonTater

  • Guest
Re: Add non-compiling files to workspaces....
« Reply #2 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...

Offline AlexN

  • Global Moderator
  • Member
  • *****
  • Posts: 383
    • Alex's Link Sammlung
Re: Add non-compiling files to workspaces....
« Reply #3 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.
best regards
 Alex ;)

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 1828
Re: Add non-compiling files to workspaces....
« Reply #4 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:
« Last Edit: May 01, 2012, 11:25:43 am by timovjl »
May the source be with you

Offline AlexN

  • Global Moderator
  • Member
  • *****
  • Posts: 383
    • Alex's Link Sammlung
Re: Add non-compiling files to workspaces....
« Reply #5 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?
best regards
 Alex ;)

CommonTater

  • Guest
Re: Add non-compiling files to workspaces....
« Reply #6 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...
 
« Last Edit: May 01, 2012, 05:35:18 pm by CommonTater »

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 1828
Re: Add non-compiling files to workspaces....
« Reply #7 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.
« Last Edit: May 01, 2012, 07:33:21 pm by timovjl »
May the source be with you

CommonTater

  • Guest
Re: Add non-compiling files to workspaces....
« Reply #8 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.