J'ai installé Wampserver 2 sur WindowsXp sur un poste local. Tout est impec niveau fonctionnement. Cependant je souhaiterai ouvrir les fichiers de confs, depuis l'icone de Wamp situé en bas à doite de la barre des taches, directement dans Pspad au lieu de Notepad.
J'ai effectué quelques petites modifications dans certains fichiers à cette fin:
Dans Wampmanager.conf j'ai ajouté dans la section [main] la ligne suivante: textEditor = "C:/Program Files/PSPad editor/PSPad.exe"
Dans config.inc.php j'ai ajouté la ligne suivante: $c_textEditor = $wampConf['textEditor'];
Dans Wampmanager.tpl j'ai remplacé FileName: "notepad.exe" par FileName: "${c_textEditor}"
Seulement tous mes tests aboutissent à l'ouverture, dans Pspad, d'un fichier vierge ! Par exemple si je clique sur php.ini, Pspad s'ouvre avec un fichier vide portant le nom php.ini. Dans la barre de titre de Pspad je peux connaitre le chemin complet --> e:\php.ini. E: étant la racine ou j'ai installé Wampserver E:\Wamp
donc on dirait bien que, par défaut il crée un nouveau fichier, si on ne lui en donne pas un explicitement ?
je ne connais pas ce prog. mais il a peut être besoin qu'on lui donne une instruction supplémentaire de type ligne de commande ? comme par ex : "PSPad.exe %" ou encore "PSPad.exe %1" ??
je n'ai pas le soft mais je pense qu'en allant voir comme ceci dans l'aide de pspad : in the PSPad help - Working with PSPad / Command line parameters tu pourrais trouver les éventuels paramètres ?
The syntax to start PSPad from the command line is:
PSPad "drive:\path\filename" [/switch] Note: The PSPad directory must be in your $PATH environment variable for this to work. If it isn't then you must enter the full path to the PSPad.exe file.
ou "drive:\path\PSPad.EXE" [/switch -switch] "file1" ["file2" ...]
------------- tentez peut-être une ligne comme : "drive:\path\PSPad.EXE" "%1"
Avec Ultraedit, pas de problèmes. Il existe un « faux » programme Notepad.exe qu'il suffit de mettre à la place du vrai Notepad.exe dans : Windows Windows/System32 Windows/System32/DllCache pour que ce soit Ultraedit qui se lance lorsque Notepad.exe est demandé.
Il existe peut-être la même chose pour PsPad. Voir sur le site du développeur.
Hi MOli, I was searching same problem. Had to use Google Translation to read your message ;^)
EDIT/UPDATE: I FIXED IT. HERE IS HOW I GOT MINE WORKING:
Changing the default text editor for the Wamp Server2 Tray Menus from NotePad to EditPadPro (or whatever you desire), plus added code for opening vHosts file from the menu too...
5 FILES INVOLVED:
*** WAMP/SCRIPTS/CONFIG.INC.PHP: 3 EDITS 1) under "//on renseigne les variables du template avec la conf locale" ADD LINE $c_textEditor = $wampConf ['textEditor2']; //['textEditor1'] for notepad, ['textEditor2'] for editpadpro or alternate editor as set in wampmanger.conf (see ahead)
2) Add the following line to section "// on construit les variables correspondant aux chemins" $c_apacheVHostsConfFile = str_replace('/','\\',$c_apacheVersionDir.'/apache'.$wampConf['apacheVersion'].'/'.$wampConf['apacheConfDir'].'/extra/'.$wampConf['apacheVHostsConfFile']);
3) Edit the log variable line to be: $logDir = 'logs\\'; //allows log files to open in chosen editor
*** WAMP/WAMPMANGER.CONF: 2 EDITS Under [main] ADD LINES: textEditor1 = "notepad.exe" textEditor2 = "editpadpro.exe" //<<YOUR ALTERNATE EDITOR HERE. MAY NEED FULL PATH
*** WAMP/WAMPMANGER.TPL: SEVERAL EDITS 1) ADD FOLLOWING 4 LINES BEFORE "$tpl = <<< EOTPL" $c_apacheConfFile = str_replace('/','\\',$c_apacheConfFile); $c_phpConfFile = str_replace('/','\\',$c_phpConfFile); $c_mysqlConfFile = str_replace('/','\\',$c_mysqlConfFile); $c_mysqlConfFile = str_replace('.\\','',$c_mysqlConfFile);
2) THEN FIND all occurances of "notepad.exe" and REPLACE with "${c_textEditor}"
*** WAMP/WAMPMANGER.INI: 1+EDIT... 1+) FIND all occurances of "notepad.exe" and REPLACE with "type-your-editor-here.exe"
*** WAMP/SCRIPTS/REFRESH.PHP: 2 EDITS (There are 2 occurances of "$c_textEditor". Apply str_replace to 'parameters... 1) CHANGE Line~399 FROM THIS Type: item; Caption: "Edit .htaccess"; Glyph: 6; Action: run; FileName: "'.$c_textEditor.'"; parameters: "'.$newalias_dest.'.htaccess" TO THIS Type: item; Caption: "Edit .htaccess"; Glyph: 6; Action: run; FileName: "'.$c_textEditor.'"; parameters: "'.str_replace('/','\\',$newalias_dest).'.htaccess"
2) CHANGE Line~412 FROM THIS Action: run; FileName: "'.$c_textEditor.'"; parameters:"'.$c_installDir.'/alias/'.$newalias_dir.'.conf"; Flags: waituntilterminated TO THIS: Action: run; FileName: "'.$c_textEditor.'"; parameters:"'.str_replace('/','\\',$c_installDir).'\\alias\\'.str_replace('/','\\',$newalias_dir).'.conf"; Flags: waituntilterminated
============================== THANK YOU MOLI for your posting about this... helped me get a good start for figuring out a solution. Please post back if you tried this and it worked (it should work ;^)
Cheers, TwoHawks Stateline, NV USA ;^)
Love is the Function, No Form is the Tool.
Modifie 4 fois. Derniere modification le 30/05/2008 à 09:29 par twohawks.
I did your hack on the 2.0c and... it's just brillant ! BTW I did it for PSPad, so I can confirm it's working with this free editor.
Thanks a lot TwoHawks, you saved my day !!!
I really hope we will see a config option in the future to choose quickly our favorite editor. Si Romain passe par là... Encore bravo à lui d'ailleurs...
Hurray! Thank you lolo and dval for commenting back... I was wondering if/when anyone else would have tried this out. Glad it is working for others and is relevant solution for this problem. Cheers, TwoHawks
[Still French forum here] You can download my patch which allows you to change editor path from its web interface Many other features included in... Have a look !