Browse Source

Remove "v" from version display strings. Make Windows installer not

install over Rack v1.
tags/v2.0.0
Andrew Belt 3 years ago
parent
commit
b6e4767e46
5 changed files with 84 additions and 95 deletions
  1. +56
    -64
      Makefile
  2. +24
    -27
      installer.nsi
  3. +2
    -2
      src/app/ModuleWidget.cpp
  4. +1
    -1
      src/app/TipWindow.cpp
  5. +1
    -1
      src/window.cpp

+ 56
- 64
Makefile View File

@@ -136,8 +136,14 @@ endif


DIST_RES := LICENSE* CHANGELOG.md res cacert.pem Core.json template.vcv
DIST_NAME := Rack-$(VERSION)-$(ARCH)
DIST_NAME := VCV-Rack-$(VERSION)-$(ARCH)
DIST_SDK_DIR := Rack-SDK
DIST_SDK := Rack-SDK-$(VERSION).zip
ifdef ARCH_MAC
DIST_DIR := VCV Rack.app
else
DIST_DIR := Rack
endif

# This target is not supported for public use
dist: $(TARGET) $(STANDALONE_TARGET)
@@ -146,61 +152,61 @@ dist: $(TARGET) $(STANDALONE_TARGET)

# Copy Rack to dist
ifdef ARCH_LIN
mkdir -p dist/Rack
cp $(TARGET) dist/Rack/
cp $(STANDALONE_TARGET) dist/Rack/
$(STRIP) -s dist/Rack/$(TARGET)
$(STRIP) -s dist/Rack/$(STANDALONE_TARGET)
mkdir -p dist/"$(DIST_DIR)"
cp $(TARGET) dist/"$(DIST_DIR)"/
cp $(STANDALONE_TARGET) dist/"$(DIST_DIR)"/
$(STRIP) -s dist/"$(DIST_DIR)"/$(TARGET)
$(STRIP) -s dist/"$(DIST_DIR)"/$(STANDALONE_TARGET)
# Manually check that no nonstandard shared libraries are linked
ldd dist/Rack/$(TARGET)
ldd dist/Rack/$(STANDALONE_TARGET)
ldd dist/"$(DIST_DIR)"/$(TARGET)
ldd dist/"$(DIST_DIR)"/$(STANDALONE_TARGET)
# Copy resources
cp -R $(DIST_RES) dist/Rack/
cp Fundamental.vcvplugin dist/Rack/
cp -R $(DIST_RES) dist/"$(DIST_DIR)"/
cp Fundamental.vcvplugin dist/"$(DIST_DIR)"/
# Make ZIP
cd dist && zip -q -9 -r $(DIST_NAME).zip Rack
endif
ifdef ARCH_MAC
mkdir -p dist/Rack.app
mkdir -p dist/Rack.app/Contents
mkdir -p dist/Rack.app/Contents/Resources
mkdir -p dist/Rack.app/Contents/MacOS
cp $(TARGET) dist/Rack.app/Contents/Resources/
cp $(STANDALONE_TARGET) dist/Rack.app/Contents/MacOS/
$(STRIP) -S dist/Rack.app/Contents/Resources/$(TARGET)
$(STRIP) -S dist/Rack.app/Contents/MacOS/$(STANDALONE_TARGET)
install_name_tool -change $(TARGET) @executable_path/../Resources/$(TARGET) dist/Rack.app/Contents/MacOS/$(STANDALONE_TARGET)
mkdir -p dist/"$(DIST_DIR)"
mkdir -p dist/"$(DIST_DIR)"/Contents
mkdir -p dist/"$(DIST_DIR)"/Contents/Resources
mkdir -p dist/"$(DIST_DIR)"/Contents/MacOS
cp $(TARGET) dist/"$(DIST_DIR)"/Contents/Resources/
cp $(STANDALONE_TARGET) dist/"$(DIST_DIR)"/Contents/MacOS/
$(STRIP) -S dist/"$(DIST_DIR)"/Contents/Resources/$(TARGET)
$(STRIP) -S dist/"$(DIST_DIR)"/Contents/MacOS/$(STANDALONE_TARGET)
install_name_tool -change $(TARGET) @executable_path/../Resources/$(TARGET) dist/"$(DIST_DIR)"/Contents/MacOS/$(STANDALONE_TARGET)
# Manually check that no nonstandard shared libraries are linked
otool -L dist/Rack.app/Contents/Resources/$(TARGET)
otool -L dist/Rack.app/Contents/MacOS/$(STANDALONE_TARGET)
otool -L dist/"$(DIST_DIR)"/Contents/Resources/$(TARGET)
otool -L dist/"$(DIST_DIR)"/Contents/MacOS/$(STANDALONE_TARGET)
# Copy resources
cp Info.plist dist/Rack.app/Contents/
$(SED) 's/{VERSION}/$(VERSION)/g' dist/Rack.app/Contents/Info.plist
cp -R $(DIST_RES) dist/Rack.app/Contents/Resources/
cp -R icon.icns dist/Rack.app/Contents/Resources/
cp Fundamental.vcvplugin dist/Rack.app/Contents/Resources/
cp Info.plist dist/"$(DIST_DIR)"/Contents/
$(SED) 's/{VERSION}/$(VERSION)/g' dist/"$(DIST_DIR)"/Contents/Info.plist
cp -R $(DIST_RES) dist/"$(DIST_DIR)"/Contents/Resources/
cp -R icon.icns dist/"$(DIST_DIR)"/Contents/Resources/
cp Fundamental.vcvplugin dist/"$(DIST_DIR)"/Contents/Resources/
# Clean up and sign bundle
xattr -cr dist/Rack.app
xattr -cr dist/"$(DIST_DIR)"
# This will only work if you have the private key to my certificate
codesign --verbose --sign "Developer ID Application: Andrew Belt (VRF26934X5)" --options runtime --entitlements Entitlements.plist --deep dist/Rack.app
codesign --verify --deep --strict --verbose=2 dist/Rack.app
codesign --verbose --sign "Developer ID Application: Andrew Belt (VRF26934X5)" --options runtime --entitlements Entitlements.plist --deep dist/"$(DIST_DIR)"
codesign --verify --deep --strict --verbose=2 dist/"$(DIST_DIR)"
# Make ZIP
cd dist && zip -q -9 -r $(DIST_NAME).zip Rack.app
cd dist && zip -q -9 -r $(DIST_NAME).zip "$(DIST_DIR)"
endif
ifdef ARCH_WIN
mkdir -p dist/Rack
cp $(TARGET) dist/Rack/
cp $(STANDALONE_TARGET) dist/Rack/
$(STRIP) -s dist/Rack/$(TARGET)
$(STRIP) -s dist/Rack/$(STANDALONE_TARGET)
mkdir -p dist/"$(DIST_DIR)"
cp $(TARGET) dist/"$(DIST_DIR)"/
cp $(STANDALONE_TARGET) dist/"$(DIST_DIR)"/
$(STRIP) -s dist/"$(DIST_DIR)"/$(TARGET)
$(STRIP) -s dist/"$(DIST_DIR)"/$(STANDALONE_TARGET)
# Copy resources
cp -R $(DIST_RES) dist/Rack/
cp /mingw64/bin/libwinpthread-1.dll dist/Rack/
cp /mingw64/bin/libstdc++-6.dll dist/Rack/
cp /mingw64/bin/libgcc_s_seh-1.dll dist/Rack/
cp Fundamental.vcvplugin dist/Rack/
cp -R $(DIST_RES) dist/"$(DIST_DIR)"/
cp /mingw64/bin/libwinpthread-1.dll dist/"$(DIST_DIR)"/
cp /mingw64/bin/libstdc++-6.dll dist/"$(DIST_DIR)"/
cp /mingw64/bin/libgcc_s_seh-1.dll dist/"$(DIST_DIR)"/
cp Fundamental.vcvplugin dist/"$(DIST_DIR)"/
# Make ZIP
cd dist && zip -q -9 -r $(DIST_NAME).zip Rack
cd dist && zip -q -9 -r $(DIST_NAME).zip "$(DIST_DIR)"
# Make NSIS installer
# pacman -S mingw-w64-x86_64-nsis
makensis -DVERSION=$(VERSION) installer.nsi
@@ -208,20 +214,20 @@ ifdef ARCH_WIN
endif

# Build Rack SDK
mkdir -p dist/Rack-SDK
cp -R LICENSE* *.mk include helper.py dist/Rack-SDK/
mkdir -p dist/Rack-SDK/dep/
cp -R dep/include dist/Rack-SDK/dep/
mkdir -p dist/"$(DIST_SDK_DIR)"
cp -R LICENSE* *.mk include helper.py dist/"$(DIST_SDK_DIR)"/
mkdir -p dist/"$(DIST_SDK_DIR)"/dep/
cp -R dep/include dist/"$(DIST_SDK_DIR)"/dep/
ifdef ARCH_WIN
cp libRack.dll.a dist/Rack-SDK/
cp libRack.dll.a dist/"$(DIST_SDK_DIR)"/
endif
cd dist && zip -q -9 -r $(DIST_SDK) Rack-SDK
cd dist && zip -q -9 -r $(DIST_SDK) "$(DIST_SDK_DIR)"


notarize:
ifdef ARCH_MAC
# This will only work if you have my Apple ID password in your keychain
xcrun altool --notarize-app -f dist/Rack-$(VERSION)-$(ARCH).zip --primary-bundle-id=com.vcvrack.rack -u "andrewpbelt@gmail.com" -p @keychain:notarize --output-format xml > dist/UploadInfo.plist
xcrun altool --notarize-app -f dist/"$(DIST_DIR)"-$(VERSION)-$(ARCH).zip --primary-bundle-id=com.vcvrack.rack -u "andrewpbelt@gmail.com" -p @keychain:notarize --output-format xml > dist/UploadInfo.plist
# Wait for Apple's servers to approve the app
while true; do \
echo "Waiting on Apple servers..." ; \
@@ -232,26 +238,12 @@ ifdef ARCH_MAC
sleep 10 ; \
done
# Mark app as notarized, check, and re-zip
xcrun stapler staple dist/Rack.app
spctl --assess --type execute --ignore-cache --no-cache -vv dist/Rack.app
xcrun stapler staple dist/"$(DIST_DIR)"
spctl --assess --type execute --ignore-cache --no-cache -vv dist/"$(DIST_DIR)"
cd dist && zip -q -9 -r $(DIST_NAME).zip Rack.app
endif


UPLOAD_URL := vortico@vcvrack.com:files/
upload:
# This will only work if you have a private key to my server
ifdef ARCH_MAC
rsync dist/$(DIST_NAME).zip $(UPLOAD_URL) -zP
endif
ifdef ARCH_WIN
rsync dist/$(DIST_NAME).zip dist/$(DIST_NAME).exe dist/$(DIST_SDK) $(UPLOAD_URL) -P
endif
ifdef ARCH_LIN
rsync dist/$(DIST_NAME).zip $(UPLOAD_URL) -zP
endif


# Plugin helpers

plugins:


+ 24
- 27
installer.nsi View File

@@ -1,16 +1,16 @@
!include "MUI2.nsh"

Name "VCV Rack v${VERSION}"
Name "VCV Rack ${VERSION}"
OutFile "installer.exe"
SetCompressor /solid "lzma"
SetCompressorDictSize 8
CRCCheck On

; Default installation folder
InstallDir "$PROGRAMFILES\VCV\Rack"
InstallDir "$PROGRAMFILES\VCV\Rack2"

; Get installation folder from registry if available
InstallDirRegKey HKLM "Software\VCV\Rack" ""
InstallDirRegKey HKLM "Software\VCV\Rack2" ""

; Request admin permissions so we can install to Program Files and add a registry entry
RequestExecutionLevel admin
@@ -19,13 +19,13 @@ RequestExecutionLevel admin
; MUI installer pages

!define MUI_ICON "icon.ico"
!define MUI_HEADERIMAGE
;!define MUI_HEADERIMAGE
;!define MUI_HEADERIMAGE_BITMAP "installer-banner.bmp" ; 150x57
;!define MUI_WELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\win.bmp" ; 164x314
;!define MUI_UNWELCOMEFINISHPAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Wizard\win.bmp" ; 164x314

!define MUI_COMPONENTSPAGE_NODESC
; !insertmacro MUI_PAGE_COMPONENTS
;!insertmacro MUI_PAGE_COMPONENTS

; Prevent user from choosing an installation directory that already exists, such as C:\Program Files.
; This is necessary because the uninstaller removes the installation directory, which is dangerous for directories that existed before Rack was installed.
@@ -55,27 +55,27 @@ FunctionEnd

; Sections

Section "VCV Rack" VCV_RACK_SECTION
Section "Install" INSTALL_SECTION
SectionIn RO
SetOutPath "$INSTDIR"

File /r "dist\Rack\*"

; Store installation folder
WriteRegStr HKLM "Software\VCV\Rack" "" "$INSTDIR"
WriteRegStr HKLM "Software\VCV\Rack2" "" "$INSTDIR"

; Write uninstaller info
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack" "DisplayName" "VCV Rack"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack" "DisplayIcon" '"$INSTDIR\Rack.exe"'
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack" "DisplayVersion" "${VERSION}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack" "UninstallString" '"$INSTDIR\Uninstall.exe"'
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack" "QuietUninstallString" '"$INSTDIR\Uninstall.exe" /S'
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack" "InstallLocation" '"$INSTDIR"'
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack" "Publisher" "VCV"
SectionGetSize ${VCV_RACK_SECTION} $0
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack" "EstimatedSize" $0
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack" "NoRepair" 1
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCVRack2" "DisplayName" "VCV Rack 2"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCVRack2" "DisplayIcon" '"$INSTDIR\Rack.exe"'
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCVRack2" "DisplayVersion" "${VERSION}"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCVRack2" "UninstallString" '"$INSTDIR\Uninstall.exe"'
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCVRack2" "QuietUninstallString" '"$INSTDIR\Uninstall.exe" /S'
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCVRack2" "InstallLocation" '"$INSTDIR"'
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCVRack2" "Publisher" "VCV"
SectionGetSize ${INSTALL_SECTION} $0
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCVRack2" "EstimatedSize" $0
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCVRack2" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCVRack2" "NoRepair" 1

; Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"
@@ -86,8 +86,8 @@ Section "VCV Rack" VCV_RACK_SECTION
WriteRegStr HKLM "Software\Classes\VCVRack.Patch\shell\open\command" "" '"$INSTDIR\Rack.exe" "%1"'

; Create shortcuts
CreateShortcut "$DESKTOP\VCV Rack.lnk" "$INSTDIR\Rack.exe"
CreateShortcut "$SMPROGRAMS\VCV Rack.lnk" "$INSTDIR\Rack.exe"
CreateShortcut "$DESKTOP\VCV Rack 2.lnk" "$INSTDIR\Rack.exe"
CreateShortcut "$SMPROGRAMS\VCV Rack 2.lnk" "$INSTDIR\Rack.exe"
SectionEnd


@@ -97,15 +97,12 @@ Section "Uninstall"
; Attempt to remove C:\Program Files\VCV if empty
RMDir "$INSTDIR\.."

Delete "$DESKTOP\VCV Rack.lnk"
Delete "$SMPROGRAMS\VCV Rack.lnk"
Delete "$DESKTOP\VCV Rack 2.lnk"
Delete "$SMPROGRAMS\VCV Rack 2.lnk"

DeleteRegKey HKLM "Software\VCV\Rack"
DeleteRegKey HKLM "Software\VCV\Rack2"
DeleteRegKey /ifempty HKLM "Software\VCV"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCV Rack"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\VCVRack2"
DeleteRegKey HKLM "Software\Classes\.vcv"
DeleteRegKey HKLM "Software\Classes\VCVRack.Patch"
SectionEnd


; Functions

+ 2
- 2
src/app/ModuleWidget.cpp View File

@@ -51,7 +51,7 @@ struct ModuleInfoItem : ui::MenuItem {

// plugin
ModuleUrlItem* pluginItem = new ModuleUrlItem;
pluginItem->text = "Plugin: " + model->plugin->name + " v" + model->plugin->version;
pluginItem->text = "Plugin: " + model->plugin->name + " " + model->plugin->version;
if (model->plugin->pluginUrl != "") {
pluginItem->url = model->plugin->pluginUrl;
}
@@ -61,7 +61,7 @@ struct ModuleInfoItem : ui::MenuItem {
menu->addChild(pluginItem);

// ui::MenuLabel* versionLabel = new ui::MenuLabel;
// versionLabel->text = "v" + model->plugin->version;
// versionLabel->text = model->plugin->version;
// menu->addChild(versionLabel);

// author


+ 1
- 1
src/app/TipWindow.cpp View File

@@ -67,7 +67,7 @@ struct TipWindow : widget::OpaqueWidget {
// header->box.size.x = box.size.x - margin*2;
header->box.size.y = 20;
header->fontSize = 20;
header->text = "Welcome to VCV Rack v" + APP_VERSION;
header->text = "Welcome to VCV Rack " + APP_VERSION;
addChild(header);

label = new ui::Label;


+ 1
- 1
src/window.cpp View File

@@ -394,7 +394,7 @@ void Window::step() {
gamepad::step();

// Set window title
std::string windowTitle = APP_NAME + " v" + APP_VERSION;
std::string windowTitle = APP_NAME + " " + APP_VERSION;
if (APP->patch->path != "") {
windowTitle += " - ";
if (!APP->history->isSaved())


Loading…
Cancel
Save