A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/SharpKit/SharpKit/commit/76ef37860d50546f196950524e02daa9fce47491 below:

When the installer was compil… · SharpKit/SharpKit@76ef378 · GitHub

@@ -50,6 +50,7 @@ class Installer

50 50

public string TemplateDirectoryVS2012 { get; set; }

51 51

public string TemplateDirectoryVS2013 { get; set; }

52 52

public string MonoDevelopPluginPath { get; set; }

53 +

public string MonoDevelopSharpKitPluginPath { get; set; }

53 54 54 55

private string WindowsFolder = Utils.GetFolderPath(Environment.SpecialFolder.Windows);

55 56

private Dictionary<string, string> ConfigHash;

@@ -66,7 +67,8 @@ public Installer()

66 67

MSBuildFolder35 = "/usr/lib/mono/3.5";

67 68

MSBuildFolder40 = "/usr/lib/mono/4.0";

68 69

MSBuildFolder45 = "/usr/lib/mono/4.5";

69 -

MonoDevelopPluginPath = "/usr/lib/monodevelop/AddIns/MonoDevelop.SharpKit";

70 +

MonoDevelopPluginPath = "/usr/lib/monodevelop/AddIns";

71 +

MonoDevelopSharpKitPluginPath = Path.Combine(MonoDevelopPluginPath,"MonoDevelop.SharpKit");

70 72

}

71 73

else

72 74

{

@@ -224,7 +226,7 @@ public void Install()

224 226 225 227

if (Utils.IsUnix)

226 228

{

227 -

zip.ExtractDirectory(@"Files/MonoDevelopPlugin", MonoDevelopPluginPath, Log);

229 +

//zip.ExtractDirectory(@"Files/MonoDevelopPlugin", MonoDevelopPluginPath, Log);

228 230

////zip.ExtractDirectory(@"Files/NET_Unix", SharpKitNETFolder35, Log);

229 231

//TODO: zip.ExtractDirectory(@"Files/NET_Unix", SharpKitNETFolder40, Log);

230 232

}

@@ -234,9 +236,15 @@ public void Install()

234 236

CreateNETSymbolicLink(MSBuildFolder40, MSBuildSharpKitFolder40, ApplicationCompilerFolder);

235 237

CreateNETSymbolicLink(MSBuildFolder45, MSBuildSharpKitFolder45, ApplicationCompilerFolder);

236 238 237 -

CreateNETSymbolicLink(Path.Combine(TemplateDirectoryVS2010, ".."), TemplateDirectoryVS2010, Path.Combine(ApplicationFolder, "Templates"));

238 -

CreateNETSymbolicLink(Path.Combine(TemplateDirectoryVS2012, ".."), TemplateDirectoryVS2012, Path.Combine(ApplicationFolder, "Templates"));

239 -

CreateNETSymbolicLink(Path.Combine(TemplateDirectoryVS2013, ".."), TemplateDirectoryVS2013, Path.Combine(ApplicationFolder, "Templates"));

239 +

if(!Utils.IsUnix){

240 +

CreateNETSymbolicLink(Utils.GetParentDir(TemplateDirectoryVS2010), TemplateDirectoryVS2010, Path.Combine(ApplicationFolder, "Templates"));

241 +

CreateNETSymbolicLink(Utils.GetParentDir(TemplateDirectoryVS2012), TemplateDirectoryVS2012, Path.Combine(ApplicationFolder, "Templates"));

242 +

CreateNETSymbolicLink(Utils.GetParentDir(TemplateDirectoryVS2013), TemplateDirectoryVS2013, Path.Combine(ApplicationFolder, "Templates"));

243 +

}

244 + 245 +

if(Utils.IsUnix){

246 +

CreateNETSymbolicLink(MonoDevelopPluginPath, MonoDevelopSharpKitPluginPath, Path.Combine(ApplicationFolder,"Integration","MonoDevelop"));

247 +

}

240 248 241 249

File.Copy(Utils.CurrentProcessFile, ApplicationFolder + dsc + "SharpKitSetup.exe", true);

242 250

@@ -248,12 +256,17 @@ public void Install()

248 256

//CreateBashScript("skc-activation", ApplicationFolder + "/SharpKitActivation.exe");

249 257 250 258

Log("Set unix read permission");

251 -

Utils.GiveUnixDirectoryReadPermission(ApplicationFolder);

252 -

Utils.GiveUnixDirectoryReadPermission(MonoDevelopPluginPath);

259 +

//Utils.GiveUnixDirectoryReadPermission(ApplicationFolder);

260 +

//Utils.GiveUnixDirectoryReadPermission(MonoDevelopSharpKitPluginPath);

261 +

Process.Start("chmod", "-R ugo+rX " + Utils.GetParentDir(ApplicationFolder)).WaitForExit();

262 + 263 +

Process.Start("chmod", "-R ugo+rX " + Utils.GetParentDir(Utils.GetParentDir(MSBuildSharpKitFolder35))).WaitForExit();

264 +

Process.Start("chmod", "-R ugo+rX " + Utils.GetParentDir(Utils.GetParentDir(MSBuildSharpKitFolder40))).WaitForExit();

265 +

Process.Start("chmod", "-R ugo+rX " + Utils.GetParentDir(Utils.GetParentDir(MSBuildSharpKitFolder45))).WaitForExit();

253 266 254 267

Log("Set unix execution permission");

255 -

Process.Start("chmod", "+x " + ApplicationCompilerFolder + "/skc5.exe").WaitForExit();

256 -

Process.Start("chmod", "+x " + ApplicationFolder + "/SharpKitSetup.exe").WaitForExit();

268 +

Process.Start("chmod", "ugo+x " + ApplicationCompilerFolder + "/skc5.exe").WaitForExit();

269 +

Process.Start("chmod", "ugo+x " + ApplicationFolder + "/SharpKitSetup.exe").WaitForExit();

257 270

//Process.Start("chmod", "+x " + ApplicationFolder + "/SharpKitActivation.exe").WaitForExit();

258 271

}

259 272

@@ -279,9 +292,11 @@ public void Install()

279 292

}

280 293

else

281 294

{

295 +

#if WINNT

282 296

//CreateShortcutWin("Activate SharpKit", ApplicationFolder + @"\SharpKitActivation.exe", "", "Activate SharpKit");

283 297

CreateShortcutWin("Check for a New Version", ApplicationCompilerFolder + @"\skc5.exe", "/CheckForNewVersion", "Check for Updates");

284 298

CreateShortcutWin("Modify installation", ApplicationFolder + @"\SharpKitSetup.exe", "", "Modify installation");

299 +

#endif

285 300

}

286 301 287 302

if (!Utils.IsUnix)

@@ -306,22 +321,38 @@ void CreateNETSymbolicLink(string checkDir, string symbol, string target)

306 321

{

307 322

if (Directory.Exists(checkDir))

308 323

{

309 -

if (!Directory.Exists(Path.Combine(symbol, "..")))

310 -

Directory.CreateDirectory(Path.Combine(symbol, ".."));

324 +

if (!Directory.Exists(Utils.GetParentDir(symbol)))

325 +

Directory.CreateDirectory(Utils.GetParentDir(symbol));

311 326 312 327

if (Directory.Exists(symbol))

313 328

{

314 329

Log("Removing old symbolic link: " + symbol);

315 330

Utils.UIDeleteDirectory(symbol, false); //target is maybe not correct, so remove it

316 331

}

317 -

Log("Creating symbolic link: " + symbol);

332 +

CreateLink(symbol, target);

333 +

}

334 +

}

335 + 336 +

void CreateLink(string symbol, string target){

337 +

Log("Creating symbolic link: " + symbol);

338 +

if (Utils.IsUnix)

339 +

{

340 +

RunProcess("ln", "-s " + target + " " + symbol);

341 +

}

342 +

else

343 +

{

318 344

if (!CreateSymbolicLink(symbol, target, 1))

319 345

{

320 346

Log("Error during creating symbolic link: " + GetLastError().ToString());

321 347

}

322 348

}

323 349

}

324 350 351 +

void RunProcess(string app, string args){

352 +

Log(String.Format("Running: {0}, Args: {1}",app, args));

353 +

Process.Start(app, args).WaitForExit();

354 +

}

355 + 325 356

[DllImport("kernel32.dll")]

326 357

static extern bool CreateSymbolicLink(string lpSymlinkFileName, string lpTargetFileName, int dwFlags);

327 358

@@ -371,7 +402,7 @@ public void Uninstall()

371 402

}

372 403

else

373 404

{

374 -

Utils.UIDeleteDirectory(MonoDevelopPluginPath);

405 +

Utils.UIDeleteDirectory(MonoDevelopSharpKitPluginPath);

375 406

}

376 407 377 408

if (Utils.IsUnix)

@@ -477,6 +508,7 @@ private TZipArchive GetZipArchive()

477 508

return new TZipArchive(ms);

478 509

}

479 510 511 +

#if WINNT

480 512

private void CreateShortcutWin(string name, string destFile, string arguments = "", string description = "")

481 513

{

482 514

var lnkFile = StartMenuDir + dsc + name + ".lnk";

@@ -492,6 +524,7 @@ private void CreateShortcutWin(string name, string destFile, string arguments =

492 524

shortcut.WorkingDirectory = Path.GetDirectoryName(destFile); ;

493 525

shortcut.Save();

494 526

}

527 +

#endif

495 528 496 529

private void CreateShortcutUnix(string fileName, string name, string destFile, string arguments = "", string description = "")

497 530

{


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4