PDA

View Full Version : Fixes to make compile.bat work in 1.16.1



42!
09-26-2004, 12:23 PM
Hello,

compile.bat in MySeq_Client_1_16_1 does not compile on a barebones C# installation (no Visual environment).

1. compile.bat: Add classes.cs to the csc.exe line.

Now it compiles fine, but does not run; the error message is that frmMain.resources is not found in the assembly. Small wonder - it is not contained on the csc call. So...

2. Use resgen to convert the .resx files to .res files.

3. Add the frmMain.resources (and other resources) to the assembly, using additional options when calling csc.

The complete, working compile.bat, which needs ONLY the freely available SDK, is:



@echo off
if "%1"=="" Goto Error
del %1.exe
echo Compiling %1
del *.resources
resgen /compile AboutDlg.resx frmMain.resx frmOptions.resx ListBoxPanel.resx ListViewPanel.resx MacroQuestPanel.resx MapCon.resx MapPane.resx
csc /nologo /out:%1.exe /target:winexe /r:Speechlib.dll,folderbrowser.dll,Magiclibrary.dll /win32icon:app.ico /recurse:*.cs /res:AboutDlg.resources,myseq.AboutDlg.resources /res:frmMain.resources,myseq.frmMain.resources /res:frmOptions.resources,myseq:frmOptions.resource s /res:ListBoxPanel.resources,myseq:ListBoxPanel.reso urces /res:ListViewPanel.resources,myseq:ListViewPanel.re sources /res:MacroQuestPanel.resources,myseq:MacroQuestPane l.resources /res:MapCon.resources,myseq:MapCon.resources /res:MapPane.resources,myseq:MapPane.resources
echo Completed.
echo Launching %1
%1
Goto Done
:Error
echo.
echo Usage: %0 {filenmae}
echo filename - This is the name of the .Exe you want to use. No spaces allowed.
It can be anything you want!
echo.
echo Example: %0 MySEQ
echo.
echo.
:done