Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Publish tools as single-file
  • Loading branch information
am11 committed Nov 24, 2022
commit 95056b2ab08f977e7ed6e9f0ed836bcc98542cc7
2 changes: 1 addition & 1 deletion build.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ set projects=jit-diff jit-dasm jit-analyze jit-format pmi jit-dasm-pmi jit-decis
REM Build each project
for %%p in (%projects%) do (
if %publish%==true (
dotnet publish -c %buildType% -o %appInstallDir% .\src\%%p
dotnet publish -c %buildType% -o %appInstallDir% .\src\%%p -p:PublishSingleFile=true
if errorlevel 1 echo ERROR: dotnet publish failed for .\src\%%p.&set __ExitCode=1
) else (
dotnet build -c %buildType% .\src\%%p
Expand Down
2 changes: 1 addition & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ declare -a projects=(jit-dasm jit-diff jit-analyze jit-format pmi jit-dasm-pmi j
for proj in "${projects[@]}"
do
if [ "$publish" == true ]; then
dotnet publish -c $buildType -o $appInstallDir ./src/$proj
dotnet publish -c $buildType -o $appInstallDir ./src/$proj -p:PublishSingleFile=true
exit_code=$?
if [ $exit_code != 0 ]; then
echo "${__ErrMsgPrefix}dotnet publish of ./src/${proj} failed."
Expand Down
3 changes: 1 addition & 2 deletions src/jit-dasm-pmi/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,7 @@ void GenerateAsmInternal(List<AssemblyInfo> assemblyInfoList, ref int errorCount
continue;
}

Assembly thisAssembly = typeof(Program).Assembly;
string binDir = Path.GetDirectoryName(thisAssembly.Location);
string binDir = Path.GetDirectoryName(System.AppContext.BaseDirectory);
string command = "DRIVEALL-QUIET";
if (Get(_command.Cctors))
{
Expand Down
2 changes: 1 addition & 1 deletion src/pmi/pmi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public CustomLoadContext(string assemblyPath)
// Add in current assembly path and framework path
pmiPath += Path.GetDirectoryName(assemblyPath);
pmiPath += ";";
pmiPath += Path.GetDirectoryName(typeof(object).Assembly.Location);
pmiPath += Path.GetDirectoryName(System.AppContext.BaseDirectory);

PmiPath = pmiPath;
}
Expand Down