Armabell V0.0.7 Doesn't work

Something else for Armagetron? Goody!
User avatar
wrtlprnft
Reverse Outside Corner Grinder
Posts: 1679
Joined: Wed Jan 04, 2006 4:42 am
Location: 0x08048000
Contact:

Post by wrtlprnft »

Sylv wrote:
aps.exe needs the path&filename/of/the/plugin.exe as command line parameter.
maybe ed can send you some additional explanations - he got it up in seconds.
sorry, my english is too bad. :?
Hmm, easy way on Windows (IIRC) is to drag the plugin exectutable (the one that refused to start) onto aps.exe.
There's no place like ::1
User avatar
ed
Match Winner
Posts: 613
Joined: Mon Feb 13, 2006 12:34 pm
Location: UK

Post by ed »

Another way would be to create a simple batch file.

Assuming your path to the Armabell plugins directory is:

C:\Program Files\ArmaBell\Plugins\

add aps.exe to this directory.

create a text file within this directory called maps.bat - making sure it's not maps.bat.txt - Tools > folder options > View > Hide extensions for known file types must not be ticked.

within this file put the line:

Code: Select all

aps.exe "C:\Program Files\ArmaBell\Plugins\armabellmaped.exe"
And save it. You can now run the map editor by doubleclicking map.bat. You can even create a shortcut to map.bat to put on your desktop/start menu.

The the same way you could have the text colour helper tool with text.bat that contains

Code: Select all

aps.exe "C:\Program Files\ArmaBell\Plugins\armabelltextcolors.exe"
User avatar
Sylv
On Lightcycle Grid
Posts: 39
Joined: Sun Sep 05, 2004 4:16 pm

Post by Sylv »

z-man wrote:Let this be a lesson: give out the source unless you have strong reason not to.
i forgot ;)

this can be compiled with Delphi 7 or Delphi 2005 (personal edition) - i didnt try FreePascal/Lazarus.

Code: Select all

program aps;

{$APPTYPE GUI}

uses
  SysUtils, Windows, Shellapi, Dialogs, Forms;

type
  PMMFData = ^TMMFData;
  TMMFData = record
    sText: string;
  end;

procedure ShellExecAndWait(dateiname: string; Parameter: string);
var
  executeInfo: TShellExecuteInfo;
  dw: DWORD;
begin
  FillChar(executeInfo, SizeOf(executeInfo), 0);
  with executeInfo do
  begin
    cbSize := SizeOf(executeInfo);
    fMask := SEE_MASK_NOCLOSEPROCESS or SEE_MASK_FLAG_DDEWAIT;
    Wnd := GetActiveWindow();
    executeInfo.lpVerb := 'open';
    executeInfo.lpParameters := PChar(Parameter);
    lpFile := PChar(dateiname);
    nShow := SW_SHOWNORMAL;
  end;
  if ShellExecuteEx(@executeInfo) then
    dw := executeInfo.HProcess
  else
  begin
    ShowMessage('Fehler: ' + SysErrorMessage(GetLastError));
    Exit;
  end;
  while WaitForSingleObject(executeInfo.hProcess, 50) <> WAIT_OBJECT_0 do
    Application.ProcessMessages;
  CloseHandle(dw);
end;

const
  MMPipeName: PChar = 'pip_ArmaBell';
var
  aHandle: THandle;
  DummyData: PMMFData;

begin
  if FileExists(ParamStr(1)) then
  begin
    aHandle := CreateFileMappingA($FFFFFFFF, 0, 4, 0, 32767, MMPipeName);
    if aHandle = 0 then
      raise Exception.Create('CreateFileMapping-Error: ' +
        IntToStr(GetLastError));
    DummyData := MapViewOfFile(aHandle, 2, 0, 0, 32767);
    if DummyData = nil then
    begin
      CloseHandle(aHandle);
      raise Exception.Create('MapViewOfFile-Error: ' + IntToStr(GetLastError));
    end;
    DummyData^.sText := 'ArmaBell';
    ShellExecAndWait(ParamStr(1), '');
  end
  else
  begin
    showmessage('usage:' + #13#10 +
      'aps.exe pluginfilename' + #13#10 +
      #13#10 +
      'example' + #13#10 +
      'aps.exe "c:\program files\armabell\plugins\armabellmaped.exe"');
  end;
end.

Image
skull1000
Posts: 3
Joined: Sun Jun 03, 2007 4:53 am

Post by skull1000 »

i cant get it to work either and i dont know anything about or what to do with these codes... id like to do a map editor, edit my cycle and and the lines is just about all i want...im probly doing something eles so pm me if you have an awnser fer this idiot...(thats me) :P
African proverb:
Speak softly and carry a big stick.
User avatar
ed
Match Winner
Posts: 613
Joined: Mon Feb 13, 2006 12:34 pm
Location: UK

Post by ed »

Here is armabell v7, the patch, a couple of batch files and a readme giving instructions to get it working.

edit: if you download this: http://vergin.org/no-leech/ArmaBell_0.0 ... _Setup.exe
it appears Sylv has also created a patched Installer that will install a working version.
Works for me.
Attachments
armabell7andpatch.zip
(1.02 MiB) Downloaded 416 times
Post Reply