Author Topic: InnoSetup Plugin  (Read 24822 times)

Offline ZinnJonas

  • Multiple posting newcomer
  • *
  • Posts: 23
InnoSetup Plugin
« on: September 21, 2010, 04:45:33 pm »
Hey all,

I'm currently writing a new plug-in for CodeBlocks for the Inno Setup Installer
http://www.jrsoftware.org/isdl.php

All you need to have is the normal/unicode version of InnoSetup.

In the Global variable set the base to the install Folder thats all.

then you should be able to let the plug-in run.

At the moment i have written the lexers High-light, and the lexer sample
(maybe not the best ;>)

if you are in your active Project you can add the *.iss File
with New->Inno Setup.

Then nearly the normal Inno Setup wizard will show up.
There you can configure the file, but not all possible settings.

So if there is someone who can help me writing an more complex Wizard, (maybe one, which looks nicer)

This is the link to the Plug-in
https://sourceforge.net/projects/wxledplugin/files/Inno%20Setup/InnoSetup.zip/download

Some little change:
like " " in the Compiler path.

Br
Jonas
« Last Edit: October 17, 2010, 10:31:30 pm by ZinnJonas »

Offline Cryogen

  • Regular
  • ***
  • Posts: 260
Re: InnoSetup Plugin
« Reply #1 on: September 22, 2010, 05:10:43 am »

 Sounds like a nice idea. Cool.


Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: InnoSetup Plugin
« Reply #2 on: September 23, 2010, 07:51:15 am »
Sounds like a nice idea. Cool.
Dito. :-)

However, do you think you could use SVN for the sources? This would ,make it easier to track / grab.
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline ZinnJonas

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: InnoSetup Plugin
« Reply #3 on: September 23, 2010, 01:10:50 pm »
I've added SVN support:

Code
svn co https://wxledplugin.svn.sourceforge.net/svnroot/wxledplugin/trunk/Inno Setup

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: InnoSetup Plugin
« Reply #4 on: September 23, 2010, 05:34:24 pm »
Code
svn co https://wxledplugin.svn.sourceforge.net/svnroot/wxledplugin/trunk/Inno Setup
Argh! Spaces in an URL? That's invalid! I guess less people will be able to access that. Can you rename this module to have no spaces, please?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline ZinnJonas

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: InnoSetup Plugin
« Reply #5 on: September 24, 2010, 02:59:32 pm »
ooops

the new path is:
Code
https://wxledplugin.svn.sourceforge.net/svnroot/wxledplugin/trunk/InnoSetup

Offline ZinnJonas

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: InnoSetup Plugin
« Reply #6 on: October 01, 2010, 03:37:42 pm »
Hi,

I've done the next svn.

there are some small fixes,:
-now you can create an empty File.
-The File will be opened at the end of the creation
-You will be prompt, to overwrite an existing File

some stuff like this

Is there someone, who can help me with a complex Wizard, because I'm not an expert, which Inno Setup
So I don't know every useful setting for an installer.

I've only written some small one with some settings, which wasn't set by the simple Wizard ;D

Br
Jonas
« Last Edit: October 01, 2010, 03:54:13 pm by ZinnJonas »

Offline gour

  • Single posting newcomer
  • *
  • Posts: 3
Re: InnoSetup Plugin
« Reply #7 on: October 11, 2010, 02:37:14 pm »
Hey all,

I'm currently writing a new plug-in for CodeBlocks for the Inno Setup Installer

Thanks a lot for it...

We plan to use CodeBlocks as IDE for upcoming open-source project written in D and few days ago I was considering whether to use CMake or Waf build-system...We'have decided to use Waf despite of the fact that CMake has support to create NSIS installers.

However, it's great to see that there is possibility to get Win installer via CB.  8)

Offline ZinnJonas

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: InnoSetup Plugin
« Reply #8 on: May 04, 2015, 12:55:13 pm »
Hey,

i reactivated the project. It is now placed on github:
https://github.com/zinnjonas/cbInno

what happend:
- changed the name to cbInno
- instead of global variable there is now a settings page
- instead of compiling after a successful build will a inno run follow, there is now a "build" in the context menu of .iss files.
- added a log window ( with icon)

Some small change will follow in the next days i guess.

best regards,
zinnjonas

Offline ZinnJonas

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: InnoSetup Plugin
« Reply #9 on: August 18, 2015, 01:33:00 pm »
Hey,

currently i had some time to play around with inno again.
I think i will improve the plugin in the following days.
But more important is that i created two inno files for the codeblocks version i use.

Both of the inno files are attached here.

So to use my codeblocks with all the plugins i use currently just use one of the installer generated and uploaded to FileStore.to.

The first one is bundled installer containing a few other installer containing usefull tools for cpp programming.
The second one is codeblocks with plugins only.

That installer and inno are windows tools i guess this plugin won't made it into the contrib. plugins.

CodeBlocks with a few other installer:
http://filestore.to/?d=J0YYVRMJ8B

CodeBlocks with a few Plugins:
http://filestore.to/?d=HBMJNASD5X

currently hosted on filestore.to does anyone knows a better place for them? And should i make installer for the nightly build for windows ? Are there some interested in that ?

To get the versions number correct out of the svn build i modified the autorevisions tool a little bit:
So here is my diff to the Windows cbp and autorevisionstool:
Code
Index: CodeBlocks.cbp
===================================================================
--- CodeBlocks.cbp (Revision 10406)
+++ CodeBlocks.cbp (Arbeitskopie)
@@ -168,7 +168,8 @@
  <Add directory="sdk/propgrid" />
  </Linker>
  <ExtraCommands>
- <Add before="build_tools\autorevision\autorevision +wx +int +t . include/autorevision.h" />
+ <Add before="build_tools\autorevision\autorevision +def +wx +int +t . include/autorevision.h" />
+ <Add before="build_tools\autorevision\autorevision +def . include/autorevision_setup.h" />
  <Add after="cmd /c if not exist devel\share\CodeBlocks mkdir devel\share\CodeBlocks" />
  <Add after="zip -jq9 devel\share\CodeBlocks\manager_resources.zip sdk\resources\*.xrc" />
  <Add after='cmd /c &quot;cd sdk\resources &amp; zip -0 -q ..\..\devel\share\CodeBlocks\manager_resources.zip images\*.png images\12x12\*.png images\16x16\*.png&quot;' />
@@ -756,6 +757,9 @@
  <Unit filename="build_tools/autorevision/autorevision.cpp">
  <Option target="AutoRevision" />
  </Unit>
+ <Unit filename="codeblocks.iss">
+ <Option target="sdk" />
+ </Unit>
  <Unit filename="include/annoyingdialog.h">
  <Option target="sdk" />
  </Unit>
Index: build_tools/autorevision/autorevision.cpp
===================================================================
--- build_tools/autorevision/autorevision.cpp (Revision 10406)
+++ build_tools/autorevision/autorevision.cpp (Arbeitskopie)
@@ -43,6 +43,7 @@
 bool do_int = false;
 bool do_std = false;
 bool do_wx  = false;
+bool do_def = false;
 bool do_translate  = false;
 bool be_verbose  = false;
 
@@ -54,7 +55,9 @@
 
     for(int i = 1; i < argc; ++i)
     {
-        if(strcmp("+int", argv[i]) == 0)
+        if( strcmp("+def", argv[i]) == 0)
+            do_def = true;
+        else if(strcmp("+int", argv[i]) == 0)
             do_int = true;
         else if(strcmp("+std", argv[i]) == 0)
             do_std = true;
@@ -76,6 +79,7 @@
     {
         puts("Usage: autorevision [options] directory [autorevision.h]");
         puts("Options:");
+        puts("         +def assign define");
         puts("         +int assign const unsigned int");
         puts("         +std assign const std::string");
         puts("         +wx  assing const wxString");
@@ -250,7 +254,6 @@
         in.close();
     }
 
-
     FILE *header = fopen(outputFile.c_str(), "wb");
     if(!header)
     {
@@ -257,12 +260,17 @@
         puts("Error: Could not open output file.");
         return false;
     }
-
-    fprintf(header, "%s\n", comment.c_str());
-    fprintf(header, "//don't include this header, only configmanager-revision.cpp should do this.\n");
+    if(!do_def)
+    {
+        fprintf(header, "%s\n", comment.c_str());
+        fprintf(header, "//don't include this header, only configmanager-revision.cpp should do this.\n");
+    }
     fprintf(header, "#ifndef AUTOREVISION_H\n");
     fprintf(header, "#define AUTOREVISION_H\n\n\n");
 
+    if(do_def)
+        fprintf(header, "#define SVN_REVISION %s\n", revision.c_str());
+
     if(do_std)
         fprintf(header, "#include <string>\n");
     if(do_wx)

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7576
    • My Best Post
Re: InnoSetup Plugin
« Reply #10 on: August 18, 2015, 05:52:50 pm »
@ZinnJonas:

I am planning to build an Code::Blocks using the wxWidgets 3.0 binaries for windows;
is it okay for me to use your iss files as a starting point for my work?

Tim S.
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: InnoSetup Plugin
« Reply #11 on: August 18, 2015, 06:02:25 pm »
Both of you: Why don't you just use NSIS (the official installer for C::B) as a starting point? All required sources are in SVN, you just need to adopt the NSIS file (and NSIS, of course).
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline stahta01

  • Lives here!
  • ****
  • Posts: 7576
    • My Best Post
Re: InnoSetup Plugin
« Reply #12 on: August 18, 2015, 06:48:35 pm »
Both of you: Why don't you just use NSIS (the official installer for C::B) as a starting point? All required sources are in SVN, you just need to adopt the NSIS file (and NSIS, of course).

After I get the installer working the way I want it to work with InnoSetup; I plan to try doing the same with NSIS.

The only installer program I have ever used is InnoSetup; so, I think I will get were I want faster with that.
And, I hope to refresh my knowledge of InnoSetup; so, I feel comfortable enough to put it on my resume.
(Also, want to have NSIS on my resume)

Tim S.
« Last Edit: August 18, 2015, 06:50:18 pm by stahta01 »
C Programmer working to learn more about C++ and Git.
On Windows 7 64 bit and Windows 10 64 bit.
--
When in doubt, read the CB WiKi FAQ. http://wiki.codeblocks.org

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9694
Re: InnoSetup Plugin
« Reply #13 on: August 19, 2015, 04:17:31 pm »
BTW: This plugin would be a candidate to me to be included into the C::B repo via "SVN external".

However, I would like to see the patch applied that I've attached:
- it adds wx30/wx 64 bit project files with relative path's (required if placed into the "contrib" plugin section in SVN)
- eliminate a lot of compiler warnings
- there are some ToDo's I've added with respect to style (ie. local variables named the same as the class)

Would that be fine with you?
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline ZinnJonas

  • Multiple posting newcomer
  • *
  • Posts: 23
Re: InnoSetup Plugin
« Reply #14 on: September 06, 2015, 06:37:18 pm »
The patch was applied.
 
The current look of the inno editor inside of Code::Blocks.




But there are a lot of todos left

  • Reopen editor after close
  • Limit autocorrect
  • Update file /save/reload
  • Add buttons to add/change/delete items
  • Add new items into the file by clicking buttons
  • Add editor to edit pascal code inside the editor itself
« Last Edit: September 06, 2015, 09:44:41 pm by ZinnJonas »