-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build on OS X #1
Comments
I don't see anything wrong. It seem as it is not listed in pkgconfig but as you checked is already there. |
Hey thanks for the answer! So following this solution, I added to Do you plan do provide an OS X build app at some point? 😄 |
There is some kind of problem with the #defines I have created in deckcard.h for the different colors used. Do you know c++ to touch a little of code? About the mac os binary question, I would like to make one but apple has put a lot of effort to make sure nobody without a mac can do it... |
Thanks that was really helpful. So I change colors definition like that: #define GREEN QColor(200,250,200)
#define LIMEGREEN QColor(50,205,50)
#define RED QColor(255,0,0)
#define YELLOW QColor(255,255,0)
#define WHITE QColor(255,255,255)
#define BLACK QColor(0,0,0)
#define BLUE QColor(0,191,255)
#define VIOLET QColor(186,85,211)
#define ORANGE QColor(255,165,0)
#define TRANSPARENT QColor(0,0,0,0)
#define CARD_SIZE QSize(218,35) And was able to build & run once I modified the So after launching the app from the build dir (and move the
I've updated the permissions on the build folder & the Thanks again! PS: Should I launch the Hearthstone app in full screen? |
Ok, great! Did You choose hero in ArenaTracker for the draft and ArenaTracker helped you through the draft with hearthArena rankings? If the answer is I chose the hero but ArenaTracker didn't help me with the drafting, then HSCards wasn't found. Try what I say in the rest of the message. That's a common error. It means the app cannot find HSCard dir that should be in the same place the executable is. But you already know this from what I have read in your comment. If you run the app from qt creator the executable is run from a build dir (different from where the sources are). You have to make sure wherever the binary is the HSCards dir have to be. Try to find the binary. Checking your first screenshot I can see your build dir where the binary will be is: Another thing to take into account: If you create a shortcut to the binary in your desktop then you will have to have an HSCards dir in your desktop too. To make things more clear HSCards have to be in the context from which the app was launched. PS: You can launch hs in fullscreen or windowed as you wish. But if you choose fullscreen you won't be able to see ArenaTracker unless you have it in another monitor. |
I tried, but each time I got the same issue with the
It's exactly what I did. I moved HSCards to the build folder and launched the My folder structure: Would it be possible to check the presence of the folder and create it if not already present? Thanks, I think we're almost there! |
I could create the dir but you should still have to move those 2 png files inside. Try adding those 4 last lines to the first function of mainwindow.cpp so it looks like the following: MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent, Qt::FramelessWindowHint|Qt::WindowStaysOnTopHint),
ui(new Ui::MainWindow)
{
QFontDatabase::addApplicationFont(":Fonts/hsFont.ttf");
ui->setupUi(this);
webUploader = NULL;//NULL indica que estamos leyendo el old log (primera lectura)
atLogFile = NULL;
isMainWindow = true;
otherWindow = NULL;
createLogFile();
readSettings();
completeUI();
initCardsJson();
createCardDownloader();
createSecretsHandler();
createDeckHandler();
createDraftHandler();
createEnemyHandHandler();
createArenaHandler();
createGameWatcher();
createLogLoader();
QFileInfo dir("./HSCards");
if(!dir.isDir()) pLog("Settings: HSCards found on " + dir.absolutePath() + " is not a directory.");
else if(dir.exists()) pLog("Settings: HSCards dir found on " + dir.absolutePath());
else pLog("Settings: HSCards dir not found on " + dir.absolutePath() + " Move the directory there.");
} I guess the code is pretty much self explanatory :) P.S: Can you post the text of log tab after running the app? |
Interesting, so I get: |
Try: QFileInfo dir("HSCards");
if(!dir.isDir()) pLog("Settings: " + dir.absoluteFilePath() + " is not a directory.");
else if(dir.exists()) pLog("Settings: HSCards dir found on " + dir.absoluteFilePath());
else pLog("Settings: HSCards dir not found on " + dir.absoluteFilePath() + " Move the directory there."); It will probably work. |
Mmm still not
Maybe the application path need to set somewhere else? |
If I create this dir on |
The context where the app is run should be the directory where the .app is. But somehow, the context is the root folder. Let me ask google and search a little. |
Try adding at the bottom: pLog("Settings: Current path: " + QDir::currentPath());
pLog("Settings: Application path: " + QCoreApplication::applicationDirPath()); There seems to be a bug with some MAC versions |
I get:
So as mentioned in the forum, the following should return the dir of the App: @QDir dir = QCoreApplication::applicationDirPath();
dir.cdUp();
dir.cdUp(); |
Yes. Well we did it XD. Before I make the proper changes, try: QDir dir = QCoreApplication::applicationDirPath();
dir.cdUp();
dir.cdUp();
dir.cdUp();
pLog("Settings: Application path: " + dir.absolutePath()); I think we need 3 cdUps to get to the dir where the binary is. I'll make the changes in the code and I will commit them. I'll tell you when is ready. Probably tomorrow. |
Yup 3 ups seems to work: PS: I just rename |
Ok, great, I'll tell you when the changes are done. |
Done. |
@supertriodo awesome it works, I was able to do an Arena draft without entering manually each card name, awesome! 😍 PR open with all changes required! |
Great, thanks for making the process easier for next mac users :) If you find something you would like to see different or think of any nice feature for the app. Share it in ArenaTracker reddit or here. Also if at some point you feel brave enough to make a static compilation in mac I'd add it to the releases. Welcome aboard! |
Anyone who successfully built on Mac cares to share the build? |
@ovidiusoft sure, you can give a try to https://dl.dropboxusercontent.com/u/5668347/ArenaTracker.zip |
I don't think that will work without making a static compiled binary with qt and opencv included. I mean you still will have to compile it after installing opencv and qt. |
I tried to rebuild from master and I got the following error: |
Strange we already solved the color macros problem... |
@supertriodo yup :-/ |
Are you sure you have the latest code? I don't see that line in arenahandler.cpp:306 |
It's the exact same line as in the first screenshot you send me: https://cloud.githubusercontent.com/assets/1322/10101329/578ae208-6398-11e5-9380-225a0f9bc12a.png It seems like you are compiling a very old version that doesn't have the MACROS of color in deckcard.h fixed |
@supertriodo correct, sorry my fork wasn't updated from this repo. Your master still works fine for me! |
Great |
Hey,
I tried to build your project on OS X (10.10.5) with QT Creator 3.5 and opencv 2.4.12 (installed with HomeBrew) but when I try to build I got this issue:
:-1: error: opencv development package not found
I added already
/usr/local/bin
in PATH on Project Build Environment and opencv is listed via pkg-config:What am I missing?
Thanks for your help!
The text was updated successfully, but these errors were encountered: