Skip to content

Commit f881348

Browse files
committed
Rename VERSION to RACK_VERSION in Makefile to avoid environment variable conflicts.
1 parent 4acf083 commit f881348

File tree

4 files changed

+19
-19
lines changed

4 files changed

+19
-19
lines changed

Info.plist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77
<key>CFBundleName</key><string>VCV Rack 2 Free</string>
88
<key>CFBundleDisplayName</key><string>VCV Rack 2 Free</string>
99
<key>CFBundleIdentifier</key><string>com.vcvrack.rack2</string>
10-
<key>CFBundleVersion</key><string>{VERSION}</string>
10+
<key>CFBundleVersion</key><string>{RACK_VERSION}</string>
1111
<key>CFBundlePackageType</key><string>APPL</string>
1212
<key>CFBundleSignature</key><string>RACK</string>
1313
<key>CFBundleExecutable</key><string>Rack</string>
1414
<key>CFBundleIconFile</key><string>icon</string>
15-
<key>CFBundleShortVersionString</key><string>{VERSION}</string>
15+
<key>CFBundleShortVersionString</key><string>{RACK_VERSION}</string>
1616
<key>NSHumanReadableCopyright</key><string>Copyright © VCV</string>
1717
<key>NSPrincipalClass</key><string>NSApplication</string>
1818
<key>NSHighResolutionCapable</key><true/>

Makefile

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
RACK_DIR ?= .
2-
EDITION := Free
3-
VERSION_MAJOR := 2
4-
VERSION ?= $(patsubst v%,%,$(shell git describe --tags --match "v$(VERSION_MAJOR).*"))
2+
RACK_EDITION := Free
3+
RACK_VERSION_MAJOR := 2
4+
RACK_VERSION ?= $(patsubst v%,%,$(shell git describe --tags --match "v$(RACK_VERSION_MAJOR).*"))
55

66
FLAGS += -Iinclude -Idep/include
77

@@ -17,7 +17,7 @@ SOURCES += dep/tinyexpr/tinyexpr.c
1717
SOURCES += $(wildcard src/*.c src/*/*.c)
1818
SOURCES += $(wildcard src/*.cpp src/*/*.cpp)
1919

20-
build/src/common.cpp.o: FLAGS += -D_APP_VERSION=$(VERSION)
20+
build/src/common.cpp.o: FLAGS += -D_RACK_VERSION=$(RACK_VERSION)
2121
build/dep/tinyexpr/tinyexpr.c.o: FLAGS += -DTE_POW_FROM_RIGHT -DTE_NAT_LOG
2222

2323
FLAGS += -fPIC
@@ -164,17 +164,17 @@ endif
164164

165165
# The following targets are not supported for public use
166166

167-
DIST_NAME = Rack$(EDITION)-$(VERSION)-$(ARCH_NAME)
167+
DIST_NAME = Rack$(RACK_EDITION)-$(RACK_VERSION)-$(ARCH_NAME)
168168
ifdef ARCH_MAC
169-
DIST_BUNDLE := VCV Rack $(VERSION_MAJOR) $(EDITION).app
169+
DIST_BUNDLE := VCV Rack $(RACK_VERSION_MAJOR) $(RACK_EDITION).app
170170
else
171-
DIST_DIR := Rack$(VERSION_MAJOR)$(EDITION)
171+
DIST_DIR := Rack$(RACK_VERSION_MAJOR)$(RACK_EDITION)
172172
endif
173173
DIST_MD := $(wildcard *.md)
174174
DIST_HTML := $(patsubst %.md, build/%.html, $(DIST_MD))
175175
DIST_RES := res cacert.pem Core.json template.vcv LICENSE-GPLv3.txt $(DIST_HTML) translations
176176
DIST_SDK_DIR := Rack-SDK
177-
DIST_SDK = Rack-SDK-$(VERSION)-$(ARCH_NAME).zip
177+
DIST_SDK = Rack-SDK-$(RACK_VERSION)-$(ARCH_NAME).zip
178178
FUNDAMENTAL_VERSION ?= 2.6.1
179179
FUNDAMENTAL_FILENAME := Fundamental-$(FUNDAMENTAL_VERSION)-$(ARCH_NAME).vcvplugin
180180

@@ -211,7 +211,7 @@ ifdef ARCH_MAC
211211
otool -L dist/"$(DIST_BUNDLE)"/Contents/MacOS/$(STANDALONE_TARGET)
212212
# Copy resources
213213
cp Info.plist dist/"$(DIST_BUNDLE)"/Contents/
214-
$(SED) 's/{VERSION}/$(VERSION)/g' dist/"$(DIST_BUNDLE)"/Contents/Info.plist
214+
$(SED) 's/{RACK_VERSION}/$(RACK_VERSION)/g' dist/"$(DIST_BUNDLE)"/Contents/Info.plist
215215
cp -R icon.icns dist/"$(DIST_BUNDLE)"/Contents/Resources/
216216
cp -R $(DIST_RES) dist/"$(DIST_BUNDLE)"/Contents/Resources/
217217
cp "$(FUNDAMENTAL_FILENAME)" dist/"$(DIST_BUNDLE)"/Contents/Resources/
@@ -273,7 +273,7 @@ endif
273273
ifdef ARCH_WIN
274274
# Make NSIS installer
275275
# pacman -S mingw-w64-x86_64-nsis
276-
makensis -DVERSION_MAJOR=$(VERSION_MAJOR) -DVERSION=$(VERSION) "-XOutFile dist/$(DIST_NAME).exe" installer.nsi
276+
makensis -DRACK_VERSION_MAJOR=$(RACK_VERSION_MAJOR) -DRACK_VERSION=$(RACK_VERSION) "-XOutFile dist/$(DIST_NAME).exe" installer.nsi
277277
endif
278278

279279

installer.nsi

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
!include "MUI2.nsh"
22

3-
!define NAME_FULL "VCV Rack Free ${VERSION}"
4-
!define NAME "VCV Rack ${VERSION_MAJOR} Free"
5-
!define RACK_DIR "Rack${VERSION_MAJOR}Free"
6-
!define INSTALL_REG "Software\VCV\Rack${VERSION_MAJOR}Free"
7-
!define UNINSTALL_REG "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCVRack${VERSION_MAJOR}Free"
3+
!define NAME_FULL "VCV Rack Free ${RACK_VERSION}"
4+
!define NAME "VCV Rack ${RACK_VERSION_MAJOR} Free"
5+
!define RACK_DIR "Rack${RACK_VERSION_MAJOR}Free"
6+
!define INSTALL_REG "Software\VCV\Rack${RACK_VERSION_MAJOR}Free"
7+
!define UNINSTALL_REG "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCVRack${RACK_VERSION_MAJOR}Free"
88

99
Name "${NAME_FULL}"
1010
Unicode True
@@ -94,7 +94,7 @@ Section "${NAME}" INSTALL_SECTION
9494
; Write uninstaller info
9595
WriteRegStr HKLM "${UNINSTALL_REG}" "DisplayName" "${NAME}"
9696
WriteRegStr HKLM "${UNINSTALL_REG}" "DisplayIcon" '"$INSTDIR\Rack.exe"'
97-
WriteRegStr HKLM "${UNINSTALL_REG}" "DisplayVersion" "${VERSION}"
97+
WriteRegStr HKLM "${UNINSTALL_REG}" "DisplayVersion" "${RACK_VERSION}"
9898
WriteRegStr HKLM "${UNINSTALL_REG}" "UninstallString" '"$INSTDIR\Uninstall.exe"'
9999
WriteRegStr HKLM "${UNINSTALL_REG}" "QuietUninstallString" '"$INSTDIR\Uninstall.exe" /S'
100100
WriteRegStr HKLM "${UNINSTALL_REG}" "InstallLocation" '"$INSTDIR"'

src/common.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const std::string APP_NAME = "VCV Rack";
1919
const std::string APP_EDITION = "Free";
2020
const std::string APP_EDITION_NAME = "Free";
2121
const std::string APP_VERSION_MAJOR = "2";
22-
const std::string APP_VERSION = TOSTRING(_APP_VERSION);
22+
const std::string APP_VERSION = TOSTRING(_RACK_VERSION);
2323
#if defined ARCH_WIN
2424
const std::string APP_OS = "win";
2525
const std::string APP_OS_NAME = "Windows";

0 commit comments

Comments
 (0)