Files
gtav-src/tools_ng/ironlib/util/data_clear_logs.rb
T
2025-09-29 00:52:08 +02:00

71 lines
2.1 KiB
Ruby
Executable File

#
# File:: %RS_TOOLSLIB%/util/data_convert_file.rb
# Description:: Entry-point into our asset build pipeline.
#
# Author:: David Muir <david.muir@rockstarnorth.com>
# Date:: 19 March 2012
#
#-----------------------------------------------------------------------------
# Uses
#-----------------------------------------------------------------------------
require 'RSG.Base.dll'
require 'RSG.Base.Configuration.dll'
require 'RSG.Base.Windows.dll'
include RSG::Base::Configuration
include RSG::Base::Logging
include RSG::Base::Logging::Universal
include RSG::Base::OS
include RSG::Base::Windows
require 'pipeline/os/options'
include Pipeline
#-----------------------------------------------------------------------------
# Constants
#-----------------------------------------------------------------------------
AUTHOR = 'RSGEDI Tools'
EMAIL = 'RSGEDI Tools <*tools@rockstarnorth.com>'
OPTIONS = [
]
#-----------------------------------------------------------------------------
# Functions
#-----------------------------------------------------------------------------
# None
#-----------------------------------------------------------------------------
# Entry-Point
#-----------------------------------------------------------------------------
if ( __FILE__ == $0 ) then
g_Options = OS::Options::new( OPTIONS )
begin
if ( g_Options.is_enabled?( 'help' ) )
puts "#{__FILE__}"
puts "Usage:"
puts g_Options.usage()
exit( 1 )
end
LogFactory.ClearLogDirectory( )
rescue Exception => ex
g_Log.Exception( ex, "Exception during #{__FILE__}." )
puts "Exception during #{__FILE__}: #{ex.message}"
puts ex.backtrace.join("\n")
if ( g_Options.show_popups? ) then
dlg = RSG::Base::Windows::ExceptionStackTraceDlg::new( ex,
g_Config.EmailAddress, AUTHOR, EMAIL )
dlg.ShowDialog( )
end
exit( 1 )
end
end
# %RS_TOOLSLIB%/util/data_clear_logs.rb