1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-08 04:58:40 +03:00

r21168: - Step 2: Update swat for the latest qooxdoo version. The build now copies

only those icons which are actually used.  This means that instead of a few
  thousand files getting copied to /usr/local/samba/share/webapps (or
  wherever), the number is less than an order of magnitude fewer.  This should
  make Andrew happier yet.
(This used to be commit 754c4fe01f91ecdbf156c757804118ef301bffe3)
This commit is contained in:
Derrell Lipman 2007-02-06 03:31:23 +00:00 committed by Gerald (Jerry) Carter
parent ef256c9580
commit 0a5d888c24
16 changed files with 117 additions and 257 deletions

View File

@ -1,241 +1,98 @@
###################################################################################
# PUBLIC VARIABLES
###################################################################################
QOOXDOO = ../qooxdoo-0.6.3-sdk
SCRIPTNAME = swat.js
APPCLASS = swat.main.Main
INCLUDEALL = false
OPTIMIZESTRINGS = false
OPTIMIZEVARIABLES = false
SOURCELOADER=
NICE=10
###################################################################################
# PRIVATE VARIABLES
###################################################################################
FRONTEND = $(QOOXDOO)/frontend
FRAMEWORK = $(FRONTEND)/framework
API = $(FRONTEND)/api
CACHE = $(FRAMEWORK)/.cache
GENERATOR = $(FRAMEWORK)/tool/generator.py
ifeq ($(INCLUDEALL),false)
INCLUDE = --include $(APPCLASS)
else
INCLUDE =
endif
ifeq ($(OPTIMIZESTRINGS),true)
OPTIMIZESTR = --optimize-strings
else
OPTIMIZESTR =
endif
ifeq ($(OPTIMIZEVARIABLES),true)
OPTIMIZEVAR = --optimize-variables
else
OPTIMIZEVAR =
endif
ifneq ($(SOURCELOADER),)
SOURCELDR = --source-loader-type $(SOURCELOADER)
else
SOURCELDR =
endif
###################################################################################
# DEFAULT TARGET
###################################################################################
all: build
###################################################################################
# COMMON TARGETS
###################################################################################
source: info-source \
generate-script-source \
generate-api-data
build: info-build \
generate-script-build \
generate-api-data \
copy-build-files \
fix-build-rights
swat-only: \
info-build \
generate-script-build \
copy-build-files \
fix-build-rights
api: generate-api-build generate-api-data
@echo
@echo " CREATE COPY OF HTML FILE"
@echo "----------------------------------------------------------------------------"
@echo " * Copying file..."
@cp -f $(API)/source/index.html api/index.html
pretty: generate-pretty
fix: generate-fix
###################################################################################
# CLEANUP TARGETS
###################################################################################
clean:
@echo
@echo " CLEANUP OF GENERATED FILES"
@echo "----------------------------------------------------------------------------"
@echo " * Deleting files..."
@rm -f source/script/$(SCRIPTNAME) build/script/$(SCRIPTNAME)
realclean: clean
@echo
@echo " CLEANUP OF GENERATED FILES (REAL)"
@echo "----------------------------------------------------------------------------"
@echo " * Deleting files..."
@nice -n $(NICE) rm -rf build
distclean: realclean
@echo
@echo " CLEANUP OF GENERATED FILES (DIST)"
@echo "----------------------------------------------------------------------------"
@echo " * Deleting files..."
@nice -n $(NICE) find . -name "*~" -o -name "*.bak" -o -name "*.old" | xargs rm -rf
@nice -n $(NICE) rm -rf $(CACHE)
###################################################################################
# GENERATOR TARGETS
###################################################################################
generate-script-source:
@$(GENERATOR) \
--script-input $(FRAMEWORK)/source/class \
--source-script-path ../$(FRAMEWORK)/source/class \
--script-input $(API)/source/class \
--source-script-path ../$(API)/source/class \
--script-input source/class \
--source-script-path class \
--generate-source-script $(SOURCELDR) \
$(INCLUDE) \
--source-script-file source/script/$(SCRIPTNAME) \
--define-runtime-setting qx.manager.object.AliasManager.resourceUri:../$(FRAMEWORK)/source/resource \
--cache-directory $(CACHE) \
--add-new-lines
################################################################################
# REQUIRED SETTINGS
################################################################################
#
# djl: --script-input begins a set for which --resource-input and
# --resource-output apply. Since there is a --resource-input and a
# --resource-output defined for one set, it must be defined for each set
# Path to the folder of your qooxdoo distribution.
# Can either be
# a) a path relative to the location of this Makefile (preferred) or
# b) an absolute path starting at the root of your file system
# Example: If you put the skeleton folder next to the qooxdoo SDK folder,
# you can use the following relative path:
# QOOXDOO_PATH = ../qooxdoo-0.6.5-sdk
#
generate-script-build:
@$(GENERATOR) \
--script-input $(FRAMEWORK)/source/class \
--resource-input $(FRAMEWORK)/source/resource \
--resource-output build/resource \
--script-input $(API)/source/class \
--resource-input $(API)/source/resource \
--resource-output build/resource \
--script-input source/class \
--resource-input source/resource \
--resource-output build/resource \
--generate-compiled-script \
$(INCLUDE) $(OPTIMIZESTR) $(OPTIMIZEVAR) \
--compiled-script-file build/script/$(SCRIPTNAME) \
--copy-resources \
--define-runtime-setting qx.manager.object.AliasManager.resourceUri:./resource \
--cache-directory $(CACHE) \
--add-new-lines
QOOXDOO_PATH = ../qooxdoo-0.6.5-sdk
generate-api-build:
@$(GENERATOR) \
--script-input $(FRAMEWORK)/source/class \
--resource-input $(FRAMEWORK)/source/resource \
--resource-output api/resource/qooxdoo \
--script-input $(API)/source/class \
--resource-input $(API)/source/resource \
--resource-output api/resource \
--include api \
$(OPTIMIZESTR) $(OPTIMIZEVAR) \
--generate-compiled-script \
--compiled-script-file api/script/api.js \
--define-runtime-setting qx.manager.object.AliasManager.resourceUri:resource/qooxdoo \
--define-runtime-setting api.Viewer.title:Swat \
--copy-resources \
--cache-directory $(CACHE)
generate-api-data:
@$(GENERATOR) \
--script-input $(FRAMEWORK)/source/class \
--script-input $(API)/source/class \
--script-input source/class \
--generate-api-documentation \
--api-documentation-json-file build/script/data.js \
--cache-directory $(CACHE)
generate-pretty:
@$(GENERATOR) \
--script-input source/class \
--script-input $(FRAMEWORK)/source/class \
--include-without-dependencies api.* \
--pretty-print \
--cache-directory $(CACHE)
generate-fix:
@$(GENERATOR) \
--script-input source/class \
--script-input $(FRAMEWORK)/source/class \
--include-without-dependencies api.* \
--fix-source \
--cache-directory $(CACHE)
###################################################################################
# ADDITIONAL TARGETS
###################################################################################
copy-build-files:
@echo
@echo " CREATE COPY OF HTML FILE"
@echo "----------------------------------------------------------------------------"
@echo " * Copying file..."
@cp -f source/index.html build/index.html
fix-build-rights:
@echo
@echo " FIX RIGHTS ON BUILD FILES"
@echo "----------------------------------------------------------------------------"
@echo " * Fixing file rights..."
@nice -n $(NICE) find build -type d | xargs chmod a+rx
@nice -n $(NICE) find build -type f | xargs chmod a+r
#
# Similar to above, but from the webserver point of view.
# Starting point is now the application HTML file of the source folder
# (source/index.html by default). In most cases just prepend a "../" to
# QOOXDOO_PATH from above.
# Example: QOOXDOO_URI = ../../qooxdoo-0.6.5-sdk
#
QOOXDOO_URI = ../../qooxdoo-0.6.5-sdk
###################################################################################
# INFO TARGETS
###################################################################################
info-build:
@echo "****************************************************************************"
@echo " GENERATING SWAT WEB APPLICATION BUILD"
@echo "****************************************************************************"
################################################################################
# BASIC SETTINGS
################################################################################
info-source:
@echo "****************************************************************************"
@echo " GENERATING SWAT WEB APPLICATION SOURCE"
@echo "****************************************************************************"
#
# Full namespace of your application
#
APPLICATION_NAMESPACE = swat
#
# Titles used in your API viewer and during the build process
#
APPLICATION_MAKE_TITLE = SWAT
APPLICATION_API_TITLE = Swat
#
# Additional static files of your application (space separated list)
#
APPLICATION_FILES = index.html
#
# Locales to build (space separated list)
# To set a specific locale like "en_US" the generic locale "en" has to be added as well
# Example: APPLICATION_LOCALES = en en_US de de_DE es
#
APPLICATION_LOCALES =
################################################################################
# ADVANCED SETTINGS
################################################################################
#
# Please take a look at $(QOOXDOO_PATH)/frontend/framework/tool/make/application.mk
# for an overview of available options
#
include $(QOOXDOO_PATH)/frontend/framework/tool/make/apiviewer.mk
APPLICATION_CLASSNAME = $(APPLICATION_NAMESPACE).main.Main
APPLICATION_LINEBREAKS_BUILD = true
APPLICATION_LINEBREAKS_SOURCE = true
APPLICATION_OPTIMIZE_STRINGS = false
APPLICATION_OPTIMIZE_VARIABLES = false
APPLICATION_ADDITIONAL_CLASS_PATH = \
--class-path $(APIVIEWER_PATH)/source/class
APPLICATION_ADDITIONAL_RESOURCE = \
--resource-input $(APIVIEWER_PATH)/source/resource \
--resource-output $(APPLICATION_BUILD_PATH)/resource/apiviewer \
--define-runtime-setting apiviewer.resourceUri:$(APPLICATION_PAGE_TO_TOPLEVEL)/resource/apiviewer
APPLICATION_RESOURCE_FILTER = true
APPLICATION_COMPLETE_SOURCE = false
################################################################################
# INCLUDE CORE
################################################################################
ifneq ($(QOOXDOO_PATH),PLEASE_DEFINE_QOOXDOO_PATH)
include $(QOOXDOO_PATH)/frontend/framework/tool/make/targets.mk
include $(QOOXDOO_PATH)/frontend/framework/tool/make/application.mk
endif
error:
@echo " * Please configure QOOXDOO_PATH"

View File

@ -151,4 +151,4 @@ qx.Proto.finalize = function(module)
/**
* Singleton Instance Getter
*/
qx.Class.getInstance = qx.util.Return.returnInstance;
qx.Class.getInstance = qx.lang.Function.returnInstance;

View File

@ -472,10 +472,10 @@ qx.Proto.addAwaitRpcResultState = function(module, blockedEvents)
* @param fsm {qx.util.fsm.FiniteStateMachine}
* The finite state machine issuing this remote procedure call.
*
* @param service {string}
* @param service {String}
* The name of the remote service which provides the specified method.
*
* @param method {string}
* @param method {String}
* The name of the method within the specified service.
*
* @param params {Array}

View File

@ -150,4 +150,4 @@ qx.Proto.setInfo = function(info)
/**
* Singleton Instance Getter
*/
qx.Class.getInstance = qx.util.Return.returnInstance;
qx.Class.getInstance = qx.lang.Function.returnInstance;

View File

@ -105,7 +105,7 @@ qx.Class.buildGui = function(moduleList)
for (moduleName in moduleList)
{
// create a radio button menu item
o = new qx.ui.menu.RadioButton(moduleName, null, command);
o = new qx.ui.menu.RadioButton(moduleName, command, false);
// Associate this button menu item with the module list
o.moduleName = moduleName;

View File

@ -36,7 +36,7 @@ new swat.main.Module("LDB Browser",
swat.module.ldbbrowse.LdbBrowse);
//#require(swat.module.documentation.Documentation)
//#require(api.Viewer)
//#require(apiviewer.Viewer)
new swat.main.Module("API Documentation",
swat.module.documentation.Documentation);

View File

@ -26,7 +26,7 @@
* class -
* The class for this module
*
* @param moduleName {string}
* @param moduleName {String}
* The name of the module being registered. This is the name that will
* appear in the Modules menu.
*

View File

@ -7,6 +7,12 @@
* LGPL 2.1: http://creativecommons.org/licenses/LGPL/2.1/
*/
/*
#embed(apiviewer.css/*)
#embed(apiviewer.image/*)
*/
/**
* Swat statistics class
*/
@ -30,21 +36,18 @@ function()
*/
qx.Proto.initialAppear = function(module)
{
qx.manager.object.AliasManager.getInstance().add("api", "./resource/image");
// Define alias for custom resource path
var am = qx.manager.object.AliasManager.getInstance();
am.add("api", qx.Settings.getValueOfClass("apiviewer", "resourceUri"));
// Include CSS file.
// (This is the hard way; I can't get qx.dom.StyleSheet.includeFile to load)
var el = document.createElement("link");
el.type = "text/css";
el.rel = "stylesheet";
el.href = "./resource/css/apiviewer.css";
var head = document.getElementsByTagName("head")[0];
head.appendChild(el);
// Include CSS file
qx.html.StyleSheet.includeFile(am.resolvePath("api/css/apiviewer.css"));
am.add("apiviewer", "./resource/image");
// avoid redundant naming by api viewer
qx.Settings.setCustomOfClass("apiviewer.Viewer", "title", "");
var viewer = new api.Viewer();
var viewer = new apiviewer.Viewer();
module.canvas.add(viewer);
viewer.load("script/data.js");
@ -56,4 +59,4 @@ qx.Proto.initialAppear = function(module)
/**
* Singleton Instance Getter
*/
qx.Class.getInstance = qx.util.Return.returnInstance;
qx.Class.getInstance = qx.lang.Function.returnInstance;

View File

@ -67,4 +67,4 @@ qx.Proto.buildFsm = function(module)
/**
* Singleton Instance Getter
*/
qx.Class.getInstance = qx.util.Return.returnInstance;
qx.Class.getInstance = qx.lang.Function.returnInstance;

View File

@ -453,4 +453,4 @@ qx.Proto.buildFsm = function(module)
/**
* Singleton Instance Getter
*/
qx.Class.getInstance = qx.util.Return.returnInstance;
qx.Class.getInstance = qx.lang.Function.returnInstance;

View File

@ -668,4 +668,4 @@ qx.Proto._clearAllFields = function(module, rpcRequest)
/**
* Singleton Instance Getter
*/
qx.Class.getInstance = qx.util.Return.returnInstance;
qx.Class.getInstance = qx.lang.Function.returnInstance;

View File

@ -49,4 +49,4 @@ qx.Proto.initialAppear = function(module)
/**
* Singleton Instance Getter
*/
qx.Class.getInstance = qx.util.Return.returnInstance;
qx.Class.getInstance = qx.lang.Function.returnInstance;

View File

@ -69,7 +69,7 @@ qx.OO.addProperty({ name : "basedn", type : "string" });
* @param type {String}
* A string containing "new" or "modify"
*
* @param data {object}
* @param data {Object}
* An LDB object with the current object parameters
* Used only if type = "modify"
*
@ -84,7 +84,7 @@ qx.Proto.isActive = function() {
/**
* Set the base of the object to add
*
* @param type {string}
* @param type {String}
* A string containing the base DN
*/

View File

@ -227,4 +227,4 @@ qx.Proto.buildFsm = function(module)
/**
* Singleton Instance Getter
*/
qx.Class.getInstance = qx.util.Return.returnInstance;
qx.Class.getInstance = qx.lang.Function.returnInstance;

View File

@ -466,4 +466,4 @@ qx.Proto.displayData = function(module, result)
/**
* Singleton Instance Getter
*/
qx.Class.getInstance = qx.util.Return.returnInstance;
qx.Class.getInstance = qx.lang.Function.returnInstance;

View File

@ -41,4 +41,4 @@ qx.Proto.initialAppear = function(module)
/**
* Singleton Instance Getter
*/
qx.Class.getInstance = qx.util.Return.returnInstance;
qx.Class.getInstance = qx.lang.Function.returnInstance;