aodn / imos-toolbox

Graphical tool for QC'ing and NetCDF'ing oceanographic datasets
GNU General Public License v3.0
46 stars 31 forks source link

build.py on Microsoft Windows #604

Closed sspagnol closed 4 years ago

sspagnol commented 5 years ago

Have a query about the build.py script and how is it supposed to work on a Windows machine. What is the shell used for the build?

I ask because if use a standard Windows CMD console then

  1. In create_java_call_sig_compile the line return f"cd {java_path};ant install;cd {root_path}" Doesn't work. Should be for windows return f"cd {java_path} && ant install && cd {root_path}"
  2. create_mcc_call_sig creates a 21976 characters long string which is too long for CMD console. Googling around says maximumn length is 8192.
ocehugo commented 5 years ago

@sspagnol ,

short answer: just use the old BuildBinaries.bat/py in windows - the old way still works.

long answer:

Yes, I'm aware of both problems. The new build.py still required a bit more work on windows - I didn't include an item in the release page because of that.

The first problem is simple - I just need to rewrite in a portable way.

The second problem is more problematic. Until the date of the release, I couldn't find a way to compile the toolbox binary in windows without calling the mcc within matlab. The problematic line is the eval(['mcc cflags']), which bypass the char limit since it's executing within matlab).

because of that, I just used Util/imosCompile.m through buildBinaries.bat for the windows release. This is why these files were not removed yet.