MobileRead Forums

MobileRead Forums (https://www.mobileread.com/forums/index.php)
-   Sigil (https://www.mobileread.com/forums/forumdisplay.php?f=203)
-   -   MacPort version of Sigil (https://www.mobileread.com/forums/showthread.php?t=52891)

krischik 08-06-2009 10:02 AM

MacPort version of Sigil
 
Quote:

Originally Posted by pdurrant (Post 543693)
I ought to give compiling it up under Mac OS X a go. Hopefully this weekend.

I am planning to create a MacPort for it so if you find out anything important let me know.

Martin

pdurrant 08-06-2009 10:46 AM

In what way does it need more porting to the Mac? It needs some mac-specific fixes in the metadata, but the Applicaton itself looks very Mac-like. Native controls, proper menu bar, etc.

Quote:

Originally Posted by krischik (Post 545278)
I am planning to create a MacPort for it so if you find out anything important let me know.

Martin


Valloric 08-06-2009 10:50 AM

Quote:

Originally Posted by pdurrant (Post 545354)
In what way does it need more porting to the Mac? It needs some mac-specific fixes in the metadata, but the Applicaton itself looks very Mac-like. Native controls, proper menu bar, etc.

I was just looking at his post an thinking "Is this a good thing or a bad thing?". I can't help but feel that if Sigil can be somehow improved for the Mac, I'd like it in the Sigil source tree myself. I'd certainly want someone to help me out with mac specific issues.

But if krischik wants to create a "MacPort", he can feel free to do so.

Valloric 08-06-2009 10:54 AM

Quote:

Originally Posted by pdurrant (Post 545354)
It needs some mac-specific fixes in the metadata.

The buttons are not all the same size, I know. Very irritating, isn't it? It looks fine on Windows and Linux, and I need to figure out what's causing this.

pdurrant 08-06-2009 11:02 AM

I was thinking more of creator code and document icons myself. But they are relatively unimportant in alpha versions.

Quote:

Originally Posted by Valloric (Post 545365)
The buttons are not all the same size, I know. Very irritating, isn't it? It looks fine on Windows and Linux, and I need to figure out what's causing this.


Valloric 08-06-2009 11:12 AM

Quote:

Originally Posted by pdurrant (Post 545383)
I was thinking more of creator code and document icons myself.

I'm not entirely sure what you mean by this.

pilotbob 08-06-2009 11:17 AM

Quote:

Originally Posted by pdurrant (Post 545354)
In what way does it need more porting to the Mac? It needs some mac-specific fixes in the metadata, but the Applicaton itself looks very Mac-like. Native controls, proper menu bar, etc.

I believe he is talking about MacPort a tool that retrieves, compiles and installs applications. A MacPort is a script that drives the "port" tool. I use MacPorts to install Ruby, Python, Bazzar, Mecurial, Subversion, Git, etc.

BOb

ldolse 08-06-2009 11:21 AM

If this thread has turned into Mac specific tweaks, one thing that isn't working is the 'Open With' finder menu option (probably same for configuring Sigil as default app for epub). It won't open the epub in this case.

Valloric 08-06-2009 11:27 AM

Quote:

Originally Posted by ldolse (Post 545421)
If this thread has turned into Mac specific tweaks, one thing that isn't working is the 'Open With' finder menu option (probably same for configuring Sigil as default app for epub). It won't open the epub in this case.

I've moved this to another thread.

Anyway, any mac specific issues can and should be raised. I don't have much (any) mac dev experience, or mac experience in general. For instance, I have no idea what an "Open With" finder option is. I can guess at it's function, but that's it.

You will have to provide more details.

ldolse 08-06-2009 12:35 PM

Unfortunately I don't really know the specifics of how it works either. It's equivalent to 'open with' in windows. i.e. you right click on an epub, you select 'Open with', and choose Sigil as the target. I assume the OS is passing the application that filename on launch somehow, but I don't know the specifics.

Anyway, not urgent in any way, just something I noticed that's likely Mac specific.

mtravellerh 08-06-2009 12:56 PM

Quote:

Originally Posted by ldolse (Post 545512)
Unfortunately I don't really know the specifics of how it works either. It's equivalent to 'open with' in windows. i.e. you right click on an epub, you select 'Open with', and choose Sigil as the target. I assume the OS is passing the application that filename on launch somehow, but I don't know the specifics.

Anyway, not urgent in any way, just something I noticed that's likely Mac specific.

Doesn't work on Win either. The command just calls up nthe software without opening the file. You have to do that manually! No big deal. I didn't even make an issue with it yet.

pdurrant 08-06-2009 01:38 PM

Quote:

Originally Posted by Valloric (Post 545406)
I'm not entirely sure what you mean by this.

Mac applications almost all have a 32-bit 'creator code' that identifies the Application to the OS in various ways. Not essential, but usual.

They also contain resources that link documents to the application, indicating that they can open the document and, if unique to the application, providing icons for the documents. Most of this happen in the Info.plist inside the application package Contents folder.

When I get Sigil compiling nicely on my Mac (i.e. when I have some hours to spend, perhaps this weekend), I'll see what I can do in terms of the metadata in the Info.plist. Icon design isn't my string point though. I can do one, but it won't be pretty!

pdurrant 08-06-2009 01:39 PM

Oooh - that makes more sense. Sorry for being obtuse.

Paul

Quote:

Originally Posted by pilotbob (Post 545415)
I believe he is talking about MacPort a tool that retrieves, compiles and installs applications. A MacPort is a script that drives the "port" tool. I use MacPorts to install Ruby, Python, Bazzar, Mecurial, Subversion, Git, etc.


Valloric 08-06-2009 01:43 PM

Quote:

Originally Posted by ldolse (Post 545512)
Unfortunately I don't really know the specifics of how it works either. It's equivalent to 'open with' in windows. i.e. you right click on an epub, you select 'Open with', and choose Sigil as the target. I assume the OS is passing the application that filename on launch somehow, but I don't know the specifics.

Anyway, not urgent in any way, just something I noticed that's likely Mac specific.

Quote:

Originally Posted by mtravellerh (Post 545540)
Doesn't work on Win either. The command just calls up nthe software without opening the file. You have to do that manually! No big deal. I didn't even make an issue with it yet.

Now I know what this is. Sigil doesn't take a file as an argument. I'll try to fix this for 0.1.2.

Valloric 08-06-2009 01:46 PM

Quote:

Originally Posted by pdurrant (Post 545610)
Mac applications almost all have a 32-bit 'creator code' that identifies the Application to the OS in various ways. Not essential, but usual.

They also contain resources that link documents to the application, indicating that they can open the document and, if unique to the application, providing icons for the documents. Most of this happen in the Info.plist inside the application package Contents folder.

When I get Sigil compiling nicely on my Mac (i.e. when I have some hours to spend, perhaps this weekend), I'll see what I can do in terms of the metadata in the Info.plist. Icon design isn't my string point though. I can do one, but it won't be pretty!

Please do. Any help on this front would be greatly appreciated. Adding information to the Info.plist is possible through CMake. You'll just have to tell me what to add and I'll find a way to add it.

The icons are not a problem: look into the Sigil app on Mac, there is a Sigil.icns file.

curtw 08-06-2009 02:28 PM

As a user, my big request would be to make this a Universal binary. I don't know if there's a specific reason that the original isn't Universal, but G5-and-earlier machines still make up a large portion of the Mac installed base. Universal and 10.4.11 compatibility would make it so *I* could use the program.

Valloric 08-06-2009 02:47 PM

Quote:

Originally Posted by curtw (Post 545661)
As a user, my big request would be to make this a Universal binary. I don't know if there's a specific reason that the original isn't Universal, but G5-and-earlier machines still make up a large portion of the Mac installed base. Universal and 10.4.11 compatibility would make it so *I* could use the program.

Now that Sigil is using the new build system, providing universal binaries should be fairly straightforward. You should see this in 0.1.2.

curtw 08-06-2009 04:04 PM

Quote:

Originally Posted by Valloric (Post 545690)
Now that Sigil is using the new build system, providing universal binaries should be fairly straightforward. You should see this in 0.1.2.

Hooray! thanks!

krischik 08-07-2009 02:58 AM

Distribution
 
Quote:

Originally Posted by pdurrant (Post 545354)
In what way does it need more porting to the Mac? It needs some mac-specific fixes in the metadata, but the Applicaton itself looks very Mac-like. Native controls, proper menu bar, etc.

I thought everybody knows about MacPorts - Macports is a distribution for Mac. MacPorts already distributes QT - so a MacPorts distribution of Sigil would not need to bundle the QT libraries.

Martin

krischik 08-07-2009 03:03 AM

DIY
 
Quote:

Originally Posted by curtw (Post 545661)
As a user, my big request would be to make this a Universal binary. I don't know if there's a specific reason that the original isn't Universal, but G5-and-earlier machines still make up a large portion of the Mac installed base. Universal and 10.4.11 compatibility would make it so *I* could use the program.

MacPorts would sort that out as well as you would compile your own version for the CPU and Operating System you use.

Martin

krischik 08-10-2009 09:33 AM

Hi,

For MacPorts I need a short and long descriptions for tidylib and ZipArchive. That's because I need to make three different ports :-( .

Martin

krischik 08-10-2009 09:59 AM

Hi,

I am currently blocked - anybody with cmake experience who can help me?

Martin

krischik 08-10-2009 11:05 AM

Done!
 
Hi,

I did get around all the problems after all and Sigil is now available for MacPorts compatible systems.

In the end I needed three portfiles: libtidylib, libziparchive and Sigil.

Of course you only have to install the last one - MacPorts takes care of dependencies itself.

See the MacPorts Homepage for instructions on how to install MacPorts.

Martin

Valloric 08-10-2009 11:06 AM

Quote:

Originally Posted by krischik (Post 549251)
For MacPorts I need a short and long descriptions for tidylib and ZipArchive. That's because I need to make three different ports :-(

Please don't separate ZipArchive and tidyLib from Sigil. These are not the upstream versions and should not be present on user's systems. They are only statically linked in to the main Sigil application.

I cannot provide you with descriptions for these libraries since I didn't write them, I only modified them.

I must say I cannot support the development of a MacPorts version, or its build system. The only build system supported is the provided CMake version. Anything beyond that, and I'm sorry to say but you are on your own.

krischik 08-10-2009 11:27 AM

I do use cmake.
 
Quote:

Originally Posted by Valloric (Post 549355)
Please don't separate ZipArchive and tidyLib from Sigil. These are not the upstream versions and should not be present on user's systems. They are only statically linked in to the main Sigil application.

It would be nice to have clear instructions on how to do that - as the sigil make not find the other libs. If the Wiki is wrong - better delete it because once I found the Wiki i stopped looking for other instructions.

Quote:

Originally Posted by Valloric (Post 549355)
I must say I cannot support the development of a MacPorts version, or its build system. The only build system supported is the provided CMake version. Anything beyond that, and I'm sorry to say but you are on your own.

MacPorts does not use it's own build system - MacPorts calls the build system provided by the developer and in the case Sigil that is cmake.

Martin

Valloric 08-10-2009 11:31 AM

Quote:

Originally Posted by krischik (Post 549352)
In the end I needed three portfiles: libtidylib, libziparchive and Sigil.

This is a very, very bad idea. What happens when someone uses those two libraries for something other than Sigil? And it breaks because of the changes made to them?

These libraries were never meant to be available on a system level. There will come a time when this will cause great harm to certain users.

Valloric 08-10-2009 11:33 AM

Quote:

Originally Posted by krischik (Post 549370)
It would be nice to have clear instructions on how to do that - as the sigil make not find the other libs. If the Wiki is wrong - better delete it because once I found the Wiki i stopped looking for other instructions.

The wiki instruction are for Linux systems, and they are very clearly labeled as such. They are not general build instructions.

You can find those in the INSTALL.txt file in the repository.

Valloric 08-10-2009 11:37 AM

Quote:

Originally Posted by krischik (Post 549370)
MacPorts does not use it's own build system - MacPorts calls the build system provided by the developer and in the case Sigil that is cmake.

But I'm guessing you used the separate CMakeLists.txt files in each of the subdirectories, which you are not supposed to do.They are only meant to be loaded from the root dir CMakeLists.txt file that will descend to the subfolders and initiate specific builds.

You should learn CMake or follow the (correct) instructions more closely.

krischik 08-10-2009 12:02 PM

Which instructions?
 
Hello,

Don't be upset about my mistakes. See them as a change to learn and improve documentation. I add a few ;) so you know I am not all that serious.

Quote:

Originally Posted by Valloric (Post 549375)
This is a very, very bad idea. What happens when someone uses those two libraries for something other than Sigil? And it breaks because of the changes made to them?

Fine, I guess I have to remove them again :( .

Quote:

Originally Posted by Valloric (Post 549378)
You can find those in the INSTALL.txt file in the repository.

which INSTALL.txt ;) ?

Code:

/Volumes/Work/macports/editors/sigil/work/Sigil_code_0.1.1  Darwin  martin@macpro  Mo Aug 10 16:44:11  standart  0
>gfind . -iname INSTALL.txt
/Volumes/Work/macports/editors/sigil/work/Sigil_code_0.1.1  Darwin  martin@macpro  Mo Aug 10 16:44:33  standart  0
>

Note that as a maintainer I only use the official release :) .

Quote:

Originally Posted by Valloric (Post 549381)
But I'm guessing you used the separate CMakeLists.txt files in each of the subdirectories, which you are not supposed to do.They are only meant to be loaded from the root dir CMakeLists.txt file that will descend to the subfolders and initiate specific builds.

Ahh, I see you mean that one ;):

Code:

/Volumes/Work/macports/editors/sigil/work/Sigil_code_0.1.1  Darwin  martin@macpro  Mo Aug 10 16:49:47  standart  0
>ls -la
insgesamt 48
drwxr-xr-x 7 root admin  238  6. Aug 02:56 .
drwxr-xr-x 5 root admin  170 10. Aug 16:42 ..
-rw-r--r-- 1 root admin  773  5. Aug 02:18 .hgignore
-rw-r--r-- 1 root admin  619  5. Aug 02:18 CMakeLists.txt
-rw-r--r-- 1 root admin 35821  5. Aug 02:18 COPYING.txt
-rw-r--r-- 1 root admin  1070  6. Aug 02:54 ChangeLog.txt
drwxr-xr-x 5 root admin  170  6. Aug 02:56 src
/Volumes/Work/macports/editors/sigil/work/Sigil_code_0.1.1  Darwin  martin@macpro  Mo Aug 10 16:49:54  standart  0
>

I have to say .txt is a great extension for a build file. You easily spot when close to COPYING.txt and ChangeLog.txt. ;) . One would never think it is just another piece of documentation ;) .

Now, again please don't be upset - I now it's your fault. The cmake guys should have known better then use .txt for a build script.

So I messed it up and I have to do it again :smack:.

Martin

Valloric 08-10-2009 12:05 PM

Quote:

Originally Posted by krischik (Post 549406)
I have to say .txt is a great extension for a build file. You easily spot when close to COPYING.txt and ChangeLog.txt. ;) . One would never think it is just another piece of documentation ;) .

Now, again please don't be upset - I now it's your fault. The cmake guys should have known better then use .txt for a build script.

Your second paragraph answers your first one: CMakeLists.txt is the name mandated by the CMake build tool. It's not something I can change.

Then again, having "CMake" as part of the name should make anyone at least curious enough to open it if they're using the CMake build system.

krischik 08-10-2009 12:40 PM

Improved!
 
Hello,

I implemented Vallorics suggestions for improvement ;) It works a lot better now :) - All I need now is someone to try the build.

Martin

krischik 08-16-2009 04:38 AM

Sigil 0.1.2 has been released for MacPorts. It's only 1.6M in size as opposed to 28.3M for the DMG version.

Have fun

Martin

Valloric 09-03-2009 04:35 PM

I see you're listing Sigil as x86_64 compatible for the MacPorts version. I'm not sure that will work out-of-the-box. See this page for details.

Basically, to work on x86_64, Qt needs to be compiled against Cocoa, not Carbon. I'm not sure the Qt version on MacPorts supports this. Have you tested this?

EDIT: The 32 bit Carbon version of Sigil should of course work without problems on x86_64 Macs.

krischik 09-03-2009 04:55 PM

Quote:

Originally Posted by Valloric (Post 579243)
Basically, to work on x86_64, Qt needs to be compiled against Cocoa, not Carbon. I'm not sure the Qt version on MacPorts supports this. Have you tested this?

Nope - I Qt itself does not compile - but that is not my task. The guys at MacPorts currently suggest to compile everything universal as well as quite a lot off stuff needs 32bit.

Unless you are into experimental stuff one should stay with 32bit for another month or so.

Martin


All times are GMT -4. The time now is 10:25 PM.

Powered by: vBulletin
Copyright ©2000 - 3.8.5, Jelsoft Enterprises Ltd.
MobileRead.com is a privately owned, operated and funded community.