summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrandomguy3 <randomguy3@7c02a99a-9b00-45e3-bf44-6f3dd7fddb64>2012-01-08 17:37:03 +0000
committerrandomguy3 <randomguy3@7c02a99a-9b00-45e3-bf44-6f3dd7fddb64>2012-01-08 17:37:03 +0000
commite9b614e436b5720c1b2c51a07c5c063197cbf1e1 (patch)
treec941e6ad7e36ea4b155945c3f2e86290d4882997
parent04c737bcffd1ed1f16b33c2a4199497c881c8502 (diff)
Fix app icon and directory creation on Windows
git-svn-id: https://tikzit.svn.sourceforge.net/svnroot/tikzit/trunk@359 7c02a99a-9b00-45e3-bf44-6f3dd7fddb64
-rw-r--r--Makefile.am6
-rw-r--r--configure.ac20
-rw-r--r--src/Makefile.am7
-rw-r--r--src/common/Shape.m3
-rw-r--r--src/linux/MainWindow.m2
-rw-r--r--src/tikzit.rc24
-rw-r--r--tikzit.icobin0 -> 34494 bytes
7 files changed, 58 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am
index d8fca7e..194e716 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -6,5 +6,9 @@ nobase_dist_app_DATA = \
select-rectangular.png \
transform-crop-and-resize.png \
transform-move.png \
- tikzit48x48.png \
shapes/*.tikz
+
+if WINDOWS
+else
+nobase_dist_app_DATA += tikzit48x48.png
+endif
diff --git a/configure.ac b/configure.ac
index eba5901..c00c749 100644
--- a/configure.ac
+++ b/configure.ac
@@ -97,4 +97,24 @@ TZ_OBJC2_FEATURES
AS_IF([test "x$tz_cv_objc_properties$tz_cv_objc_fast_enumeration$tz_cv_objc_optional_keyword" != "xyesyesyes"],
[AC_MSG_ERROR([Your Objective C compiler does not support the required Objective C 2 features])])
+dnl ----------------------------------------------------------------------------
+dnl
+dnl platform-specific stuff.
+
+AC_CANONICAL_HOST
+have_msw="no"
+case $host_os in
+
+ *mingw32*)
+ have_msw="yes"
+ OBJCFLAGS="$OBJCFLAGS -mwindows"
+ AC_SUBST([WINDOWS])
+ AC_SUBST([WIN32])
+ AC_SUBST([_WIN32])
+ ;;
+
+esac
+
+AM_CONDITIONAL([WINDOWS],[test "x$have_msw" = "xyes"])
+
AC_OUTPUT
diff --git a/src/Makefile.am b/src/Makefile.am
index 117bedf..d2d558f 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -87,6 +87,13 @@ tikzit_SOURCES += \
linux/PreviewWindow.m
endif
+if WINDOWS
+tikzit.res: tikzit.rc
+ $(AM_V_GEN)windres $^ -O coff -o $@
+
+tikzit_LDADD = tikzit.res
+endif
+
common/tikzlexer.m: common/tikzlexer.lm
$(AM_V_GEN)$(LEX) -o $@ $^
diff --git a/src/common/Shape.m b/src/common/Shape.m
index 8fdfe8b..8714031 100644
--- a/src/common/Shape.m
+++ b/src/common/Shape.m
@@ -85,7 +85,6 @@ NSDictionary *shapeDictionary = nil;
for (NSString *f in files) {
if ([f hasSuffix:@".tikz"]) {
nm = [f substringToIndex:[f length]-5];
- NSLog(@"found: %@", nm);
TikzShape *sh =
[[TikzShape alloc] initWithTikzFile:
[shapeDir stringByAppendingPathComponent:f]];
@@ -95,8 +94,6 @@ NSDictionary *shapeDictionary = nil;
}
}
}
- } else {
- NSLog(@"shape directory \"%@\" not found", shapeDir);
}
}
diff --git a/src/linux/MainWindow.m b/src/linux/MainWindow.m
index c68c9e8..6ef8837 100644
--- a/src/linux/MainWindow.m
+++ b/src/linux/MainWindow.m
@@ -567,11 +567,13 @@ static void update_paste_action (GtkClipboard *clipboard, GdkEvent *event, GtkAc
g_object_ref_sink (mainWindow);
gtk_window_set_title (mainWindow, "TikZiT");
gtk_window_set_default_size (mainWindow, 700, 400);
+#ifndef WINDOWS
GdkPixbuf *icon = gdk_pixbuf_new_from_file (TIKZITSHAREDIR "/tikzit48x48.png", NULL);
if (icon) {
gtk_window_set_icon (mainWindow, icon);
g_object_unref (icon);
}
+#endif
GtkBox *mainLayout = GTK_BOX (gtk_vbox_new (FALSE, 0));
gtk_widget_show (GTK_WIDGET (mainLayout));
diff --git a/src/tikzit.rc b/src/tikzit.rc
new file mode 100644
index 0000000..072f825
--- /dev/null
+++ b/src/tikzit.rc
@@ -0,0 +1,24 @@
+1 VERSIONINFO
+FILEVERSION 0,7,0,0
+PRODUCTVERSION 0,7,0,0
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "080904E4"
+ BEGIN
+ VALUE "FileDescription", "A graph editor for LaTeX"
+ VALUE "FileVersion", "1.0"
+ VALUE "InternalName", "tikzit"
+ VALUE "LegalCopyright", "Aleks Kissinger, Alex Merry, Chris Heunen"
+ VALUE "OriginalFilename", "tikzit.exe"
+ VALUE "ProductName", "TikZiT"
+ VALUE "ProductVersion", "0.7"
+ END
+ END
+
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x809, 1252
+ END
+END
+id ICON "../tikzit.ico"
diff --git a/tikzit.ico b/tikzit.ico
new file mode 100644
index 0000000..3132b4c
--- /dev/null
+++ b/tikzit.ico
Binary files differ