mirror of
https://github.com/flutter/samples.git
synced 2025-11-11 07:18:15 +00:00
[Gallery] Fix directory structure (#312)
This commit is contained in:
40
gallery/windows/scripts/bundle_assets_and_deps.bat
Executable file
40
gallery/windows/scripts/bundle_assets_and_deps.bat
Executable file
@@ -0,0 +1,40 @@
|
||||
:: Copyright 2019 The Flutter team. All rights reserved.
|
||||
:: Use of this source code is governed by a BSD-style license that can be
|
||||
:: found in the LICENSE file.
|
||||
@echo off
|
||||
|
||||
set FLUTTER_CACHE_DIR=%~1
|
||||
set BUNDLE_DIR=%~2
|
||||
set PLUGIN_DIR=%~3
|
||||
set EXE_NAME=%~4
|
||||
|
||||
set DATA_DIR=%BUNDLE_DIR%data
|
||||
|
||||
if not exist "%DATA_DIR%" call mkdir "%DATA_DIR%"
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
:: Write the executable name to the location expected by the Flutter tool.
|
||||
echo %EXE_NAME%>"%FLUTTER_CACHE_DIR%exe_filename"
|
||||
|
||||
:: Copy the Flutter assets to the data directory.
|
||||
set FLUTTER_APP_DIR=%~dp0..\..
|
||||
set ASSET_DIR_NAME=flutter_assets
|
||||
set TARGET_ASSET_DIR=%DATA_DIR%\%ASSET_DIR_NAME%
|
||||
if exist "%TARGET_ASSET_DIR%" call rmdir /s /q "%TARGET_ASSET_DIR%"
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
call xcopy /s /e /i /q "%FLUTTER_APP_DIR%\build\%ASSET_DIR_NAME%" "%TARGET_ASSET_DIR%"
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
:: Copy the icudtl.dat file from the Flutter tree to the data directory.
|
||||
call xcopy /y /d /q "%FLUTTER_CACHE_DIR%icudtl.dat" "%DATA_DIR%"
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
:: Copy the Flutter DLL to the target location.
|
||||
call xcopy /y /d /q "%FLUTTER_CACHE_DIR%flutter_windows.dll" "%BUNDLE_DIR%"
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
|
||||
:: Copy any Plugin DLLs to the target location.
|
||||
if exist "%PLUGIN_DIR%" (
|
||||
call xcopy /y /d /q "%PLUGIN_DIR%"*.dll "%BUNDLE_DIR%"
|
||||
if %errorlevel% neq 0 exit /b %errorlevel%
|
||||
)
|
||||
8
gallery/windows/scripts/prepare_dependencies.bat
Executable file
8
gallery/windows/scripts/prepare_dependencies.bat
Executable file
@@ -0,0 +1,8 @@
|
||||
:: Copyright 2019 The Flutter team. All rights reserved.
|
||||
:: Use of this source code is governed by a BSD-style license that can be
|
||||
:: found in the LICENSE file.
|
||||
@echo off
|
||||
|
||||
:: Run flutter tool backend.
|
||||
set BUILD_MODE=%~1
|
||||
"%FLUTTER_ROOT%\packages\flutter_tools\bin\tool_backend" windows-x64 %BUILD_MODE%
|
||||
Reference in New Issue
Block a user