xbox-scene.com - your xbox news information source
Quick Links: Main Forums | Xbox360 Forums | Xbox1 Forums | PS3 Forums
Xbox-Scene Forum Help  Search Xbox-Scene Forums   Xbox-Scene Forum Members   Xbox-Scene Calendar

Giganews Offers: days binary retention, 99%+ Completion, and Unlimited Access!
Try Giganews' no obligation free trial!

Support this site - buy the X-Scene Tshirt $17.95


Welcome Guest ( Log In | Register )

 Forum Rules Rules
 
Reply to this topicStart new topic
> Programmer's Notepad 2 : Smallest Devtool For Openxdk
openxdkman
post Jan 12 2007, 11:06 AM
Post #1


X-S Genius
****

Group: Moderator
Posts: 790
Joined: 2-August 06
Member No.: 292548
Xbox Version: unk
360 version: unknown



PN2 (Programmer's Notepad v2.6.0.1) is free and can be found here :
http://www.pnotepad.org

The mass of code I'm handling is becoming really huge, and I felt the need to have some tool able to take me right to the faulty line when a compilation error occurs, even if I'm just using cygwin alone (i.e you type "make" in a cygwin window to compile programs).

PN2 brought me that instantly (Pn doesn't need to be installed, just put it in any directory).

Here is how I've attached F9 key to an automatic make+report errors/send binary to console operation :
- copy cygwin.bat in order to create cygwin_make.bat (in \cygwin)
- at top of cygwin_make.bat, add this line :
set AUTOMAKE=ON
- in your account directory, add this line in .bashrc file :
(assuming your project is in subdirectory myproject):
if [ -n "$AUTOMAKE" ]; then cd myproject; make; exit; fi

Now if cygwin_make.bat is launched instead of cygwin.bat, session opens, make is done, session is closed.

In PN2, now, go in Tools->Options. Select Tools on bottom left. Select "(None) - Global tools" in Scheme combolist at top. Click Add. Fill in the fields :
Name: Make
Command: c:\cygwin\cygwin_make.bat
Folder: <full path to your project files, or file won't be shown when you click an error report line>
Shortcut: F9 (select field and press F9)
Save: All files

Now just hit F9 to save, make, and eventually send to console (if your makefile launch ftp2xbox.bat or ps2client.exe - see Pong makefile for example)

You can also save the list (.pnws) of all the text files you opened so they can be opened automatically later, if you associate .pnws to pn.exe, and double click .pnws file.

(I bet this method can still be improved)

User is offlineProfile CardPM
Go to the top of the page
+Quote Post
TMaul
post Jan 12 2007, 07:56 PM
Post #2


X-S Senior Member
**

Group: Members
Posts: 230
Joined: 30-May 03
From: Over there --->
Member No.: 41184
Xbox Version: v1.2
360 version: v1 (xenon)



Cool - good tip openxdkman. Much easier than having a cygwin window and a half dozen copies of notepad open. wink.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
openxdkman
post Jan 20 2007, 10:47 AM
Post #3


X-S Genius
****

Group: Moderator
Posts: 790
Joined: 2-August 06
Member No.: 292548
Xbox Version: unk
360 version: unknown



Thx!

new method for pn2 (more flexible) :

add this to cygwin.bat (after echo off and before the call to bash) :
set CYGWINPARAM1=%1
set CYGWINPARAM2=%2
set CYGWINPARAM3=%3
set CYGWINPARAM4=%4
set CYGWINPARAM5=%5

add this to .bashrc (so it's executed by bash, no problem):
if [ -n "$CYGWINPARAM1" ]; then
cd $CYGWINPARAM1
if [ -n "$CYGWINPARAM2" ]; then
$CYGWINPARAM2 $CYGWINPARAM3 $CYGWINPARAM4 $CYGWINPARAM5
fi
exit
fi


In PN2, now, go in Tools->Options. Select Tools on bottom left. Select "(None) - Global tools" in Scheme combolist at top. Click Add. Fill in the fields :

Name: Make
Command: c:\cygwin\cygwin.bat
Folder: %d
Parameters: %d make
Shortcut: F9 (select field and press F9)
Save: All files

Name: Make clean
Command: c:\cygwin\cygwin.bat
Folder: %d
Parameters: %d make clean
Shortcut: F12 (select field and press F12)
Save: All files

User is offlineProfile CardPM
Go to the top of the page
+Quote Post
openxdkman
post Jan 24 2007, 10:17 AM
Post #4


X-S Genius
****

Group: Moderator
Posts: 790
Joined: 2-August 06
Member No.: 292548
Xbox Version: unk
360 version: unknown



These ones are useful for compiling vertex and pixel shaders (for pbKit):

Name: Cg (vs)
Command: cgc.exe
Folder: %d
Parameters: -profile vs_1_1 -o %n.vsh %n.cg
Shortcut: F1 (select field and press F1)
Save: All files
This tool will modify the current file: Yes

Name: Vsa
Command: vsa.exe
Folder: %d
Parameters: /nologo /Vd /Fh %n.h %n.vsh
Shortcut: F2 (select field and press F2)
Save: All files
This tool will modify the current file: Yes

Name: Cg (ps)
Command: cgc.exe
Folder: %d
Parameters: -profile ps_1_1 -o %n.psh %n.cg
Shortcut: F3 (select field and press F3)
Save: All files
This tool will modify the current file: Yes

Name: Psa
Command: psa.exe
Folder: %d
Parameters: /nologo /Vd /Fh %n.h %n.psh
Shortcut: F4 (select field and press F4)
Save: All files
This tool will modify the current file: Yes

If you create vs.cg, select it and press F1 (.cg=>.vsh) & F2 (.vsh=>.h)
If you create ps.cg, select it and press F3 (.cg=>.psh) & F4 (.psh=>.h)
Take look at vs.vsh to see in which register each vertex data is expected
You can select any of the file (.cg, .vsh, .psh or .h) and press F1,F2,F3 or F4.
If selected file is result of compilation/assembly, its contents is refreshed automatically.

This post has been edited by openxdkman: Jan 24 2007, 10:20 AM
User is offlineProfile CardPM
Go to the top of the page
+Quote Post





Reply to this topicStart new topic

 

Lo-Fi Version Time is now: 9th September 2010 - 08:18 AM