Skip to content

Commit 7f2f758

Browse files
committed
Release different ReadMe.txt for standard & portable
Makefile updated to copy appropriate ReadMe-portable.txt or ReadMe-standard.txt as ReadMe.txt to release zip files for portable and standard edition builds respectively. Made similar changes to Inno Setup script to copy ReadMe-standard.txt as ReadMe.txt into the install program. Both versions of ReadMe.txt were temporarily stored in new _build\release\~tmp~ directory.
1 parent 848d284 commit 7f2f758

File tree

2 files changed

+15
-4
lines changed

2 files changed

+15
-4
lines changed

Diff for: Src/Install/CodeSnip.iss

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
#define SrcDocsPath SourcePath + "..\..\Docs\"
3030
#define SrcAssetsPath SourcePath + "\Assets\"
3131
#define SrcExePath SourcePath + "..\..\_build\exe\"
32+
#define TmpPath SourcePath + "..\..\_build\release\~tmp~\"
3233
#define ProgDataSubDir AppName + ".4"
3334
#define ExeProg SrcExePath + ExeFile
3435
#define AppVersion DeleteToVerStart(GetFileProductVersion(ExeProg))
@@ -89,7 +90,7 @@ Name: {commonappdata}\{#AppPublisher}\{#ProgDataSubDir}\Database; permissions: e
8990
Source: {#SrcExePath}{#ExeFile}; DestDir: {app}
9091
Source: {#SrcExePath}{#HelpFile}; DestDir: {app}; Flags: ignoreversion
9192
Source: {#SrcDocsPath}{#LicenseTextFile}; DestDir: {app}; Flags: ignoreversion
92-
Source: {#SrcDocsPath}{#ReadMeFile}; DestDir: {app}; Flags: ignoreversion
93+
Source: {#TmpPath}{#ReadMeFile}; DestDir: {app}; Flags: ignoreversion
9394
Source: {#SrcAssetsPath}UpdatingPreview.rtf; Flags: dontcopy
9495

9596
[Icons]

Diff for: Src/Makefile

+13-3
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,15 @@ BUILD_ROOT = _build
1212
BIN_ROOT = $(BUILD_ROOT)\bin
1313
EXE_ROOT = $(BUILD_ROOT)\exe
1414
RELEASE_ROOT = $(BUILD_ROOT)\release
15+
RELEASE_TMP_ROOT = $(RELEASE_ROOT)\~tmp~
1516
DOCS_ROOT = Docs
1617
SRC_ROOT = Src
1718

1819
# Defines macros giving directories relative to location of the Makefile
1920
BIN_REL = ..\$(BIN_ROOT)
2021
EXE_REL = ..\$(EXE_ROOT)
22+
DOCS_REL = ..\$(DOCS_ROOT)
23+
RELEASE_TMP_REL = ..\$(RELEASE_TMP_ROOT)
2124

2225
# Check for required environment variables
2326

@@ -115,6 +118,7 @@ config:
115118
@mkdir $(BIN_ROOT)
116119
@if not exist $(EXE_ROOT) mkdir $(EXE_ROOT)
117120
@if not exist $(RELEASE_ROOT) mkdir $(RELEASE_ROOT)
121+
@if not exist $(RELEASE_TMP_ROOT) mkdir $(RELEASE_TMP_ROOT)
118122
@cd $(SRC_ROOT)
119123

120124
# Builds CodeSnip pascal files and links program
@@ -160,8 +164,10 @@ typelib:
160164
# Builds setup program
161165
setup:
162166
!ifndef PORTABLE
163-
@del $(EXE_REL)\CodeSnip-Setup-*
167+
copy $(DOCS_REL)\ReadMe-standard.txt $(RELEASE_TMP_REL)\ReadMe.txt
168+
del $(EXE_REL)\CodeSnip-Setup-*
164169
@$(ISCC) Install\CodeSnip.iss
170+
del $(RELEASE_TMP_REL)\ReadMe.txt
165171
!else
166172
@echo **** Portable build - no setup file created ****
167173
!endif
@@ -195,12 +201,16 @@ release:
195201
@cd ..
196202
-@if exist $(OUTFILE) del $(OUTFILE)
197203
!ifndef PORTABLE
198-
@$(ZIP) -j -9 $(OUTFILE) $(EXE_ROOT)\CodeSnip-Setup-*.exe $(DOCS_ROOT)\ReadMe.txt
204+
copy $(DOCS_ROOT)\ReadMe-standard.txt $(RELEASE_TMP_ROOT)\ReadMe.txt
205+
@$(ZIP) -j -9 $(OUTFILE) $(EXE_ROOT)\CodeSnip-Setup-*.exe $(RELEASE_TMP_ROOT)\ReadMe.txt
206+
del $(RELEASE_TMP_ROOT)\ReadMe.txt
199207
!else
208+
copy $(DOCS_ROOT)\ReadMe-portable.txt $(RELEASE_TMP_ROOT)\ReadMe.txt
200209
@$(ZIP) -j -9 $(OUTFILE) $(EXE_ROOT)\CodeSnip-p.exe
201210
@$(ZIP) -j -9 $(OUTFILE) $(EXE_ROOT)\CodeSnip.chm
202-
@$(ZIP) -j -9 $(OUTFILE) $(DOCS_ROOT)\ReadMe.txt
211+
@$(ZIP) -j -9 $(OUTFILE) $(RELEASE_TMP_ROOT)\ReadMe.txt
203212
@$(ZIP) -j -9 $(OUTFILE) $(DOCS_ROOT)\License.html
213+
del $(RELEASE_TMP_ROOT)\ReadMe.txt
204214
!endif
205215
@cd $(SRC_ROOT)
206216

0 commit comments

Comments
 (0)