-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added the ability to define the py files to be taken over to the outp…
…ut folder. (sometimes ) you want to keep some py files instead of having only the binarys) Most times the entry script need to be a py script do get it started.
- Loading branch information
1 parent
526df42
commit c742424
Showing
5 changed files
with
254 additions
and
0 deletions.
There are no files selected for viewing
136 changes: 136 additions & 0 deletions
136
7_Double_Click_Me_To_Create_Binarys_from_input_to_output_with_excluded_files.bat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,136 @@ | ||
@echo off | ||
|
||
@REM %~dp0: Breaks down as follows: | ||
@REM %~d0: Extracts the drive letter from %0. | ||
@REM %~p0: Extracts the path (directory) from %0. | ||
@REM Combining the above two (%~d0 and %~p0) gives the drive and path of the batch file. | ||
|
||
REM this is getting the path where the bat file is. | ||
cd /D "%~dp0" | ||
|
||
@REM REM this is getting the parent path fro where the bat file is. | ||
@REM cd /D "%~dp0.." | ||
|
||
set PATH=%PATH%;%SystemRoot%\system32 | ||
|
||
echo "%CD%"| findstr /C:" " >nul && echo This script relies on Miniconda which can not be silently installed under a path with spaces. && goto end | ||
|
||
@rem fix failed install when installing to a separate drive | ||
set TMP=%cd%\dev_env | ||
set TEMP=%cd%\dev_env | ||
|
||
@rem deactivate existing conda envs as needed to avoid conflicts | ||
(call conda deactivate && call conda deactivate && call conda deactivate) 2>nul | ||
|
||
@rem config | ||
set CONDA_ROOT_PREFIX=%cd%\dev_env\conda | ||
set INSTALL_ENV_DIR=%cd%\dev_env\env | ||
@REM set "inputFolder=C:\Path\to\inputFolder" | ||
@REM set "outputFolder=C:\Path\to\outputFolder" | ||
set input=%cd%\input | ||
set output=%cd%\output | ||
REM copy from input to output folder | ||
xcopy "%input%\*" "%output%\" /s /e | ||
|
||
|
||
|
||
@rem activate installer env | ||
call "%CONDA_ROOT_PREFIX%\condabin\conda.bat" activate "%INSTALL_ENV_DIR%" || ( echo. && echo Miniconda hook not found. && goto end ) | ||
|
||
call python -m compileall -b -f %output% | ||
|
||
|
||
@REM rem Generate .pyc files for existing .py files | ||
@REM for %%f in ("%output%\*.py") do ( | ||
@REM python -m compileall "%%f" | ||
@REM ) | ||
|
||
@REM rem Delete all .py files inside the output folder | ||
@REM del "%outputFolder%\*.py" | ||
|
||
|
||
|
||
@REM rem Delete all .py files inside the output folder and its subfolders | ||
@REM for /R "%output%" %%f in (*.py) do ( | ||
@REM del "%%f" | ||
@REM ) | ||
|
||
REM put here the python files you dont want to delete. | ||
set "excluded_files=__Init__.py MoResive004.py" | ||
|
||
for /R "%output%" %%f in (*.py) do ( | ||
set "exclude_file=" | ||
for %%x in (%excluded_files%) do ( | ||
if /I "%%~nxf" == "%%~x" set "exclude_file=1" | ||
) | ||
if not defined exclude_file ( | ||
del "%%f" | ||
) | ||
) | ||
|
||
|
||
|
||
|
||
echo All operations completed successfully. | ||
pause | ||
|
||
|
||
|
||
|
||
@echo off | ||
set "output=C:\Path\to\Output\Folder" | ||
set "excluded_files=exclude1.py exclude2.py" | ||
|
||
for /R "%output%" %%f in (*.py) do ( | ||
set "exclude_file=" | ||
for %%x in (%excluded_files%) do ( | ||
if /I "%%~nxf" == "%%~x" set "exclude_file=1" | ||
) | ||
if not defined exclude_file ( | ||
del "%%f" | ||
) | ||
) | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
REM Using build in compiler to compile all python files. | ||
@REM call python -m compileall -b -f . | ||
REM comileall -l means not recursive that means it only compiles the files | ||
REM that are inside the . folder it ignores sub folders | ||
@REM call python -m compileall -b -f -l . | ||
@REM call python -m compileall -b -f -l BackendCoreClassLib\InBlenderRunningLib | ||
|
||
|
||
|
||
|
||
@REM @echo off | ||
@REM set "inputFolder=C:\Path\to\inputFolder" | ||
@REM set "outputFolder=C:\Path\to\outputFolder" | ||
|
||
@REM rem Copy all files from input folder to output folder | ||
@REM xcopy "%inputFolder%\*" "%outputFolder%\" /s /e | ||
|
||
@REM rem Generate .pyc files for existing .py files | ||
@REM for %%f in ("%outputFolder%\*.py") do ( | ||
@REM python -m compileall "%%f" | ||
@REM ) | ||
|
||
@REM rem Delete all .py files inside the output folder | ||
@REM del "%outputFolder%\*.py" | ||
|
||
@REM echo All operations completed successfully. | ||
@REM pause |
101 changes: 101 additions & 0 deletions
101
8_Double_Click_Me_To_Create_Binarys_from_input_to_output_with_excluded_files_from_txt.bat
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,101 @@ | ||
@echo off | ||
|
||
@REM %~dp0: Breaks down as follows: | ||
@REM %~d0: Extracts the drive letter from %0. | ||
@REM %~p0: Extracts the path (directory) from %0. | ||
@REM Combining the above two (%~d0 and %~p0) gives the drive and path of the batch file. | ||
|
||
REM this is getting the path where the bat file is. | ||
cd /D "%~dp0" | ||
|
||
@REM REM this is getting the parent path fro where the bat file is. | ||
@REM cd /D "%~dp0.." | ||
|
||
set PATH=%PATH%;%SystemRoot%\system32 | ||
|
||
echo "%CD%"| findstr /C:" " >nul && echo This script relies on Miniconda which can not be silently installed under a path with spaces. && goto end | ||
|
||
@rem fix failed install when installing to a separate drive | ||
set TMP=%cd%\dev_env | ||
set TEMP=%cd%\dev_env | ||
|
||
@rem deactivate existing conda envs as needed to avoid conflicts | ||
(call conda deactivate && call conda deactivate && call conda deactivate) 2>nul | ||
|
||
@rem config | ||
set CONDA_ROOT_PREFIX=%cd%\dev_env\conda | ||
set INSTALL_ENV_DIR=%cd%\dev_env\env | ||
@REM set "inputFolder=C:\Path\to\inputFolder" | ||
@REM set "outputFolder=C:\Path\to\outputFolder" | ||
set input=%cd%\input | ||
set output=%cd%\output | ||
REM copy from input to output folder | ||
xcopy "%input%\*" "%output%\" /s /e | ||
|
||
|
||
|
||
@rem activate installer env | ||
call "%CONDA_ROOT_PREFIX%\condabin\conda.bat" activate "%INSTALL_ENV_DIR%" || ( echo. && echo Miniconda hook not found. && goto end ) | ||
|
||
call python -m compileall -b -f %output% | ||
|
||
|
||
@REM rem Generate .pyc files for existing .py files | ||
@REM for %%f in ("%output%\*.py") do ( | ||
@REM python -m compileall "%%f" | ||
@REM ) | ||
|
||
@REM rem Delete all .py files inside the output folder | ||
@REM del "%outputFolder%\*.py" | ||
|
||
|
||
|
||
@REM rem Delete all .py files inside the output folder and its subfolders | ||
@REM for /R "%output%" %%f in (*.py) do ( | ||
@REM del "%%f" | ||
@REM ) | ||
|
||
@REM REM put here the python files you dont want to delete. | ||
@REM set "excluded_files=__Init__.py MoResive004.py" | ||
|
||
@REM for /R "%output%" %%f in (*.py) do ( | ||
@REM set "exclude_file=" | ||
@REM for %%x in (%excluded_files%) do ( | ||
@REM if /I "%%~nxf" == "%%~x" set "exclude_file=1" | ||
@REM ) | ||
@REM if not defined exclude_file ( | ||
@REM del "%%f" | ||
@REM ) | ||
@REM ) | ||
|
||
@REM echo All operations completed successfully. | ||
@REM pause | ||
|
||
|
||
set "excluded_files_file=excluded_files.txt" | ||
|
||
for /R "%output%" %%f in (*.py) do ( | ||
set "exclude_file=" | ||
for /F "tokens=*" %%x in (%excluded_files_file%) do ( | ||
if /I "%%~nxf" == "%%~x" set "exclude_file=1" | ||
) | ||
if not defined exclude_file ( | ||
del "%%f" | ||
) | ||
) | ||
|
||
|
||
echo All operations completed successfully. | ||
pause | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
__Init__.py | ||
OP_OT_Auto_Anim_Pro_highlight_in_outliner.py | ||
OP_OT_run_motion_blend_pro.py | ||
OP_OT_lock_all_bones.py | ||
OP_OT_run_motion_blend_pro.py | ||
OP_OT_run_mo_resive.py | ||
OP_OT_unlock_all_bones.py | ||
test_script_animate_operator.py | ||
AUTO_ANIMATE_PRO_PT_Auto_Animate_PRO_TOOL.py | ||
My_MotionBlend_Pro_Settings_Processor.py | ||
download_demo_file.py | ||
reqirement_installer.py | ||
MoResive004.py | ||
MainApp.py |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.