Browse Source

Merge branch 'master' of github.com:VCVRack/Rack

tags/v0.3.0
Andrew Belt 6 years ago
parent
commit
9e12c4ce4e
4 changed files with 38 additions and 19 deletions
  1. +2
    -2
      Info.plist
  2. +26
    -14
      Makefile
  3. +1
    -1
      dep/Makefile
  4. +9
    -2
      src/main.cpp

+ 2
- 2
Info.plist View File

@@ -19,7 +19,7 @@
<key>CFBundleExecutable</key>
<string>Rack</string>
<key>CFBundleIconFile</key>
<string></string>
<string>icon</string>
<key>CFBundleLongVersionString</key>
<string>0.0.0</string>
<key>CFBundleShortVersionString</key>
@@ -27,6 +27,6 @@
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>NSHighResolutionCapable</key>
<string>NO</string>
<string>YES</string>
</dict>
</plist>

+ 26
- 14
Makefile View File

@@ -54,7 +54,7 @@ ifeq ($(ARCH), win)
endif

clean:
rm -rf $(TARGET) build dist
rm -rfv $(TARGET) build dist

# For Windows resources
%.res: %.rc
@@ -84,27 +84,34 @@ ifeq ($(ARCH), lin)
cp dep/lib/libsamplerate.so.0 dist/Rack/
endif
ifeq ($(ARCH), mac)
mkdir -p $(BUNDLE)
mkdir -p $(BUNDLE)/Contents
mkdir -p $(BUNDLE)/Contents/Resources
cp Info.plist $(BUNDLE)/Contents/

mkdir -p $(BUNDLE)/Contents/MacOS
cp Rack $(BUNDLE)/Contents/MacOS/
cp icon.icns $(BUNDLE)/Contents/Resources/

otool -L $(BUNDLE)/Contents/MacOS/Rack

# cp /usr/local/opt/glew/lib/libGLEW.2.0.0.dylib $(BUNDLE)/Contents/MacOS/
# cp /usr/local/opt/jansson/lib/libjansson.4.dylib $(BUNDLE)/Contents/MacOS/
# cp /usr/local/opt/portaudio/lib/libportaudio.2.dylib $(BUNDLE)/Contents/MacOS/
# cp /usr/local/opt/portmidi/lib/libportmidi.dylib $(BUNDLE)/Contents/MacOS/
# cp /usr/local/opt/libsamplerate/lib/libsamplerate.0.dylib $(BUNDLE)/Contents/MacOS/
# cp /usr/local/opt/libzip/lib/libzip.4.dylib $(BUNDLE)/Contents/MacOS/

# install_name_tool -change /usr/local/opt/glew/lib/libGLEW.2.0.0.dylib @executable_path/libGLEW.2.0.0.dylib $(BUNDLE)/Contents/MacOS/Rack
# install_name_tool -change /usr/local/opt/jansson/lib/libjansson.4.dylib @executable_path/libjansson.4.dylib $(BUNDLE)/Contents/MacOS/Rack
# install_name_tool -change /usr/local/opt/portaudio/lib/libportaudio.2.dylib @executable_path/libportaudio.2.dylib $(BUNDLE)/Contents/MacOS/Rack
# install_name_tool -change /usr/local/opt/portmidi/lib/libportmidi.dylib @executable_path/libportmidi.dylib $(BUNDLE)/Contents/MacOS/Rack
# install_name_tool -change /usr/local/opt/libsamplerate/lib/libsamplerate.0.dylib @executable_path/libsamplerate.0.dylib $(BUNDLE)/Contents/MacOS/Rack
# install_name_tool -change /usr/local/opt/libzip/lib/libzip.4.dylib @executable_path/libzip.4.dylib $(BUNDLE)/Contents/MacOS/Rack
cp dep/lib/libGLEW.2.1.0.dylib $(BUNDLE)/Contents/MacOS/
cp dep/lib/libglfw.3.dylib $(BUNDLE)/Contents/MacOS/
cp dep/lib/libjansson.4.dylib $(BUNDLE)/Contents/MacOS/
cp dep/lib/libsamplerate.0.dylib $(BUNDLE)/Contents/MacOS/
cp dep/lib/libcurl.4.dylib $(BUNDLE)/Contents/MacOS/
cp dep/lib/libzip.5.dylib $(BUNDLE)/Contents/MacOS/
cp dep/lib/libportaudio.2.dylib $(BUNDLE)/Contents/MacOS/
cp dep/lib/libportmidi.dylib $(BUNDLE)/Contents/MacOS/

install_name_tool -change /usr/local/lib/libGLEW.2.1.0.dylib @executable_path/libGLEW.2.1.0.dylib $(BUNDLE)/Contents/MacOS/Rack
install_name_tool -change lib/libglfw.3.dylib @executable_path/libglfw.3.dylib $(BUNDLE)/Contents/MacOS/Rack
install_name_tool -change $(PWD)/dep/lib/libjansson.4.dylib @executable_path/libjansson.4.dylib $(BUNDLE)/Contents/MacOS/Rack
install_name_tool -change $(PWD)/dep/lib/libsamplerate.0.dylib @executable_path/libsamplerate.0.dylib $(BUNDLE)/Contents/MacOS/Rack
install_name_tool -change $(PWD)/dep/lib/libcurl.4.dylib @executable_path/libcurl.4.dylib $(BUNDLE)/Contents/MacOS/Rack
install_name_tool -change $(PWD)/dep/lib/libzip.5.dylib @executable_path/libzip.5.dylib $(BUNDLE)/Contents/MacOS/Rack
install_name_tool -change $(PWD)/dep/lib/libportaudio.2.dylib @executable_path/libportaudio.2.dylib $(BUNDLE)/Contents/MacOS/Rack
install_name_tool -change @rpath/libportmidi.dylib @executable_path/libportmidi.dylib $(BUNDLE)/Contents/MacOS/Rack

otool -L $(BUNDLE)/Contents/MacOS/Rack

@@ -120,4 +127,9 @@ endif
$(MAKE) -C plugins/Fundamental dist
cp -R plugins/Fundamental/dist/Fundamental dist/Rack/plugins/

ifeq ($(ARCH), mac)
cd dist && ln -s /Applications Applications
cd dist && hdiutil create -srcfolder . -volname Rack -ov -format UDZO Rack-$(VERSION)-$(ARCH).dmg
else
cd dist && zip -5 -r Rack-$(VERSION)-$(ARCH).zip Rack
endif

+ 1
- 1
dep/Makefile View File

@@ -49,7 +49,7 @@ $(glfw):
$(UNZIP) $@.zip
cd $@ && $(CMAKE) . \
-DCMAKE_INSTALL_PREFIX="$(LOCAL)" -DBUILD_SHARED_LIBS=ON \
-DGLFW_USE_CHDIR=ON -DGLFW_USE_MENUBAR=ON -DGLFW_USE_RETINA=ON
-DGLFW_USE_CHDIR=OFF -DGLFW_USE_MENUBAR=ON -DGLFW_USE_RETINA=ON
$(MAKE) -C $@
$(MAKE) -C $@ install
ifeq ($(ARCH),win)


+ 9
- 2
src/main.cpp View File

@@ -53,26 +53,33 @@ void fixCwd() {
if (isCorrectCwd())
return;

/*
// Get path of binary inside the app bundle
// It should be something like */Rack.app/Contents/MacOS
// It should be something like .../Rack.app/Contents/MacOS
char path[PATH_MAX];
uint32_t pathLen = sizeof(path);
int err = _NSGetExecutablePath(path, &pathLen);
assert(!err);
if (isCorrectCwd())
return;

// Switch to the directory of the actual binary
chdir(dirname(path));
if (isCorrectCwd())
return;

// and then go up three directories to get to the parent directory
chdir("../../../");
if (isCorrectCwd())
return;
*/

// Switch to a default absolute path
chdir("/Applications/Rack");
if (isCorrectCwd())
return;

alert("Install Rack", "To install Rack, please move the Rack directory to your /Applications folder.", 2);
alert("Install Rack", "To install Rack, please move the Rack directory (including the Rack app and plugins directory) to the /Applications folder.", 2);
exit(1);
}
#endif


Loading…
Cancel
Save