<commit_before>/**
* launch deskshell and open console.
*/


!define PRODUCT_NAME "deskshell"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"

!include "..\common\config.nsi"
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"


;!include "..\common\LogicLib.nsh"
!include "SupportFunctions.nsi"

RequestExecutionLevel user
Name "${PRODUCT_NAME}"
OutFile "..\..\..\deskshell_debug.exe"
Icon "deskshell.ico"
ShowInstDetails hide

Function .onInit
    SetSilent silent
 FunctionEnd

Section "MainSection" SEC01
    Var /GLOBAL MyPath

    ;HideWindow
    Push "$EXEPATH"
    Call GetParent
    Pop $MyPath
    
     Call GetParameters
     Pop $2

     ${If} $2 == ''
         ;Exec '"$MYPATH\bin\win\node.exe" "$MYPATH\sys-apps\env.js" "$MYPATH/sys-apps/default/default.desk"'
         Exec '"$MYPATH\bin\win\node.exe" "$MYPATH\bin\win\deskshell.js"'
        ;MessageBox MB_OK '$MYPATH\bin\win\node.exe "$MYPATH/sys-apps/default/default.desk"'
     ${Else}
         Exec '$MYPATH\bin\win\node.exe "$MYPATH\bin\win\deskshell.js" $2'
         ;MessageBox MB_OK '$MYPATH\bin\win\node.exe $2'
    ${EndIf}
    
SectionEnd

Section -AdditionalIcons
SectionEnd

Section -Post
SectionEnd


Function GetParameters

  Push $R0
  Push $R1
  Push $R2
  Push $R3

  StrCpy $R2 1
  StrLen $R3 $CMDLINE<commit_msg>Found a way to hide the nodejs debug console from NSIS, this removes the need to have a c based launcher.<commit_after>/**
* launch deskshell and open console.
*/


!define PRODUCT_NAME "deskshell"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"

!include "..\common\config.nsi"
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"

;!include "..\common\LogicLib.nsh"
!include "SupportFunctions.nsi"

RequestExecutionLevel user
Name "${PRODUCT_NAME}"
OutFile "..\..\..\deskshell2.exe"
Icon "deskshell.ico"
ShowInstDetails hide

Function .onInit
    SetSilent silent
 FunctionEnd

Section "MainSection" SEC01
    Var /GLOBAL MyPath

    ;HideWindow
    Push "$EXEPATH"
    Call GetParent
    Pop $MyPath
    
     Call GetParameters
     Pop $2

     nsExec::Exec '"$MYPATH\bin\win\node.exe" "$MYPATH\bin\win\deskshell.js"'
SectionEnd

Section -AdditionalIcons
SectionEnd

Section -Post
SectionEnd


Function GetParameters

  Push $R0
  Push $R1
  Push $R2
  Push $R3

  StrCpy $R2 1
  StrLen $R3 $CMDLINE
{'fraction_non_alphanumeric': 0.1187392055267703, 'fraction_numerical': 0.010362694300518135, 'mean_word_length': 3.464354527938343, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2131185', 'n_tokens_mistral': 887, 'n_tokens_neox': 837, 'n_words': 201}