Commit e2fdbba4 authored by 魔大农's avatar 魔大农 🍀

Working on instrall script

parent c67dd902
......@@ -37,3 +37,32 @@ HEADERS += \
piece.h \
master.h \
effectmaster.h
unix {
isEmpty(PREFIX) {
PREFIX = /usr/local
}
isEmpty(BINDIR) {
BINDIR = $$PREFIX/bin
}
isEmpty(DATADIR) {
DATADIR = $$PREFIX/share
}
DEFINES += DATADIR=\\\"$${DATADIR}/quatter\\\"
target.path = $$BINDIR
pixmap.files = resources/linux/icons/marklar.xpm
pixmap.path = $$DATADIR/pixmaps
icon.files = resources/linux/icons/hicolor/*
icon.path = $$DATADIR/icons/hicolor
desktop.files = resources/linux/marklar.desktop
desktop.path = $$DATADIR/applications/
appdata.files = Resources/*
appdata.path = $$DATADIR/quatter/
INSTALLS += target icon pixmap desktop appdata
}
This diff is collapsed.
......@@ -518,7 +518,6 @@ void InputMaster::ActionButtonPressed()
Piece* selectedPiece{MC->GetSelectedPiece()};
if (selectedPiece){
selectedPiece->Pick();
BOARD->SelectNearestFreeSquare();
} else if (MC->selectionMode_ == SM_STEP || MC->selectionMode_ == SM_YAD){
......@@ -527,7 +526,7 @@ void InputMaster::ActionButtonPressed()
} else if (MC->selectionMode_ == SM_CAMERA){
MC->CameraSelectPiece();
}
} else if (MC->InPutState() ){
} else if (MC->InPutState() && MC->GetPickedPiece()){
BOARD->PutPiece(MC->GetPickedPiece());
}
}
......
......@@ -54,14 +54,24 @@ void MasterControl::Setup()
{
SetRandomSeed(TIME->GetSystemTime());
FileSystem* fs{GetSubsystem<FileSystem>()};
String resourcePath{"/usr/local/share/quatter"};
if (!fs->DirExists(resourcePath)){
resourcePath = "Resources";
}
if (fs->DirExists(resourcePath))
engineParameters_["ResourcePaths"] = resourcePath;
Log::Write(1, resourcePath);
engineParameters_["WindowTitle"] = "Quatter";
engineParameters_["LogName"] = GetSubsystem<FileSystem>()->GetAppPreferencesDir("urho3d", "logs")+"Quatter.log";
engineParameters_["ResourcePaths"] = "Resources";
engineParameters_["LogName"] = fs->GetAppPreferencesDir("urho3d", "logs")+"Quatter.log";
engineParameters_["WindowIcon"] = "icon.png";
// engineParameters_["FullScreen"] = false;
// engineParameters_["WindowWidth"] = 800;
// engineParameters_["WindowHeight"] = 600;
// engineParameters_["FullScreen"] = false;
// engineParameters_["WindowWidth"] = 800;
// engineParameters_["WindowHeight"] = 600;
// engineParameters_["borderless"] = true;
}
void MasterControl::Start()
{
......
......@@ -62,7 +62,7 @@ public:
void SetDistance(float distance) { aimDistance_ = Clamp(distance, ZOOM_MIN, ZOOM_MAX); }
float GetDistance() const { return distance_; }
void Zoom(float delta);
void ZoomToBoard() { SetDistance(7.0f); }
void ZoomToBoard() { SetDistance(6.0f); }
void ZoomToTable() { SetDistance(13.0f); }
private:
......
sudo apt-get install libx11-dev libxrandr-dev libasound2-dev git cmake make qmake
cd `dirname $0`
if [ ! -d Urho3D ]
then
git clone https://github.com/Urho3D/Urho3D
fi
cd Urho3D
cmake .
make
cd ..
qmake Quatter.pro
sudo make uninstall
sudo make install
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment