NO

Author Topic: Add-In SelCompiler  (Read 18681 times)

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Add-In SelCompiler
« on: August 04, 2010, 07:12:19 PM »
Deprecated
Change compiler setting CC AS LINK RC INCLUDE LIB and ASFLAGS CCFLAGS LINKFLAGS RCFLAGS from SelCompiler.ini settings.
You can change like AS from poasm.exe to JWAsm.exe and back.
Every settings block must have Title that comes to button.

SelCompiler-1.2

Usage:

Copy SelCompiler.dll to PellesC AddIns (AddIns64) folder.
Restart PellesC.
From menu Tools -> Customize... select Add-ins tab.
Check Select compiler from list.
Close dialog with button OK.
New button SEL CC should appear to toolbar.

Press button SEL CC from toolbar with tooltip text Select Compiler
To add new entry:
 - press Options ...
 - Fill Title: field for new button / entry name
 - Fill fields and flags you need
 - Press button New

EDIT 20100805: Added setup dialog and some bug fixes.
EDIT 20100806: Added flags and changed format. (SelCompiler_WS-8.zip)
                      Bug fix CCFLAGS
EDIT 20100807: Added button for new option (SelCompiler_WS-9.zip).
                      Now it's possible create options from setup dialog if you have writing rights to AddIns folder.

EDIT 20100809: Cleaned version uses different ini-file format. (SelCompiler.zip)

EDIT 20110901: This version have delete/copy options and use title as section name. (SelCompilerWS-1.3)
EDIT 20110903: Fix for set options.
EDIT 20110910: Browse file and folder buttons. (SelCompiler-1.2.2.zip)
                       New button saves modified fields.

New:
Code: [Select]
[JWAsm]
Title=JWAsm
AS=c:\code\jahpeth\JWAsm.exe
ASF=-coff -Zi

options:
CC CCF AS ASF LINK LINKF RC RCF INCLUDE LIB
« Last Edit: February 25, 2014, 02:56:38 PM by timovjl »
May the source be with you

blzbb

  • Guest
Re: Add-In SelCompiler
« Reply #1 on: August 05, 2010, 11:38:20 PM »
thank you for you useful add-in  :D
it would be greate if you add support of other option like ASFLAGS in the future
becuase for using assembler like jwasm we have to manually add some parameter to ASFLAGS
jwasm use omf object by default that have conflict with pelesC default object i mean coff

BlZbB

blzbb

  • Guest
Re: Add-In SelCompiler
« Reply #2 on: August 07, 2010, 06:49:54 AM »
thank you timovjl

BlZbB

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: Add-In SelCompiler
« Reply #3 on: September 10, 2011, 11:30:47 AM »
SelCompiler-1.2.1

Usage:

Copy SelCompiler.dll to PellesC AddIns (AddIns64) folder.
Restart PellesC.
From menu Tools -> Customize... select Add-ins tab.
Check Select compiler from list.
Close dialog with button OK.
New button SEL CC should appear to toolbar.

Press button SEL CC from toolbar with tooltip text Select Compiler
To add new entry:
 - press Options ...
 - Fill Title: field for new button / entry name
 - Fill fields and flags you need
 - Press button New

EDIT: New button saves modified fields only.
« Last Edit: September 10, 2011, 10:18:41 PM by timovjl »
May the source be with you

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: Add-In SelCompiler
« Reply #4 on: February 07, 2012, 10:07:28 AM »
SelCompiler-1.2.3 for PellesC v 6.50

This version use AddIn_SetProjectShells macro to change ppj-file commandline macro.
For example with bcc32/TurboC++ use:
$(CC) $(CCFLAGS) -o"$@" "$!" instead of $(CC) $(CCFLAGS) "$!" -Fo"$@"
$(LINK) $(LINKFLAGS) $** ,"$@" instead of $(LINK) $(LINKFLAGS) -out:"$@" $**

MS rc.exe need this: $(RC) $(RCFLAGS) -Fo"$@" "$!"


EDIT 20120311: Fix missing additional \0 in parameter for AddIn_SetProjectShells() macro
« Last Edit: March 11, 2012, 10:59:30 AM by timovjl »
May the source be with you

CLR

  • Guest
Re: Add-In SelCompiler
« Reply #5 on: February 09, 2012, 05:24:00 PM »
Very nice. Thanks.

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: Add-In SelCompiler
« Reply #6 on: February 24, 2014, 07:32:49 PM »
Updated:
EDIT: 2014-11-05 Another fix to save, buffer size bigger. SelCompilerWS-1.5_a4.zip

With it these are useful to:
Project options:
http://forum.pellesc.de/index.php?topic=5248.msg20172#msg20172

msvc errorline handler:
http://forum.pellesc.de/index.php?topic=3124.msg11807#msg11807
« Last Edit: November 05, 2014, 01:43:25 PM by TimoVJL »
May the source be with you

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: Add-In SelCompiler
« Reply #7 on: November 05, 2014, 01:42:57 PM »
Updated:
EDIT: 2014-11-07 fix to save, buffer sizes bigger, setup dialog height in sizing.  SelCompilerWS-1.5_a6.zip

EDIT: 2016-11-08 some fixes for dialogs  SelCompilerWS-1.5_a7.zip
« Last Edit: November 08, 2016, 11:06:41 AM by TimoVJL »
May the source be with you

Offline bitcoin

  • Member
  • *
  • Posts: 179
Re: Add-In SelCompiler
« Reply #8 on: August 24, 2019, 03:23:53 PM »
Do you have sample, how to compile code with Masm32/ Uasm?

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: Add-In SelCompiler
« Reply #9 on: August 24, 2019, 04:10:39 PM »
At first create normal asm project and the press SEL CC button.

If you don't have UAsm button, follow this:
https://forum.pellesc.de/index.php?topic=3250.msg14561#msg14561

For example to create entry for UAsm with Option... button.
 Title: UAsm
 AS: browse location of uasm32.exe/uasm64.exe
 ASFLAGS: -coff
save settings
then push UAsm button to change UAsm for asm.

After these, a normal poide Project -> Compile use selected compiler.

In user folder should be then a SelCompiler.ini
Code: [Select]
[UAsm]
Title=UAsm
AS=C:\code\UAsm\uasm64.exe
ASF=-coff
« Last Edit: August 24, 2019, 06:48:49 PM by TimoVJL »
May the source be with you

Offline bitcoin

  • Member
  • *
  • Posts: 179
Re: Add-In SelCompiler
« Reply #10 on: August 24, 2019, 09:21:41 PM »
TimoVJL, i have error..

> D:\masm32\asm\uasm\uasm64.exe -coff "d:\sstst\1.asm" -Fo"d:\sstst\output\1.obj"
UASM v2.47, Nov 17 2018, Masm-compatible assembler.
Portions Copyright (c) 1992-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.


***********
ASCII build
***********

1.asm: 19 lines, 2 passes, 43 ms, 0 warnings, 0 errors
Building 1.tag.
> polink.exe -machine:x86 -subsystem:windows -safeseh kernel32.lib user32.lib gdi32.lib comctl32.lib comdlg32.lib advapi32.lib delayimp.lib -out:"d:\sstst\1.exe" d:\sstst\output\1.obj
POLINK: fatal error: File not found: 'd:\sstst\output\1.obj'.
*** Error code: 1 ***
Done.


But this file are in current dir, nor in output

If i copy 1.obj to output dir, it works.

Offline TimoVJL

  • Global Moderator
  • Member
  • *****
  • Posts: 2115
Re: Add-In SelCompiler
« Reply #11 on: August 25, 2019, 12:17:14 AM »
problem is with option order
Code: [Select]
D:\masm32\asm\uasm\uasm64.exe -coff "d:\sstst\1.asm" -Fo"d:\sstst\output\1.obj" -Fo should be before source file.

EDIT: menu View -> Target files or Project window, press Target Files, select .obj from treeview, select left mouse button context menu Properties, Build commands and fix string at there

in ppj-file need to be
Code: [Select]
$(AS) $(ASFLAGS) -Fo"$@" "$!"SelCompiler.ini
Code: [Select]
[UAsm]
...
APSH=$(AS) $(ASFLAGS) -Fo"$@" "$!"

Pelles C 9
Code: [Select]
Generated by HexEdit
C:\code\PellesC9\Bin\poide.exe

001110f0  00 00 00 00 24 00 28 00 41 00 53 00 29 00 20 00  ....$.(.A.S.). .
00111100  24 00 28 00 41 00 53 00 46 00 4c 00 41 00 47 00  $.(.A.S.F.L.A.G.
00111110  53 00 29 00 20 00 2d 00 46 00 6f 00 22 00 24 00  S.). .-.F.o.".$.
00111120  40 00 22 00 20 00 22 00 24 00 21 00 22 00 00 00  @.". .".$.!."...
« Last Edit: August 26, 2019, 03:43:34 PM by TimoVJL »
May the source be with you

Offline bitcoin

  • Member
  • *
  • Posts: 179
Re: Add-In SelCompiler
« Reply #12 on: August 25, 2019, 12:56:37 PM »
Yes, it works. Thanks.