Mentions légales du service

Skip to content
Snippets Groups Projects
Commit c080d448 authored by DEBREUVE Eric's avatar DEBREUVE Eric
Browse files

some notes on win standalone

parent 89912cb1
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
.mypy_cache/ .mypy_cache/
__pycache__/ __pycache__/
__dll__/
__material__/ __material__/
__runtime__/ __runtime__/
__version__/ __version__/
......
...@@ -88,7 +88,7 @@ start_time = tm_.time() ...@@ -88,7 +88,7 @@ start_time = tm_.time()
# --- Images # --- Images
image = io_.imread(data_path) image = io_.imread(data_path)
assert image.ndim == 3 assert image.ndim == 3 # TODO: replace assertion with proper exception handling
image = image[:, 512:, 512:]#562 image = image[:, 512:, 512:]#562
img_shape = image.shape img_shape = image.shape
# #
......
{
"command_data":{
"onefile":false,
"console":true,
"additional_files":{
"addFiles_lbb4d":{
"source":"C:/Users/eric/Documents/code/python-to-exe/nutrimorph/main_prm.py",
"destination":"."
},
"addFiles_aaa0a":{
"source":"C:/Users/eric/Documents/code/python-to-exe/nutrimorph/libblas.dll",
"destination":"."
},
"addFiles_aaa0b":{
"source":"C:/Users/eric/Documents/code/python-to-exe/nutrimorph/libgcc_s_seh-1.dll",
"destination":"."
},
"addFiles_aaa0c":{
"source":"C:/Users/eric/Documents/code/python-to-exe/nutrimorph/libgfortran-5.dll",
"destination":"."
},
"addFiles_aaa0d":{
"source":"C:/Users/eric/Documents/code/python-to-exe/nutrimorph/liblapack.dll",
"destination":"."
},
"addFiles_aaa0e":{
"source":"C:/Users/eric/Documents/code/python-to-exe/nutrimorph/libquadmath-0.dll",
"destination":"."
},
"addFiles_aaa0f":{
"source":"C:/Users/eric/Documents/code/python-to-exe/nutrimorph/libwinpthread-1.dll",
"destination":"."
},
"addFiles_ouqe7j":{
"source":"C:/Users/eric/Documents/code/python-to-exe/nutrimorph/frangi3.so",
"destination":"."
}
}
},
"id_injectable":{
"file":"C:/Users/eric/Documents/code/python-to-exe/nutrimorph/main.py",
"icon":"",
"output_location":"C:/Users/eric/Documents/code/python-to-exe/nutrimorph/standalone",
"VALUE--upx-dir":"",
"VALUE--log-level":"",
"VALUE-n":"",
"VALUE--add-binary":"",
"VALUE-p":"",
"COMMASPLIT--hidden-import":"",
"VALUE--additional-hooks-dir":"",
"VALUE--runtime-hook":"",
"COMMASPLIT--exclude-module":"",
"VALUE--key":"",
"VALUE--debug":"",
"VALUE--version-file":"",
"VALUE-m":"",
"VALUE-r":"",
"VALUE--osx-bundle-identifier":"",
"VALUE--runtime-tmpdir":"",
"extra_command_data":""
},
"switches":{
"disable_recursion_limit":false,
"OPTION-a":false,
"OPTION--clean":false,
"OPTION-s":false,
"OPTION--noupx":false,
"OPTION--uac-admin":false,
"OPTION--uac-uiaccess":false,
"OPTION--win-private-assemblies":false,
"OPTION--win-no-prefer-redirects":false,
"OPTION--bootloader-ignore-signals":false
}
}
Remove all brick... hierarchy in imports
Remove hierarchy in c-extension loading in frangi3.py
Change name nutrimorph.py into main.py
Change name parameters.py into main_prm.py
In main.py (re-check necessity periodically as this should not be necessary):
> import tifffile
Then
< assert image.ndim == 3 # TODO: replace assertion with proper exception handling
---
> if image.ndim == 4:
> image = image[:,:,:,0]
> assert image.ndim == 3, f"Image dimension: {image.ndim}={image.shape}, expected 3"
--- Some random notes (should be obsolete)
/mingw64/bin/CC.exe -fPIC -std=c++11 -O2 -shared -o libarmadillo.so CMakeFiles/armadillo.dir/src/wrapper1.cpp.obj CMakeFiles/armadillo.dir/src/wrapper2.cpp.obj /mingw64/lib/libblas.dll.a /mingw64/lib/liblapack.dll.a /mingw64/lib/gcc/x86_64-w64-mingw32/9.2.0/libgfortran.a
https://packages.msys2.org/search
Install libgfortran
Modified link.txt in C:\Users\eric\Documents\code\python-to-exe to point to the appriopriate version of the libraries (.dll.a, not .a)
Modified shared:
/mingw64/bin/CC.exe -fPIC -std=c++11 -O2 -shared -o libarmadillo.so CMakeFiles/armadillo.dir/src/wrapper1.cpp.obj CMakeFiles/armadillo.dir/src/wrapper2.cpp.obj /mingw64/lib/libblas.dll.a /mingw64/lib/liblapack.dll.a /mingw64/lib/gcc/x86_64-w64-mingw32/9.2.0/libgfortran.a
Maybe final
/mingw64/bin/CC.exe -fPIC -std=c++11 -O2 -shared -o libarmadillo.so CMakeFiles/armadillo.dir/src/wrapper1.cpp.obj CMakeFiles/armadillo.dir/src/wrapper2.cpp.obj /mingw64/lib/libblas.dll.a /mingw64/lib/liblapack.dll.a
$ cd /mingw64/x86_64-w64-mingw32/include
$ ln -s /usr/include/armadillo
$ ln -s /usr/include/armadillo_bits
$ cd /mingw64/lib/
$ ln -s /usr/lib/libarmadillo.so
$ find /c/Users/eric/Documents/code/armadillo/armadillo-9.800.3 -name '*.obj'
./CMakeFiles/armadillo.dir/src/wrapper1.cpp.obj
./CMakeFiles/armadillo.dir/src/wrapper2.cpp.obj
If tifffile is missing, then DIO_6H_6_1.70bis_2.2_3.tif, when read with skimage.imread, appears as a 4-D (last dim=color) image which only contains zeros in the first channel.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment