Mentions légales du service

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

standalone generation+win script

parent 108edce6
No related branches found
No related tags found
No related merge requests found
{
"command_data":{
"onefile":false,
"console":true,
"additional_files":{
"addFiles_lbb4d":{
"source":"C:/Users/eric/Documents/code/python-to-exe/nutrimorph/main_prm.py",
"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
}
}
...@@ -40,9 +40,11 @@ ...@@ -40,9 +40,11 @@
import connection as cn_ import connection as cn_
import extension as xt_ import extension as xt_
import feedback as fb_ import feedback as fb_
from main_prm import * # from main_prm import *
import soma as sm_ import soma as sm_
import os as os_
import sys as sy_
import time as tm_ import time as tm_
# import tracemalloc as tr_ # import tracemalloc as tr_
...@@ -52,6 +54,27 @@ import skimage.io as io_ ...@@ -52,6 +54,27 @@ import skimage.io as io_
import skimage.measure as ms_ import skimage.measure as ms_
if sy_.argv.__len__() < 2:
print("Missing parameter file argument")
sy_.exit(0)
if not (os_.path.isfile(sy_.argv[1]) and os_.access(sy_.argv[1], os_.R_OK)):
print("Wrong parameter file path or parameter file unreadable")
sy_.exit(0)
data_path = None
with_plot = None
soma_low_c = None
soma_high_c = None
ext_low_c = None
ext_high_c = None
soma_selem_c = None
max_straight_sq_dist_c = None
max_weighted_length_c = None
min_area_c = None
in_parallel = None
execfile(sy_.argv[1])
soma_t = sm_.soma_t soma_t = sm_.soma_t
extension_t = xt_.extension_t extension_t = xt_.extension_t
......
<# : chooser.bat
:: address/from/source: https://exceptionshub.com/file-folder-chooser-dialog-from-a-windows-batch-script.html (Update 2016.3.20)
:: launches a File... Open sort of file chooser and outputs choice(s) to the console
:: https://stackoverflow.com/a/15885133/1683264
@echo off
setlocal
for /f "delims=" %%I in ('powershell -noprofile "iex (${%~f0} | out-string)"') do (
.\main\main.exe %%~I
)
goto :EOF
: end Batch portion / begin PowerShell hybrid chimera #>
Add-Type -AssemblyName System.Windows.Forms
$f = new-object Windows.Forms.OpenFileDialog
$f.InitialDirectory = pwd
$f.Filter = "PY Files (*.py)|*.py"
$f.ShowHelp = $true
$f.Multiselect = $false
[void]$f.ShowDialog()
if ($f.Multiselect) { $f.FileNames } else { $f.FileName }
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