Shop OBEX P1 Docs P2 Docs Learn Events
PZST - an open-source Propeller IDE in development [ Version 1.0.1 released! ] - Page 2 — Parallax Forums

PZST - an open-source Propeller IDE in development [ Version 1.0.1 released! ]

245678

Comments

  • jazzedjazzed Posts: 11,803
    edited 2011-02-28 01:03
    Ok. Program runs, but I can't seem to open any .spin files. SpinEditor doesn't instantiate.
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-02-28 01:55
    What do you mean by "SpinEditor doesn't instantiate"? You get file open dialog, select file, press Open - and just nothing happens?
  • jazzedjazzed Posts: 11,803
    edited 2011-02-28 02:03
    What do you mean by "SpinEditor doesn't instantiate"? You get file open dialog, select file, press Open - and just nothing happens?
    The file select dialog works, but the program crashes.
    The SpinEditor constructor fails to produce a new object of the class (it doesn't instantiate).
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-02-28 02:10
    Do you have the QScintilla library compiled and installed ? I compiled it as static library, and dropped libqscintilla2.a to c:\qt\2009.05\qt\lib
  • jazzedjazzed Posts: 11,803
    edited 2011-02-28 02:24
    I did qmake qscintilla.pro, make, make install. The make install put the lib/dll's into c:\qt\2010.05\qt\lib. Guess i'll try again.
  • Heater.Heater. Posts: 21,230
    edited 2011-02-28 03:16
    Andrey,

    This is looking quite fabulous!

    I am using qt v4.7 and building with Qt creator under Debian.

    Here is what I did:

    1) Check out pzst-read-only from http://code.google.com/p/pzst/
    2) Unpacked that which creates the pzst-read-only directory.
    3) Download and unpack QScintilla in the pzst-read-only director creating a QScintilla-gpl-2.4.6 directory in there.
    4) Build Scintilla using Qt Creator from the project file: QScintilla-gpl-2.4.6/Qt4/qscintilla.pro
    5) Copy the resulting scintilla libraries into my Qt setup:
    # cp -a QScintilla-gpl-2.4.6/qscintilla-build-desktop/libqscintilla2.so*  ~/qtsdk-2010.05/qt/lib/
    
    6) Copy the scintilla include files into my Qt setup:
    cp -a QScintilla-gpl-2.4.6/Qt4/Qsci    /home/michael/qtsdk-2010.05/qt/include/
    
    7) Build pzst in QtCreator using the project file PZST.pro

    THIS FAILS with an unknown header file Qsci/SB.h in mainwindow.cpp so:

    8) Delete that include statement and build again.

    SUCCESS!

    And it runs, see attached scree shot.

    It's fast. I loaded it up with 10000 lines of Spin and it scrolls around without a stutter.

    Now, is there any chance of simplifying this build I don't like to have to add libs and includes to my QT sdk.
    853 x 682 - 68K
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-02-28 03:57
    Where is that SB.h came from????? There is nothing liket neither in qscintilla nor in my code.

    To BUILD the code, you have to add these includes. But you do not need them to RUN the program, given you have QT libraries installed. Also, I build QScintilla as a static library by replacing "dll" with "staticlib" in qscintilla.pro (the line starting with config +=) - this way, when building the app, qscintilla is compiled into the application, and the app does not require qscintilla dll to run

    P.S. If you install Parallax font, it will look a bit better :)
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-02-28 03:59
    Heater. wrote: »
    It's fast. I loaded it up with 10000 lines of Spin and it scrolls around without a stutter.

    Actually, there can be a delay if you load a big file and then navigate to the end of file, either by pressing Ctrl+End of by selecting a method that is near the bottom of the file - that is syntax highlighter parsing the file. When it is finished, scolling is very fast
  • Heater.Heater. Posts: 21,230
    edited 2011-02-28 04:06
    Yep, I realize there is a lot of work going on with the parser when moving around files. No complaints about that. It's a lot faster than BST for example.
  • Heater.Heater. Posts: 21,230
    edited 2011-02-28 04:18
    Andrey,
    Where is that SB.h came from????? There is nothing liket neither in qscintilla nor in my code.

    Oh yes there is! It's in the pzst-read-only/mainwindow.cpp like so:
    #include <QMdiSubWindow>
    #include <QWidget>
    #include <QFileDialog>
    #include <QApplication>
    #include <QCloseEvent>
    #include <QMimeData>
    #include <QTabBar>
    #include <QSettings>
    #include <QProgressBar>
    #include <QDockWidget>
    #include <QMessageBox>
    #include <QDir>
    #include <QTextCodec>
    #include <Qsci/SB.h>
    #include <QScrollArea>
    #include <QPainter>
    #include <QLineEdit>
    
    #include "mainwindow.h"
    #include "spineditor.h"
    #include "spinlexer.h"
    #include "spinparser.h"
    #include "eserialport.h"
    #include "propellerloader.h"
    #include "spincompiler.h"
    #include "erroritem.h"
    #include "aboutdialog.h"
    #include "preferencesdialog.h"
    #include "pzstpreferences.h"
    
    using namespace PZST;
    
    SpinError::SpinError(QString msg, QString f, int l, int c) :message(msg), filename(f), line(l), col(c)
    {
    }
    
    etc etc....
    

    For sure I did not put it there:)
    To BUILD the code, you have to add these includes.

    Yes, but I'd rather have them somewhere other than in my qtsdk directories. There must be a nice way to tell QtCreator to find them somewhere else. Like in the scintilla directories.

    Same for the scintilla library I might guess.

    All in all this is shaping up to be a great addition to the Propeller tools world.
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-02-28 04:33
    Heater, that's some black magic happening on your side :)

    see https://code.google.com/p/pzst/source/browse/trunk/mainwindow.cpp - there is no <Qsci/SB.h>, that line says <Qsci/qscilexercustom.h>, and it always did so.
  • Heater.Heater. Posts: 21,230
    edited 2011-02-28 04:48
    OK lets try that again: I check out a read only version of pzst like so:
    heater@rsm-51:~/tmp$ svn checkout http://pzst.googlecode.com/svn/trunk/ pzst-read-only
    A    pzst-read-only/eserialport.h
    A    pzst-read-only/aboutdialog.h
    
    ....etc etc etc
    
    A    pzst-read-only/spinparser.h
     U   pzst-read-only
    Checked out revision 5.
    

    Change to the new copies directory and do a diff of mainwindow aganst my last download:
    heater@rsm-51:~/tmp$ cd pzst-read-only/
    heater@rsm-51:~/tmp/pzst-read-only$ diff mainwindow.cpp /home/heater/pzst-read-only/mainwindow.cpp
    14c14
    < #include <Qsci/qscilexercustom.h>
    ---
    > //#include <Qsci/SB.h>
    462d461
    <     menuWindow->addAction(searchResultsDock->toggleViewAction());
    

    Hmmm...That include fiel is different and a new line of code has appeared.

    Oh well, it builds and runs here anyway:)

    I installed the Parallax font. Had to change to 14 point to get the same size as the 12 point Liberation Mono.

    I think the Parallax font looks awful ! See attachment.

    Which raises the issue of saving files as good old ASCII or as UTF-16.

    Many of us hate to have source code saved as UTF-16 as it buggers up all kinds of tools when working under Unix. diff for example.

    Still it's early days for your users to be making requests:)
    1001 x 812 - 75K
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-02-28 05:14
    PZST can open ASCII, UTF-8, UTF16 and UTF32 (the last two only if BOM is present) - but always saves UTF-8
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-02-28 05:28
    Just realized that PST does not like UTF8 :( So, there will be an option to save as UTF16
  • RoadsterRoadster Posts: 209
    edited 2011-03-01 17:33
    Has anyone got this to work with windows, I was able to build the exe, however after I open a spin file and select compile it says "Failed to start compliler"
    861 x 716 - 69K
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-03-01 19:23
    Roadster, you need to download bstc compiler http://www.fnarfbargle.com/bst/bstc/Latest/
    and place bstc.exe into one of directories listed in PATH environment variable
  • Dr_AculaDr_Acula Posts: 5,484
    edited 2011-03-02 01:23
    Andrey, could you edit your post #1 so there is a link to the code http://code.google.com/p/pzst/

    (I can put the link here and it is also on post #26 but these will get lost as the thread grows longer)

    Also can you please describe how to get the code. http://code.google.com/p/pzst/source/checkout
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-03-02 01:25
    Dr_Acula, thanks for the note. First post edited
  • tdeyletdeyle Posts: 85
    edited 2011-03-05 16:39
    I get a "CompileError" every time I try to compile my code. I have ensured that $PATH listed the location of the BSTC program. I have checked the bstc program in terminal and it compiles the file properly.

    I used qmake, make with Linux Mint 10, Qt 4.7 to build.

    How's that .deb coming along?
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-03-05 17:23
    PZST is still in very early stage, and I expect those who build it will have different issues.

    tdeyle, what is that "CompileError" exactly? What's in "Compile errors" window?

    Binary builds (deb or exe) are not expected soon.
  • tdeyletdeyle Posts: 85
    edited 2011-03-05 17:35
    Nothing is in the Compiler Window. "Compile Error" shows up in the bottom right hand corner of the IDE.

    I thought it was because I have my .spin file in my "Ubuntu One" directory, due to that space in the directory name. But, I moved the file onto my desktop, and it still did not compile, throwing a Compile Error, with no information in the Compiler Window.

    Could it be because I installed Qt in Synaptic instead of downloading the SDK?
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-03-05 18:17
    tdeyle, what version of bstc are you using? Can you provide the file you are trying to compile?
  • tdeyletdeyle Posts: 85
    edited 2011-03-05 18:57
    I am using version 0.15.3.

    I am using a basic blank file:
    PUB Main
    
    repeat
    

    As well as the one attached.

    I have checked it with the bstc in a terminal window to ensure that it executed without errors.
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-03-05 19:02
    Download the latest bstc - it has some command-line options changed since 0.15.3
  • tdeyletdeyle Posts: 85
    edited 2011-03-05 19:34
    Hmm. I thought 0.15.3 was the latest. I have downloaded the file from Brad's site @ /bst/bstc/Latest/, and it states: bstc-0.15.3.linux.zip
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-03-05 19:37
  • tdeyletdeyle Posts: 85
    edited 2011-03-05 20:09
    Yep it works! Now, since I use Ubuntu One to sync code between computers, the program will only compile files that are saved under a directory without spaces.

    Is there any way to put this in the "ToDo" list? I only ask because I would REALLY like to make this my regular Propeller IDE. I really like the layout and look of it!
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-03-05 20:16
    What's the problem with spaces? I am not observing it
    spaces.png
    499 x 477 - 29K
  • tdeyletdeyle Posts: 85
    edited 2011-03-05 20:23
    Wow, I kinda feel like what you named your example method, right now...

    Forgot to set the search path in Preferences.
  • Andrey DemenevAndrey Demenev Posts: 377
    edited 2011-03-05 20:56
    Couple of things added today:
    - optional line numebring in editor window
    - optional current line marker in editor window

    Now working on code completion. Then find/replace functionality (for now, only search works, no replace), VIM-style quick search/replace - and I think I am ready for first release :)
Sign In or Register to comment.