mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 16:39:29 -05:00
webui: redefined building webui
on linux: 'make' don't build libresapi every time anymore, it now knows when, what and how to 'build' webui on windows: builds old style
This commit is contained in:
parent
baf940443d
commit
0a6ae559fd
@ -15,19 +15,75 @@ INCLUDEPATH += ../../libretroshare/src
|
|||||||
unix {
|
unix {
|
||||||
|
|
||||||
webui_files.path = "$${DATA_DIR}/webui"
|
webui_files.path = "$${DATA_DIR}/webui"
|
||||||
webui_files.files = webui/*
|
webui_files.files = webui/app.js webui/app.css webui/index.html
|
||||||
INSTALLS += webui_files
|
INSTALLS += webui_files
|
||||||
|
|
||||||
webui_img_files.path = "$${DATA_DIR}/webui/img"
|
webui_img_files.path = "$${DATA_DIR}/webui/img"
|
||||||
webui_img_files.files = ../../retroshare-gui/src/gui/images/logo/logo_splash.png
|
webui_img_files.files = ../../retroshare-gui/src/gui/images/logo/logo_splash.png
|
||||||
INSTALLS += webui_img_files
|
INSTALLS += webui_img_files
|
||||||
|
|
||||||
create_webfiles.commands = sh $$_PRO_FILE_PWD_/webui-src/make-src/build.sh $$_PRO_FILE_PWD_
|
#create_webfiles.commands = sh $$_PRO_FILE_PWD_/webui-src/make-src/build.sh $$_PRO_FILE_PWD_
|
||||||
QMAKE_EXTRA_TARGETS += create_webfiles
|
#QMAKE_EXTRA_TARGETS += create_webfiles
|
||||||
PRE_TARGETDEPS += create_webfiles
|
#POST_TARGETDEPS += create_webfiles
|
||||||
|
|
||||||
# create dummy files
|
#QMAKE_POST_LINK=sh $$_PRO_FILE_PWD_/webui-src/make-src/build.sh $$_PRO_FILE_PWD_
|
||||||
system(webui-src/make-src/init.sh .)
|
|
||||||
|
WEBUI_SRC_SCRIPT = webui-src/make-src/build.sh
|
||||||
|
|
||||||
|
WEBUI_SRC_HTML = $$WEBUI_SRC_SCRIPT
|
||||||
|
WEBUI_SRC_HTML += webui-src/app/assets/index.html
|
||||||
|
|
||||||
|
WEBUI_SRC_JS = $$WEBUI_SRC_SCRIPT
|
||||||
|
WEBUI_SRC_JS += webui-src/app/accountselect.js
|
||||||
|
WEBUI_SRC_JS += webui-src/app/adddownloads.js
|
||||||
|
WEBUI_SRC_JS += webui-src/app/addidentity.js
|
||||||
|
WEBUI_SRC_JS += webui-src/app/addpeer.js
|
||||||
|
WEBUI_SRC_JS += webui-src/app/chat.js
|
||||||
|
WEBUI_SRC_JS += webui-src/app/createlogin.js
|
||||||
|
WEBUI_SRC_JS += webui-src/app/downloads.js
|
||||||
|
WEBUI_SRC_JS += webui-src/app/forums.js
|
||||||
|
WEBUI_SRC_JS += webui-src/app/home.js
|
||||||
|
WEBUI_SRC_JS += webui-src/app/identities.js
|
||||||
|
WEBUI_SRC_JS += webui-src/app/main.js
|
||||||
|
WEBUI_SRC_JS += webui-src/app/menudef.js
|
||||||
|
WEBUI_SRC_JS += webui-src/app/menu.js
|
||||||
|
WEBUI_SRC_JS += webui-src/app/mithril.js
|
||||||
|
WEBUI_SRC_JS += webui-src/app/mithril.min.js
|
||||||
|
WEBUI_SRC_JS += webui-src/app/peers.js
|
||||||
|
WEBUI_SRC_JS += webui-src/app/retroshare.js
|
||||||
|
WEBUI_SRC_JS += webui-src/app/search.js
|
||||||
|
WEBUI_SRC_JS += webui-src/app/searchresult.js
|
||||||
|
WEBUI_SRC_JS += webui-src/app/servicecontrol.js
|
||||||
|
WEBUI_SRC_JS += webui-src/app/settings.js
|
||||||
|
WEBUI_SRC_JS += webui-src/app/waiting.js
|
||||||
|
|
||||||
|
WEBUI_SRC_CSS = $$WEBUI_SRC_SCRIPT
|
||||||
|
WEBUI_SRC_CSS += webui-src/app/green-black.scss
|
||||||
|
WEBUI_SRC_CSS += webui-src/app/_reset.scss
|
||||||
|
WEBUI_SRC_CSS += webui-src/app/_chat.sass
|
||||||
|
WEBUI_SRC_CSS += webui-src/app/main.sass
|
||||||
|
|
||||||
|
|
||||||
|
create_webfiles_html.output = webui/index.html
|
||||||
|
create_webfiles_html.input = WEBUI_SRC_HTML
|
||||||
|
create_webfiles_html.commands = sh $$_PRO_FILE_PWD_/webui-src/make-src/build.sh $$_PRO_FILE_PWD_ index.html .
|
||||||
|
create_webfiles_html.variable_out = OBJECTS
|
||||||
|
create_webfiles_html.CONFIG = combine no_link
|
||||||
|
|
||||||
|
create_webfiles_js.output = webui/app.js
|
||||||
|
create_webfiles_js.input = WEBUI_SRC_JS
|
||||||
|
create_webfiles_js.commands = sh $$_PRO_FILE_PWD_/webui-src/make-src/build.sh $$_PRO_FILE_PWD_ app.js .
|
||||||
|
create_webfiles_js.variable_out = OBJECTS
|
||||||
|
create_webfiles_js.CONFIG = combine no_link
|
||||||
|
|
||||||
|
create_webfiles_css.output = webui/app.css
|
||||||
|
create_webfiles_css.input = WEBUI_SRC_CSS
|
||||||
|
create_webfiles_css.commands = sh $$_PRO_FILE_PWD_/webui-src/make-src/build.sh $$_PRO_FILE_PWD_ app.css .
|
||||||
|
create_webfiles_css.variable_out = OBJECTS
|
||||||
|
create_webfiles_css.CONFIG = combine no_link
|
||||||
|
|
||||||
|
|
||||||
|
QMAKE_EXTRA_COMPILERS += create_webfiles_html create_webfiles_js create_webfiles_css
|
||||||
}
|
}
|
||||||
|
|
||||||
win32{
|
win32{
|
||||||
@ -44,9 +100,10 @@ win32{
|
|||||||
MAKE_SRC=$$PRO_PATH\\webui-src\\make-src
|
MAKE_SRC=$$PRO_PATH\\webui-src\\make-src
|
||||||
}
|
}
|
||||||
|
|
||||||
create_webfiles.commands = $$MAKE_SRC\\build.bat $$PRO_PATH
|
#create_webfiles.commands = $$MAKE_SRC\\build.bat $$PRO_PATH
|
||||||
QMAKE_EXTRA_TARGETS += create_webfiles
|
#QMAKE_EXTRA_TARGETS += create_webfiles
|
||||||
PRE_TARGETDEPS += create_webfiles
|
#PRE_TARGETDEPS += create_webfiles
|
||||||
|
QMAKE_POST_LINK=$$MAKE_SRC\\build.bat $$PRO_PATH
|
||||||
|
|
||||||
# create dummy files
|
# create dummy files
|
||||||
system($$MAKE_SRC\\init.bat .)
|
system($$MAKE_SRC\\init.bat .)
|
||||||
|
@ -10,14 +10,20 @@ else
|
|||||||
src=$1/webui-src
|
src=$1/webui-src
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "$2" = "" ]; then
|
||||||
|
|
||||||
if [ -d "$publicdest" ]; then
|
if [ -d "$publicdest" ]; then
|
||||||
echo remove existing $publicdest
|
echo remove existing $publicdest
|
||||||
rm $publicdest -R
|
rm $publicdest -R
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ ! -d "$publicdest" ]; then
|
||||||
echo mkdir $publicdest
|
echo mkdir $publicdest
|
||||||
mkdir $publicdest
|
mkdir $publicdest
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$2" = "" ]||[ "$2" = "app.js" ]; then
|
||||||
echo building app.js
|
echo building app.js
|
||||||
echo - copy template.js ...
|
echo - copy template.js ...
|
||||||
cp $src/make-src/template.js $publicdest/app.js
|
cp $src/make-src/template.js $publicdest/app.js
|
||||||
@ -31,13 +37,26 @@ for filename in $src/app/*.js; do
|
|||||||
echo >> $publicdest/app.js
|
echo >> $publicdest/app.js
|
||||||
echo }\)\; >> $publicdest/app.js
|
echo }\)\; >> $publicdest/app.js
|
||||||
done
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$2" = "" ]||[ "$2" = "app.css" ]; then
|
||||||
echo building app.css
|
echo building app.css
|
||||||
cat $src/app/green-black.scss >> $publicdest/app.css
|
cat $src/app/green-black.scss >> $publicdest/app.css
|
||||||
cat $src/make-src/main.css >> $publicdest/app.css
|
cat $src/make-src/main.css >> $publicdest/app.css
|
||||||
cat $src/make-src/chat.css >> $publicdest/app.css
|
cat $src/make-src/chat.css >> $publicdest/app.css
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$2" = "" ]||[ "$2" = "index.html" ]; then
|
||||||
echo copy index.html
|
echo copy index.html
|
||||||
cp $src/app/assets/index.html $publicdest/index.html
|
cp $src/app/assets/index.html $publicdest/index.html
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$2" != "" ]&&[ "$3" != "" ]; then
|
||||||
|
if [ ! -d "$3/webui" ]; then
|
||||||
|
echo mkdir $3/webui
|
||||||
|
mkdir $3/webui
|
||||||
|
fi
|
||||||
|
echo copy $2 nach $3/webui/$2
|
||||||
|
cp $publicdest/$2 $3/webui/$2
|
||||||
|
fi
|
||||||
echo build.sh complete
|
echo build.sh complete
|
||||||
|
Loading…
Reference in New Issue
Block a user