Permalink
Browse files

Add a shell parameter to load an external wire.txt

  • Loading branch information...
1 parent c8ff39c commit 377a6f0ee2fccec39652708711cb77a895f701d8 @fredakilla fredakilla committed May 8, 2012
Showing with 7 additions and 1 deletion.
  1. +7 −1 altona_wz4/altona/main/wz4lib/gui.cpp
@@ -283,7 +283,13 @@ void MainWindow::MainInit()
ExtendWireRegister();
- sWire->ProcessText(WireTXT,L"werkkzeug4.wire.txt");
+ // if -w shell parameter is set, load external wire.txt else load internal default wire.txt
+ const sChar *wirefilename = sGetShellParameter(L"w",0);
+ if(wirefilename && sCreateFile(wirefilename,sFA_READ) )
+ sWire->ProcessFile(wirefilename);
+ else
+ sWire->ProcessText(WireTXT,L"werkkzeug4.wire.txt");
+
ExtendWireProcess();
sWire->ProcessEnd();

0 comments on commit 377a6f0

Please sign in to comment.