VaKeR CYBER ARMY
Logo of a company Server : Apache/2.4.41 (Ubuntu)
System : Linux absol.cf 5.4.0-198-generic #218-Ubuntu SMP Fri Sep 27 20:18:53 UTC 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.33
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Directory :  /usr/share/boost-build/src/contrib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/boost-build/src/contrib/wxFormBuilder.jam
################################################################################
#
# Copyright (c) 2007-2008 Dario Senic, Jurko Gospodnetic.
#
# Use, modification and distribution is subject to the Boost Software
# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
# http://www.boost.org/LICENSE_1_0.txt)
#
################################################################################

################################################################################
#
#   Boost Build wxFormBuilder generator tool module.
#
#   wxFormBuilder is a GUI designer tool for the wxWidgets library. It can then
# generate C++ sources modeling the designed GUI using the wxWidgets library
# APIs.
#
#   This module defines a wxFormBuilder project file type and rules needed to
# generate C++ source files from those projects. With it you can simply list
# wxFormBuilder projects as sources for some target and Boost Build will
# automatically convert them to C++ sources and process from there.
#
#   The wxFormBuilder executable location may be provided as a parameter when
# configuring this toolset. Otherwise the default wxFormBuilder.exe executable
# name is used located in the folder pointed to by the WXFORMBUILDER environment
# variable.
#
#   Current limitations:
#
#   * Works only on Windows.
#   * Works only when run via Boost Jam using the native Windows cmd.exe command
#     interpreter, i.e. the default native Windows Boost Jam build.
#   * Used wxFormBuilder projects need to have their output file names defined
#     consistently with target names assumed by this build script. This means
#     that their target names must use the prefix 'wxFormBuilderGenerated_' and
#     have no output folder defined where the base name is equal to the .fpb
#     project file's name.
#
################################################################################

################################################################################
#
# Implementation note:
#
#   Avoiding the limitation on the generated target file names can be done but
# would require depending on external tools to copy the wxFormBuilder project to
# a temp location and then modify it in-place to set its target file names. On
# the other hand wxFormBuilder is expected to add command-line options for
# choosing the target file names from the command line which will allow us to
# remove this limitation in a much cleaner way.
#                                                    (23.08.2008.) (Jurko)
#
################################################################################

import generators ;
import os         ;
import path       ;
import toolset    ;
import type       ;


################################################################################
#
# wxFormBuilder.generate()
# ------------------------
#
#   Action for processing WX_FORM_BUILDER_PROJECT types.
#
################################################################################
#
# Implementation notes:
#
#   wxFormBuilder generated CPP and H files need to be moved to the location
# where the Boost Build target system expects them so that the generated CPP
# file can be included into the compile process and that the clean rule
# successfully deletes both CPP and H files. We expect wxFormBuilder to generate
# files in the same location where the provided WX_FORM_BUILDER_PROJECT file is
# located.
#                                                    (15.05.2007.) (Dario)
#
################################################################################

actions generate
{
    start "" /wait "$(EXECUTABLE)" /g "$(2)"
    move "$(1[1]:BSR=$(2:P))" "$(1[1]:P)"
    move "$(1[2]:BSR=$(2:P))" "$(1[2]:P)"
}


################################################################################
#
# wxFormBuilder.init()
# --------------------
#
#   Main toolset initialization rule called via the toolset.using rule.
#
################################################################################

rule init ( executable ? )
{
    if $(.initialized)
    {
        if $(.debug-configuration)
        {
            ECHO notice: [wxFormBuilder-cfg] Repeated initialization request
                (executable \"$(executable:E="")\") detected and ignored. ;
        }
    }
    else
    {
        local environmentVariable = WXFORMBUILDER ;

        if $(.debug-configuration)
        {
            ECHO notice: [wxFormBuilder-cfg] Configuring wxFormBuilder... ;
        }

        # Deduce the path to the used wxFormBuilder executable.
        if ! $(executable)
        {
            executable = "wxFormBuilder.exe" ;
            local executable-path = [ os.environ $(environmentVariable) ] ;
            if $(executable-path)-is-not-empty
            {
                executable = [ path.root $(executable) $(executable-path) ] ;
            }
            else if $(.debug-configuration)
            {
                ECHO notice: [wxFormBuilder-cfg] No wxFormBuilder path
                    configured either explicitly or using the
                    $(environmentVariable) environment variable. ;
                ECHO notice: [wxFormBuilder-cfg] To avoid complications please
                    update your configuration to includes a correct path to the
                    wxFormBuilder executable. ;
                ECHO notice: [wxFormBuilder-cfg] wxFormBuilder executable will
                    be searched for on the system path. ;
            }
        }
        if $(.debug-configuration)
        {
            ECHO notice: [wxFormBuilder-cfg] Will use wxFormBuilder executable
                \"$(executable)\". ;
        }

        # Now we are sure we have everything we need to initialize this toolset.
        .initialized = true ;

        # Store the path to the used wxFormBuilder executable.
        .executable = $(executable) ;

        # Type registration.
        type.register WX_FORM_BUILDER_PROJECT : fbp ;

        # Parameters to be forwarded to the action rule.
        toolset.flags wxFormBuilder.generate EXECUTABLE : $(.executable) ;

        # Generator definition and registration.
        generators.register-standard wxFormBuilder.generate :
            WX_FORM_BUILDER_PROJECT : CPP(wxFormBuilderGenerated_%)
            H(wxFormBuilderGenerated_%) ;
    }
}


################################################################################
#
# wxFormBuilder.is-initialized()
# ------------------------------
#
#   Returns whether this toolset has been initialized.
#
################################################################################

rule is-initialized ( )
{
    return $(.initialized) ;
}


################################################################################
#
#   Startup code executed when loading this module.
#
################################################################################

# Global variables for this module.
.executable = ;
.initialized = ;

if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
{
    .debug-configuration = true ;
}

VaKeR 2022