-
Notifications
You must be signed in to change notification settings - Fork 161
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not recompress 7zs on every build
- Loading branch information
1 parent
2d10493
commit a46b9cf
Showing
4 changed files
with
68 additions
and
10 deletions.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -24,4 +24,5 @@ x64/ | |
Rectify11Installer/Resources/*.7z | ||
*.tmp | ||
|
||
!Resources | ||
!Resources | ||
Resources/DoNotBuild.txt |
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,6 @@ | ||
# Resources | ||
This directory contains all of Rectify11's assets. | ||
|
||
The icons are located in the Files folder, stored in .res files. .res files can be open in Resource Hacker. | ||
> [!CAUTION] | ||
> Make sure to delete DoNotBuild.txt in the resources folder so that the changes would be built. |
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,59 @@ | ||
@echo off | ||
REM This script generates the files.7z, extras.7z, and themes.7z needed for the Rectify11 installer | ||
|
||
REM load command line arguments | ||
set SolutionDir=%1 | ||
set ProjectDir=%2 | ||
|
||
REM Validate command line | ||
if not exist %SolutionDir% ( | ||
echo bad solution directory argument | ||
exit /b 1 | ||
) | ||
|
||
if not exist %ProjectDir% ( | ||
echo bad project directory argument | ||
exit /b 1 | ||
goto exit | ||
) | ||
|
||
REM Check if we already built them | ||
if not exist "%ProjectDir%Resources\files.7z" ( | ||
goto build_archives | ||
) | ||
if not exist "%ProjectDir%Resources\extras.7z" ( | ||
goto build_archives | ||
) | ||
if not exist "%ProjectDir%Resources\themes.7z" ( | ||
goto build_archives | ||
) | ||
if exist "%SolutionDir%Resources\DoNotBuild.txt" ( | ||
echo Skipping building archives as DoNotBuild.txt exists | ||
goto exit | ||
) | ||
|
||
REM build the archives | ||
:build_archives | ||
echo building archives as DoNotBuild.txt doesn't exist | ||
cd /D "%SolutionDir%Resources\Files\" | ||
%SolutionDir%Resources\Tools\7z.exe a "%ProjectDir%Resources\files.7z" * -mx9 -ssp | ||
if not %ERRORLEVEL% == 0 ( | ||
echo Failed to compress files.7z | ||
exit /b | ||
) | ||
cd /D "%SolutionDir%Resources\Extras\" | ||
%SolutionDir%Resources\Tools\7z.exe a "%ProjectDir%Resources\extras.7z" * -mx9 -ssp | ||
if not %ERRORLEVEL% == 0 ( | ||
echo Failed to compress extras.7z | ||
exit /b | ||
) | ||
cd /D "%SolutionDir%Resources\Themes\" | ||
%SolutionDir%Resources\Tools\7z.exe a "%ProjectDir%Resources\themes.7z" * -mx9 -ssp | ||
if not %ERRORLEVEL% == 0 ( | ||
echo Failed to compress themes.7z | ||
exit /b | ||
) | ||
|
||
echo "Delete this file to recompress the archives" > %SolutionDir%Resources\DoNotBuild.txt | ||
|
||
:exit |