jaPBe für PB 4.00

Ankündigungen PureBasic oder die Community betreffend.
Benutzeravatar
Leonhard
Beiträge: 602
Registriert: 01.03.2006 21:25

Beitrag von Leonhard »

Ich bin gerade dabei, ein PlugIn für jaPBe zu schreiben. Dabei soll bei jedem Compilieren / EXE-Erstellen mein PlugIn mit 2 Parametern gestartet werden: 1. der Name der Input-Datei (Source-Datei) und 2. der Name + der Output-Datei (die Datei, die geparst wird). Dabei soll die Orginal-Datei nicht verwendet werden.

In der PureBasic ID hab ich da folgendes gemacht:
Argumente: "%TEMPFILE" "D:\developing\PureBasic\IDE & Compiler\Compilers\PB_EditorOutput.pb"

(X) Warte bis Werkzeug beendet
Wie kann ich das in der jaPBe IDE umsetzen?
Benutzeravatar
gnozal
Beiträge: 219
Registriert: 04.12.2004 13:01
Wohnort: Frankreich (67)
Kontaktdaten:

Beitrag von gnozal »

Leonhard hat geschrieben:Ich bin gerade dabei, ein PlugIn für jaPBe zu schreiben. Dabei soll bei jedem Compilieren / EXE-Erstellen mein PlugIn mit 2 Parametern gestartet werden: 1. der Name der Input-Datei (Source-Datei) und 2. der Name + der Output-Datei (die Datei, die geparst wird). Dabei soll die Orginal-Datei nicht verwendet werden.

In der PureBasic ID hab ich da folgendes gemacht:
Argumente: "%TEMPFILE" "D:\developing\PureBasic\IDE & Compiler\Compilers\PB_EditorOutput.pb"

(X) Warte bis Werkzeug beendet
Wie kann ich das in der jaPBe IDE umsetzen?
You cannot use it with arguments as a plugin, but as tool (plugins don't take arguments, but rely on the plugin interface).

Did you try this ?

Arguments : "%FILE" "%TEMPFILE"

Wait until tool Quits : (X)

Trigger : Before Create EXE
jaPBe manual hat geschrieben:Arguments
These are the command line parameters for your program. jaPBe supports the following placeholders:
%PATH
The path of the current file.
%FILE
The file name inclusive the path of the current file.
%TEMPFILE
The path and name of the file that jaPBe creates as a copy. Very handy if you want, that nothing will be changed on the original.
%CURSOR
This will be replaced by the current cursor position, in the form of LINExCOLUMN.
%WORD
Contains the word currently under the cursor.
%JAPBE
This will be replaced by the jaPBe main window handle.
%SCI
This will be replaced by the Scintilla window handle.

Trigger (only available for Plugins, or for Tools if 'Wait until tools Quit' is checked)
You can select when the tool or plugin should be executed. Any number of tools or plugins can have the same trigger, they will all be executed when the trigger event happens. The order of their execution depends on the order they appear in the list.
jaPBe Start : the tool will be executed right after jaPBe has been fully started.
jaPBe End : the tool will be executed right before jaPBe ends. Note that all open sources have already been closed at this time.
Before Compile/Run : the tool will be executed right before the compiler is called to compile a source code with F5/F6.
After Compile/Run : the tool will be executed right after the compilation is finished, but before the executable is executed for testing.
Before Create EXE : the same as for the "Before Compile/Run" trigger applies here too, only that the triggering event is when the user creates the final executable (F7).
After Create EXE : the tool is executed after the compilation to create the final executable is complete.
Source loaded : the tool is executed after a source code has been loaded into jaPBe.
Source saved : the tool will be executed after a source code in jaPBe has been saved successfully.
For free libraries and tools, visit my web site (also home of jaPBe V3 and PureFORM).
Benutzeravatar
#NULL
Beiträge: 2235
Registriert: 20.04.2006 09:50

Beitrag von #NULL »

ich hab eine frage:
kann ich jaPBe beibringen, dass ich auch den block zwischen
StartDrawing(..) und StopDrawing(..) eingerückt haben möchte?
wenn der cursor hinter StopDrawing() steht (am ende der zeile),
und ich drücke return, dann schiebt er mir das StopDrawing() einen
tab nach rechts. das sieht dann so aus:

Code: Alles auswählen

StartDrawing( ScreenOutput() )
  dummy()
  StopDrawing()
  ..
:cry:

ich will deshalb nicht das ganze auto-indent abstellen.
my pb stuff..
Bild..jedenfalls war das mal so.
Benutzeravatar
edel
Beiträge: 3667
Registriert: 28.07.2005 12:39
Computerausstattung: GameBoy
Kontaktdaten:

Beitrag von edel »

Ja , du kannst es neu kompilieren :D

Das ganze sollte augelagert werden, auch die Schlüsselwörter (für eigene).
Vorzugsweise XML :allright:
Benutzeravatar
Green Snake
Beiträge: 1394
Registriert: 22.02.2005 19:08

Beitrag von Green Snake »

RTFM! :mrgreen:

Code: Alles auswählen


StartDrawing( ScreenOutput() ) ;>
  dummy() 
StopDrawing() ;<

-.-"
Benutzeravatar
#NULL
Beiträge: 2235
Registriert: 20.04.2006 09:50

Beitrag von #NULL »

danke.
ich wollte erstmal nur sichergehen, dass ich keine direkte einstellungsmöglichkeit übersehen hab.
das ;< wird mir in dem fall bestimmt reichen.
thnx für the tipp. 8)
my pb stuff..
Bild..jedenfalls war das mal so.
Benutzeravatar
Kukulkan
Beiträge: 1066
Registriert: 09.09.2004 07:07
Wohnort: Süddeutschland
Kontaktdaten:

Beitrag von Kukulkan »

Hallo,

Irgendwie kann ich die Funktion InitSprite3D() nicht mit jaPBE verwenden. Wenn ich den Code in jaPBE compilieren oder starten möchte kommt immer

Line xxx - InitSprite3D() is not a function, array, macro or linked list.

Wenn ich den selben Quellcode in der original PB-IDE öffne, dann klappt das problemlos. Kann das jemand bestätigen oder mach ich was falsch?

Beispielcode:

Code: Alles auswählen

If InitSprite() = 0 Or InitKeyboard() = 0 Or InitMouse() = 0 Or InitSound() = 0
  MessageRequester("Error", "Can't open DirectX 7 or later, mouse-, input- or sound-device", 0)
  End
EndIf

If InitSprite3D() = 0
  MessageRequester("Error", "Can't open DirectX 7 sprite-support or later (initsprite3d)", 0)
  End
EndIf
End
[EDIT] Hab noch die anderen Init's aus meinem Code in das Beispiel eingefügt. Ändert aber nix am verhalten da ich mit diesem Befehl in jaPBE weder starten (F5/F6) noch compilieren kann. In der Original IDE klappt es Problemlos.

Volker
Zuletzt geändert von Kukulkan am 05.05.2007 14:53, insgesamt 1-mal geändert.
a14xerus
Beiträge: 1440
Registriert: 14.12.2005 15:51
Wohnort: Aachen

Beitrag von a14xerus »

Bei mir klappt es, außer natürlich, das erstmal sprites initialisiert werden müssen, aber das ist ja beim compilieren nicht wichtig.
Also jaPBe meckert bei mir nicht
Benutzeravatar
dige
Beiträge: 1183
Registriert: 08.09.2004 08:53

Beitrag von dige »

Volker: schau mal in Deinen Einstellungen welche Includes und Deklarationen
da aktiviert sind.
Möglicherweise wird die InitSprite3d() Funktion mit einer anderen
Prozedure "überladen"
"Papa, mein Wecker funktioniert nicht! Der weckert immer zu früh."
Benutzeravatar
Kukulkan
Beiträge: 1066
Registriert: 09.09.2004 07:07
Wohnort: Süddeutschland
Kontaktdaten:

Beitrag von Kukulkan »

Hi dige,
Volker: schau mal in Deinen Einstellungen welche Includes und Deklarationen
da aktiviert sind.
Möglicherweise wird die InitSprite3d() Funktion mit einer anderen
Prozedure "überladen"
Also in den Projekteinstellungen ist absolut kein Include angewählt. In den Einstellungen zu jaPBE ist ebenfalls kein Include gewählt. Die Definitions hier im Screenshot:

Bild

Ist da was falsch? Ich hab halt gewählt was mir für meine aktuellen Projekte für Wichtig erschienen ist. Aber auch wenn ich alles anwähle und dann jaPBE neu starte ist das Problem noch immer das selbe.

Volker
Antworten