Skip to content

Commit

Permalink
re-pin to latest native host implementation, changed managed code sig…
Browse files Browse the repository at this point in the history
…nature
  • Loading branch information
mspeterhon committed Jul 29, 2015
1 parent 68af229 commit c080f35
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion scripts/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ run-host: $(RUN_TARGETS) dotnetlibs/host_cmdline internal-prepare-exec_env
# check if corerun is the right one (could be the debug version)
if ! diff dotnetlibs/corerun $(MONAD_EXT)/coreclr/Release/corerun; then cp -r $(MONAD_EXT)/coreclr/Release/* dotnetlibs; fi
# execute a cmdlet, this will auto-load the utility module and print a, b and c in 3 lines
cd exec_env/app_base && PSMODULEPATH=$(shell pwd)/exec_env/app_base/Modules LD_LIBRARY_PATH=. ./host_cmdline powershell-simple.exe '"a","b","c","a","a" | Select-Object -Unique'
#cd exec_env/app_base && PSMODULEPATH=$(shell pwd)/exec_env/app_base/Modules LD_LIBRARY_PATH=. ./host_cmdline
#cd exec_env/app_base && PSMODULEPATH=$(shell pwd)/exec_env/app_base/Modules LD_LIBRARY_PATH=. ./host_cmdline powershell-simple.exe '"a","b","c","a","a" | Select-Object -Unique'
cd exec_env/app_base && PSMODULEPATH=$(shell pwd)/exec_env/app_base/Modules LD_LIBRARY_PATH=. ./host_cmdline -b /tmp "powershell-simple, version=1.0.0.0, culture=neutral, PublicKeyToken=null" "ps_hello_world.Program" "UnmanagedMain" '"a","b","c","a","a" | Select-Object -Unique'

run-interactive: $(POWERSHELL_RUN_TARGETS) dotnetlibs/corerun dotnetlibs/Microsoft.PowerShell.Commands.Management.dll dotnetlibs/Microsoft.PowerShell.Commands.Utility.dll dotnetlibs/Microsoft.PowerShell.Security.dll dotnetlibs/api-ms-win-core-registry-l1-1-0.dll internal-prepare-exec_env
# check if corerun is the right one (could be the debug version)
Expand Down
2 changes: 1 addition & 1 deletion src/monad-native
Submodule monad-native updated from f7396c to 0a3165
4 changes: 3 additions & 1 deletion src/powershell-run/powershell-simple.cs
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ static void test2(string[] args)
}
}

public static void UnmanagedMain(int argc, [MarshalAs(UnmanagedType.LPArray,ArraySubType=UnmanagedType.LPStr,SizeParamIndex=0)] String[] argv)
public static int UnmanagedMain(int argc, [MarshalAs(UnmanagedType.LPArray,ArraySubType=UnmanagedType.LPStr,SizeParamIndex=0)] String[] argv)
{
init();
List<String> allArgs = new List<String>();
Expand All @@ -535,6 +535,8 @@ public static void UnmanagedMain(int argc, [MarshalAs(UnmanagedType.LPArray,Arra
}

test2(allArgs.ToArray());

return 0;
}

static void Main(string[] args)
Expand Down

0 comments on commit c080f35

Please sign in to comment.