Again, I need more context. It's very hard to help if I don't know what you're running (particularly what options you're passing to cmake and what you expect to happen).
In the binary zip file I downloaded, in the bin folder, the exe I'm using is called, "cmake-gui.exe". This whole thing is confusing me.


Edit: I just found the installer link.
*DOUBLE POST*
I wish I didn't have to compile this myself. It is so difficult. Grr...
Fine, here you go.
http://jenkins.taricorp.net/job/fx-cg-cl/
You'll want the mingw32 build for Code::Blocks on windows. The library is compiled for 64-bit targets only, because important features (direct input mappings) won't work on 32-bit Windows without some fiddling.
That is to say, you'll need a 64-bit operating system and GCC to use that precompiled library.
Tari wrote:
Fine, here you go.
http://jenkins.taricorp.net/job/fx-cg-cl/
You'll want the mingw32 build for Code::Blocks on windows. The library is compiled for 64-bit targets only, because important features (direct input mappings) won't work on 32-bit Windows without some fiddling.
That is to say, you'll need a 64-bit operating system and GCC to use that precompiled library.


What do I click(Sorry for all this trouble Neutral )?
I would think that if Tari said "mingw32 build", that when the options are amd64-mingw32msvc-gcc and Native, the correct choice would be amd64-mingw32msvc-gcc.
KermMartian wrote:
I would think that if Tari said "mingw32 build", that when the options are amd64-mingw32msvc-gcc and Native, the correct choice would be amd64-mingw32msvc-gcc.


Yes but that doesn't give me a download when I click it.
Spenceboy98 wrote:
KermMartian wrote:
I would think that if Tari said "mingw32 build", that when the options are amd64-mingw32msvc-gcc and Native, the correct choice would be amd64-mingw32msvc-gcc.


Yes but that doesn't give me a download when I click it.
Last build -> Build Artifacts -> (all files in zip)
KermMartian wrote:
Spenceboy98 wrote:
KermMartian wrote:
I would think that if Tari said "mingw32 build", that when the options are amd64-mingw32msvc-gcc and Native, the correct choice would be amd64-mingw32msvc-gcc.


Yes but that doesn't give me a download when I click it.
Last build -> Build Artifacts -> (all files in zip)


What do I do with the libfx-cg-cl.a file and the include folder(Also, you can delete all of these posts if you need to after I'm finally done with this)?
Well, there wasn't any info that I saw on starting fx-cg-ui, so I tried and failed to get it running:
Code:
[HAL@HAL fx-cg-ui]$ python2 fx_cg_ui/core.py
Traceback (most recent call last):
  File "fx_cg_ui/core.py", line 5, in <module>
    from .GUI import Ui_MainWindow
ValueError: Attempted relative import in non-package

Currently using the latest fx-cg-ui from bitbucket and running python 2.7.3.

<edit>

Ah, fixed. To run fx-cg-ui, run:

Code:
[HAL@HAL fx-cg-ui]$ python -m fx_cg_ui.core


Which brings me to my next issue, what is the parameter to the script? No matter what I give it, I get this

Code:
Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/HAL/projects/fx-cg-ui/fx_cg_ui/core.py", line 189, in <module>
    main()
  File "/home/HAL/projects/fx-cg-ui/fx_cg_ui/core.py", line 184, in main
    ui = FXUI(sys.argv[1])
  File "/home/HAL/projects/fx-cg-ui/fx_cg_ui/core.py", line 102, in __init__
    self.shm = memoryview(createSharedMapping(mapping))
  File "/home/HAL/projects/fx-cg-ui/fx_cg_ui/core.py", line 13, in createSharedMapping
    return mmap.mmap(f.fileno(), SHM_SIZE, tagname='FXCGCL')
TypeError: 'tagname' is an invalid keyword argument for this function
Ah, you hit one of the platform abstractions that I haven't gotten to handling in the UI yet. You can drop the "tagname='FXCGCL'" portion from line 13 there and it should work properly.

The parameter to pass to the script should be the name of a file to back the IPC interface. For now you should just be able to touch a file (I don't think size matters..) and pass its name in. You should pass the same file name to your program that uses [CL].
On Windows, you just need to pass a string that doesn't contain backslashes (no file required), and the same string to the [CL] (since shared memory isn't backed by files on Windows).

It's on my list to make the UI handle creating an IPC file when necessary and make it easy to launch a [CL] program with the correct parameters, at some point.

I'm not entirely sure everything will work correctly on python 2.x, but it appears to be okay up the problem you hit. I was doing all my development on 3.x, but we'll see how that goes for you.
Here goes more issues:
Code:
[HAL@HAL fx-cg-ui]$ touch test
[HAL@HAL fx-cg-ui]$ python -m fx_cg_ui.core test
Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/HAL/projects/fx-cg-ui/fx_cg_ui/core.py", line 189, in <module>
    main()
  File "/home/HAL/projects/fx-cg-ui/fx_cg_ui/core.py", line 184, in main
    ui = FXUI(sys.argv[1])
  File "/home/HAL/projects/fx-cg-ui/fx_cg_ui/core.py", line 102, in __init__
    self.shm = memoryview(createSharedMapping(mapping))
  File "/home/HAL/projects/fx-cg-ui/fx_cg_ui/core.py", line 13, in createSharedMapping
    return mmap.mmap(f.fileno(), SHM_SIZE)
ValueError: mmap length is greater than file size


I will put PyQt4 libs for python 3.x and try there.

<edit>

filling test with loads of garbage still gives the same error.
Nah, turns out file size is actually important for the IPC mapping.
Code:
$ dd if=/dev/zero of=test bs=1 count=165908
Should do the trick (assuming I computed that correctly). If it still doesn't work, double-check my math with struct.calcsize("8H165888pI") in your Python interpreter.
Same error. I have no idea what you mean by "struct.calcsize("8H165888pI")" (I am not a python person, sadly)
Still having issues
Code:
![HAL@HAL fx-cg-ui]$ cat fx_cg_ui/__main__.py
from .core import main
if __name__ == "__main__":
    main()

![HAL@HAL fx-cg-ui]$ dd if=/dev/zero bs=12 of=test
^C3932877+0 records in
3932877+0 records out
47194524 bytes (47 MB) copied, 6.65223 s, 7.1 MB/s

![HAL@HAL fx-cg-ui]$ python -m fx_cg_ui test
Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/home/HAL/projects/fx-cg-ui/fx_cg_ui/__main__.py", line 3, in <module>
    main()
  File "fx_cg_ui/core.py", line 189, in main
    ui = FXUI(sys.argv[1])
  File "fx_cg_ui/core.py", line 107, in __init__
    self.shm = memoryview(createSharedMapping(mapping))
TypeError: cannot make memory view because object does not have the buffer interface
![HAL@HAL fx-cg-ui]$
You really need a README here...

<edit>Running python3 fixed that, but now it has no idle background and has errors on all keys:

Code:
![HAL@HAL fx-cg-ui]$ python3 -m fx_cg_ui test
X Error: BadWindow (invalid Window parameter) 3
  Major opcode: 31 (X_GrabKeyboard)
  Resource id:  0x0
Traceback (most recent call last):
  File "fx_cg_ui/core.py", line 155, in keyPressEvent
    self.keyboard[idx] |= mask
TypeError: unsupported operand type(s) for |=: 'bytes' and 'int'
Traceback (most recent call last):
  File "fx_cg_ui/core.py", line 158, in keyReleaseEvent
    self.keyboard[idx] &= ~mask
TypeError: unsupported operand type(s) for &=: 'bytes' and 'int'
Traceback (most recent call last):
  File "fx_cg_ui/core.py", line 155, in keyPressEvent
    self.keyboard[idx] |= mask
TypeError: unsupported operand type(s) for |=: 'bytes' and 'int'
Traceback (most recent call last):
  File "fx_cg_ui/core.py", line 158, in keyReleaseEvent
    self.keyboard[idx] &= ~mask
TypeError: unsupported operand type(s) for &=: 'bytes' and 'int'


<edit>

I memset the VRAM in a test addin, and, well...


You drew a letter! Huzzah! I hope this means that text function emulation is coming soon. Smile

Yes.

More yes. PrintXY is officially done, now to get other fonts working.
Added Bdisp_EnableColor, Print_OS, and locate_OS. Calling Bdisp_PutDisp_DD() without Bdisp_EnableColor(1) _will_ show up in C3 mode.
Awesome! Send pull requests early and often.

I need to debug input on Linux. It may be that grabbing keyboard focus isn't actually needed, but it seems there are a few things Qt does differently between Windows and Linux for input.
A question: How do I download the source for this project?
Tari wrote:
Flyingfisch wrote:
Can I download a tarball somewhere?
Yes, from bitbucket (see the first post in the thread, which I edited to include URLs). Downloads->Branches->default will get you a snapshot of the current dev tree.

Or clone the repository with Mercurial:

Code:
$ hg clone https://bitbucket.org/tari/fx-cg-cl
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 3 of 5
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement