mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-28 00:49:28 -05:00
webui: windows creating batch-files
This commit is contained in:
parent
d96a8efb66
commit
3bbd370242
41
libresapi/src/webui-src/make-src/build.bat
Normal file
41
libresapi/src/webui-src/make-src/build.bat
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
@echo off
|
||||||
|
REM create webfiles from sources at compile time (works without npm/node.js)
|
||||||
|
|
||||||
|
set publicdest=%1\webui
|
||||||
|
set src=%1\webui-src
|
||||||
|
|
||||||
|
if "%1" == "" set publicdest=..\..\webui&&set src=..
|
||||||
|
|
||||||
|
if exist "%publicdest%" echo remove existing %publicdest%&&rd %publicdest% /S /Q
|
||||||
|
|
||||||
|
echo mkdir %publicdest%
|
||||||
|
md %publicdest%
|
||||||
|
|
||||||
|
echo building app.js
|
||||||
|
echo - copy template.js ...
|
||||||
|
copy %src%\make-src\template.js %publicdest%\app.js
|
||||||
|
|
||||||
|
for %%F in (%src%\app\*.js) DO (set "fname=%%~nF" && CALL :addfile)
|
||||||
|
|
||||||
|
echo building app.css
|
||||||
|
type %src%\app\green-black.scss >> %publicdest%\app.css
|
||||||
|
type %src%\make-src\main.css >> %publicdest%\app.css
|
||||||
|
type %src%\make-src\chat.css >> %publicdest%\app.css
|
||||||
|
|
||||||
|
echo copy index.html
|
||||||
|
copy %src%\app\assets\index.html %publicdest%\index.html
|
||||||
|
|
||||||
|
echo build.bat complete
|
||||||
|
|
||||||
|
goto :EOF
|
||||||
|
|
||||||
|
:addfile
|
||||||
|
echo - adding %fname% ...
|
||||||
|
echo require.register("%fname%", function(exports, require, module) { >> %publicdest%\app.js
|
||||||
|
echo %src%\app\%fname%.js
|
||||||
|
type %src%\app\%fname%.js >> %publicdest%\app.js
|
||||||
|
echo. >> %publicdest%\app.js
|
||||||
|
echo }); >> %publicdest%\app.js
|
||||||
|
|
||||||
|
|
||||||
|
:EOF
|
15
libresapi/src/webui-src/make-src/init.bat
Normal file
15
libresapi/src/webui-src/make-src/init.bat
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
@echo off
|
||||||
|
REM create dummy webfiles at qmake run
|
||||||
|
|
||||||
|
set publicdest=%1\webui
|
||||||
|
if "%1" == "" set publicdest=..\..\webui
|
||||||
|
|
||||||
|
if exist %publicdest% echo remove %publicdest%&&rd %publicdest% /S /Q
|
||||||
|
|
||||||
|
echo create %publicdest%
|
||||||
|
md %publicdest%
|
||||||
|
|
||||||
|
echo create %publicdest%\app.js, %publicdest%\app.css, %publicdest%\index.html
|
||||||
|
echo. > %publicdest%\app.js
|
||||||
|
echo. > %publicdest%\app.css
|
||||||
|
echo. > %publicdest%\index.html
|
Loading…
Reference in New Issue
Block a user