Raised This Month: $ Target: $400
 0% 

ccompile


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
_KaszpiR_
AMX Mod X Beta Tester
Join Date: Feb 2004
Location: Warsaw, Poland
Old 03-10-2006 , 04:02   ccompile
Reply With Quote #1

WARNING: THIS IS LINUX ONLY
and there will ne NO windows version at all

Overview
CCompiler - AMX Mod X only -
Colorful .sma compiler output with extended error file details to logs
with option to recompile bad plugins
version 0.2 (changelog at the end of file)
by _KaszpiR_
Newest version is always at ccompile (uncompressed bash script, so during install you can skip the 'tar zxf' part)





Description
Bash script based on the 'compile' but displays coloured information to console and produces separate warning/error (if any) for each compiled plugin separately.


Logs are stored in different directories depending on if the plugin was compiled properly, contained warnings, contained errors
  • logs_fail - contain logs about plugins that failed to compile
    logs_warn - contain logs about plugins that were compiled but had warnings (like loose identation ;) )
    logs_ok - contain logs about plugins that were compiled properly, just for you information about how much data it use, so you coudl optimize it

Option to compile only plugins that were having warnings and errors from the prevous script execution.







Requirements
Requires:
- bash
- coreutils

Usually most linux / BSD distros allready have it, so propbaby you do not ahve to install anthing extra, unless you are using very customized distro

Tested on Fedora Core 3


Insatllation
Download the attachment on the forum at the bottom of this post.
After downloading the file to the addons/amxmodx/scripting/ go to the that directory and unpack file with command
Code:
tar zxf ccompile.tar.gz
Change permissions to enable execute on file (via shell)

Code:
chmod +x ccompile
Usage
Now run:
ccompile
and enjoy.

If you want to run compilation of all plugins (especially if you downloaded new .sma files) run:
ccompile all

Noitce, sometimes you run command with ./ccompile (depends on host configuration)

Extra
Configuration - for advanced users:
Edit the ccompile with favourice editor, the description of vars is inside

Any Feedback Appreciated
ChangeLog && ToDo
Code:
###################################################################
# Todo
# - compiling new plugins without nneding to run all
# - saving cache partially (if someon breaks execution of script)
#   but it will require checking for logs files
# - display output logs with warnings/errors after compilation
###################################################################
# Changelog
# 0.2
# - AMX Mod X 1.70 compatible (any other unsupported) (ugh amxxpc is not so nice as i expectd)
# - Dropped support for AMX Mod (cause i moved to AMX Mod X, when AMX Mod 
#   become rather dead after djeyl.net host hack)
# - added cache file for option to compile only plugins with errors or warnings
#   i wanted to implement a bunch of code to check if the logs in directories exist but i decided
#   that cache file will be easier :)
Attached Files
File Type: gz ccompile.tar.gz (2.2 KB, 163 views)
__________________
= Ave Cesar, morituri Te salutant. = http://nvt.prv.pl = http://hlds.pl/
_KaszpiR_ is offline
JKB
Member
Join Date: Jan 2006
Old 03-10-2006 , 10:22  
Reply With Quote #2

Nice but... why is this in the suggestions/requests forum?
__________________
Quote:
Chuck Norris doesn't sleep. He waits.
JKB is offline
filou
Junior Member
Join Date: Feb 2005
Location: France
Old 03-10-2006 , 16:02  
Reply With Quote #3

Nice but when I compile my plugin I like to view all error in live to correct them
filou is offline
_KaszpiR_
AMX Mod X Beta Tester
Join Date: Feb 2004
Location: Warsaw, Poland
Old 03-11-2006 , 05:39  
Reply With Quote #4

Quote:
Originally Posted by JKB
Nice but... why is this in the suggestions/requests forum?
cause there is on other better place for it
- it is not a plugin
- it's not offtopic
- it's not module
-

Quote:
Originally Posted by filou
Nice but when I compile my plugin I like to view all error in live to correct them
it does not display things live (yet)
i created the plugin cause i prefer the log file - i always when edit plugin got also opened log file with errors, which is autoupdated by editor on file change. Actually the original idea of compile rthat displays error and deletes the error log after compilation, is for unacceptable - i often remove the rm -f oart about deleting error .txt file if i cannot use my script ;D

if you got plugn.sma then if it is compiled properly you will get
compiled/plugin.amxx
logs_ok/plugin.log

if it has warnings you will get:
compiled/plugin.amxx
login_warn/plugin.log

if it has errors you only get one file
logs_fail/plugin.log


if you want i can add option to display logs with warnings and errors in the console.
__________________
= Ave Cesar, morituri Te salutant. = http://nvt.prv.pl = http://hlds.pl/
_KaszpiR_ is offline
filou
Junior Member
Join Date: Feb 2005
Location: France
Old 03-12-2006 , 09:29  
Reply With Quote #5

Quote:
Originally Posted by _KaszpiR_
if you want i can add option to display logs with warnings and errors in the console.
Yes , if u can do that, thanks.

filou is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 06:05.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode