Skip to content

Commit

Permalink
update prepare.bat for loader
Browse files Browse the repository at this point in the history
  • Loading branch information
slore committed Oct 27, 2019
1 parent 8f81e20 commit ecf2638
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 22 deletions.
19 changes: 1 addition & 18 deletions Projects/WIN10XPE/00-Configures/Loader/main.bat
@@ -1,17 +1,4 @@
set PE_LOADER=SYSTEM

if "x%opt[loader.name]%"=="x" set opt[loader.name]=PECMD

if /i "x%opt[loader.name]%"=="xLUA" set PE_LOADER=LUA
if /i "x%opt[loader.name]%"=="xPECMD" set PE_LOADER=PECMD

echo PE_LOADER=%PE_LOADER%

if "x%opt[loader.PEMaterial]%"=="x" set opt[loader.PEMaterial]=PEMaterial
set "X_PEMaterial=%X%\%opt[loader.PEMaterial]%"
set "X_OSInit=%X_PEMaterial%\Autoruns\OSInit"
set "X_Startup=%X_PEMaterial%\Autoruns\Startup"
set "X_BeforeShell=%X_PEMaterial%\Autoruns\Startup\BeforeShell"
call "%WB_PROJECT_PATH%\shared\InitLoader.bat"

if exist "%_CUSTOMFILES_%\PEMaterial" (
xcopy /Y /E "%_CUSTOMFILES_%\PEMaterial" "%X_PEMaterial%\"
Expand All @@ -25,10 +12,6 @@ rem add PECMD always
call V2X PECMD -Copy "Pecmd_%_Vx8664%.exe" "%X_SYS%\Pecmd.exe"
call X2X

rem init for LUALINK, LUAPIN
call LuaLink -init "%X_Startup%\BeforeShell\Shortcuts.lua"
call LuaPin -init "%X_Startup%\PinShortcuts.lua"

if "%PE_LOADER%"=="LUA" goto :LOADER_LUA
if "%PE_LOADER%"=="PECMD" goto :LOADER_PECMD

Expand Down
8 changes: 4 additions & 4 deletions Projects/WIN10XPE/last.bat
@@ -1,3 +1,7 @@
rem update lua scripts for escape characters
call LuaLink -done
call LuaPin -done

if "x%opt[build.last_filereg_disabled]%"=="xtrue" goto :EOF

rem incompatible with StartIsBack(SYSTEM account)
Expand All @@ -24,10 +28,6 @@ if not exist "%X_SYS%\dwm.exe" (

call za-Slim\Cleanup.bat

rem update lua scripts for escape characters
call LuaLink -done
call LuaPin -done

rem use prepared HIVE files
call PERegPorter.bat Tmp UNLOAD 1>nul

Expand Down
2 changes: 2 additions & 0 deletions Projects/WIN10XPE/prepare.bat
Expand Up @@ -18,6 +18,8 @@ set X_SYS=%X_WIN%\System32
set X_Desktop=%X%\Users\Default\Desktop
set "_CUSTOMFILES_=%WB_PROJECT_PATH%\_CustomFiles_"

call "%WB_PROJECT_PATH%\shared\InitLoader.bat"

call V2X -init

rem call prepare.bat before mounting
Expand Down
20 changes: 20 additions & 0 deletions Projects/WIN10XPE/shared/InitLoader.bat
@@ -0,0 +1,20 @@
if not "x%PE_LOADER%"=="x" goto :EOF

set PE_LOADER=SYSTEM

if "x%opt[loader.name]%"=="x" set opt[loader.name]=PECMD

if /i "x%opt[loader.name]%"=="xLUA" set PE_LOADER=LUA
if /i "x%opt[loader.name]%"=="xPECMD" set PE_LOADER=PECMD

echo PE_LOADER=%PE_LOADER%

if "x%opt[loader.PEMaterial]%"=="x" set opt[loader.PEMaterial]=PEMaterial
set "X_PEMaterial=%X%\%opt[loader.PEMaterial]%"
set "X_OSInit=%X_PEMaterial%\Autoruns\OSInit"
set "X_Startup=%X_PEMaterial%\Autoruns\Startup"
set "X_BeforeShell=%X_PEMaterial%\Autoruns\Startup\BeforeShell"

rem init for LUALINK, LUAPIN
call LuaLink -init "%X_Startup%\BeforeShell\Shortcuts.lua"
call LuaPin -init "%X_Startup%\PinShortcuts.lua"

0 comments on commit ecf2638

Please sign in to comment.