mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Merge pull request #2222 from MineBill/linux-package-manager
Make the package manager work on Linux.
This commit is contained in:
commit
262d3179b1
3 changed files with 29 additions and 3 deletions
|
@ -1822,7 +1822,27 @@ BFP_EXPORT void BFP_CALLTYPE BfpDirectory_Create(const char* path, BfpFileResult
|
||||||
|
|
||||||
BFP_EXPORT void BFP_CALLTYPE BfpDirectory_Rename(const char* oldName, const char* newName, BfpFileResult* outResult)
|
BFP_EXPORT void BFP_CALLTYPE BfpDirectory_Rename(const char* oldName, const char* newName, BfpFileResult* outResult)
|
||||||
{
|
{
|
||||||
NOT_IMPL;
|
if (rename(oldName, newName) != 0)
|
||||||
|
{
|
||||||
|
switch (errno)
|
||||||
|
{
|
||||||
|
case EEXIST:
|
||||||
|
OUTRESULT(BfpFileResult_AlreadyExists);
|
||||||
|
break;
|
||||||
|
case ENOTEMPTY:
|
||||||
|
OUTRESULT(BfpFileResult_NotEmpty);
|
||||||
|
break;
|
||||||
|
case EISDIR:
|
||||||
|
case ENOTDIR:
|
||||||
|
OUTRESULT(BfpFileResult_InvalidParameter);
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
OUTRESULT(BfpFileResult_UnknownError);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
OUTRESULT(BfpFileResult_Ok);
|
||||||
}
|
}
|
||||||
|
|
||||||
BFP_EXPORT void BFP_CALLTYPE BfpDirectory_Delete(const char* path, BfpFileResult* outResult)
|
BFP_EXPORT void BFP_CALLTYPE BfpDirectory_Delete(const char* path, BfpFileResult* outResult)
|
||||||
|
|
|
@ -95,6 +95,8 @@ class GitManager
|
||||||
if (!File.Exists(gitPath))
|
if (!File.Exists(gitPath))
|
||||||
gitPath.Clear();
|
gitPath.Clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
psi.UseShellExecute = false;
|
||||||
#endif
|
#endif
|
||||||
if (gitPath.IsEmpty)
|
if (gitPath.IsEmpty)
|
||||||
gitPath.Set("git");
|
gitPath.Set("git");
|
||||||
|
@ -103,7 +105,6 @@ class GitManager
|
||||||
psi.SetArguments(mArgs);
|
psi.SetArguments(mArgs);
|
||||||
if (mPath != null)
|
if (mPath != null)
|
||||||
psi.SetWorkingDirectory(mPath);
|
psi.SetWorkingDirectory(mPath);
|
||||||
psi.UseShellExecute = false;
|
|
||||||
psi.RedirectStandardError = true;
|
psi.RedirectStandardError = true;
|
||||||
psi.RedirectStandardOutput = true;
|
psi.RedirectStandardOutput = true;
|
||||||
psi.CreateNoWindow = true;
|
psi.CreateNoWindow = true;
|
||||||
|
|
|
@ -179,7 +179,12 @@ namespace IDE.util
|
||||||
if (!CheckInit())
|
if (!CheckInit())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
String beefBuildPath = scope $"{gApp.mInstallDir}BeefBuild.exe";
|
#if BF_PLATFORM_WINDOWS
|
||||||
|
let ext = ".exe";
|
||||||
|
#else
|
||||||
|
let ext = "";
|
||||||
|
#endif
|
||||||
|
String beefBuildPath = scope $"{gApp.mInstallDir}BeefBuild{ext}";
|
||||||
String args = scope $"-run";
|
String args = scope $"-run";
|
||||||
var execInst = gApp.DoRun(beefBuildPath, args, path, .None);
|
var execInst = gApp.DoRun(beefBuildPath, args, path, .None);
|
||||||
execInst?.mAutoDelete = false;
|
execInst?.mAutoDelete = false;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue