Skip to content

Commit

Permalink
Committing Player Corrections and Scripts to easy build
Browse files Browse the repository at this point in the history
  • Loading branch information
marceloadsj committed Apr 10, 2015
1 parent 9b9f0f8 commit 90855d9
Show file tree
Hide file tree
Showing 12 changed files with 77 additions and 3 deletions.
7 changes: 7 additions & 0 deletions libgid/scripts/install_name_tool.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
install_name_tool -id @executable_path/../Frameworks/libgid.dylib libgid.dylib
install_name_tool -change libgvfs.1.dylib @executable_path/../Frameworks/libgvfs.dylib libgid.dylib
install_name_tool -change /Applications/Qt/5.4/clang_64/lib/QtOpenGL.framework/Versions/5/QtOpenGL @executable_path/../Frameworks/QtOpenGL.framework/Versions/5/QtOpenGL libgid.dylib
install_name_tool -change /Applications/Qt/5.4/clang_64/lib/QtWidgets.framework/Versions/5/QtWidgets @executable_path/../Frameworks/QtWidgets.framework/Versions/5/QtWidgets libgid.dylib
install_name_tool -change /Applications/Qt/5.4/clang_64/lib/QtGui.framework/Versions/5/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui libgid.dylib
install_name_tool -change /Applications/Qt/5.4/clang_64/lib/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore libgid.dylib
install_name_tool -change /Applications/Qt/5.4/clang_64/lib/QtNetwork.framework/Versions/5/QtNetwork @executable_path/../Frameworks/QtNetwork.framework/Versions/5/QtNetwork libgid.dylib
4 changes: 4 additions & 0 deletions libgideros/scripts/install_name_tool.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
install_name_tool -id @executable_path/../Frameworks/libgideros.dylib libgideros.dylib
install_name_tool -change libgid.1.dylib @executable_path/../Frameworks/libgid.dylib libgideros.dylib
install_name_tool -change liblua.1.dylib @executable_path/../Frameworks/liblua.dylib libgideros.dylib
install_name_tool -change libpystring.1.dylib @executable_path/../Frameworks/libpystring.dylib libgideros.dylib
3 changes: 3 additions & 0 deletions libgvfs/scripts/install_name_tool.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
install_name_tool -id @executable_path/../Frameworks/libgvfs.dylib libgvfs.dylib
install_name_tool -change /Applications/Qt/5.4/clang_64/lib/QtGui.framework/Versions/5/QtGui @executable_path/../Frameworks/QtGui.framework/Versions/5/QtGui libgvfs.dylib
install_name_tool -change /Applications/Qt/5.4/clang_64/lib/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore libgvfs.dylib
2 changes: 2 additions & 0 deletions libpystring/scripts/install_name_tool.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
install_name_tool -id @executable_path/../Frameworks/libpystring.dylib libpystring.dylib
install_name_tool -change /Applications/Qt/5.4/clang_64/lib/QtCore.framework/Versions/5/QtCore @executable_path/../Frameworks/QtCore.framework/Versions/5/QtCore libpystring.dylib
2 changes: 2 additions & 0 deletions lua/scripts/install_name_tool.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
install_name_tool -id @executable_path/../Frameworks/liblua.dylib liblua.dylib
install_name_tool -change libgvfs.1.dylib @executable_path/../Frameworks/libgvfs.dylib liblua.dylib
31 changes: 30 additions & 1 deletion player/Forms/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@
<addaction name="actionRestart"/>
<addaction name="actionOpen"/>
<addaction name="actionOpen_Directory"/>
<addaction name="separator"/>
<addaction name="actionExit"/>
</widget>
<widget class="QMenu" name="menuHardware">
Expand Down Expand Up @@ -181,6 +182,8 @@
<addaction name="actionQuarter"/>
<addaction name="actionHalf"/>
<addaction name="actionOriginal"/>
<addaction name="actionDouble"/>
<addaction name="actionTriple"/>
<addaction name="separator"/>
<addaction name="actionFit_To_Window"/>
<addaction name="actionFit_To_App"/>
Expand All @@ -197,9 +200,25 @@
</property>
<addaction name="actionSettings"/>
</widget>
<widget class="QMenu" name="menuZoom2">
<property name="title">
<string>Zoom</string>
</property>
<addaction name="actionZoom_In"/>
<addaction name="actionZoom_Out"/>
<addaction name="separator"/>
<addaction name="actionQuarter"/>
<addaction name="actionHalf"/>
<addaction name="actionOriginal"/>
<addaction name="actionDouble"/>
<addaction name="actionTriple"/>
<addaction name="separator"/>
<addaction name="actionFit_To_Window"/>
</widget>
<addaction name="menuFile"/>
<addaction name="menu_View"/>
<addaction name="menuHardware"/>
<addaction name="menuZoom2"/>
<addaction name="menuConfigurations"/>
</widget>
<action name="actionExit">
Expand Down Expand Up @@ -351,6 +370,16 @@
<string>Alt+O</string>
</property>
</action>
<action name="actionDouble">
<property name="text">
<string>200%</string>
</property>
</action>
<action name="actionTriple">
<property name="text">
<string>300%</string>
</property>
</action>
<action name="action480x800">
<property name="checkable">
<bool>true</bool>
Expand Down Expand Up @@ -433,7 +462,7 @@
</action>
<action name="actionQuarter">
<property name="text">
<string>25 %</string>
<string>25%</string>
</property>
</action>
<action name="action1536x2048">
Expand Down
1 change: 1 addition & 0 deletions player/Headers/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ class MainWindow : public QMainWindow{
void checkLoadedSettings();
void saveSettings();
void resizeWindow(int width, int height);
void fullScreenWindow(bool _fullScreen);

protected:
virtual void closeEvent(QCloseEvent*);
Expand Down
21 changes: 19 additions & 2 deletions player/Sources/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ void MainWindow::setupUiActions(){
connect(ui.actionQuarter, SIGNAL(triggered()), this, SLOT(actionScale()));
connect(ui.actionHalf, SIGNAL(triggered()), this, SLOT(actionScale()));
connect(ui.actionOriginal, SIGNAL(triggered()), this, SLOT(actionScale()));
connect(ui.actionDouble, SIGNAL(triggered()), this, SLOT(actionScale()));
connect(ui.actionTriple, SIGNAL(triggered()), this, SLOT(actionScale()));
connect(ui.actionZoom_In, SIGNAL(triggered()), this, SLOT(actionScale()));
connect(ui.actionZoom_Out, SIGNAL(triggered()), this, SLOT(actionScale()));
connect(ui.actionFit_To_Window, SIGNAL(triggered()), this, SLOT(actionScale()));
Expand Down Expand Up @@ -175,6 +177,8 @@ void MainWindow::setupUiProperties(){
ui.actionQuarter->setProperty("scale", 25);
ui.actionHalf->setProperty("scale", 50);
ui.actionOriginal->setProperty("scale", 100);
ui.actionDouble->setProperty("scale", 200);
ui.actionTriple->setProperty("scale", 300);
ui.actionZoom_In->setProperty("scale", eZoomIn);
ui.actionZoom_Out->setProperty("scale", eZoomOut);
ui.actionFit_To_Window->setProperty("scale", eFitToWindow);
Expand Down Expand Up @@ -577,9 +581,16 @@ void MainWindow::updateResolution(){

void MainWindow::updateAutoScale(){
if(autoScale()){
ui.centralWidget->setMinimumSize(1, 1);

}else{
ui.centralWidget->setMinimumSize(0, 0);

QAction *action = resolutionGroup_->checkedAction();
if(action)
action->setChecked(false);
if(action){
setWidth(action->property("width").toInt());
setHeight(action->property("height").toInt());
}
}

resolutionGroup_->setEnabled(!autoScale());
Expand Down Expand Up @@ -707,6 +718,7 @@ bool MainWindow::fullScreen(){

void MainWindow::setFullScreen(bool fullScreen){
fullScreen_ = fullScreen;
ui.actionFull_Screen->setChecked(fullScreen);
}

float MainWindow::scale(){
Expand Down Expand Up @@ -748,6 +760,11 @@ void MainWindow::resizeWindow(int width, int height){
resize(width, height);
}

void MainWindow::fullScreenWindow(bool _fullScreen){
setFullScreen(_fullScreen);
actionFull_Screen(fullScreen());
}

void MainWindow::resizeEvent(QResizeEvent*){
if(autoScale())
updateResolution();
Expand Down
1 change: 1 addition & 0 deletions player/scripts/copy-generated.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
cp -r "Gideros Player.app" ../release
5 changes: 5 additions & 0 deletions player/scripts/copy-required.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
cp ../libgid/libgid.dylib "../release/Gideros Player.app/Contents/Frameworks"
cp ../libgideros/libgideros.dylib "../release/Gideros Player.app/Contents/Frameworks"
cp ../libgvfs/libgvfs.dylib "../release/Gideros Player.app/Contents/Frameworks"
cp ../lua/liblua.dylib "../release/Gideros Player.app/Contents/Frameworks"
cp ../libpystring/libpystring.dylib "../release/Gideros Player.app/Contents/Frameworks"
2 changes: 2 additions & 0 deletions player/scripts/install_name_tool.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
install_name_tool -change libgvfs.1.dylib @executable_path/../Frameworks/libgvfs.dylib "Gideros Player.app/Contents/MacOS/Gideros Player"
install_name_tool -change libpystring.1.dylib @executable_path/../Frameworks/libpystring.dylib "Gideros Player.app/Contents/MacOS/Gideros Player"
1 change: 1 addition & 0 deletions player/scripts/macdeployqt.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
macdeployqt "Gideros Player.app"

0 comments on commit 90855d9

Please sign in to comment.