Subscribe to this thread
Home - General / All posts - script runtime 32 64 bits and radian 32 64 bits
lionel109 post(s)
#10-Aug-17 23:01

Does both Radian 32 64 bit are agnostic about 32 /64 bit script runtime ( use inside radian ) .

I copy ironpython.Dll on both radian location near manidold.exe inside Bin and Bin64 directory and i could launch test without error the ironpython script inside radian 32 and radian 64 . Ironpython.Dll is 32 bit .

I don't test for other language script available for radian but does we have to take care of the 32 64 bit version of "runtime" script.

It really nice to see ironpython 32 bit work inside radian 32 and 64 bit . What are the recommandation from use 32 or 64 script version ? I don't test for python that exist both in 32 and 64 bit . IF i have both language runtime 32/64 and language is supported bit radian. How radian detect the version to use ? Does the detection use OS variable path or only one version is supported by radian ? Howto t ochange it ?

When you want to test ironpython , the header of the script alert us about ironpython.Dll . The dll must be near the manifold.exe so copy it in the both directory to make ironpython work for radian 32 and 64 bit !!

Hope i use the right word since i think 32 bit exe need 32 bit runtime and 64 bit exe need 64 bits runtime . Perhaps all script ( except SQL) in radian use another process thread for all script language ( except SQL) and so don't share the same memory that radian use !!

I ll test by my own but ll take time ( when you want to test cases that have come to mind ....with time ) since i was thinking and make wrong test that let me affirm that ironpython ( 32 bit) work only inside radian 32 bit !!! argh !!!! ( error to ironpython.dll location )

regard's

lionel109 post(s)
#10-Aug-17 23:35

32 64 bit for data http://www.manifold.net/doc/radian/mdb_files_in_64-bit_windows.htm

32 64 bit for script http://www.manifold.net/doc/radian/scripts.htm ( nothing about 32 / 64 bit )

Does data are 64 bit or the runtime that process data !! So issue is not about data storage but jet engine ? I am lost !!!! use radian 32 bit to import mdb in inside map and then use radian 64 bit to open and use data inside the same map file !!! Wouah !!

tjhb

7,503 post(s)
#11-Aug-17 01:02

Lionel,

As I understand it, IronPython.dll is itself agnostic about bitness, being compiled for AnyCPU (I will check this).

If that's right, then IronPython can run in 64-bit mode on 64-bit Windows, and I believe it normally will do, when invoked from 64-bit Manifold or Radian. I assume it will run in 32-bit mode when invoked from 32-bit Manifold or Radian--but I don't know how that works.

The fact that IronPython is installed to Program Files (x86) by default is arbitrary, does not affect bitness.

Tim

lionel109 post(s)
#11-Aug-17 03:49

I read the web for information

1) refer to https://superuser.com/questions/358434/how-to-check-if-a-binary-is-32-or-64-bit-on-windows

=>I find using Notepad that the first occurrence is PE L so dll is 32 Bit .

2) refer to https://stackoverflow.com/questions/270531/how-to-determine-if-a-net-assembly-was-built-for-x86-or-x64

=> i find using ps script IL Only

3) http://www.red-gate.com/dynamic/products/dotnet-development/reflector/download

=> C:\Program Files (x86)\Red Gate\.NET Reflector\Desktop 9.0\Reflector.exe

return seem 32 bit

Attachments:
manifold_ironpyhton_notepad.png
manifold_ironpython_powershell.png
manifold_reflector.png

adamw


7,215 post(s)
#11-Aug-17 07:29

A bit off-topic.

I saw the screen of a binary module in Notepad and I think you will like this better: HxD (this is a hex viewer / editor, very useful if you want to go really low-level and decode header fields scribbling on a napkin / look for byte patterns, etc).

lionel109 post(s)
#11-Aug-17 04:07

4) MITEC exe Explorer at http://www.mitec.cz/exe.html

=> 32 bit

Not easy to know i nwich side 32 or 64 bit occur in OS ? but seem all test converge to 32 bit for ironpython.dll ! But what is the place of ironpython.dll in the worflow ? I know that in ironpython directopry there is exe with 64 like ipy.exe and ipy64.exe ( shell wrapper only) !!

Attachments:
manifold_ironpyhton_directory.png
manifold_ironpythondll_exeEplorer.png

lionel109 post(s)
#11-Aug-17 04:29

5) using corflag on ironpyhtondll

=> return PE32

Attachments:
manifold_corflags_CLI.png

adamw


7,215 post(s)
#11-Aug-17 06:53

The IRONPYTHON.DLL you are looking at is built for AnyCPU.

PE32 from corflags does not mean that the assembly has been built for x86, the choice is between PE32 and PE32+. A combination of PE=PE32 and 32BITREQ=0 means AnyCPU. That is, the same assembly will run in either 32-bit or 64-bit mode.

In general:

If the assemblies are bit-neutral (like in the case with IronPython), consider putting them into ~\Shared (eg, C:\Program Files\Manifold\v9.0\Shared or, say, C:\Portable\Manifold-9.0.234.5\Shared), that way Radian / Viewer will see them in both 32-bit and 64-bit mode. You can also use global PATH or put assemblies into the global assembly cache.

If the assemblies for 32-bit and 64-bit *are* different, put the 32-bit modules into ~\Bin and 64-bit modules into ~\Bin64. If you want to use global PATH, it is best to set up different versions of the environment for 23-bit and 64-bit (basically, launch through BAT file). Putting assemblies into the global assembly cache will work, of course, the cache will deal with different versions of the assemblies automatically.

lionel109 post(s)
#11-Aug-17 20:02

Thank's a lot for the information that is rather not about gis but usefull to understand All the problem that ll appear during migration from 32 to 64 bit ( the documentation about access and jet is a must read ) .

1) corflags seem to be the best tool but need ti understand how interpret the result !!

2) for radian ( for be explicit) Does all the programming language can be use inside Radian 32 and 64 bit .

3) Which language exist only in 32 or only in 64 bit or both 32 64 bit using 2 files or 1 file ( bit neutral) .

regard's

above are some questions/ details for my knowledge not very usefull .... since now i succeed to make ironpython work inside radian 32/64 bit !

adamw


7,215 post(s)
#12-Aug-17 07:58

Regarding 2 and 3:

Yes, all scripting languages supported by Radian come both in 32-bit and 64-bit versions. The 32-bit download for ActiveState Python is not on their latest downloads page and has to be pulled from archives that they have, all other downloads are fairly straightforward.

The scripting engine assemblies for .NET scripting languages are all bit-neutral as well, as far as we know.

lionel109 post(s)
#15-Aug-17 02:41

this post could be call ironpython 32/64 bit because all turn around ironpython and implicit code.

.

Here a composite/blend capture screen of relation beetween ironpython and .Net wpf ( xaml) i try to understand.

It show that Microsoft compiler target different Framework version ( 2 , 3 , 4, ) , plateform ( desktop ,silverlight) and bit ( 32 , 64 ) !! and .NET core and uwp appear in 2017 !!

.

Strange to read OS condition do not match !!... What does this mean ?

.

I was thinking style xaml was like html/css but we are really far !! perhaps svg is the only one that is close to xaml ! Need to study compare radian Studio style and css reserved word !! How publisher can use radian with adobe illustrator ?

Attachments:
manifold_ironpyhton_wpf-xaml.png

adamw


7,215 post(s)
#15-Aug-17 06:59

This is a bit off-topic, but here goes...

The screen looks pretty normal.

I would guess that the v1.0.3705 and v1.1.4322 folders under x:\Windows\Microsoft.NET\Framework just contain a couple of config files that help the system in some way, they do not contain .NET 1.0 or 1.1. .NET 1.x is very old, it was superseded soundly by .NET 2.0 and since .NET 2.0 also broke compatibility, .NET 1.x has not been used ever since.

The "Not running action ... because the OS condition does not match" is just a log message indicating that one of the actions inside the setup did not run. That's normal, perhaps there was a similar action with a slightly different name that did run.

Etc, everything seems normal.

lionel109 post(s)
#15-Aug-17 03:16

i test a ironpython script wit wpf . Howto make the window a child ( MDI ?) of RS9 GUI ? (create a new thread ? )

what is the recommanded GUI inside RS9 : wpf or winform ?

I have this message when launt the script ;

""""

---------------------------

Radian Studio

---------------------------

Exception has been thrown by the target of an invocation.

Cannot create more than one System.Windows.Application instance in the same AppDomain.

---------------------------

OK

---------------------------

""""

Attachments:
wpf_ipy_test_9.Map

adamw


7,215 post(s)
#15-Aug-17 07:15

You should be able to use either WPF or WinForms or anything else.

With WPF, however, you currently have to be careful not to try to reinitialize it. We currently run all .NET scripts within the same AppDomain (application domains are used to create multiple independent script "applications" in the same Windows process, we don't use this because we want scripts to be able to exchange data - through shared objects - which they cannot do if they use different domains, and because the abstraction is not free and we don't want to pay the performance cost unless the separation is actually needed) and once WPF initializes itself in that domain, you shouldn't try to reinitialize it, you should just use it. I realize that in your script the initialization is implicit inside some module that you didn't write, but there has to be some way to skip re-initialization. Alternatively, sooner or later we will likely have to provide means for a .NET script to run in its own AppDomain, the script can wait until that time (and in the meantime, use WinForms).

lionel109 post(s)
#15-Aug-17 20:36

Is far from my knowledge (now) .... i was thinking i can easely replace the "active X control " available in M8 in RS9 by using ironpython and form ( WinForms) !!

1) Have you got some other key words that could let find where i have to search if i want to use IronPuthon script inside RS9 with WinForm gui component ? Appdomain/process/re initialisation are main keywords and there so, already a lot to study !!! The only thing i want t oechieve at this time is only a little test : show a windows gui and a click button that show in a textarea a user name string store inside RS9 table )

2) Does manage data inside map can be access easely from external ironpython GUI ? In this case can i use mapV9 file that ll in same time both use by GUI RS9 and external ironpython GUI ? I think no because windows 10 now show me for concurrent access to excel file a window message that inform me to wait and ask me if i want to be alert when the ressource will be available ( not open by the other user !!) .

3) Could someone confirm that if I want completion ( outside RS9 ) for ironpyhton, since Ironpython is a dynamic language , the compilation occur during running so any external ironpyhton IDE should be limited for intellisense/completion ?

regard's

adamw


7,215 post(s)
#16-Aug-17 06:57

1 - Not sure I have any good additional keywords for doing WinForms in Radian. Just use WinForms as you would in a regular WinForms application, then compile to DLL (that way you can use resource editors, easily add event handlers using the IDE, etc) and make a script that would use the forms in the DLL, that's about it. There are next to none special tricks required, having to get past initialization in WPF is about the extent of special tricks.

2 - You can use Radian objects and access data in MAP files / other data sources, run queries, etc, from any third-party application, including written in IronPython, sure. You will not be able to open the same MAP file simultaneously both in Radian and in an external application, unless you open it in read-only mode in both.

3 - I don't know how well IDEs for dynamic languages deal with autocompletion. They definitely have it much harder than static languages, but I expect there will be some intelligent guessing.

tjhb

7,503 post(s)
#17-Aug-17 03:00

Re 1, again a book, slightly dated but highly recommended. IronPython in Action.

The physical book is out of print but still available and worth seeking out.

lionel109 post(s)
#17-Aug-17 18:31

i already have that book buy in 2007 when is was not finalized and read it again a lot .

I think best book has to be buy and same mfor software

(((((

NB I ll avoid buy software if

-no forum exist

-the documentation don't teach me a lot of things ( see Draw plus software )

-the response after a technical question to sale is a robot pre define text or a link to their website

-the tool is not open or don't support other/many formats .

))))))

But my problem is about howto use ironpyhton inside manifold or radian and is it writing explicitly in the doc that the documentation ll stay focus on GIS and not Dev and i like to understand things : the inter dependance , the layer from simple basic to higher level thus you know all the staff that library do without alert us and then you know where to search / go if issue arise ( debug line number ) !!! So language is one thing but debug write code is another thing and i don't want to use notepad to write(30% time) or debug ( 70%) any languages ( python ironpyhton ) or any languages support by manifol/radian.

The best way to learn ll be to go to test COM microsoft ( perhaps outlook MAPI because is implement in win32Com and badly inside Thunderbird ) and then python / ironpython . I search a good book on this subject . Programming is not my daily work and i don't need a big project to understand things , i only need many simple projects that focus each time on one thing ( call external library , manage event , compile, debug ) . I do this on javascript read the book and create simple test to understand how event work, create class , capture event understand up/Down bubble ..... Thank's if you have any recommandations ( until now i already have the 2 books you highly recommanded to me) .. my recommandation ll be to take more time to study again the book .. but don't have a lot ..

I understand what adam write but never try code Winform in C# , never code Windows Application and I only want to stay on python and ironpyhton !! ( I already configure and launch make in linux to compile postgis from code source but never code )

Attachments:
manifold_ironpython.png

tjhb

7,503 post(s)
#18-Aug-17 06:52

Lionel,

If you would like to better your English I would be happy to help.

Tim

tjhb

7,503 post(s)
#18-Aug-17 07:18

Mon français n'est pas parfait, loin de là. Tu pourrais m'y aider autant sinon davantage.

lionel109 post(s)
#15-Aug-17 21:08

some articles perhaps usefull to study but far from ironpython language

  • MS appdomain

  • MS IPC

  • modular asp

  • Manifold User Community Use Agreement Copyright (C) 2007-2017 Manifold Software Limited. All rights reserved.