From c77da7e6e3022e537d7c83d999325954ef354b48 Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Mon, 14 Nov 2016 20:09:17 +0100 Subject: [PATCH] #99, upstream fixes (runnable + CE proj with user1 & 2) --- src/ce_ceproject.pas | 2 +- src/ce_dmdwrap.pas | 14 +++++++------- src/ce_main.pas | 4 ++-- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/ce_ceproject.pas b/src/ce_ceproject.pas index a86d2f88..0659b1d5 100644 --- a/src/ce_ceproject.pas +++ b/src/ce_ceproject.pas @@ -1035,7 +1035,7 @@ var begin str := TStringList.Create; try - str.Add(CEProjectCompilerFilename.extractFileName); + str.Add(CEProjectCompilerFilename); getOpts(str); result := str.Text; finally diff --git a/src/ce_dmdwrap.pas b/src/ce_dmdwrap.pas index 4e07af3f..b431e294 100644 --- a/src/ce_dmdwrap.pas +++ b/src/ce_dmdwrap.pas @@ -1238,17 +1238,17 @@ var i: integer; str: string; baseopt: TOtherOpts; - lst: TStringList; + lst: TStringList = nil; begin if base.isNil then begin // TODO-cCompilerPaths paths: add other options to CE proj format for the other comps case compiler of dmd: lst := fDmdOthers; - ldc: lst := fLdcOthers; - gdc: lst := fGdcOthers; + ldc, ldmd: lst := fLdcOthers; + gdc, gdmd: lst := fGdcOthers; end; - for i := 0 to lst.Count-1 do + if lst.isNotNil then for i := 0 to lst.Count-1 do begin str := lst[i]; if str.isEmpty or isStringDisabled(str) then @@ -1266,18 +1266,18 @@ begin lst := baseopt.fDmdOthers else lst := fDmdOthers; - ldc: + ldc, ldmd: if fLdcOthers.Count = 0 then lst := baseopt.fLdcOthers else lst := fLdcOthers; - gdc: + gdc, gdmd: if fGdcOthers.Count = 0 then lst := baseopt.fGdcOthers else lst := fGdcOthers; end; - for i := 0 to lst.Count-1 do + if lst.isNotNil then for i := 0 to lst.Count-1 do begin str := lst[i]; if str.isEmpty or isStringDisabled(str) then diff --git a/src/ce_main.pas b/src/ce_main.pas index 5174a9d0..269b50dc 100644 --- a/src/ce_main.pas +++ b/src/ce_main.pas @@ -2650,8 +2650,8 @@ begin dmd: dmdProc.Executable := fCompilerSelector.getCompilerPath(dmd); gdc, gdmd: dmdProc.Executable := fCompilerSelector.getCompilerPath(gdmd); ldc, ldmd: dmdProc.Executable := fCompilerSelector.getCompilerPath(ldmd); - user1: fCompilerSelector.getCompilerPath(user1); - user2: fCompilerSelector.getCompilerPath(user2); + user1: dmdProc.Executable := fCompilerSelector.getCompilerPath(user1); + user2: dmdProc.Executable := fCompilerSelector.getCompilerPath(user2); end; dmdproc.Parameters.Add(fDoc.fileName); if not asObj then