This topic is locked

Source folder behaviour

9/3/2009 5:11:13 AM
PHPRunner General questions
N
nico282 author

Hi.
I have a number of files to add to the output directory after the build. Some are new, some must overwrite a file generated by PHPrunner.
By trials, I understood that this is the behaviour of the "source" folder in the phpr project directory, so i put there the files to merge.

After the build, i noticed that some of the files are correcly copied to the build directory, but some are not.

  1. Did I understood correctly the behaviour of the Source folder?
  2. Why this feature is not described in the user guide?
  3. Why some of my files aren't copied?


Nicholas :-)

A
alang 9/3/2009

The build process generates files in the "Output" directory by default. You can also set the output directory on the "Output" tab - last one in PHPR.

N
nico282 author 9/4/2009



The build process generates files in the "Output" directory by default. You can also set the output directory on the "Output" tab - last one in PHPR.


The output folder is ok. I'm referring to the "Source" folder in the project directory (the same folder as the .phpr file, the tmp and the visual folders), NOT the Source folder in the PHPrunner program folder.

A
alang 9/7/2009

I don't believe the source folder works the way you may be expecting with your own files. See http://www.asprunner.com/forums/index.php?/topic/11244-best-practice-on-modifying-generated-output/pagehltemplatesfromsearch1 for further ideas.

Sergey Kornilov admin 9/7/2009

PHPRunner manual is often a good place to start:

http://www.xlinesoft.com/phprunner/docs/files.txt.htm

N
nico282 author 9/8/2009



PHPRunner manual is often a good place to start:

http://www.xlinesoft.com/phprunner/docs/files.txt.htm


The linked page refers to the "source" folder in the C:/Program Files/PHPrunner/ directory.

I couldn't find any reference in the manual to the "source" folder located in each Project directory.

N
nico282 author 9/8/2009



I don't believe the source folder works the way you may be expecting with your own files. See http://www.asprunner.com/forums/index.php?/topic/11244-best-practice-on-modifying-generated-output/pagehltemplatesfromsearch1 for further ideas.


Try it yourself:

  1. Create a new project in a folder named /Project1/ with any table and make a build with all the default options
  2. Check the output in the /Project1/output folder
  3. Go to the /Project1/source/ folder and create two empty files and one folder with the following structure:

    /Project1/source/testfile1.txt

    /Project1/source/include/testfile2.txt
  4. Build again the project
  5. Check the output folder: you'lll find a copy of your file in the right place:

    /Project1/output/testfile1.txt

    /Project1/output/include/testfile2.txt


This is the default behaviour for the new files.
In my experience, if you put a file with the same name of an existing file, the phprunner generated file will be overwritten by the new file at the end of the build process. It's a great feature to override some of the default files for only one project.

My concernig is that sometimes the "overwriting" beaviour doesn't work. That's why I'm asking what the correct behaviour should be.

Sergey Kornilov admin 9/8/2009

I'm afraid you are misreading. It doesn't say anything about Program files directory.
More specifically:



Each business template (Cars, Vacations, Paypal etc) has its own 'files.txt' which overrides the rules defined in the main file.
If you add your own files to the template, it's necessary for you to add a new line to the 'files.txt' file that defines how new file should be processed.


If you need more assistance with this open a ticket at http://support.xlinesoft.com sending your project directory zipped for investigation.

A
alang 9/8/2009



In my experience, if you put a file with the same name of an existing file, the phprunner generated file will be overwritten by the new file at the end of the build process. It's a great feature to override some of the default files for only one project.

My concernig is that sometimes the "overwriting" beaviour doesn't work. That's why I'm asking what the correct behaviour should be.


I would suggest you are attempting to use an "un-documented" feature of PHP Runner (which only works sometimes from your experience). Recommend you use business templates for what you are trying to do. They are easy to set up and use, do what you want to do, and can be applied on a project by project basis.