Problems from Source Build and Extension Wizard

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems from Source Build and Extension Wizard

Patrick Noble
Hi, I need to code my own module for Slicer but I am unable to install it from source. In Visual Studio I get about 10 errors and 200 warnings. My guess is that the installation instructions are outdated. Also, I tried to use the Extension Wizard rather than building from source but I get an error (shown in attached image).

Any help would be greatly appreciated.

Thanks,
Patrick



_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: Problems from Source Build and Extension Wizard

miketfh@sjtu.edu.cn
Hi Patrick,

I was able to work around the issue by modifying bin/SlicerExtensionWizard.
Try replacing the following lines:

    # Set up environment
    eval $("F:/3DSlicer/SuperBuild/Slicer-build/Slicer"
--launcher-show-set-environment-commands)

with:

    CYGPATH=/usr/bin/cygpath

    if [[ ! -x $CYGPATH ]]
    then
        echo "ERROR: $CYGPATH not found"
        exit 1
    fi

    # Match PATH line and convert path list to Unix format
    cmds=$("F:/3DSlicer/SuperBuild/Slicer-build/Slicer"
--launcher-show-set-environment-commands)
    regex="^(declare -x \"PATH=)(.+)(\\$\{.*\}\";)"

    while read -r line; do
        if [[ $line =~ $regex ]]; then
            converted_paths=$("$CYGPATH" -u -p -- ${BASH_REMATCH[2]})
            eval "${BASH_REMATCH[1]}${converted_paths}${BASH_REMATCH[3]}"
        else
            eval ${line}
        fi
    done <<< "$cmds"

Sincerely,
Fenghe Tang

----- 原始邮件 -----
发件人: "Patrick Noble" <[hidden email]>
收件人: "SPL Slicer Users" <[hidden email]>
发送时间: 星期二, 2016年 6 月 28日 上午 1:26:23
主题: [slicer-users] Problems from Source Build and Extension Wizard

Hi, I need to code my own module for Slicer but I am unable to install it from source. In Visual Studio I get about 10 errors and 200 warnings. My guess is that the installation instructions are outdated. Also, I tried to use the Extension Wizard rather than building from source but I get an error (shown in attached image).

Any help would be greatly appreciated.

Thanks,
Patrick



_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ
_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ
Reply | Threaded
Open this post in threaded view
|

Re: Problems from Source Build and Extension Wizard

Jean-Christophe Fillion-Robin
Hi Fenghe,

(I will also post this message on the developer list so that we can continue the conversation there)

As you noticed, using Cygwin is not supported.

The recommended way is to use a POSIX compliant shell.
See http://wiki.slicer.org/slicerWiki/index.php/Documentation/Nightly/Developers/ExtensionWizard#Invoking_the_Wizard

If you would like to add support for cygwin, I suggest that you directly improve the launcher so that it detect cygwin and return the expected command when using "--launcher-show-set-environment-commands".

Hth
Jc

On Mon, Jun 27, 2016 at 10:23 PM, [hidden email] <[hidden email]> wrote:
Hi Patrick,

I was able to work around the issue by modifying bin/SlicerExtensionWizard.
Try replacing the following lines:

    # Set up environment
    eval $("F:/3DSlicer/SuperBuild/Slicer-build/Slicer"
--launcher-show-set-environment-commands)

with:

    CYGPATH=/usr/bin/cygpath

    if [[ ! -x $CYGPATH ]]
    then
        echo "ERROR: $CYGPATH not found"
        exit 1
    fi

    # Match PATH line and convert path list to Unix format
    cmds=$("F:/3DSlicer/SuperBuild/Slicer-build/Slicer"
--launcher-show-set-environment-commands)
    regex="^(declare -x \"PATH=)(.+)(\\$\{.*\}\";)"

    while read -r line; do
        if [[ $line =~ $regex ]]; then
            converted_paths=$("$CYGPATH" -u -p -- ${BASH_REMATCH[2]})
            eval "${BASH_REMATCH[1]}${converted_paths}${BASH_REMATCH[3]}"
        else
            eval ${line}
        fi
    done <<< "$cmds"

Sincerely,
Fenghe Tang

----- 原始邮件 -----
发件人: "Patrick Noble" <[hidden email]>
收件人: "SPL Slicer Users" <[hidden email]>
发送时间: 星期二, 2016年 6 月 28日 上午 1:26:23
主题: [slicer-users] Problems from Source Build and Extension Wizard

Hi, I need to code my own module for Slicer but I am unable to install it from source. In Visual Studio I get about 10 errors and 200 warnings. My guess is that the installation instructions are outdated. Also, I tried to use the Extension Wizard rather than building from source but I get an error (shown in attached image).

Any help would be greatly appreciated.

Thanks,
Patrick



_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ
_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ



--
+1 919 869 8849

_______________________________________________
slicer-users mailing list
[hidden email]
http://massmail.spl.harvard.edu/mailman/listinfo/slicer-users
To unsubscribe: send email to [hidden email] with unsubscribe as the subject
http://www.slicer.org/slicerWiki/index.php/Documentation/4.3/FAQ